Sakana AI提出PC-ALM:层局部替代反向传播,可训练千层网络
Sakana AI Researchers Introduce PC-ALM, a Layer-Local Alternative to Backpropagation That Trains 1000-Layer Networks
这篇论文展示了突破性的训练方法,用纯局部规则实现了接近反向传播的性能,甚至能稳定训练1000层网络。对探索类脑学习和高效训练机制的研究者极具参考价值,建议深入阅读技术细节。
Backpropagation is a global algorithm: a forward pass, then a backward pass, then a weight update, each locked behind the previous one. Brains have no known mechanism for that kind of network-wide phase locking, which is why local-learning alternatives such as predictive coding (PC) keep drawing research interest. Sakana AI researchers propose Augmented Lagrangian Predictive Coding (PC-ALM), a variant of PC that keeps every update layer-local yet recovers backprop-aligned credit signals. The research team reports training residual MLPs up to 1000 layers within about 2 percentage points of backprop on MNIST.
反向传播是一种全局算法:一次前向传递,接着是一次后向传递,然后是一次权重更新,每一步都严格依赖于上一步。大脑中尚无已知的机制能够实现这种全网相位锁定,这也是预测编码(PC)等局部学习替代方案持续吸引研究兴趣的原因。Sakana AI 的研究人员提出了增强拉格朗日预测编码(PC-ALM),这是 PC 的一种变体,它在保持所有更新局限于各层的同时,恢复了与反向传播对齐的信用分配信号。研究团队报告称,在 MNIST 数据集上,其训练的残差 MLP 深度可达 1000 层,性能仅比反向传播低约 2 个百分点。
Is it deployable? Yes, as research code: an MIT-licensed JAX reference implementation runs on CPU and reproduces the paper’s width-depth grid. It is a training method, not a model, and has only been tested on small image benchmarks.
它是否可部署?是的,作为研究代码:一份采用 MIT 许可证的 JAX 参考实现在 CPU 上运行,并复现了论文中的宽度-深度网格实验。这是一种训练方法,而非模型,且目前仅在小型图像基准测试中进行了验证。
Why standard PC stalls in deep, narrow networks
为什么标准 PC 在深层窄网络中会停滞不前
PC treats every hidden activation as an optimization variable and penalizes the squared mismatch between each layer’s activation and the prediction arriving from the layer below. Inference is gradient descent on that energy; learning is a Hebbian-like weight step. The catch is that supervision enters at the output and must diffuse through a chain of local compromises. In deep, narrow networks the credit signal fades long before it reaches the input. Innocenti et al. characterized this PC-BP gap as a function of width and depth, and it is worst when width is smaller than depth.
PC 将每个隐藏激活值视为优化变量,并对每一层的激活值与其下方层传来的预测值之间的平方失配进行惩罚。推理过程是对该能量函数进行梯度下降;学习过程则是类似赫布式的权重更新。问题在于,监督信号从输出端进入,必须通过一系列局部妥协扩散开来。在深层窄网络中,信用分配信号在到达输入层之前就已衰减殆尽。Innocenti 等人将这种 PC 与 BP 之间的差距表征为宽度和深度的函数,当宽度小于深度时,这种差距最为严重。
What PC-ALM changes
PC-ALM 改变了什么
PC-ALM starts from the constrained view of training: minimize the supervised loss subject to hi=σ(Wihi−1)h_i = \sigma(W_i h_{i-1}) at every layer. PC is the quadratic-penalty relaxation of that problem. PC-ALM uses the augmented Lagrangian instead, attaching a Lagrange multiplier λi∈ℝdisuch thatdim(λi)=dim(hi)\lambda_i \in \mathbb{R}^{d_i} \quad \text{such that} \quad \text{dim}(\lambda_i) = \text{dim}(h_i) to each layer constraint while keeping PC’s penalty. Setting λ = 0 recovers PC exactly.
PC-ALM 从约束视角的训练出发:在满足每层 h_i = \sigma(W_i h_{i-1}) 的条件下最小化监督损失。PC 是该问题的二次惩罚松弛形式。PC-ALM 则使用增广拉格朗日方法,在保留 PC 惩罚项的同时,为每个层约束附加一个拉格朗日乘子 λ_i ∈ ℝ^{d_i},使得 dim(λ_i) = dim(h_i)。设置 λ = 0 即可精确恢复 PC。
Inference alternates 2 local steps: a primal gradient step on the activations, and a dual step λi←λi+αri\lambda_i \leftarrow \lambda_i + \alpha r_i that accumulates the layer’s prediction error. Completing the square shows each primal step is a standard PC step with the prediction target shifted by −λi/ρ-\lambda_i/\rho. After T steps the weight update acts on the composite signal λi+ρri\lambda_i + \rho r_i. The research team read this as a PI controller per layer: the prediction error is the proportional term and the multiplier is the integral term. α = 0 gives PC; α = ρ with the inner problem solved exactly gives the classical method of multipliers.
推理交替执行2个本地步骤:对激活值进行原始梯度步,以及一个累积层预测误差的对偶步 λi←λi+αri。完成平方显示每个原始步是具有由 −λi/ρ 偏移的预测目标的标准 PC 步。经过 T 步后,权重更新作用于复合信号 λi+ρri。研究团队将此解读为每层的 PI 控制器:预测误差是比例项,乘数是积分项。α = 0 给出 PC;当内部问题被精确求解且 α = ρ 时,给出经典乘子法。
Exact backprop gradients in the linear case
线性情况下的精确反向传播梯度
LeCun observed in 1988 that the Lagrange multipliers of a constrained network equal the backprop adjoints at a KKT point. The team proves that in linear PC networks, under a spectral-radius stability condition, PC-ALM converges to that KKT point: activations return to their forward-pass values while each λi\lambda_i integrates to the exact BP adjoint. The per-mode stability bound is ηhσi2(2ρ+α)<4\eta_h \sigma_i^2 (2\rho + \alpha) < 4, which reduces to PC’s condition at α = 0. Unlike PC’s monotone gradient flow, PC-ALM’s iteration matrix has complex eigenvalues that produce damped oscillations; α sets their frequency but not their decay rate.
LeCun 在 1988 年观察到,约束网络的拉格朗日乘数等于 KKT 点处的反向传播伴随变量。该团队证明,在线性 PC 网络中,在谱半径稳定性条件下,PC-ALM 收敛到该 KKT 点:激活值返回其前向传递值,而每个 λi 积分得到精确的 BP 伴随变量。每模式的稳定性界限为 ηhσi2(2ρ+α)<4,这在 α = 0 时简化为 PC 的条件。与 PC 的单调梯度流不同,PC-ALM 的迭代矩阵具有产生阻尼振荡的复特征值;α 设置其频率但不影响其衰减速率。
Results
结果
The research team sweeps residual MLPs with width and depth from 8 to 128 on Fashion-MNIST and MNIST under the mean-field parameterization of Innocenti et al., training for 1 epoch. With an inference budget of T = 2L, PC-ALM matches backprop across every width, depth, and activation (identity, tanh, ReLU), while PC drops sharply in deep, narrow cells. The repo’s reference cell (width 32, depth 32, ReLU, Fashion-MNIST) reports 78.66% test accuracy for BP, 68.13% for PC, and 77.75% for PC-ALM, with gradient cosine to BP rising from 0.604 to 0.909.
研究团队在 Fashion-MNIST 和 MNIST 上以 Innocenti 等人的平均场参数化方式,对宽度与深度从 8 到 128 的残差 MLP 进行扫描,训练 1 个 epoch。在推理预算 T = 2L 下,PC-ALM 在所有宽度、深度和激活函数(恒等、tanh、ReLU)下均匹配反向传播,而 PC 在深层窄单元中急剧下降。仓库中的参考单元(宽度 32,深度 32,ReLU,Fashion-MNIST)报告 BP 测试准确率为 78.66%,PC 为 68.13%,PC-ALM 为 77.75%,与 BP 的梯度余弦相似度从 0.604 上升到 0.909。
The research extends the picture: 1000-layer residual MLPs on MNIST (width 32, ReLU, 5 epochs) stay within roughly 2 points of BP, and PC-ALM improves over PC on every benchmark tried, including ResNet-18 on CIFAR-10 and Tiny ImageNet.
研究进一步扩展了这一图景:MNIST 上的 1000 层残差 MLP(宽度 32,ReLU,5 个 epoch)保持在 BP 大约 2 个百分点以内,并且 PC-ALM 在所有尝试的基准测试中均优于 PC,包括 CIFAR-10 和 Tiny ImageNet 上的 ResNet-18。
Key Takeaways
关键要点
- PC-ALM adds a per-layer Lagrange multiplier to predictive coding; every update stays layer-local.
- In linear networks the multipliers converge to exact backprop gradients.
- Matches BP across the 8 to 128 width-depth grid at T = 2L; PC fails in deep, narrow cells.
- Trains 1000-layer residual MLPs within about 2 points of BP on MNIST.
- MIT-licensed JAX code reproduces the results on CPU.
- PC-ALM 为预测编码添加了每层拉格朗日乘数;每次更新都保持层局部性。
- 在线性网络中,乘数收敛到精确的反向传播梯度。
- 在 T = 2L 下,在 8 到 128 的宽度-深度网格上匹配 BP;PC 在深层窄单元中失败。
- 在 MNIST 上训练 1000 层残差 MLP,精度与 BP 相差约 2 个百分点。
- 采用 MIT 许可证的 JAX 代码可在 CPU 上复现结果。
Check out the Paper, Blog, and GitHub Repo. All credit goes to the researcher of this project. Also, feel free to follow us on Twitter and don’t forget to join our 150k+ML SubReddit and Subscribe to our Newsletter. Wait! are you on telegram? now you can join us on telegram as well.
查看论文、博客和 GitHub 仓库。所有功劳归于本项目的研究者。此外,欢迎在 Twitter 上关注我们,别忘了加入我们拥有 15 万+成员的 ML SubReddit 并订阅我们的新闻通讯。等等!你在 Telegram 上吗?现在你也可以在 Telegram 上加入我们。
Need to partner with us for promoting your GitHub Repo OR Hugging Face Page OR Product Release OR Webinar etc.? Connect with us
需要与我们合作推广你的 GitHub 仓库、Hugging Face 页面、产品发布或网络研讨会等吗?请联系我们要
The post Sakana AI Researchers Introduce PC-ALM, a Layer-Local Alternative to Backpropagation That Trains 1000-Layer Networks appeared first on MarkTechPost.
本文《Sakana AI 研究人员推出 PC-ALM:一种可训练 1000 层网络的反向传播替代方案》首发于 MarkTechPost。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力