跳到正文
arXiv (AI + Vision + Imaging)· Zhao Song, Lichen Zhang, Ruizhe Zhang·· 9 天前AI 评分15

如何在次二次时间内训练多层过参数化神经网络

Training Multi-Layer Over-Parametrized Neural Network in Subquadratic Time

AI 导读

研究提出一种训练多层过参数化神经网络末层的框架,初始化阶段耗时 O(m²nL),之后每次迭代的摊销代价降至 m^{2-Ω(1)},真正达到次二次复杂度。加速来自一种阈值与层输入范数成正比的移位 ReLU 稀疏激活,使每层正齐次,收敛证明所需的宽度仅与深度 L、样本数 n 及最小核特征值倒数成多项式关系。

正文 · 原文

arXiv:2112.07628v3 Announce Type: replace Abstract: We consider the problem of training the last layer of a multi-layer over-parametrized neural network to minimize the empirical risk induced by a loss function. In the typical setting of over-parametrization, the network width $m$ is much larger than the data dimension $d$ and the number of training samples $n$ ($m=\mathrm{poly}(n,d)$), which induces a prohibitively large weight matrix $W\in\mathbb{R}^{m\times m}$ per layer above the first. Naively, when the layer inputs are dense, one has to pay $O(m^2)$ time to read the weight matrix and evaluate the neural network function in both forward and backward computation. To reduce the training cost per iteration, we propose a framework that uses $O(m^2nL)$ time in the initialization phase and achieves a truly subquadratic amortized cost per iteration in terms of $m$, i.e., $m^{2-\Omega(1)}$ per iteration. The speedup comes from a sparse activation, a shifted ReLU whose threshold at each layer is proportional to the norm of the layer input. With this threshold every layer is positively homogeneous, so our convergence proof needs a width only polynomial in the depth $L$, in $n$ and in the inverse smallest kernel eigenvalues. The inputs of the trained layer are fixed and sparse. In this setting, simpler algorithms without a data structure reach the same cost per iteration, and maintaining the products of the last layer with its inputs lowers it to $mn^{\omega-1+o(1)}$, where $\omega$ is the matrix multiplication exponent. Our result can be viewed as an idealized model of maintaining a small amount of state on top of a frozen pre-trained model to speed up fine-tuning, a core procedure to deploy large language models (LLMs). Our guarantees assume that the frozen layers are random, and for a pre-trained model only the cost per iteration of maintaining these products carries over.

来源:arXiv (AI + Vision + Imaging) · arxiv.org