\section{Acceleration}\label{sec:acceleration}

A conservation law by itself changes no convergence rate, as the two-parameter network already shows.

\begin{proposition}[Rate and sharpness]\label{prop:rate}
Let $L(a,w)=\tfrac12(aw-1)^2$, $m=aw$, $Q=\tfrac12(w^2-a^2)$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item Along gradient flow, $\dot m=-2\sqrt{Q^2+m^2}\,(m-1)$.
\item At a minimum the Hessian has the eigenvalues $0$ and $\lambda_Q=2\sqrt{Q^2+1}$.
\item Gradient descent linearised at the minimum multiplies the error in $m$ by $1-h\lambda_Q$ at each step. The contraction factors attained by the
stable steps $0<h<2/\lambda_Q$ form the interval $(-1,1)$ for every $Q$.
\end{enumerate}
\end{proposition}
\begin{proof}
With $\rho=m-1$, $\dot m=\dot aw+a\dot w=-\rho\,(a^2+w^2)$, and $(a^2+w^2)^2=(w^2-a^2)^2+4a^2w^2=4Q^2+4m^2$. At a minimum the Hessian is
$\nabla\rho\,\nabla\rho\transp$ with $\nabla\rho=(w,a)$, of norm squared $a^2+w^2$. (iii) follows from (ii).
\end{proof}

