KOALA: A Kalman Optimization Algorithm with Loss Adaptivity

Aram Davtyan, Sepehr Sameni, Llukman Cerkezi, Givi Meishvili, Adam Bielski, Paolo Favaro

Introduction

Deep learning optimization typically relies on Stochastic Gradient Descent (SGD) or its variants like Adam. These methods are stochastic because they compute gradients on minibatches, introducing noise that can help escape local minima but often hinders convergence. Traditionally, this noise is managed through manually tuned hyperparameters such as learning rates and momentum.

This paper, presented at AAAI-22, introduces KOALA (Kalman Optimization Algorithm with Loss Adaptivity). KOALA reimagines neural network training through the lens of control theory and signal processing. By treating the training loss as a noisy observation of an underlying "optimal" state, KOALA uses Kalman filtering to estimate the best model weights. It provides a scalable, self-tuning alternative that automatically adapts to data noise while maintaining computational efficiency.

Methodology

Previous attempts to apply Kalman Filters to deep learning were computationally prohibitive, requiring the storage and inversion of massive $N \times N$ covariance matrices (where $N$ is the number of parameters). KOALA overcomes this through several key innovations:

  1. Loss as Measurement: Instead of using high-dimensional gradients as the primary measurement, KOALA utilizes the scalar loss value as the noisy observation.
  2. Computational Approximations: To ensure scalability, the authors approximate massive covariance matrices using scaled identity matrices or small $2 \times 2$ blocks. This reduces complexity to $O(N)$, making it as efficient as standard optimizers.
  3. Loss Adaptivity: KOALA introduces a "target loss" schedule. Rather than aiming for zero loss immediately, the algorithm moves toward a target that decreases iteratively, effectively deriving a principled learning rate schedule.

The framework is offered in two primary variants: KOALA-V (Vanilla), which adapts to current loss and gradients, and KOALA-M (Momentum), which incorporates "velocity" into the state to stabilize training, similar to momentum in traditional optimizers.

Algorithm 1: The KOALA-V (Vanilla) optimization procedure.

Experimental Evaluation

The researchers evaluated KOALA on standard computer vision benchmarks, including CIFAR-10, CIFAR-100, and a downsampled ImageNet-32. The framework was also tested on Generative Adversarial Networks (GANs) and Natural Language Processing (NLP) tasks.

Key Results

KOALA consistently performed on par with or better than state-of-the-art optimizers:

  • CIFAR-100 (ResNet50): KOALA-M achieved a 22.34% Top-1 error, significantly outperforming standard Adam (24.95%) and SGD (25.05%).
  • Robustness: A standout feature of KOALA is its insensitivity to initial hyperparameter settings, batch sizes, and weight initialization methods. This "self-tuning" nature reduces the need for extensive grid searches.
Performance comparison of KOALA-M vs SGD across different weight initialization strategies.
  • Compatibility: KOALA can be integrated with advanced techniques like Lookahead (LA) and Stochastic Weight Averaging (SWA). Combining KOALA-M with Lookahead on CIFAR-100 resulted in a Top-1 error of 21.70%.

Discussion and Limitations

KOALA offers a principled approach to noise handling by using Kalman Filter foundations to estimate noise variance and adjust step sizes accordingly. The "target loss" concept elegantly replaces heuristic learning rate schedules with a derived optimal step size.

However, some limitations remain:

  • Memory Overhead: KOALA-M requires approximately twice the memory of basic SGD due to the need to store internal state vectors (velocity and average state).
  • Theoretical Scope: Convergence analysis relies on standard but strong assumptions (Lipschitz-continuity). While successful in vision tasks, further large-scale testing on Transformer architectures is needed to confirm its general dominance.

Conclusion

KOALA represents a significant step toward more robust and self-tuning optimization in deep learning. By bridging the gap between control theory and stochastic optimization, it offers a mathematically grounded framework that rivals the performance of highly tuned traditional optimizers with less manual intervention.

Summary updated

BibTeX
@inproceedings{davtyan2022koala,
  author = {Aram Davtyan and Sepehr Sameni and Llukman Cerkezi and Givi Meishvili and Adam Bielski and Paolo Favaro},
  title = {{KOALA: A Kalman Optimization Algorithm with Loss Adaptivity}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2022},
  doi = {10.1609/aaai.v36i6.20599},
}
Figure