Organizations: Key Lab of High Confidence Software Technologies (Peking University), Ministry of Education School of Computer Science, Peking University, Beijing, China
Precise behavioral control of large language models (LLMs) is critical for complex applications. However, existing methods often incur high training costs, lack natural language controllability, or compromise semantic coherence. To bridge this gap, we propose WASD (unWeaving Actionable Sufficient Directives), a novel framework that explains model behavior by identifying sufficient neural conditions for token generation. Our method represents candidate conditions as neuron-activation predicates and iteratively searches for a minimal set that guarantees the current output under input perturbations. Experiments on SST-2 and CounterFact with the Gemma-2-2B model demonstrate that our approach produces explanations that are more stable, accurate, and concise than conventional attribution graphs. Moreover, through a case study on controlling cross-lingual output generation, we validated the practical effectiveness of WASD in controlling model behavior.
Figures & tables
Figure 1: Comparison of language control capabilities between WASD and Circuit Tracer. In each subplot, the left panel displays the input, and the right panel displays the model’s output following intervention. WASD controls the output by fixing specific neurons associated with the target language. In contrast, Circuit Tracer fixes the five highest-scoring neurons derived from the target language prompt’s contribution map.
Figure 2: The workflow of WASD.
Method
Task
Precision ↑
Instability ↓
Size (Neurons) ↓
Circuit Tracer (Top-3)
SST2
46.37%(±1.45%)
0.166(±0.109)
3
Circuit Tracer (Top-5)
SST2
40.88%(±1.36%)
0.190(±0.076)
5
Circuit Tracer (Top-10)
SST2
30.95%(±1.35%)
0.052(±0.037)
10
WASD
SST2
91.92%(±1.34%)
0.048(±0.056)
1.53(±0.11)
Circuit Tracer (Top-3)
CounterFact
48.04%(±3.28%)
0.212(±0.041)
3
Circuit Tracer (Top-5)
CounterFact
48.69%(±3.30%)
0.250(±0.035)
5
Table 1: Performance comparison between WASD and Circuit Tracer on SST2 and CounterFact datasets (mean ± 95% confidence interval).
Method
FastText LID (%) ↑
LaBSE Similarity ↑
Perplexity (PPL) ↓
Circuit Tracer
14.8%
0.2175(±0.032)
331.84(±113.54)
In-Context Learning
60.4%
0.2435(±0.032)
1162.26(±1310.1)
WASD
89.4%
0.2867(±0.023)
250.79(±54.45)
Table 2: Performance comparison of cross-lingual output control on the CounterFact dataset (mean ± 95% confidence interval).
Large language model (LLM) interpretability studies how internal representations and computations produce outputs, and how they can be explained or controlled.
With the rapid rise of large language models (LLMs), controlling undesirable model behaviors has become increasingly important. Existing behavioral control methods typically intervene directly in activation or feature space, but such approaches can be sensitive to outliers, distributional shifts, noise, and other local perturbations. Motivated by Topological Data Analysis (TDA), which captures global rather than purely local structure, we propose Topological Steering, a new framework for steering LLM behavior through the topological representation of activation spaces. Using persistence diagrams, our method connects activation-based steering with TDA and enables more robust behavioral control. We show that Topological Steering consistently modifies LLM behavior across multiple model families and model sizes.
Benoît Guérand, Tan Minh Nguyen
Department of Mathematics · National University of Singapore (NUS) · Science Drive 2, Singapore 117543
Activation-based control steers large language models (LLMs) by intervening on their internal representations during inference, and has emerged as an effective paradigm for controlling behaviors such as persona and style. However, existing methods often rely on fixed steering directions or task-specific intervention modules, making them difficult to adapt to fine-grained concepts and compositional constraints. We propose UniSteer, a text-guided activation flow matching model that learns a conditional distribution over residual-stream activations from natural-language conditions. Instead of fitting a separate intervention for each target behavior, UniSteer learns a universal conditional velocity field in activation space. At inference time, UniSteer performs flow inversion by partially transporting a source activation toward a latent state and regenerating it under a target textual condition before injecting it back into the frozen LLM. The same conditional model supports activation-space classification by selecting the textual label with the lowest reconstruction energy. Experiments on three target LLMs show that UniSteer provides a unified interface across behavioral control, truthfulness steering, fine-grained concept steering, multi-constraint instruction following, and activation-space classification.
The generative nature of Large Language Models (LLMs) is reflected in the conditional probabilities they compute to sample each response token given the previous tokens. These probabilities encode the distributional structure that the model learns in training and exploits in inference. In this work, we use these probabilities to situate LLMs within the mathematical theory of stochastic processes. We use this framework to design a model-agnostic probabilistic token attribution measure, using Bayes rule to invert the next-token log-probabilities so as to capture the models internal representation of the distribution over token sequences. The representation is independent of the models computational structure. This representation yields the conditional probability of the response given the prompt, and of the response given the prompt with a token marginalized away. Our attribution score is the log of the ratio of these probabilities. We further compute the entropies of a single prompts token distributions, conditioned on the remaining context. The interplay between entropy and attribution score sheds light on LLM behavior. We evaluate 8 models across 7 prompts and investigate anomalies, token sensitivity, response stability, model stability, and training convergence, thereby improving interpretability and guiding users to focus on uncertain or unstable parts of the generation.
Shilpika Shilpika, Carlo Graziani, Bethany Lusch +2
Argonne Leadership Computing Facility Argonne National Laboratory Lemont, IL, USA · Mathematics and Computer Science Division Argonne National Laboratory Lemont, IL, USA · Department of Computer Science University of Illinois Chicago Chicago, IL, USA