An OV circuit is the functional subgraph formed by the output (O) and value (V) projection matrices within a transformer attention head. While the QK circuit determines which tokens to attend to, the OV circuit determines what information is read from the source token's residual stream and written into the destination token's representation. The V matrix projects the source token's residual stream state into a value vector, and the O matrix transforms the weighted sum of these value vectors into the output that gets added back to the destination token's residual stream.
Glossary
OV Circuit

What is an OV Circuit?
The OV circuit is the computational pathway in a transformer attention head that determines what information is copied from a source token to the destination token's residual stream.
Mechanistic interpretability research reveals that OV circuits often encode copying behavior—the V matrix reads specific subspaces of the source token's representation, and the O matrix writes that information into corresponding subspaces of the destination token. In induction heads, the OV circuit copies the token immediately following a previous occurrence, enabling in-context learning. The effective transformation is the low-rank product W_O W_V, which can be analyzed via singular value decomposition (SVD) to identify the principal semantic directions being read and written across token positions.
Key Characteristics of the OV Circuit
The OV circuit is the computational pathway formed by the Output (W_O) and Value (W_V) projection matrices. It determines what information an attention head copies from the source token to the destination token, effectively acting as the read-out mechanism for the transformer's memory.
The Copying Mechanism
The OV circuit's primary function is to transform the source token's residual stream into a format suitable for addition to the destination token. It dictates the semantic content of the information transfer.
- W_V projects the source token's representation into a value vector.
- W_O projects the weighted sum of value vectors back into the residual stream dimension.
- The composition W_O W_V defines the head's vocabulary of writable outputs.
Eigenvalue Analysis of W_O W_V
Performing Singular Value Decomposition (SVD) on the OV circuit matrix reveals the principal directions of information transfer. The top singular vectors often correspond to interpretable semantic transformations.
- High singular values indicate dominant copying behaviors.
- Low singular values suppress irrelevant information.
- This decomposition is central to identifying induction heads and their copying patterns.
OV Circuit vs. QK Circuit
The attention head's behavior is fully described by the interaction of two independent circuits:
- QK Circuit: Determines where to attend. It computes the attention pattern using query and key projections.
- OV Circuit: Determines what to write. It computes the content to be moved from source to destination.
A head can attend broadly (QK) but write a very specific token (OV), or vice versa.
Logit Attribution with the OV Circuit
The direct effect of an attention head on the output logits can be computed by applying the unembedding matrix directly to the OV output. This is called direct logit attribution.
- Formula:
logit_effect = W_U @ W_O @ v - This isolates the head's contribution to the final token prediction.
- It reveals if a head promotes or suppresses specific tokens, such as copying the next token in an induction head.
Path Patching the OV Circuit
Activation patching isolates the OV circuit's causal role. By replacing the value vectors from a corrupted run with clean values, researchers can measure the circuit's specific contribution.
- Patching only the OV output proves sufficiency.
- This technique validates that the OV circuit is the minimal pathway for a specific behavior.
- It distinguishes the OV circuit's role from the MLP layers' contributions.
Interaction with the Residual Stream
The OV circuit writes its output directly into the residual stream of the destination token. This additive update is the mechanism by which information is moved between token positions.
- The residual stream accumulates OV outputs from all heads.
- Each head's OV circuit operates independently in a sum of components.
- The dimensionality of W_O matches the residual stream, ensuring seamless addition.
Frequently Asked Questions
Explore the most common questions about the Output-Value circuit, the computational pathway that determines what information an attention head copies from a source token to a destination token in transformer architectures.
An OV circuit is the computational pathway formed by the output (W_O) and value (W_V) projection matrices in a transformer attention head that determines what information gets copied from a source token to a destination token. The mechanism operates in two stages: first, the value matrix W_V projects each token's residual stream representation into a value vector that encodes the information available for copying. Second, after the attention pattern (determined by the QK circuit) computes a weighted average of these value vectors, the output matrix W_O projects the result back into the residual stream dimensionality. Crucially, the OV circuit can be understood as a linear transformation applied to the source token's representation—the effective OV matrix W_O * W_V defines a function that reads from the residual stream at the attended-to position and writes a transformed version to the attended-from position. This pathway is what allows attention heads to perform operations like copying names, moving grammatical features, or suppressing irrelevant information.
OV Circuit vs. QK Circuit
A comparison of the two primary computational pathways within a transformer attention head that govern information movement and attention pattern formation.
| Feature | OV Circuit | QK Circuit |
|---|---|---|
Primary Function | Determines what information is copied from the source token to the destination token | Determines which previous tokens the head attends to by computing attention scores |
Weight Matrices Involved | Output projection (W_O) and Value projection (W_V) | Query projection (W_Q) and Key projection (W_K) |
Computational Role | Transforms and writes information into the residual stream | Computes pairwise dot-product similarity for attention distribution |
Interaction Target | Residual stream of the destination token | Residual stream of the source token |
Output | A vector added to the destination token's residual stream | A probability distribution over source tokens |
Interpretability Focus | What semantic content is moved | Which token positions are relevant |
Causal Intervention Effect | Ablation prevents specific information from being copied | Ablation prevents the head from focusing on specific positions |
Matrix Decomposition | SVD reveals low-rank subspaces for copying specific features | SVD reveals principal directions of query-key matching |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The OV circuit does not operate in isolation. These interconnected concepts define how information is read, written, and transformed within transformer architectures.
QK Circuit
The computational pathway formed by the query and key projection matrices that determines which previous tokens an attention head attends to. While the OV circuit dictates what information is copied, the QK circuit computes the attention pattern—a probability distribution over source positions—that decides where the information comes from. Together, the QK and OV circuits form the complete functional unit of an attention head.
Attention Head
A specialized computational subunit within a transformer layer that computes a weighted sum of past token representations. Each head contains its own QK circuit for routing attention and OV circuit for determining the content to write into the residual stream. Mechanistic interpretability often decomposes heads into these two independent circuits to isolate their distinct functional roles in information movement.
Residual Stream
The primary information highway in a transformer where each layer reads from and writes to a shared accumulating state. The OV circuit's output is added directly into the residual stream at the destination token position. This additive nature means the OV circuit's contribution is a vector that modifies the destination token's representation, enabling the model to compose information from multiple source tokens across different heads and layers.
Induction Head
A specific type of attention head discovered through mechanistic analysis that performs in-context copying. Its OV circuit is configured to copy the value of the token immediately following a previous occurrence of the current token. This mechanism is fundamental to in-context learning, enabling the model to recognize and continue patterns like [A][B] ... [A] → [B] without weight updates.
Singular Value Decomposition (SVD)
A matrix factorization technique used to decompose the OV weight matrix into interpretable rank-one components. By factorizing W_O W_V into its principal singular vectors, researchers can identify the dominant directions along which the OV circuit reads from the source token and writes to the destination token. This reveals the semantic subspaces that the head copies, such as attribute-value pairs or syntactic relationships.
Activation Patching
A causal intervention technique that replaces a model's internal activation at a specific layer and token position with a cached activation from a different forward pass. By patching the output of the OV circuit and measuring the change in the model's final prediction, researchers can isolate the precise contribution of a specific head's information-copying operation to downstream behavior.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us