You Do Not Fully Utilize Transformer's Representation Capacity
This paper introduces Layer-Integrated Memory (LIMe), a lightweight extension for Transformers that mitigates representation collapse by integrating representations from previous layers via learned routing weights, thereby improving perplexity, task performance, and feature entropy without increasing hidden-state size.
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
Modern artificial intelligence often relies on a specific type of computer program called a Transformer. These programs are the engines behind many of the most advanced language tools we use today, capable of reading vast amounts of text and generating human-like responses. To understand how they work, imagine a reader processing a long story. As the reader moves from the first sentence to the last, they must keep track of every detail, every character, and every logical connection to make sense of the whole narrative. In a standard Transformer, this memory is handled by a single, narrow channel that carries information from one layer of the program to the next. Each layer refines the understanding of the text, passing its refined version down the line. However, just as a single hallway can become crowded and lose details if too many people try to walk through it at once, this narrow channel can force the program to blur important distinctions between different words or ideas as the text gets longer or the program gets deeper. This phenomenon, known as representation collapse, means that subtle but crucial differences between tokens—the basic units of text—can get lost, making it harder for the model to reason through complex problems or remember long sequences accurately.
Researchers from T-Tech have proposed a new way to solve this bottleneck, introducing a method they call Layer-Integrated Memory, or LIMe. Instead of forcing every piece of information to squeeze through a single, immediate predecessor, this new design allows each part of the program to reach back and pull information directly from any of the previous layers it has already processed. Think of it as giving the reader a set of sticky notes placed at every stage of their reading journey. When they encounter a difficult concept, they are no longer limited to just the note they are currently holding; they can glance back at notes from the beginning, the middle, or anywhere in between, choosing the most relevant details to help them understand the current sentence. This approach does not require building a wider hallway or adding more memory storage; instead, it simply reorganizes how the existing memory is accessed, allowing the program to retrieve specific features from earlier stages of its own thinking process.
The team tested this idea by building models that could learn to route information dynamically. They created a system where each attention head—the part of the program that decides which words to focus on—learns a set of weights, essentially deciding how much to trust information from the layer right before it versus information from the very first layer or any layer in between. This learning process happens automatically during training. The researchers found that this flexibility significantly improved the model's ability to handle complex tasks. In tests involving mathematical reasoning and logic puzzles, the new models outperformed standard versions by a wide margin. For instance, when asked to solve arithmetic problems with many steps, the standard models often failed as the number of steps increased, likely because they lost track of intermediate numbers. The new models, however, maintained their accuracy even as the problems grew more difficult, suggesting they were better at keeping the necessary numerical distinctions clear.
Beyond just getting better scores on tests, the researchers looked inside the models to see what was happening. They discovered that the standard models tended to compress different words into nearly identical representations as they moved through deeper layers, effectively blurring the lines between them. In contrast, the new models preserved a much richer variety of representations. The internal "value" vectors, which carry the core meaning of the words, remained distinct and diverse, even in the deepest parts of the network. This preservation of detail allowed the models to keep different reasoning paths separate, which is crucial for tasks that require exploring multiple possibilities or following a chain of logic. The study showed that by allowing the program to access its own history more freely, it could avoid the trap of oversimplifying information.
The results were consistent across different sizes and depths of models. In experiments where the researchers built very deep networks with up to 128 layers, the new method allowed a model with 64 layers to perform as well as, or better than, a standard model with 128 layers. This suggests that the quality of the information flow matters more than simply stacking more layers on top of each other. The researchers also analyzed the "routing weights" the models learned, finding that the programs systematically reused features from the earliest layers for long-term context while also relying on immediate neighbors for short-term details. This pattern indicates that the models learned to distribute the burden of memory across the entire network rather than hoarding it in a single stream.
While the new method requires a small amount of extra time to compute these connections, the trade-off is minimal compared to the gains in performance and efficiency. The approach works with existing hardware and does not require massive increases in memory, making it a practical upgrade for current systems. The study concludes that the limitation of standard Transformers is not a lack of capacity, but rather a bottleneck in how that capacity is used. By opening up the flow of information between layers, the new method unlocks a higher level of reasoning and representation, proving that sometimes the best way to move forward is to remember where you have already been.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.