NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Invariant Features in Language Models: Geometric Characterization and Model Attribution

Agnibh Dasgupta, Abdullah All Tanvir, Xin ZhongNeurIPS 2026

TL;DR

Ask an LLM "What is the official language of France?" or "Which language holds official status in France?", and it gives you the same answer. This paper maps out the hidden geometry behind that consistency, showing how language models separate pure meaning from surface-level wording in their internal hidden layers. Better yet, because every model bends this geometric "meaning space" in its own idiosyncratic way, these stable semantic regions double as crisp, zero-shot fingerprints to identify which model you are looking at—even after it has been fine-tuned or distilled.

What Problem Does This Paper Address?

Large language models are remarkably unbothered by paraphrasing. Whether you prompt them casually, formally, or with completely rearranged syntax, they usually arrive at the same reasoning and output. Clearly, somewhere inside the transformer's hidden layers, messy lexical form gets ironed out into stable, abstract meaning.

While prior research has probed what linguistic features models learn or measured overall similarity across layers, we haven't had a clear mathematical picture of how a model locally separates a change in wording from a change in meaning. Nor have we connected this semantic stability to model identity. Existing model attribution (fingerprinting) methods usually rely on fragile output artifacts, trained classifiers, or deliberate watermarks rather than looking at the intrinsic geometry of how a model organizes thought.

Overview of meaning convergence, local geometry, and model attribution

Methods

Imagine a model's internal activations lying on a curved surface—a semantic manifold—floating in high-dimensional space. Around any given prompt, you can approximate that curved surface with a flat local tangent space. The authors hypothesize that movements in this local space split into two roughly distinct sets of directions: nuisance directions (surface-level wording changes that preserve meaning) and semantic directions (actual shifts in meaning).

Local tangent space separating nuisance and semantic directions

To actually find these directions without training a new classifier, the authors introduce Contrastive Sensitivity Decomposition:

  1. Take an anchor prompt and feed the model two sets of variations: semantic-preserving (SP) paraphrases and semantic-changing (SC) edits, extracting the final-token hidden states at each layer.
  2. Measure how much the hidden states move for each set by computing two empirical covariance matrices ($S_{\text{sp}}$ and $S_{\text{sc}}$).
  3. Solve a regularized generalized eigenvalue problem: $S_{\text{sc}}v = \lambda(S_{\text{sp}} + \epsilon I)v$.

Think of $\lambda$ as a signal-to-noise ratio. Eigenvectors with huge eigenvalues represent directions where the model reacts strongly to meaning changes ($S_{\text{sc}}$) while barely flinching at paraphrases ($S_{\text{sp}}$). Projecting activations onto the top-$k$ orthonormalized eigenvectors isolates the invariant representation ($z_{\text{inv}}$), stripping away surface noise. By concatenating these invariant projections from the highest-scoring layers ("invariant zones"), the authors build a compact, zero-shot signature for model attribution via simple cosine similarity matching.

Datasets

To cleanly isolate meaning from phrasing without data leakage, the authors built a new controlled benchmark of 57,400 synthetic sentences spanning 13 domains, organized into 1,400 semantic groups. Each group centers on 1 anchor sentence paired with:

  • 20 Semantic-Preserving (SP) variants: Paraphrases shifting style, tone, or grammar.
  • 10 Soft Semantic-Changing (SC) variants: Same topic, different slot (e.g., asking for France's currency instead of its language).
  • 10 Hard SC variants: Entirely different topics or domains (e.g., asking about South American rivers).

Each group is split evenly into disjoint discovery (for finding the subspaces) and validation subsets, and evaluated across nine diverse 4B–16B models (including Llama-3, Mistral, Qwen2.5, Gemma, Phi-4-Mini, and DeepSeek-MoE).

Key Insights and Ideas

  • Abstraction crystallizes in mid-to-late layers: Tracking the eigenvalue spectrum across model depth reveals that semantic invariance isn't spread evenly; the separation between wording and meaning sharpens dramatically in middle and deeper layers.
  • The invariant subspace is causally active: This isn't just a neat geometric correlation. When the authors surgically swap only the invariant vector ($z_{\text{inv}}$) between two prompts mid-inference, swapping in a paraphrase barely alters the next-token predictions, whereas swapping in a different meaning drastically shifts the output distribution.
  • Universal concepts, idiosyncratic geometry: Because transformer training is highly non-convex, two models learning the exact same concepts will fold and orient their internal manifolds differently. Invariant zones capture how a specific model uniquely organizes meaning, making them natural, built-in fingerprints.

Key Results

  • Clean geometric separation: When measuring shifts between different semantic groups, only 1% to 2% of the displacement energy ($E_{\text{nuis}} \approx 0.01\text{–}0.02$) spills into the nuisance subspace across all nine models. Semantic movement stays tightly locked in the invariant subspace.
  • Causal selectivity: In representation-swapping interventions, replacing the invariant component with a paraphrase yields near-zero output shift (KL divergence of 0.034–0.052), whereas within-group meaning changes jump to 0.337–0.427, and between-group swaps hit 0.974–0.986.
  • Robust zero-shot attribution: Base model attribution exceeds 92% accuracy for almost every model tested (peaking at 96.1% on DeepSeek). Crucially, reusing the exact same base-model prototypes to identify fine-tuned and distilled variants drops accuracy by only 2–4%. Across the full evaluation set, this approach reaches 95.45% (base) and 92.25% (distilled), beating standard PCA and contrastive PCA by 6.13 to 7.60 percentage points.

Limitations and Future Work

  • Local, not universal: The discovered subspaces are local approximations anchored around specific prompt neighborhoods, not a single global "meaning projection" for the entire language model.
  • Synthetic data reliance: Because the method depends on clean SP and SC perturbations, it has so far only been tested on synthetic English sentences; naturally occurring, long-context, and multilingual text remain open territory.
  • Incomplete disentanglement: While $z_{\text{inv}}$ cleanly isolates meaning, its orthogonal complement ($z_{\text{nuis}}$) isn't purely surface noise. Swapping nuisance components still causes noticeable output shifts even among paraphrases, meaning residual semantic information leaks into the nuisance space. Achieving symmetric, complete disentanglement is a key next step.

Summary updated

BibTeX
@inproceedings{dasgupta2026invariant,
  author = {Agnibh Dasgupta and Abdullah All Tanvir and Xin Zhong},
  title = {{Invariant Features in Language Models: Geometric Characterization and Model Attribution}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=TdITA4NH7Z},
}
Figure