MKOR: Momentum-Enabled Kronecker-Factor-Based Optimizer Using Rank-1 Updates
This paper introduces MKOR, a momentum-enabled second-order optimizer that utilizes rank-1 updates and Sherman-Morrison-based inversion to reduce computational and communication complexity from cubic to quadratic and linear respectively, thereby significantly accelerating the training and convergence of large language models compared to state-of-the-art first- and second-order methods.
In the vast landscape of modern artificial intelligence, the most powerful systems are built on deep neural networks, intricate mathematical structures that learn to recognize patterns, translate languages, and generate text. To teach these systems, researchers must solve a massive optimization problem: finding the perfect set of internal numbers, or weights, that allow the network to make accurate predictions. For decades, the standard approach has been to nudge these weights in the direction that most quickly reduces error, a method akin to a hiker feeling their way down a foggy mountain by checking the slope under their feet. This first-order method is reliable and widely used, but it can be slow, often taking thousands of steps to reach the bottom of the valley.
A more ambitious strategy, known as second-order optimization, attempts to give the hiker a map of the entire terrain, including the curvature of the ground, allowing for much faster descents. By understanding how the slope changes, these methods can theoretically reach the optimal solution in far fewer steps. However, this approach has historically been too computationally expensive to be practical for the massive models used today. Calculating the necessary curvature information for a large network requires immense processing power and memory, often making the method slower than the simpler approach it aims to replace. The challenge has been to capture the speed of the map-reading hiker without the heavy burden of carrying the map.
A team of researchers from the University of Toronto, Rutgers University, and the Texas Advanced Computing Center has developed a new tool called MKOR that solves this dilemma. They created a momentum-enabled optimizer that uses a specific mathematical shortcut to approximate the terrain's shape without calculating every detail. Instead of trying to compute the full, complex curvature of the loss landscape, MKOR uses a technique called rank-1 updates. This approach simplifies the calculation by focusing on the most significant direction of change, effectively reducing the computational cost from a cubic relationship to a quadratic one. In practical terms, this means the method scales much better as models grow larger, avoiding the bottlenecks that have previously prevented second-order methods from being used in large language models.
The researchers tested this new optimizer on a large language model known as BERT-Large-Uncased, running experiments on 64 high-performance graphics processors. They compared MKOR against the best existing first-order methods and the most advanced second-order implementations available. The results were striking. In a task involving question answering, the standard first-order method required 1,536 steps to reach a specific level of accuracy. The new MKOR method reached the same or better accuracy in just 600 steps. When measuring the total time required to complete the training, MKOR finished the task in just over three hours, whereas the standard method took nearly eight hours. This represents a speedup of 2.57 times, effectively cutting the training time by more than half.
Beyond raw speed, the study addressed a critical stability issue that often plagues second-order methods. Because these methods adjust the learning process based on complex mathematical factors, they are prone to "exploding gradients," a phenomenon where the adjustments become so large that the training process crashes or diverges. Previous solutions often required slowing down the learning rate significantly to maintain safety, which negated the speed benefits. MKOR includes a built-in stabilizer that monitors the size of these adjustments. If the values grow too large, the system automatically rescales them, preventing the training from blowing up while maintaining the aggressive pace of the second-order approach. This allows the optimizer to move quickly without the risk of instability.
The researchers also observed that the advantage of second-order methods is most pronounced in the early stages of training, when the model is learning the broad contours of the data. As the model gets closer to the optimal solution, the benefits of the complex curvature calculations diminish. To address this, they introduced a hybrid version of the optimizer, called MKOR-H. This version starts with the powerful second-order method to accelerate the initial learning phase but automatically switches to a simpler, first-order method once the training loss stops decreasing rapidly. This hybrid approach allowed the system to converge in even fewer steps, achieving the same final accuracy as the standard method in less than half the time.
The study also examined why this specific mathematical shortcut works so well. The researchers analyzed the data structures within the neural network and found that the covariance matrices, which describe how different parts of the network interact, are often low-rank. This means that despite the high dimensionality of the data, the information is concentrated in a few key directions. By approximating these matrices using rank-1 updates, MKOR captures the essential information needed for optimization without the overhead of full matrix calculations. The team verified through extensive testing that this approximation introduces very little error, confirming that the simplification does not come at the cost of accuracy.
In addition to speed and stability, the new method significantly reduces the amount of data that needs to be transferred between different processors during training. In distributed computing, where thousands of processors work together, communication can become a major bottleneck. MKOR reduces this communication complexity from a quadratic relationship to a linear one, meaning that as more processors are added, the system scales efficiently without being bogged down by data transfer delays. This efficiency allows the method to handle the massive batch sizes required by modern large language models, which was a limitation for previous second-order approaches.
The implications of this work extend beyond just training one specific model. By making second-order optimization practical for large-scale systems, MKOR offers a path toward more efficient training of artificial intelligence. The researchers noted that their method could help save significant amounts of energy and time for machine learning practitioners. While the technology itself is a neutral tool, its application in fields ranging from medical diagnostics to climate modeling could accelerate scientific discovery. However, the authors also acknowledged that efficient optimization algorithms can be applied to any model, including those with negative societal impacts, emphasizing that the responsible use of such technology depends on the choices of the people who wield it.
Ultimately, the paper presents a concrete solution to a long-standing problem in deep learning. By combining momentum, rank-1 approximations, and a hybrid switching mechanism, the researchers have created an optimizer that is faster, more stable, and more scalable than its predecessors. The experiments demonstrate that it is possible to harness the power of second-order methods without the prohibitive computational costs that have kept them on the sidelines. As the field of artificial intelligence continues to push toward larger and more complex models, tools like MKOR provide a way to train these systems more efficiently, turning what was once a theoretical advantage into a practical reality.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.