So for a single unit the level of $Q$ rescales the speed of the flow and the largest stable step by the same factor. A gain is available when
several blocks with different levels share one step size: the block with the largest $\lambda_Q$ bounds $h$, and every other block converges at
the rate $h\lambda_{Q'}$. The symmetry can be used in four ways to remove this mismatch, and the next three propositions make them explicit.

\begin{proposition}[The induced dynamics on the product]\label{prop:induced}
Let $(B,A)\in\R^{m\times r}\times\R^{r\times n}$ have rank $r$, $X=BA$, and let $G=\nabla\ell(X)$ for a loss $\ell(X)$.
\begin{enumerate}[label=\textup{(\roman*)}]
\item Gradient descent on $(B,A)$ with step $\eta$ gives $X^+=X-\eta\,(BB\transp G+GA\transp A)+\eta^2\,GX\transp G$. On the balanced slice of \cref{thm:balanced},
$BB\transp=(XX\transp)^{1/2}$ and $A\transp A=(X\transp X)^{1/2}$.
\item The \emph{scaled} update $B^+=B-\eta\,GA\transp(AA\transp)^{-1}$, $A^+=A-\eta\,(B\transp B)^{-1}B\transp G$ commutes with the action of $\GL_r$, and
\[
X^+=X-\eta\,(P_cG+GP_r)+\eta^2\,GX^{\dagger}G,
\]
where $P_c$ and $P_r$ are the orthogonal projectors onto the column and row spaces of $X$ and $X^\dagger$ is the Moore--Penrose inverse.
\item Let $\ell(X)=\tfrac12\norm{X-M}^2$ with $M$ of rank $r$ and singular values $\sigma_1\ge\dots\ge\sigma_r$. Linearised at $X=M$, the component of the
error along the singular vectors $u_i,v_j$ is multiplied by $1-\eta(\sigma_i+\sigma_j)$ in case \textup{(i)} on the balanced slice, with $\sigma_i=0$ for $i>r$,
and by $1-2\eta$ or $1-\eta$ in case \textup{(ii)}.
\end{enumerate}
\end{proposition}
\noindent Parts (i) and (ii) are \cref{exo:induced}. For (iii), $G$ is the error $E$ to first order, the preconditioners are evaluated at $M$, and
$(MM\transp)^{1/2}$, $(M\transp M)^{1/2}$, $P_c$, $P_r$ are diagonal in the singular bases. In case (i) the stable steps satisfy $\eta<1/\sigma_1$ and the slowest
tangent direction contracts by $1-\eta\sigma_r$: the number of steps grows as the condition number $\sigma_1/\sigma_r$. In case (ii) the rates do not involve
the singular values. Part (i) on the balanced slice is the preconditioned end-to-end dynamics of \cite{Arora}; part (ii) is the scaled
gradient descent of \cite{TongMaChi}, where convergence at a rate independent of the condition number is proved for several low-rank
estimation problems. In the terms of this chapter, the update of (ii) is defined on the quotient $\Theta/\GL_r$: it is independent of the
level of $Q$. Low-rank adapters $W_0+BA$ have this symmetry, and so do the key--query and value--output pairs of an attention head, whose
output depends on the products only; the usual initialisation of an adapter, $B=0$ and $A$ random, lies at the level $Q=AA\transp$, far from the
balanced slice \cite{LoRAplus}.

\begin{figure}[t]
\centering
\begin{tikzpicture}
\begin{semilogyaxis}[width=6.9cm,height=5.4cm,xlabel={iteration},ylabel={$\norm{BA-M}$},xmin=0,xmax=900,ymin=1e-16,ymax=2,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={gradient descent, $\eta=0.4$}]
\addplot[hcsrust,mark=*,mark size=1.5pt,line width=0.7pt] coordinates {(0,5.938e-01) (100,1.450e-03) (200,3.654e-05) (300,9.273e-07) (400,2.354e-08) (500,5.975e-10) (600,1.517e-11) (700,3.850e-13) (800,9.766e-15) (900,3.002e-16)};
\end{semilogyaxis}
\end{tikzpicture}\hspace{0.3cm}
\begin{tikzpicture}
\begin{semilogyaxis}[width=6.9cm,height=5.4cm,xlabel={iteration},xmin=0,xmax=9,ymin=1e-16,ymax=2,
  tick label style={font=\small},label style={font=\small},title style={font=\small},title={scaled update, $\eta=0.5$}]
\addplot[hcsteal,mark=square*,mark size=1.5pt,line width=0.7pt] coordinates {(0,5.938e-01) (1,1.045e-01) (2,1.527e-02) (3,1.866e-03) (4,4.691e-05) (5,3.286e-08) (6,1.616e-14) (7,1.665e-16) (8,1.594e-16)};
\end{semilogyaxis}
\end{tikzpicture}
\caption{Factorisation of a $2\times2$ matrix with singular values $1$ and $10^{-2}$ from the same initial point. The update that commutes with
$\GL_2$ reaches rounding error in $7$ iterations; gradient descent on the factors needs about $800$. Data from \texttt{checks.py}.}\label{fig:scaled}
\end{figure}

\begin{proposition}[Weight decay on scale-invariant weights]\label{prop:weight-decay}
Let $L(s\theta)=L(\theta)$ for $s>0$, and $\theta^+=(1-h\lambda)\theta-h\nabla L(\theta)$. Then
\[
\abs{\theta^+}^2=(1-h\lambda)^2\abs\theta^2+\frac{h^2\,\abs{\hat g}^2}{\abs\theta^2},\qquad\hat g=\nabla L(\theta/\abs\theta),
\]
the norm is stationary at $\abs\theta^4=h\abs{\hat g}^2/\lambda(2-h\lambda)$, and there the step on the unit sphere is $\sqrt{h\lambda(2-h\lambda)}\,/\abs{\hat g}$.
\end{proposition}
\noindent The proof is \cref{exo:weight-decay}. The stationary effective step depends on $h$ and $\lambda$ through the product $h\lambda$ alone, to first order
\cite{vanLaarhoven}: the drift of \cref{thm:two-noether}(c) and the decay balance, and the two hyperparameters are one.

\begin{proposition}[Horizontal projection]\label{prop:horizontal}
Let $A\in\fpp$ and let $\theta^+=\theta+u$ be any update. Then $Q_A(\theta^+)-Q_A(\theta)=\langle u,A\theta\rangle+\tfrac12\langle u,Au\rangle$. For $u=-h\nabla L(\theta)$ the first term vanishes.
For $u=-hD\nabla L(\theta)$ with a positive diagonal matrix $D$, as in adaptive methods, it is $-h\langle D\nabla L,A\theta\rangle$, of first order in $h$. For the
projected update
\[
u_\perp=u-\sum_j\frac{\langle u,A_j\theta\rangle}{\abs{A_j\theta}^2}\,A_j\theta ,
\]
over generators $A_j$ with mutually orthogonal $A_j\theta$, the first term vanishes again.
\end{proposition}
\begin{proof}
Expand $\tfrac12\langle\theta+u,A(\theta+u)\rangle$ with $A$ symmetric, and use \eqref{eq:orth}.
\end{proof}

For the sign update $u=-h\,\mathrm{sign}(\nabla L)$ on the two-parameter network, the invariant $Q$ changes over a unit of time by $0.31$ for
$h=10^{-2}$ and by $0.32$ for $h=10^{-3}$; with the projection the changes are $6.2\cdot10^{-3}$ and $6.2\cdot10^{-4}$ (\texttt{checks.py}). For the scale
symmetry, $A=1$, the projection removes the radial part of the update, which is the method of \cite{AdamP}.

The four uses are therefore: \emph{to choose the level} of $Q$ at initialisation, which by \cref{prop:induced}(i) is a choice of
preconditioner; \emph{to move along the orbit} during training, at no cost in loss, either back to the balanced slice or to the point of the
orbit with the largest gradient \cite{ZhaoTeleport}; \emph{to make the update equivariant}, so that it is defined on the quotient
(\cref{prop:induced}(ii), \cite{Absil}); and \emph{to project} a non-gradient update onto the directions orthogonal to the orbits
(\cref{prop:horizontal}). \Cref{ch:structure} derives all four from one geometric statement.

