# Poster 27933

- Kind: Poster
- Talk page and recording: https://iclr.cc/virtual/2025/poster/27933

> Transcript of the talk's recording (session_asr), made by speech recognition or taken from the host's captions. It may contain errors. The words are the speakers'; listen to the recording on the talk's page before quoting it.

Hello, my name is Minak. I will present a paper titled Does SGD Really Happen in Tiny Subspaces? This is a joint work with Guangjun at Microsoft Research and Charlie Yi at KAIST AI. We will revisit a seminal paper titled Gradient Descent Happens in a Tiny Subspace, which has observed that during DNN training gradients align with the dominant subspace.
We challenge this observation and ask, can the NN be trained within the WNS subspace? As a spoiler, our answer is no and we will see why. We are interested in a K class classification problem and to formalize our study we define the WNS subspace S sub K as a top K eigenspace of the training loss Hessian.
And the bulk subspace as its orthogonal complement. We also define the projection matrix onto the dominant subspace as P sub k and the fraction of a given vector v in the dominant subspace as chi sub k of v. We first recover the phenomenon observed by a seminal paper that gradients do align with the dominant subspace during DNN training with SGD.
The last session has a low-rank structure. The above figures show that the top k eigenvalues are much larger than the other eigenvalues when training MLP, CNN, and Transformer. Moreover, the gradients do align with the dominance of space. The bottom figure shows the plot of k-sub-k of the full batch gradient during training.
As this value becomes close to one, this indicates that gradient possibly aligning with the dominant subspace. Based on this observation, we ask whether this gradient alignment leads to an effective training. To answer this question, we introduce three types of optimizers. First is finalized GD, second is domain SGD which uses the domain component of this stochastic gradient as an update vector.
And finally, bulk HGD which uses the bulk component of the stochastic gradient. Since gradient aligns with the domain subspace, it is natural to expect that dome HGD should be as effective as HGD, but the bulk HGD is not. We conduct the experiment by switching from HGD to dome HGD, and bulk HGD after gradient dual aligns with the domain subspace.
The figures shows the training loss curve of each optimizer in the log scale. Surprisingly, DOM-SGD fails to further decrease the loss, but in contrast, bulk SGD is as effective as SGD. This indicates that the alignment between gradient and the dominant subspace was spurious. Therefore, we ask what causes this spurious alignment.
We conduct experiment of switching from SGD to GD and also GD to SGD. And we plot the chi_sub_k of full batch gradient. The left figure shows that while training with SGD, the gradient aligns with dominant subspace but after switching to GD, the alignment quickly vanishes and vice versa. This suggests that the experience alignment is caused by the stochastic noise of SGD.
To further understand this phenomenon, we introduce a toy model which is a L-conditioning quadratic loss and trained with G_D and S_G_D. It turns out that this toy model can recover all the observed phenomenon. Here the S_G_D iterates oscillates in the high curvature direction which results in the gradient alignment but the true training progresses in the flat direction.
Based on this observation, we introduce our mental model of box loadscape in DNA training. This picture illustrates an ill-conditioned value of landscape. Here, the noise of SGD bumps parameters up the steep walls, which is a dominant direction, but the true training progress happens along the bottom of a narrow and steep valley, which is a bulk direction.
To wrap up, our key takeaway is that DNA cannot be trained within the Doppler subspace, and bulk subspace plays an essential role during training. We extend our observation to practical scenarios including the large binary reach-out, SEM, as well as momentum and adaptive optimizers. For more details, please visit our poster session or look at our paper.
