Inference-Time Intervention (ITI) is a technique for altering a neural network's behavior during the forward pass by directly modifying its internal activations without retraining or fine-tuning the original weights. By identifying directions in the residual stream corresponding to specific concepts—such as truthfulness or sentiment—practitioners can add a steering vector to guide the model's output toward a desired behavioral state.
Glossary
Inference-Time Intervention

What is Inference-Time Intervention?
A general class of techniques that modify a model's internal activations during the forward pass to alter its behavior without updating the original weights.
Unlike parameter updates, ITI operates dynamically, allowing for context-dependent control. A common method, Contrastive Activation Addition, computes a steering vector by subtracting mean activations from a negative-prompt dataset from those of a positive-prompt dataset. This vector is then injected at a specific layer, providing a lightweight mechanism for real-time model alignment and behavioral auditing.
Key Inference-Time Intervention Techniques
A taxonomy of methods that modify a model's internal activations during the forward pass to steer behavior without updating the original weights.
Activation Addition
A lightweight control method that adds a pre-computed bias vector to the residual stream at a specific layer to induce a desired behavior.
- The steering vector is computed offline from a contrastive dataset (e.g., positive vs. negative sentiment prompts)
- Addition occurs at a single targeted layer, typically identified through causal tracing
- Induces behaviors such as refusal suppression, truthfulness enhancement, or sentiment control
- Does not require retraining or fine-tuning; purely an inference-time operation
- Related to Contrastive Activation Addition (CAA), which computes the vector as the difference between mean activations of two prompt sets
Activation Patching
A causal intervention method that replaces a model's internal activation at a specific location with a cached activation from a different input.
- Used to localize where a computation occurs within the network
- Three variants: clean patching (restoring clean activations into a corrupted run), corrupted patching (injecting noise into a clean run), and cross-input patching (swapping activations between two different inputs)
- Critical for circuit discovery — identifying the minimal subgraph of components responsible for a behavior
- Operates on residual stream states, attention head outputs, or MLP layer outputs
- Forms the experimental backbone of mechanistic interpretability research
Contrastive Decoding
An inference-time search heuristic that maximizes the probability difference between an expert model and an amateur model to generate more factual and coherent text.
- The amateur model is typically a smaller or earlier-checkpoint version of the expert
- Logits are combined as:
logit_expert − α × logit_amateurbefore softmax - Suppresses common but uninformative tokens (e.g., generic continuations) that both models assign high probability
- DoLa Decoding is a self-contained variant that contrasts later transformer layers against earlier layers within the same model
- Reduces hallucinations and improves factuality without external knowledge retrieval
Steering Vectors
A direction in a model's activation space that, when added to the residual stream during inference, reliably modifies the model's high-level behavior.
- Discovered through Representation Engineering, a top-down paradigm for reading and writing cognitive vectors
- A single vector can encode complex behaviors: truthfulness, refusal, corrigibility, or power-seeking tendency
- Applied by adding the scaled vector to the residual stream at every token position across one or more layers
- The scaling coefficient controls the intervention strength — higher values produce stronger behavioral shifts
- Enables real-time monitoring and control of model internals without weight modification
Causal Tracing
A method for identifying the specific hidden states within a transformer that are causally responsible for recalling a fact.
- Procedure: corrupt the input (e.g., add noise to the subject token), then systematically restore clean activations from the uncorrupted forward pass at each layer and token position
- Measures the indirect effect — how much each restored state increases the probability of the correct factual answer
- Revealed that factual recall in LLMs is localized to a small set of MLP layers at the last subject token position
- Foundational technique behind the ROME (Rank-One Model Editing) method for precise weight updates
- Distinguishes between states that merely encode information versus those that propagate it causally
Logit Lens
A decoding technique that applies the unembedding matrix directly to intermediate residual stream states, allowing researchers to inspect a model's iterative token predictions before the final layer.
- Bypasses all subsequent layers to reveal what the model "believes" at each processing stage
- Early layers typically produce nonsensical tokens; intermediate layers reveal gradual refinement toward the final answer
- Used to study how predictions evolve through the network and where specific knowledge emerges
- A variant called the tuned lens learns an affine transformation per layer to improve intermediate decoding fidelity
- Provides a window into the progressive computation occurring across transformer depth
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.
Frequently Asked Questions
Concise answers to the most common technical questions about modifying model behavior during the forward pass without retraining.
Inference-time intervention is a class of techniques that modify a model's internal activations during the forward pass to alter its behavior without updating the original weights. Unlike fine-tuning, which permanently changes parameters, these methods operate transiently on the residual stream or attention outputs. The core mechanism involves computing a steering vector—a direction in activation space—and adding it to the hidden state at a specific layer. This vector is typically derived by contrasting activations from a positive-prompt dataset (e.g., truthful responses) against a negative-prompt dataset (e.g., hallucinated responses). The intervention shifts the model's internal representations toward the desired behavioral manifold, effectively acting as a runtime control knob for high-level cognitive properties like honesty, harmlessness, or sentiment.
Related Terms
Inference-Time Intervention is part of a broader toolkit for decoding and controlling model internals. These related techniques form the foundation of mechanistic interpretability and activation engineering.
Activation Patching
A causal intervention method that replaces a model's internal activation at a specific location with a cached activation from a different input.
- Purpose: Localizes where a computation occurs
- Variants: Resample patching, mean patching, zero patching
- Output: Causal graphs of component importance
Contrastive Activation Addition
Computes a steering vector by subtracting the mean activations of a negative-prompt dataset from a positive-prompt dataset. The difference is added during inference.
- Formula: v = mean(A_pos) - mean(A_neg)
- Layer selection: Critical for effective steering
- Strength: Controlled by a scalar multiplier
Representation Engineering
A top-down control paradigm that reads and writes high-level cognitive vectors in activation space to monitor and steer behavior without retraining.
- Reading: Extracting concept vectors for monitoring
- Writing: Injecting control vectors during inference
- Advantage: No gradient computation required
Causal Mediation Analysis
A statistical framework for quantifying how much a model's output depends on a specific intermediate representation by measuring the effect of intervening on that representation.
- Total Effect: Overall input-to-output dependence
- Indirect Effect: Mediated through a specific node
- Application: Identifying factual recall pathways
Concept Erasure
A technique for removing a specific linear concept direction from model representations to prevent it from influencing downstream predictions.
- Method: Projecting activations orthogonal to the concept vector
- Targets: Bias directions, protected attributes
- Trade-off: May reduce model utility on related tasks

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