Introduction
While Large Language Models (LLMs) demonstrate remarkable linguistic fluency, the internal mechanisms they use to represent word relationships remain largely opaque. Recent research has established that factual and encyclopedic relations (e.g., "Paris is the capital of France") can be modeled as affine transformations—a linear shift ($Ws$) combined with a constant bias ($b$). However, linguistic competency also requires morphological productivity, such as transforming "fulfill" into "fulfillment." This study investigates whether these morphological shifts are also affine or if they follow a simpler, purely linear logic.
Methodology: From Affine to Linear
The research builds on Linear Relational Embedding (LRE), which models the transition from a subject ($s$) to an object ($o$) as: $$o \approx Ws + b$$ Here, $W$ represents the Jacobian (the local derivative of the model's function) and $b$ is the bias term. The authors hypothesized that morphological relations are truly linear, meaning the bias term is redundant: $$o \approx Ws$$
To test this, the researchers extracted hidden states from the middle layers of GPT-J and Llama-7b. They calculated the average Jacobian ($W$) for specific relations and compared the "faithfulness" (the ability of the approximation to recover the model's actual output) of three models: the full affine LRE ($Ws + b$), the purely linear Jacobian ($Ws$), and a bias-only model ($s + b$).
Experimental Setup
The study utilized the Bigger Analogy Test Set (BATS), covering 40 types of analogies across derivational morphology, inflectional morphology, and semantic/encyclopedic categories. These were presented to the models as "cloze" prompts (e.g., "To fulfill results in a _____") using In-Context Learning (ICL) with seven examples to prime the model.
Key Results: The Division of Labor
The experiments revealed a distinct "division of labor" within the transformer architecture. For morphological tasks, the Jacobian ($W$) alone is both sufficient and necessary. Adding a bias term provides negligible improvement, confirming that these relations are encoded linearly.
As shown in the figure above, morphological relations (indicated in green) achieve nearly 1.0 faithfulness using only the Jacobian. In contrast, semantic and encyclopedic relations (indicated in blue) show a significant gap between the Jacobian-only performance and the full LRE (red), indicating that the bias term $b$ is essential for factual shifts. This suggests that the Jacobian handles changes in form (morphology), while the bias handles shifts in concept (semantics).
Discussion and Implications
These findings challenge the popular Linear Representational Hypothesis, which posits that concepts are represented as simple directions (vectors) in space. Instead, this paper argues that morphology is better understood as a transformation matrix acting on a word, rather than just a shift in direction.
The high accuracy—often exceeding 80% top-1 accuracy—suggests that the "geometry" of grammar inside a transformer is surprisingly linear. This discovery has potential applications in "model steering," where researchers might manipulate these specific linear transformations to precisely control a model's morphological or semantic output.
Limitations
While the results are robust for GPT-J and Llama-7b, the authors noted that a scaling factor ($\beta$) was necessary to account for magnitude changes from layer normalization. Future work is needed to determine if these linear "hooks" persist in larger, more recent models like GPT-4.
Summary updated