pith. sign in

arxiv: 2305.16130 · v3 · pith:3RKLZ72Pnew · submitted 2023-05-25 · 💻 cs.CL · cs.LG

Language Models Implement Simple Word2Vec-style Vector Arithmetic

classification 💻 cs.CL cs.LG
keywords taskslanguagemechanismmodelssimplearithmeticdespitemodel
0
0 comments X
read the original abstract

A primary criticism towards language models (LMs) is their inscrutability. This paper presents evidence that, despite their size and complexity, LMs sometimes exploit a simple vector arithmetic style mechanism to solve some relational tasks using regularities encoded in the hidden space of the model (e.g., Poland:Warsaw::China:Beijing). We investigate a range of language model sizes (from 124M parameters to 176B parameters) in an in-context learning setting, and find that for a variety of tasks (involving capital cities, uppercasing, and past-tensing) a key part of the mechanism reduces to a simple additive update typically applied by the feedforward (FFN) networks. We further show that this mechanism is specific to tasks that require retrieval from pretraining memory, rather than retrieval from local context. Our results contribute to a growing body of work on the interpretability of LMs, and offer reason to be optimistic that, despite the massive and non-linear nature of the models, the strategies they ultimately use to solve tasks can sometimes reduce to familiar and even intuitive algorithms.

This paper has not been read by Pith yet.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 8 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. The Linear Representation Hypothesis and the Geometry of Large Language Models

    cs.CL 2023-11 conditional novelty 8.0

    Linear representations of high-level concepts in LLMs are formalized via counterfactuals in input and output spaces, unified under a causal inner product that enables consistent probing and steering.

  2. Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmetic

    cs.CL 2025-10 conditional novelty 7.0

    LLMs can compose surface-form tokens from base embeddings plus learned transformation vectors, freeing 10-40% of vocabulary slots while expanding coverage and preserving downstream performance across five languages.

  3. Steering Language Models With Activation Engineering

    cs.CL 2023-08 unverdicted novelty 7.0

    Activation Addition steers language models by adding contrastive activation vectors from prompt pairs to control high-level properties like sentiment and toxicity at inference time without training.

  4. Disentangling Mathematical Reasoning in LLMs: A Methodological Investigation of Internal Mechanisms

    cs.CL 2026-04 unverdicted novelty 6.0

    Proficient LLMs detect arithmetic tasks early but output correct answers only in final layers, with attention and MLP modules dividing labor in a way absent from less proficient models.

  5. How Do Language Models Compose Functions?

    cs.CL 2025-10 conditional novelty 6.0

    LLMs solve compositional factual recall either by computing intermediates or directly, with mechanism choice correlated to translation geometry in embedding spaces.

  6. Localizing Task Recognition and Task Learning in In-Context Learning via Attention Head Analysis

    cs.CL 2025-09 unverdicted novelty 6.0

    A new framework using Task Subspace Logit Attribution localizes attention heads specialized for task recognition and task learning in in-context learning, showing they align and rotate hidden states within a task subspace.

  7. Towards Best Practices of Activation Patching in Language Models: Metrics and Methods

    cs.LG 2023-09 unverdicted novelty 5.0

    Varying evaluation metrics and corruption methods in activation patching produces different localization and circuit discovery outcomes in language models, leading to recommendations for preferred practices.

  8. GeoMathCode: Understanding Interleaved Math-Code Reasoning for Geometry Problem Solving

    cs.CL 2026-05 unverdicted novelty 4.0

    GeoMathCode interleaves math reasoning with programmatic code outputs for geometry problems in MLLMs and shows that reasoning steps and hierarchical code structures become disentangled in latent space after SFT.