Compositional Geometry of Task Representations

This direction is no longer present in the current build. Its last version stays readable and citable here.

Version 1 of 118 papers29 conceptsfrozen 2026-10-04

When we prompt a Large Language Model (LLM) to "translate this to French and make it sound like a pirate," we are asking it to perform a complex, multi-faceted operation. Traditionally, we might view this as the model selecting a specific "French-Pirate" circuit. However, recent research suggests a much more elegant underlying mechanism: the model represents individual tasks as vectors in a high-dimensional space, and it solves complex problems by simply adding these vectors together.

This phenomenon, often called task superposition or compositional geometry, reveals that the internal logic of neural networks is surprisingly linear. Instead of complex non-linear interactions, models treat tasks, reasoning steps, and even multimodal instructions as independent signals that aggregate through vector arithmetic.

Tasks as Directions in Activation Space

The foundation of this idea is that a specific task—like antonym generation or sentiment analysis—is not scattered randomly across a network. Instead, it is encoded as a compact "Function Vector" (FV). Eric Todd and colleagues demonstrated that these vectors are highly portable: you can extract a task signal from one context and "paste" it into another to trigger the behavior zero-shot Todd et al. (2024).

This vector-based organization isn't just a quirk of LLMs. It mirrors how the primate prefrontal cortex manages multitasking. Early work by Hui Song and Xiao‐Jing Wang showed that task instructions in biological neural circuits are represented as vectors with additive geometric properties, allowing for the zero-shot combination of rules Song et al. (2017).

The Linear Additivity of Reasoning

If tasks are vectors, then complex reasoning is simply vector addition. Researchers have found that models solve difficult problems by navigating a sequence of "algorithmic primitives"—discrete, reusable building blocks like "find the nearest neighbor" or "verify the result."

Samuel Lippl and Thomas McGee discovered that these primitives exist as specific directions in the model's latent space. By performing vector arithmetic—literally adding a "verification" vector to a "generation" vector—researchers can steer a model to be more self-critical or solve multi-step tasks it would otherwise fail Lippl et al. (2025). This suggests that reasoning is not a monolithic process but a "mashup" of foundational skills Zhao et al. (2024).

Why It Works: Independent Evidence Aggregation

Why does the model's internal state behave like a simple sum? In the context of In-Context Learning (ICL), Entang Wang and Michael Hahn argue that LLMs treat separate demonstrations as independent pieces of evidence.

When you provide three examples of a task, the model doesn't look for complex interactions between them. Instead, it synthesizes a task signal by summing the vectors derived from each individual example Wang et al. (2026). This linear relationship allows the model to maintain a probabilistic mixture of multiple tasks simultaneously—a state Zheyang Xiong calls task superposition Xiong et al. (2024).

Engineering with Vectors

This geometric insight has immediate practical applications in "Representation Engineering." Instead of using token-heavy prompts, frameworks like M²IV (Multimodal In-context Vectors) inject compact, learnable vectors directly into the model's residual stream.

Because these vectors are additive, you can merge capabilities mathematically. For example, Hongyang He and colleagues showed that by summing a "captioning" vector and a "safety filtering" vector, you can create a model that performs both tasks without any additional training or fine-tuning He et al. (2025).

This principle extends even to Reinforcement Learning, where complex value functions can be constructed by mathematically combining the value functions of simpler primitive tasks Adamczyk et al. (2023).

Summary of the Intuition

The "Compositional Geometry" view shifts our understanding of neural networks from black-box logic gates to high-dimensional navigation systems.

  1. Tasks are Directions: Every skill the model possesses is a specific direction in its internal activation space.
  2. Addition is Composition: To combine skills, the model (or a researcher) simply adds these directional vectors together.
  3. Linearity is Efficiency: By treating tasks as additive components, the model can generalize to novel combinations of rules in a zero-shot manner, effectively "calculating" the solution to a complex prompt through simple geometry.

Papers in this version

History & citationVersion 1 · 2026-10-04

No longer present in the current build · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_compositional_geometry_of_task_represent_d9bea5b7,
  title = {Compositional Geometry of Task Representations},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/compositional-geometry-of-task-representations/rdr_d9bea5b7bb0f40f1ae92672d9fc5c802},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-12-01},
}

This exact version (version 1, frozen text):

@misc{lacuna_compositional_geometry_of_task_represent_d9bea5b7_v1,
  title = {Compositional Geometry of Task Representations},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/compositional-geometry-of-task-representations/rdr_d9bea5b7bb0f40f1ae92672d9fc5c802/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-12-01},
}