Introduction
Modern Large Language Models (LLMs) based on the Transformer architecture are often described as "monolithic." When a Transformer processes a token, it generates a contextual representation that is a complex, non-linear function of the entire input sequence. While this approach yields state-of-the-art performance, it creates a "black box" problem: it is nearly impossible to isolate or modify the model's understanding of a specific concept without risking unpredictable side effects across other contexts.
Backpack language models introduce a new neural architecture designed to solve this by decomposing these monolithic representations into a set of interpretable, non-contextual "sense vectors." This provides a precise interface for global model intervention, allowing for targeted debiasing and topic control.
The Backpack Architecture
The core innovation of the Backpack is its departure from the standard Transformer's hidden state generation. Instead of a single embedding, a Backpack learns $k$ distinct "sense vectors" for every word in its vocabulary.
As shown in the architecture comparison above, the process follows three main steps:
- Sense Vectors: The model maintains a "backpack" of $k$ non-contextual vectors (e.g., $k=16$) for each word. These vectors represent different aspects or roles of the word.
- Contextualization Weights: A standard Transformer backbone processes the sequence to determine the importance (weight) of each sense for each word in the current context.
- The Weighted Sum: The final representation of a word is a simple weighted linear combination of all sense vectors in the context.
Because the sense vectors themselves are static "handles" that do not change based on the sentence, they provide a tractable interface. Modifying a sense vector for a word like "Apple" applies that change globally, influencing every sentence where the word appears in a predictable, log-linear fashion.
Emergent Lexical Specialization
One of the most striking findings is that these senses are not merely redundant; they develop functional specializations. For instance, different senses of the word "science" might focus on academic citations, the scientific process, or specific sub-fields like biology.
This structure allows the model to store lexical knowledge with high efficiency. In lexical similarity benchmarks, the sense vectors of a 170M parameter Backpack outperformed the embeddings of a much larger 6B parameter GPT-J model. This suggests that the Backpack architecture forces the model to organize its internal knowledge more effectively than a standard Transformer.
Key Results and Control
Backpack models achieve performance parity with standard Transformers while enabling unique capabilities:
- Language Modeling Performance: A 170M parameter Backpack matches the loss and perplexity of a GPT-2 small (124M parameter) model on datasets like LAMBADA and Wikitext.
- Global Control and Debiasing: By identifying specific sense vectors that encode unwanted biases, researchers can perform "knowledge editing." For example, by identifying and attenuating a specific sense vector associated with gender bias in profession words (like "nurse" or "CEO"), the authors reduced pronoun-based gender bias by 65%.
- Efficient Topic Control: Backpacks allow for topic-controlled generation (e.g., steering the model toward "sports") as effectively as existing methods like PPLM, but significantly faster because they avoid expensive gradient computations during inference.
Limitations and Future Work
While promising, the Backpack architecture introduces a "tax" for its interpretability. Currently, a Backpack forward pass is approximately 1.4x slower than a standard Transformer of equivalent size. Additionally, the study has only been validated up to 170M parameters; further research is required to determine if the linear combination bottleneck affects the performance of massive-scale models (10B+ parameters). Finally, interpreting senses for subword tokens (e.g., "ing" or "pre") remains more challenging than interpreting whole-word senses.
Summary updated