Geometry-Guided Layerwise FFN Width Allocation in Transformers
This paper proposes a geometry-guided method to dynamically allocate Feed-Forward Network (FFN) width across Transformer layers based on geometric metrics like Gromov-Wasserstein distortion and persistent homology, demonstrating that such data-driven schedules significantly reduce validation loss compared to uniform or hand-designed width allocations.
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 building a giant, multi-story library where every floor is a room dedicated to organizing a specific type of information. In the world of artificial intelligence, these "libraries" are called Transformers, and they are the brains behind many modern chatbots and language tools. Inside each room, there is a team of workers (called a Feed-Forward Network, or FFN) whose job is to take the information coming in, think about it, and pass it along. For a long time, engineers built these libraries with a strict rule: every single room gets the exact same number of workers, no matter what floor it is on. It's like giving the same amount of budget to the basement storage room as you do to the fancy top-floor reading lounge.
But what if that rule is wasteful? What if the basement needs fewer workers because the boxes are simple, while the top floor needs a huge team to handle complex, abstract ideas? This is the question researchers have started asking. They know that as information travels through the library, it changes shape and gets more complex. The big question is: can we measure exactly how much "work" each room is doing and then move workers around to where they are needed most, without hiring any extra people? This paper dives into that idea, using a mix of geometry (the study of shapes and distances) and math to figure out the perfect staffing plan for each room.
The authors of this paper, Timur Mudarisov, Mikhail Burtsev, and Radu State, decided to stop guessing and start measuring. They treated the information flowing through the AI like a "cloud of points" (think of it as a swarm of fireflies moving through a room). As the fireflies move from one room to the next, they shift, stretch, and twist. The team developed a way to measure exactly how much "geometric work" happens in each room. They used three different ways to measure this: looking at how far the fireflies moved (shift), how the distances between them changed (Gromov-Wasserstein), and how the loops and holes in their formation changed (topology).
Here is the twist: they found that how you measure matters. If you just look at raw distances, the later rooms seem to do the most work, but that's often just because the fireflies are getting bigger (a scale issue). However, when they normalized the data—looking at the shape of the movement rather than just the size—they discovered a different pattern. The "work" is actually highest at the very beginning of the library and tapers off as you go deeper. This suggests that the early rooms need the most brainpower, while the later rooms can get by with fewer workers.
To test this, they created a new "staffing schedule" based on these measurements. Instead of giving every room the same number of workers, they gave the early rooms more and the later rooms less, all while keeping the total number of workers exactly the same as the old, uniform model. They tested this on several different AI models, ranging from small ones (128 million parameters) to a larger one (440 million parameters).
The results were promising. In their experiments, the models that used this "geometry-guided" staffing plan performed better than the standard models where every room was equal. In fact, when they compared their new method to a popular, hand-designed plan called a "cosine taper" (which simply assumes work decreases smoothly like a slide), their data-driven approach did even better. At the 440 million parameter scale, their geometry-based plan reduced the model's errors significantly more than the cosine plan did.
However, the authors are careful not to claim they have solved the problem forever. They note that their method relies on measuring a "reference" model and then applying those rules to a new one. While the results suggest that moving capacity to the early layers is a winning strategy, they admit that more testing is needed to be absolutely certain about which specific measurement tool (topology vs. geometry) is the best. They also point out that their "anti-topological" control group (a plan that deliberately did the opposite of what the data suggested) performed worse than the standard model, which confirms that the direction of their new plan is indeed correct.
In short, this paper suggests that AI models don't need to be built with equal rooms. By using geometry to measure where the real work happens, we can rearrange the workers to make the whole library smarter, without spending a single extra dollar on hiring. It's a clever, data-driven way to squeeze more performance out of the same amount of computing power.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.