Bernstein resolvent activation
Implementation & benchmark of arXiv:2607.05538 — Riccati Reductions for Modified Bessel Ratios: Bernstein Positivity, Exact Certificates, and Transfer Obstructions
Source paper: Riccati Reductions for Modified Bessel Ratios: Bernstein Positivity, Exact Certificates, and Transfer Obstructions arXiv:2607.05538 ⓘ · analyzed Aug 30, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace an unconstrained scalar activation or nonnegative gate with a finite positive mixture of rational Bernstein basis functions. The learned function is monotone and concave on the nonnegative half-line, while its derivatives have controlled alternating signs; this can prevent pathological feature amplification and gives an interpretable shape prior. Use the paper's sharp exponent restriction τ≤1/2 rather than treating the power as an arbitrary hyperparameter.
Formulas
Mathematical statement
For ν>-1, define W_ν(z)=z I_ν(z)/I_{ν+1}(z), where I_ν is the modified Bessel function and j_{ν+1,n}>0 are the positive zeros of the ordinary Bessel function J_{ν+1}. The paper derives W_ν(√s)=2(ν+1)+2∑_{n≥1}s/(s+j_{ν+1,n}²). Each pole λ_n=j_{ν+1,n}² is positive and each coefficient is positive. A Bernstein function is nonnegative with a completely monotone derivative; equivalently, its derivative has alternating signs, so it is increasing and concave. The paper proves that x↦W_ν(x^τ) is Bernstein for ν>-1 and 0<τ≤1/2, and that this exponent interval is sharp. The implementable finite analogue replaces the infinite Bessel pole set by λ_k>0 and c_k≥0: φ(x)=b+a x^τ+∑_{k=1}^K c_k x^τ/(x^τ+λ_k), x≥0, with a,c_k≥0. Its derivative is φ'(x)=aτx^{τ-1}+∑_k c_k τλ_k x^{τ-1}/(x^τ+λ_k)^2≥0; the rational terms are increasing and concave in s=x^τ, and τ≤1/2 supplies the paper's certified Bernstein composition regime. Use ε+x in code to avoid a singular derivative at zero.
Implementation notes
(1) Integration point: implement this as a drop-in replacement for GELU or SiLU in an MLP block, but apply it to nonnegative features after RMSNorm plus ReLU, or use it as a positive gate multiplying a residual branch. For signed activations, use the odd extension sign(x)φ(|x|), and compare it separately because the Bernstein guarantee itself is only on x≥0. (2) Pseudocode: initialize fixed log-spaced poles λ_k=exp(linspace(log λ_min, log λ_max, K)); store unconstrained parameters u_a,u_c,u_λ and map them with softplus: a=softplus(u_a), c_k=softplus(u_c[k]), λ_k=softplus(u_λ[k])+λ_floor. Set y=epsilon+relu(h), s=y**tau with tau either fixed to 0.5 or learned through tau=0.5*sigmoid(u_tau). Return b+a*s+sum(c_k*s/(s+λ_k)). Backpropagate normally. Optionally normalize the output by dividing by the value of φ at a calibration quantile of the input so its scale matches the baseline activation. (3) Computed from the paper's mathematics: positivity of coefficients, positive poles, and the certified τ≤1/2 range. Estimated empirically: K, pole range, epsilon, output normalization, and whether the monotone-concave prior helps the task. Numerically verify monotonicity on a dense grid and estimate derivative signs with automatic differentiation. (4) First experiment: train a 4-layer CIFAR-10 MLP or small ViT MLP block with identical parameter count using GELU, Softplus, and the resolvent activation for K∈{4,8,16}. Compare training stability, gradient-norm variance, calibration, and test accuracy at equal FLOPs. A successful result is fewer exploding or vanishing-gradient events and equal-or-better validation accuracy, or faster loss descent at equal optimizer steps. Then ablate τ=0.75 versus τ=0.5 to test whether violating the paper's sharp range causes worse derivative behavior or optimization instability.
Verification
Stage 1 · Toy mechanism gate: Failed ✗
Stage 2 · Mechanism transferred to benchmark: Not tested
Stage 2 · Practical benchmark result: Not run
Methodology: Toy-system gate first; the benchmark stage runs only after a pass. How verification works
Stage 1 — Mechanism check agent confidence 9/10
Built a drop-in finite Bernstein resolvent activation with positive softplus-constrained coefficients, fixed positive poles, epsilon stabilization, and configurable τ. The 500-step digits MLP comparison gave GELU 98.44% test accuracy versus 97.11% for the proposed τ=0.5 activation, with mean gradient norm 0.131 versus 5.26 and maximum 1.38 versus 60.29. The core math check was positive: the 500-pole fractional-Bessel partial-fraction approximation had 0.094% maximum relative error, and the τ=0.5 activation had nonnegative first derivative and nonpositive second derivative on the tested grid; however, this did not translate into a training win.
- Agent confidence
- 9/10
- Baseline
- GELU: test accuracy 0.9844, final train loss 0.000236, mean gradient norm 0.1307, gradient std 0.2370, max gradient 1.3781
- Idea
- Bernstein resolvent τ=0.5: test accuracy 0.9711, final train loss 0.05247, mean gradient norm 5.2641, gradient std 5.2259, max gradient 60.2857; τ=0.75 ablation reached 0.9844 accuracy but was not a valid improvement over GELU
Limitations: Only one fixed-seed, small digits classification MLP experiment was run rather than CIFAR-10. Pole ranges, output normalization, K ablations, multiple seeds, calibration, FLOP-normalized timing, and a rigorous higher-order Bernstein-sign test were not evaluated. The τ=0.75 check measured second-derivative concavity only; concavity alone does not test the full sharp Bernstein restriction.
How to run: python3 experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Artifacts
- experiment.py 4.7 KB View Raw
- report.md 1.7 KB View