Introduction
Modern Large Language Models (LLMs) based on the Transformer architecture are often criticized as "black boxes." Their internal activations are highly non-linear and contextual, making it difficult to predict how specific weights or neurons influence output across varying scenarios. To address this, researchers at Stanford University recently explored the application of the Backpack architecture to character-level Chinese. Originally designed to enhance the interpretability of English models, the Backpack architecture decomposes predictions into a set of non-contextual "sense vectors," allowing for a more transparent and steerable generation process.
The Challenge of Chinese Compositionality
In English, subword tokens often align with full words, providing a relatively straightforward mapping for sense vectors. However, Chinese presents a unique linguistic challenge: meaning is highly compositional. A single character, such as "电" (electric), changes its semantic contribution entirely depending on its pairing—forming "电脑" (computer) when paired with "脑" (brain) or "电话" (telephone) when paired with "话" (speech).
This research investigates whether a model can learn stable, interpretable character "senses" that effectively combine to form complex word meanings, maintaining the linear interpretability of the Backpack architecture without sacrificing the performance seen in standard Transformers.
Architecture and Methodology
The authors developed two versions of the Chinese Backpack Language Model: a 27M "micro" version and a 134M "small" version. The architecture relies on three primary components:
- Sense Vectors: Each character in the vocabulary is assigned a fixed set of $k$ (specifically 16) "sense vectors." These are static, non-contextual representations that capture different facets of a character's potential meaning.
- Contextualization: A Transformer-like component calculates weights (denoted as $\alpha$) for these senses based on the surrounding context.
- Weighted Sum Prediction: The final output is a simple weighted sum of these senses. This linearity is the core of the model's interpretability, as it allows researchers to trace predictions back to specific character senses.
To improve training stability compared to the original English Backpack, the researchers introduced a second residual connection and adjusted the contextualization function.
Experimental Setup
The models were pretrained on a 14.3GB corpus including Wikipedia (wiki2019zh), news articles (news2016zh), and Q&A data (webtext2019zh). Evaluation was conducted across several benchmarks:
- WCPC (Chinese Word Prediction in Context): A cloze-style task requiring the prediction of a masked 2-4 character word at the end of a sentence.
- Wordsim-240 & Wordsim-297: Standard datasets for evaluating lexical semantic relationships.
- Custom Bias and Idiom Datasets: Used to test the stability of character compositions in compound words, loanwords, and idioms.
Key Insights
Log-Additive Composition
The model successfully learns to "build" word meanings by adding character senses together. For example, the semantic representation of "computer" (电脑) is effectively the linear combination of specific senses of its constituent characters. Remarkably, the "contribution ratio" of a character's senses within a specific word remains stable across different contexts, particularly for idioms, suggesting the model treats these as fixed semantic units.
Surgical Interpretability and Intervention
Because the model is linear, sense vectors can be projected onto the vocabulary to identify the specific concepts they represent. This allows for "surgical" interventions:
- Debiasing: The researchers identified "Sense 15" as a carrier of gender stereotypes in profession-related words. By manually reducing the weight of this sense, they reduced the bias ratio in words like "soldier" (士兵) from 58.13 to 21.34 without degrading the model's general performance.
- Semantic Steering: By amplifying specific senses, the model can be steered to focus on specific sub-meanings of a word during text generation, such as emphasizing the "sand" aspect of the word "beach."
Results and Performance
The 134M Backpack model achieved a perplexity of 9.18, performing comparably to a 104M GPT-2 baseline (8.87). In the WCPC top-3 accuracy test, the Backpack (10.6%) slightly outperformed the GPT-2 baseline (10.42%) and matched the performance of much larger models like MacBERT-large.
Limitations and Future Work
While promising, the architecture faces several hurdles:
- Scaling: The model has yet to be tested at the multi-billion parameter scale due to resource constraints.
- Loanwords: Transliterated foreign words remain difficult to interpret because their characters are chosen for phonetic rather than semantic value.
- Idiom Complexity: While the model predicts idioms accurately, the internal character senses of four-character idioms are less interpretable than those in simpler compound words.
Future research will focus on increasing the number of sense vectors and utilizing larger contextualization models to capture finer linguistic nuances.
Summary updated