Uniform-Certificate Bayesian Feature Head
Implementation & benchmark of arXiv:2608.16415 — Scalable Gaussian Process Regression via Deterministic Trigonometric Features: Uniform Bounds for Safe Model Predictive Control
Source paper: Scalable Gaussian Process Regression via Deterministic Trigonometric Features: Uniform Bounds for Safe Model Predictive Control arXiv:2608.16415 ⓘ · analyzed Sep 1, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Replace the final layer of a neural predictor with Bayesian linear regression over deterministic trigonometric features, retaining a computable posterior variance and a high-probability confidence envelope over the full bounded input domain. Use this envelope to reject unsafe actions, downweight uncertain training targets, or restrict optimizer updates in regions where the network is extrapolating.
Formulas
Mathematical statement
Let $z\in\mathcal{D}\subset\mathbb{R}^{d}$ be the network input, let $\phi(z)\in\mathbb{R}^{M}$ be a deterministic trigonometric feature vector, and let the scalar prediction be $\hat y(z)=\phi(z)^{\top}\hat\theta$. For observations $(z_i,y_i)$ with noise variance $\sigma^2$, define $V=\lambda I_M+\sum_{i=1}^{N}\phi(z_i)\phi(z_i)^{\top}$ and $b=\sum_{i=1}^{N}\phi(z_i)y_i$, where $\lambda>0$ is the prior precision and $\hat\theta=V^{-1}b$. The posterior standard deviation is $s(z)=\sigma\sqrt{\phi(z)^{\top}V^{-1}\phi(z)}$. A self-normalized high-probability bound has the form $|f(z)-\hat y(z)|\leq\beta_{\alpha}s(z)$ simultaneously over $z\in\mathcal{D}$ with probability at least $1-\alpha$, where $\beta_{\alpha}$ depends on the prior norm bound, noise level, feature dimension, regularization, and confidence level. For a computable continuous-domain approximation, evaluate the bound on a $\delta$-net $\mathcal{G}\subset\mathcal{D}$ and add a Lipschitz extension term $L\delta$, with $L$ bounding the spatial derivative of the prediction error. The key property is that $V$ and $b$ are sufficient statistics, so prediction and uncertainty no longer scale with the number of stored examples.
Implementation notes
1. Integration point: attach this head to an MLP, encoder, or policy/value network. First freeze the neural representation $r_\psi(x)$ and define $z=r_\psi(x)$, optionally concatenated with the action $u$. Use a deterministic Fourier map $\phi(z)=[1,\cos(\omega_1^\top z),\sin(\omega_1^\top z),\ldots,\cos(\omega_K^\top z),\sin(\omega_K^\top z)]$, with frequencies fixed on a grid rather than resampled. Maintain $V$ and $b$ online using rank-one updates. 2. Pseudocode: initialize $V=\lambda I$, $b=0$; for each labeled sample compute $p=\phi(z)$, update $V\leftarrow V+pp^\top$ and $b\leftarrow b+py$; solve $V\hat\theta=b$ by Cholesky; predict $\mu=p^\top\hat\theta$ and $s=\sigma\sqrt{p^\top V^{-1}p}$; use $\mu\pm\beta_\alpha s$ for loss weighting, action rejection, or uncertainty-aware exploration. 3. Computed from the paper's mechanism: deterministic features, Bayesian sufficient statistics, posterior variance, and the simultaneous confidence envelope. Estimated empirically: observation noise $\sigma$, the feature approximation error, $\beta_\alpha$ if the exact prior norm is unknown, and the Lipschitz constant $L$; estimate $L$ by maximizing finite-difference gradients on a validation grid. 4. First cheap experiment: use a two-layer MLP encoder on UCI regression or a small CartPole or pendulum dynamics model, comparing a standard deterministic head, random Fourier features, and this certified head at fixed feature width $M\in\{64,128,256\}$. Hold out a dense input grid and measure simultaneous coverage, mean interval width, and update cost as the number of samples grows from $10^3$ to $10^6$. The quantitative prediction is that head-update and uncertainty-query cost will be independent of $N$ after sufficient-statistic accumulation, while empirical simultaneous coverage over the grid should be at least $1-\alpha$ up to the feature-discretization term; violations should decrease as the grid spacing correction $L\delta$ is reduced. A second falsifiable signature is uncertainty contraction proportional to $\sqrt{\phi(z)^\top V^{-1}\phi(z)}$, with rapid contraction in repeatedly sampled regions and persistent high variance in uncovered regions.
Verification
Stage 1 · Toy mechanism gate: Passed ✓
Stage 2 · Mechanism transferred to benchmark: Confirmed ✓
Stage 2 · Practical benchmark result: Significant win ✓
Methodology: 8 paired seeds, permutation test (p<0.05) against a learning-rate-tuned baseline. How verification works
Stage 1 — Mechanism check agent confidence 8/10
Built a deterministic Fourier-feature Bayesian linear head with batch and online sufficient-statistic updates, posterior mean, and uncertainty. Numerical predictions were confirmed: batch/online statistics agreed to 2e-13, uncertainty log-log slope was -0.49998 versus predicted -0.5, and uncertainty ratios matched sigma ratios exactly. The proposed head had the same point-prediction RMSE as ridge but supplied location-dependent uncertainty; however, beta=2.5 did not attain nominal 95% simultaneous coverage (0.65-0.82), so the full uniform-certificate claim was not validated.
- Agent confidence
- 8/10
- Baseline
- Deterministic ridge: grid RMSE 0.6344, interval width 0, no uncertainty signal.
- Idea
- Same grid RMSE 0.6344; mean interval width 10.5849 in the concentrated-data comparison and zero observed misses there. Core scaling: observed uncertainty slope -0.49998 vs -0.5 predicted; sigma ratios [0.25,0.5,1,2] exactly matched prediction; broad-data simultaneous coverage was 0.65 at N=40 and 0.72 at N=160 versus 0.95 target.
Limitations: This was a one-dimensional synthetic regression experiment, not an MLP/online RL integration. It did not derive or validate a principled beta_alpha, Lipschitz delta-net correction, feature approximation error over general domains, GPU behavior, million-sample throughput, or learned neural representations.
How to run: python3 experiment.py
Stage 2 — Benchmark vs. tuned baseline (arXiv:2608.16415)
Beats the tuned baseline by -21.7734 metric points (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- -21.7734 (n/a; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 0 configs
Only the tabular Friedman#1 track was tested; no vision, sequence, or dynamics transfer was evaluated. The Bayesian head was fit after representation training rather than jointly end-to-end, and the claimed 95% uniform certificate/Lipschitz delta-net correction was not derived or validated. The very low beta=2.5 coverage means the confidence envelope should not be treated as a valid calibrated safety certificate.
How to run: python3 bench_experiment.py
Verdict computed by deterministic test code from paired-seed statistics — not by the language model.
Stage 2 — Benchmark latest Worked ✓
Agent confidence: 7/10
Built the Uniform-Certificate Bayesian Feature Head with a shared MLP representation and deterministic Fourier Bayesian readout, evaluated against a tuned standard MLP system. The idea achieved mean test MSE 11.26499 versus baseline 33.03840, paired delta -21.77341 with permutation p=0.0081 and 8/8 paired wins, satisfying the bench win criterion. The uncertainty mechanism showed a trained-model high/low posterior-SD ratio of 3.682, but beta=2.5 coverage was only 0.00844, so the uncertainty envelope was not calibrated despite the task-metric win.
- Baseline
- best_cfg lr=0.01, weight_decay=0.0; full 8-seed mean MSE 33.03840112686157; per-seed [34.395347595214844,31.198909759521484,32.69178009033203,28.08059310913086,36.69027328491211,33.26426696777344,34.30606460571289,33.67997360229492]
- Idea
- best_cfg lr=0.001, weight_decay=0.0; full 8-seed mean MSE 11.264991521835327; per-seed [10.268460273742676,10.212242126464844,9.813057899475098,10.562983512878418,13.34918212890625,11.693805694580078,10.852352142333984,13.36784839630127]
- Idea wins
- 8/8
- Mechanism signature
- map[confirmed:true coverage_beta_2.5:0.0084375 mean_high_to_low_sd_ratio:3.6821917593479156 mean_sd:0.013744487892836332 note:Uncertainty was measured from trained benchmark models; confirmed only the localization/contraction direction, not nominal uniform coverage.]
- Paired delta
- -21.773409605026245
- Permutation p
- 0.0081
Benchmark result
Beats the tuned baseline by -21.7734 metric points (p=0.0081, wins 8 / 8 paired seeds; metric: lower is better).
- Benchmark
- Tabular regression (Friedman)
- Model
- mlp_tiny
- Paired seeds
- 8
- Baseline mean
- 0
- Idea mean
- 0
- Effect (Δ)
- -21.7734 (n/a; negative = idea better)
- Wins
- 8 / 8 paired seeds
- p-value
- 0.0081 (permutation test, 20 000 shuffles)
- Smallest detectable effect
- n/a
- Mechanism
- Confirmed ✓
- Practical effect
- Helps
- Baseline tuning
- swept over 0 configs
Only the tabular Friedman#1 track was tested; no vision, sequence, or dynamics transfer was evaluated. The Bayesian head was fit after representation training rather than jointly end-to-end, and the claimed 95% uniform certificate/Lipschitz delta-net correction was not derived or validated. The very low beta=2.5 coverage means the confidence envelope should not be treated as a valid calibrated safety certificate.
How to run: python3 bench_experiment.py
Artifacts
- bench_experiment.py 6.7 KB View Raw
- bench_report.json 3.0 KB View Raw
- experiment.py 6.8 KB View Raw
- report.md 1.6 KB View
- report_bench_2026-09-01T161507.md 3.2 KB View
- results.json 2.8 KB View Raw