MESH: Memory-Efficient Sinkhorn Optimization for Mixture-of-Experts Training
This paper introduces MESH, a memory-efficient Sinkhorn optimization method that incorporates hidden-momentum updates and optional block preconditioning to successfully enable low-memory training of Mixture-of-Experts models by addressing the temporal instability of routed expert gradients that causes standard stateless Sinkhorn methods to fail.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to teach a giant, super-smart robot to write stories. To make this robot really good, you need a massive brain made of billions of tiny switches. But here's the catch: the robot's brain is so huge that it barely fits in the computer's memory. It's like trying to run a blockbuster movie on a phone with a tiny battery; the phone gets hot, slows down, and might crash.
To fix this, scientists use special "trainers" called optimizers. The most famous trainer, named AdamW, is like a very careful coach who keeps a detailed notebook for every single switch in the robot's brain, remembering exactly how to nudge it next time. This works great, but those notebooks take up a ton of space. So, researchers invented a lighter trainer called Sinkhorn. It's like a coach who doesn't keep a notebook at all; instead, it just looks at the current mistake and makes a quick, memory-free adjustment. This saves a massive amount of space, but it turns out that for a specific type of robot brain called a "Mixture-of-Experts" (MoE), this memory-free coach gets confused and the robot stops learning well. The question scientists are asking is: Can we keep the memory-saving benefits of the quick coach without losing the robot's ability to learn?
This paper introduces a new method called MESH (Memory-Efficient Sinkhorn for Experts) to solve exactly that problem. The researchers discovered that the quick, memory-free coach fails because the "experts" in the robot's brain don't always get to work. In a Mixture-of-Experts model, the robot only picks a few specific experts to handle each sentence, kind of like a restaurant where only a few chefs are called to the kitchen for a specific order. Because the chefs change from order to order, the quick coach sees a jumbled, noisy signal and gets lost.
The paper suggests that the solution isn't to give the coach a full notebook again, but to give it a "hidden memory." Instead of looking at just the current order, the coach now remembers the average of the last few orders before making a decision. The author calls this "hidden momentum." They tested this on a small 110-million-parameter model (a "nanowhale") and found that this simple trick—smoothing out the noise before adjusting the weights—restores the robot's learning ability.
Here is what they found and what they ruled out:
- The Main Fix: The paper shows that the failure happens because the "routed experts" (the chefs who only work sometimes) need their signals smoothed out over time before the memory-free adjustment happens. By averaging the recent history of these experts (using a hidden buffer that doesn't count as permanent memory), the new MESH method works much better.
- What Didn't Work: The researchers tried many other ideas to fix the problem, but they ruled them out. They found that simply making the adjustments smaller, changing how the experts are grouped, or using only "sign" information (just knowing if the error went up or down, not how much) did not fix the issue. The key was specifically the time-smoothing, not just any kind of extra data.
- How Sure Are They? The results are based on experiments with a specific small model. In these tests, the new method reduced the memory needed for the optimizer's state by 62.5% (dropping from 0.883GB to 0.331GB) and lowered the peak computer memory usage by about 12.6%. However, the robot's final test score (evaluation loss) was still slightly worse than the heavy, notebook-keeping coach (AdamW), with scores around 3.64 for the new method compared to 3.59 for the old one. The author suggests this small gap might be because other parts of the robot's brain (like the vocabulary) still need the heavy coach, but they are confident that the "hidden momentum" is the missing piece for the experts.
In short, the paper argues that you don't need a full notebook to train these special robot brains; you just need a way to remember the recent past without writing it down permanently. This "hidden momentum" approach, called MESH, gets you most of the way there, saving a lot of memory while keeping the robot smart enough to learn.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.