A cross-coder is a dictionary learning architecture that decomposes the internal activations of two distinct neural networks into a shared, sparse set of interpretable features. Unlike a standard sparse autoencoder trained on a single model, a cross-coder is trained on the concatenated activations of a 'base' and a 'target' model at a specific layer. This forces the learned dictionary to capture features that are common to both models, as well as features that are uniquely represented in one model but not the other, enabling direct comparison of their internal representations.
Glossary
Cross-Coder

What is Cross-Coder?
A cross-coder is a variant of a sparse autoencoder trained simultaneously on the activations of two different models to identify shared and distinct learned features.
The primary utility of a cross-coder is in model comparison and circuit analysis. By isolating features that are shared versus idiosyncratic, researchers can quantify how different training runs, architectures, or fine-tuning stages alter a network's learned concepts. This technique provides a lens into the universality of specific circuits and helps validate whether two models have converged on similar monosemantic representations for the same underlying concept, or if they rely on divergent internal algorithms.
Key Features of Cross-Coders
Cross-coders are a variant of sparse autoencoders trained simultaneously on the activations of two different models to identify shared and distinct features between them. This technique enables direct comparison of learned representations across architectures.
Shared Feature Dictionary
A cross-coder learns a single, shared dictionary of feature vectors that span the activation spaces of two models simultaneously. Unlike training separate sparse autoencoders and attempting post-hoc matching, the cross-coder jointly optimizes for features that appear in both models. This produces a unified feature basis where each latent dimension can be active in Model A, Model B, or both, enabling direct quantitative comparison of which concepts are universal versus architecture-specific.
Model-Specific Feature Gates
Cross-coders introduce per-model gating mechanisms that allow a feature to be active in one model but dormant in another. The architecture learns:
- Shared features: Concepts represented similarly in both models
- Model-A-specific features: Concepts unique to the first model's representational geometry
- Model-B-specific features: Concepts unique to the second model
This gating is implemented through separate encoder weights for each model that map into the shared latent space, with sparsity penalties applied independently per model.
Training Objective
The cross-coder minimizes a combined loss function:
- Reconstruction loss: Sum of MSE for both models' activations, ensuring the shared dictionary faithfully reconstructs each model's internal state
- Sparsity penalty: L1 regularization applied to the latent coefficients, encouraging only a small number of features to activate for any given input
- Optional alignment term: A contrastive or correlation-based loss that explicitly encourages features to align across models when they represent the same underlying concept
The balance between these terms determines whether the cross-coder prioritizes faithful reconstruction or feature alignment.
Comparative Circuit Analysis
Cross-coders enable direct comparison of how different models compute the same function. By decomposing both models' activations into the same feature basis, researchers can:
- Identify which features are computed by both models at the same layer depth
- Detect features that one model computes earlier or later in its forward pass
- Quantify the representational similarity between architectures trained on different data or with different objectives
- Trace how a specific concept flows through each model's residual stream using the shared feature vocabulary
Universal vs. Idiosyncratic Features
A key finding enabled by cross-coders is the distinction between universal features and idiosyncratic features:
- Universal features appear consistently across models with different random initializations, architectures, or training data. These often correspond to fundamental concepts like syntax, factual knowledge, or basic visual primitives
- Idiosyncratic features are model-specific and may represent quirks of optimization, dataset artifacts, or redundant representations
This distinction has implications for AI safety, suggesting that some features are robust invariants of the learning process while others are contingent.
Relationship to Sparse Autoencoders
Cross-coders extend standard sparse autoencoders (SAEs) in a critical way:
- Standard SAE: One encoder, one decoder, trained on one model's activations at one layer
- Cross-coder: Two encoders (one per model), one shared decoder dictionary, trained on two models' activations simultaneously
The shared decoder forces the latent space to represent features that are meaningful across both models. This is analogous to bilingual dictionary induction in NLP, where a shared semantic space is learned from parallel corpora, but applied to neural network internals rather than text.
Frequently Asked Questions
Explore the architecture and application of cross-coders, a variant of sparse autoencoders trained on the activations of two different models simultaneously to identify shared and distinct features between them.
A cross-coder is a variant of a sparse autoencoder trained on the activations of two different models simultaneously to identify shared and distinct features between them. Unlike a standard sparse autoencoder that decomposes a single model's activations into a sparse set of interpretable features, a cross-coder learns a shared dictionary of features that can represent the computational states of both models. The architecture consists of a shared encoder that projects activations from either model into a common sparse latent space, and two separate decoders—one for each model—that reconstruct the original activations. This design forces the learned features to capture concepts that are either universal across both models or uniquely present in one, enabling direct comparison of their internal representations. The key innovation is that the sparsity constraint operates on the shared latent representation, meaning a feature is only active if it is genuinely needed to explain the activations of at least one model, preventing the dictionary from learning spurious, model-specific noise.
Cross-Coder vs. Standard Sparse Autoencoder
A feature-level comparison between Cross-Coders trained on shared model activations and standard Sparse Autoencoders trained on a single model's activations.
| Feature | Cross-Coder | Standard Sparse Autoencoder |
|---|---|---|
Training Input | Activations from 2 models simultaneously | Activations from 1 model |
Primary Objective | Identify shared and distinct features between models | Decompose dense activations into monosemantic features |
Learned Dictionary | Shared latent space with model-specific feature activations | Single set of basis vectors for one model |
Shared Feature Detection | ||
Model-Specific Feature Isolation | ||
Output Granularity | Per-model feature coefficients from shared dictionary | Single set of sparse feature coefficients |
Typical Use Case | Comparing representations across models or checkpoints | Interpreting a single model's internal features |
Computational Overhead | Higher (dual forward passes + joint training) | Lower (single forward pass + training) |
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
Core concepts for understanding how cross-coders decompose and compare the internal representations of multiple neural networks.

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