# Projection-Regularized Gradient Updates

- ID: 1515
- Canonical URL: https://synthcore.org/idea/1515/projection-regularized-gradient-updates
- API JSON: https://synthcore.org/api/idea/1515.json
- API Markdown: https://synthcore.org/api/idea/1515.md
- Verification status: failed_benchmark
- Source: [arXiv:2607.28123](https://arxiv.org/abs/2607.28123)
- Category: optimizer
- Solves: stability, generalization, speedup
- ML areas: optimizer, training-dynamics, fine-tuning
- Math tags: optimization, linear-algebra, statistics, dynamical-systems
- Ratings: usefulness 7/10; difficulty 6/10; novelty 6/10

## Idea description

Replace unconstrained neural-network updates by updates projected toward directions supported by a recent, regularized gradient or feature subspace. This transfers PRPC's errors-in-variables correction: directions that are weakly identified by noisy or rank-deficient minibatches receive stronger shrinkage, preventing large updates caused by accidental correlations. The method is especially suitable for recurrent, world-model, and small-data fine-tuning problems where minibatch covariance is ill-conditioned.

## Mathematical statement

Let $g_t=\nabla_\theta \ell_t(\theta_t)\in\mathbb{R}^p$ be the minibatch gradient, let $G_t=[g_{t-m+1},\ldots,g_t]\in\mathbb{R}^{p\times m}$ collect the last $m$ gradients, and define the regularized covariance $S_t=\beta S_{t-1}+(1-\beta)G_tG_t^\top/m+\lambda I_p$, where $\beta\in[0,1)$ and $\lambda>0$. The data-supported projection is $P_t=S_t^{-1/2}G_t(G_t^\top S_t^{-1}G_t+\rho I_m)^{-1}G_t^\top S_t^{-1/2}$, with projection strength $\rho>0$. Use the preconditioned/projected direction $d_t=S_t^{-1/2}[(1-\alpha)P_t+\alpha I_p]S_t^{-1/2}g_t$, where $\alpha\in[0,1]$. The update is $\theta_{t+1}=\theta_t-\eta_t d_t$. Eigen-directions with small empirical support are controlled by $\lambda$ and cannot produce arbitrarily large steps. For a locally quadratic loss with Hessian eigenvalue $h_i$, stability requires approximately $0<\eta_t q_i h_i<2$ in every effective direction, where $q_i$ is the corresponding eigenvalue of the update metric.

## Key formulas

- $$S_t=\beta S_{t-1}+(1-\beta)\frac{G_tG_t^\top}{m}+\lambda I_p,\qquad G_t=[g_{t-m+1},\ldots,g_t].$$
- $$P_t=S_t^{-1/2}G_t\left(G_t^\top S_t^{-1}G_t+\rho I_m\right)^{-1}G_t^\top S_t^{-1/2}.$$
- $$\theta_{t+1}=\theta_t-\eta_tS_t^{-1/2}\left[(1-\alpha)P_t+\alpha I_p\right]S_t^{-1/2}g_t.$$
- $$0<\eta_t q_i h_i<2\quad\text{for every local Hessian mode }i.$$

## Implementation notes

Integrate this as an optimizer wrapper around AdamW or SGD, initially without momentum or weight decay so that the effect of the projection is isolated. At step $t$, compute the ordinary minibatch gradient $g_t$, maintain a rolling matrix of the last $m$ flattened gradients, and update the exponentially averaged covariance $S_t$. For a first implementation, avoid explicit $p\times p$ matrices: use a diagonal approximation for $S_t$ in large models, or apply the Woodbury identity to compute products with the low-rank matrix $G_tG_t^\top$. Compute the projected direction by solving the $m\times m$ system $G_t^\top S_t^{-1}G_t+\rho I_m$; never form a pseudoinverse. Apply gradient clipping only after projection, then update parameters with learning rate $\eta_t$. The quantities $G_t$, $S_t$, and $P_t$ are empirical estimates; the projection formula and ridge regularization are the transferred paper mechanism. Start with a two-layer MLP on CIFAR-10 or a small transformer on a noisy synthetic sequence task, comparing SGD or AdamW against the projected optimizer at matched step sizes. Measure the largest stable learning rate by sweeping $\eta$. The quantitative prediction is that the divergence threshold shifts according to $\eta_c\approx2/(q_{\max}h_{\max})$ rather than the unprojected $2/h_{\max}$, and that validation-loss variance decreases most strongly when the gradient covariance has small effective rank. Estimate local $h_i$ with Hessian-vector products and test whether the measured threshold agrees within 20%.

## Verification

- Status: failed_benchmark
- Mechanism evidence: yes
- Mechanism confirmed: no
- Practical verdict: harms
- Verdict: Built an exact small-model ProjectionRegularizedSGD optimizer and a deterministic quadratic verification harness. The measured stability thresholds matched the analytical thresholds to about 1e-9; increasing lambda and rho monotonically increased the threshold, while alpha=0 gave exactly zero unsupported-direction metric and increasing alpha increased it. In the noisy quadratic comparison at eta=0.055, the projected method reached mean final loss 0.0232 versus 1.511 for the nonprojected regularized baseline, but this is secondary because that baseline is not plain SGD.

### Mechanism check

- Verdict: Built an exact small-model ProjectionRegularizedSGD optimizer and a deterministic quadratic verification harness. The measured stability thresholds matched the analytical thresholds to about 1e-9; increasing lambda and rho monotonically increased the threshold, while alpha=0 gave exactly zero unsupported-direction metric and increasing alpha increased it. In the noisy quadratic comparison at eta=0.055, the projected method reached mean final loss 0.0232 versus 1.511 for the nonprojected regularized baseline, but this is secondary because that baseline is not plain SGD.
- Confidence: 9/10
- Limitations: Only a 2D deterministic/noisy quadratic and a small PyTorch smoke test were evaluated; no CIFAR, recurrent, transformer, or realistic small-data fine-tuning experiment was run. The optimizer uses explicit p-by-p matrices and is limited to small models; no wall-clock, FLOP, Hessian-vector-product, clipping, AdamW, or plain-SGD comparison was tested.

### Practical benchmark

- Paired seeds: 8
- Baseline mean: 0
- Idea mean: 0
- p-value: 0.0081
- Paired wins: 0/8
- Benchmark verdict: idea worse (significant)

## Artifacts

- [bench_projection.py](https://synthcore.org/code/590/bench_projection.py)
- [bench_report.json](https://synthcore.org/code/590/bench_report.json)
- [projection_experiment.py](https://synthcore.org/code/590/projection_experiment.py)
- [projection_optimizer.py](https://synthcore.org/code/590/projection_optimizer.py)
- [report.md](https://synthcore.org/code/590/report.md)
- [report_bench_2026-08-31T192641.md](https://synthcore.org/code/590/report_bench_2026-08-31T192641.md)
- [results.json](https://synthcore.org/code/590/results.json)
- [Download all files as ZIP](https://synthcore.org/download/590)

## Disclaimer

AI-generated research hypothesis, automatically tested. Not peer-reviewed.
