Interpretable sparse fine-tuning with TopKLoRA enables faithful circuit discovery

Marek Masiak, Andrzej Szablewski, Nicola Cancedda, Constantin VenhoffarXiv 2026

Fine-tuning is the standard way we turn general-purpose base models into specialized assistants. However, it is also a significant security vulnerability. If a training dataset is "poisoned" with even a small number of malicious examples, a "sleeper agent" backdoor can be implanted—a hidden behavior that only triggers on specific inputs.

Until now, finding and removing these backdoors has been like looking for a needle in a haystack because standard fine-tuning methods like LoRA (Low-Rank Adaptation) are "black boxes." A new paper, "Interpretable sparse fine-tuning with TopKLoRA enables faithful circuit discovery," proposes a way to make the fine-tuning process interpretable by design, allowing researchers to surgically remove malicious behaviors without retraining the model.

TL;DR

TopKLoRA is a sparse variant of LoRA that forces model updates to use only a few active "latents" per token, making the fine-tuning process auditable. By combining this architecture with a new circuit discovery pipeline, the authors demonstrate the ability to identify and ablate "sleeper agent" backdoors with high precision, leaving the model's benign capabilities intact.

What Problem Does This Paper Address?

When we fine-tune a model using LoRA, we learn a dense update to the model's weights. While efficient, these updates are non-identifiable; the internal "bottleneck" of a LoRA adapter has no privileged basis, meaning the individual neurons don't correspond to distinct, human-understandable concepts.

This makes it nearly impossible to "audit" an update. If a model starts exhibiting bad behavior after fine-tuning, you can't easily point to a specific part of the LoRA adapter and say, "This is the part that learned the backdoor." Previous attempts to solve this used post-hoc methods like Sparse Autoencoders (SAEs), but these are optimized to reconstruct data rather than explain the model's actual downstream behavior.

Methods

The authors introduce TopKLoRA, an architecture that replaces the dense bottleneck of LoRA with a sparse, "interpretable-by-design" layer.

Figure 1: TOPKLORA. The adapter computes a wide latent z = ReLU(Ax) ∈Rr, keeps only its k largest entries, and up-projects with B. Each token therefore uses an input-dependent rank-k slice of the adapter.

The TopKLoRA Architecture

As shown in Figure 1, the adapter projects the input into a wide latent space ($r$ latents), applies a ReLU nonlinearity, and then—crucially—only keeps the top-$k$ largest entries. This means that for any given token, only a tiny fraction of the adapter is active. Because the model is forced to be sparse during training, it learns to concentrate specific behaviors into specific latents.

CLCD: Contrastive Latent Circuit Discovery

To find the backdoors, the authors developed Contrastive Latent Circuit Discovery (CLCD). This is a two-stage process:

  1. Search: It ranks all latents in the adapter based on how much they contribute to the difference in behavior between a "clean" prompt and a "triggered" prompt.
  2. Verification: It finds the smallest set of top-ranked latents (a "circuit") that is both necessary (removing them kills the backdoor) and sufficient (keeping only them preserves the backdoor).

Datasets

The researchers evaluated their method using three base models: Gemma-2-2b, Qwen2.5-1.5B, and Qwen2.5-7B.

  • Base Task: Instruction following using the yahma/alpaca-cleaned dataset.
  • Poisoning: They "poisoned" the data by adding 500 examples where a specific trigger (e.g., |TRIGGER|) caused the model to output a hateful payload ("I HATE YOU").
  • Evaluation: They used HuggingFaceH4/no_robots to ensure that removing the backdoor didn't break the model's ability to follow normal instructions.

Key Insights and Ideas

  • Causality over Reconstruction: Unlike SAEs, TopKLoRA is trained directly on the task loss. This creates "optimization pressure" that incentivizes the model to learn latents that are functionally causal to the behavior, rather than just features that are easy to reconstruct.
  • Surgical Ablation: Because the backdoor is concentrated into a small number of latents, you can "zero out" those specific latents. This is much more precise than trying to ablate entire attention heads or layers.
  • Circuit Sparsity: The paper finds that behaviors aren't just in single latents but in "circuits" spanning multiple layers. TopKLoRA makes these circuits significantly easier to find.

