Stochastic Gradient Methods with Block Diagonal Matrix Adaptation

Jihun Yun, Aurélie C. Lozano, Eunho YangarXiv 2019

Abstract

Adaptive gradient methods like Adam and RMSProp typically use diagonal matrix adaptation, assuming parameter independence for computational efficiency. This paper proposes a block-diagonal matrix adaptation framework that captures interactions between related parameters, such as weights within the same layer. By incorporating a novel spectrum-clipping scheme, the proposed methods achieve faster convergence and superior generalization compared to standard diagonal optimizers.

Introduction

Most deep learning practitioners rely on adaptive gradient methods like Adam, RMSProp, or AdaGrad. These methods adjust the learning rate for each parameter individually based on past gradients. To keep things computationally feasible, they use a diagonal matrix for this adaptation, effectively assuming that every parameter is independent.

While diagonal adaptation is fast, it ignores the complex interactions between different weights in a neural network. On the other end of the spectrum, full-matrix adaptation captures all interactions but is computationally prohibitive in high-dimensional deep learning models. This paper addresses the gap between these two extremes: how to leverage richer structural information without the massive computational overhead of full-matrix methods.

Methods: Block-Diagonal Adaptation

The authors propose a framework for Adaptive SGD with Block Diagonal Adaptation. The core idea is to partition parameters into groups where full-matrix adaptation is performed locally within each block.

Coordinate Grouping

Instead of treating every parameter independently (diagonal) or all together (full-matrix), parameters are partitioned into groups. For example, all weights connected to a single neuron or all weights in a specific layer can form a block. Within these small blocks, the algorithm performs full-matrix adaptation, capturing local curvature information.

Different grouping methods for block-diagonal adaptation, including input-neuron, output-neuron, and filter-wise grouping.

Algorithm and Spectrum-Clipping

The general framework, detailed in Algorithm 1, can be applied to create block-diagonal versions of Adam, RMSProp, and AdaGrad. It computes the outer product of gradients within each group to build a block-diagonal preconditioner.

To address the generalization gap often seen in adaptive methods, the authors introduce a spectrum-clipping scheme. By clipping the eigenvalues of the adaptation matrix, the optimizer can behave like Adam early in training for speed and transition to behaving like SGD later for better generalization.

Algorithm 1 for block-diagonal adaptation and a comparison of optimization trajectories. Block-diagonal methods (d) show smoother convergence compared to diagonal methods (c).

Key Insights and Results

The authors evaluated their methods across standard benchmarks including image classification (MNIST, CIFAR-10/100), language modeling (Penn TreeBank), and generative models ($\beta$-TCVAE).

Layer-wise Grouping and Stability

A key finding is that grouping weights within the same layer is more effective than grouping across different layers. The loss landscape has more "dynamic curvature" within a layer, which the block-diagonal approach exploits. Empirical observations show that diagonal methods often suffer from oscillatory behavior in later training stages, whereas block-diagonal updates lead to a much smoother and more stable convergence path.

Performance Benchmarks

  • Superior Generalization: On CIFAR-100, Block-Adam achieved a test error of 21.7%, outperforming vanilla SGD (22.27%), standard Adam (26.51%), and even recent "bounded" adaptive methods like AdaBound (22.5%).
  • Language Modeling: In Penn TreeBank LSTM experiments, the block-diagonal approach achieved lower (better) perplexity than Adam, SGD, and GGT (a recent full-matrix approximation).
  • Better Disentanglement: For generative models ($\beta$-TCVAE), the block-diagonal version achieved higher Mutual Information Gap (MIG) scores, indicating it helps the model learn more distinct, independent features.

Limitations and Future Work

While much faster than full-matrix methods, block-diagonal adaptation is still more expensive than diagonal methods. The authors note that Block-Adam takes about 2x more wall-clock time than standard Adam on CIFAR datasets. Additionally, the spectrum-clipping scheme introduces new hyperparameters that may require tuning. Future directions include exploring more sophisticated grouping strategies and developing even more computationally efficient ways to handle the small matrix operations required for the block updates.

Summary updated

BibTeX
@misc{yun2019stochastic,
  author = {Jihun Yun and Aurélie C. Lozano and Eunho Yang},
  title = {{Stochastic Gradient Methods with Block Diagonal Matrix Adaptation}},
  year = {2019},
  eprint = {1905.10757},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1905.10757},
}
Figure