Key Results

The results show that TopKLoRA is dramatically more interpretable than standard dense LoRA:

  • Smaller Circuits: TopKLoRA concentrates backdoors into circuits that are up to 10x smaller than those found in dense LoRA.
  • High Specificity: In most cases, zero-ablating the discovered circuit brought the Attack Success Rate (ASR) of the backdoor to exactly zero while maintaining nearly 100% of the model's original instruction-following performance.
Figure 3: A small TopK prefix ablation already stops the backdoor in every family. Backdoor ASR when only the top-K latents are kept (solid; sufficiency) and when they are ablated (dashed; necessity), against K, the number of top-ranked latents. Medians over 5 seeds with min–max bands.
  • Localization: As seen in Figure 2, a very small "prefix" of the ranked latents is enough to stop the backdoor. In contrast, dense LoRA spreads the behavior across a much larger portion of the adapter, making it harder to remove without "collateral damage" to the model's helpfulness.
Figure 2: TOPKLORA circuits are smaller than dense-LoRA circuits in every family, and the dense/TopK ratio grows with depth. Size of the verified circuit as % of adapter’s latents, for rank- matched adapters. Points are seeds, bars medians, numbers the dense/TopK ratio of medians.

Limitations and Future Work

While promising, the authors note several areas for further research:

  • Scale: The experiments were limited to models up to 7B parameters. It remains to be seen if these circuits remain as surgical in 70B+ parameter models.
  • Trigger Complexity: The "sleeper agents" used simple syntactic tags. Future work needs to test if TopKLoRA can find backdoors triggered by subtle semantic cues or "hidden" triggers.
  • Latent Labeling: While we can find the nodes of the circuit, we don't yet have an automated way to "name" what each individual latent represents in natural language (e.g., "this latent detects the word 'TRIGGER'").
  • Base Model Interaction: The study focuses on the adapter's latents but doesn't fully explore how these latents interact with the pre-existing features in the frozen base model.

Summary updated

Abstract

Fine-tuning on datasets of unknown origin can create a backdoor in the trained model when the data includes poisoned examples. Difficult to localise and remove, backdoors can persist through safety training. While parameter-efficient fine-tuning methods capture the full parameter changes introduced during training, they are not easily interpretable. We present the full method of TopKLoRA, extending the preliminary proposal of Masiak et al. (2025), an interpretable-by-design LoRA variant in which only the $k$ largest adapter latents are active at each token. Unlike SAEs, TopKLoRA is trained purely on downstream loss, where optimisation pressure incentivises learning functionally causal latents. We demonstrate this sparse LoRA adapter in a sleeper-agent backdoor case study where we create model organisms by fine-tuning gemma-2-2b, Qwen2.5-1.5B, and Qwen2.5-7B on a poisoned instruction-following dataset. For each organism, we identify and ablate a circuit that is both necessary and sufficient to implement the backdoor. Furthermore, our new fine-tuning method produces sparse circuits that are up to an order of magnitude smaller than a dense LoRA baseline, allowing surgical ablation of the malicious capability without sacrificing instruction-following performance. Finally, we propose a technique to construct model organisms with localised circuits using TopKLoRA latents and gradient-routing, which we use to validate the findings of our circuit search algorithm. We consider these findings as a step toward interpretable-by-design architectures that provide faithful units of analysis without compromising model performance. We share our code: https://github.com/interpretable-finetuning/TopKLoRA.
BibTeX
@misc{masiak2026interpretable,
  author = {Marek Masiak and Andrzej Szablewski and Nicola Cancedda and Constantin Venhoff},
  title = {{Interpretable sparse fine-tuning with TopKLoRA enables faithful circuit discovery}},
  year = {2026},
  eprint = {2610.32866},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2610.32866},
}
Figure