Emergent misalignment, where fine-tuning on narrow, non-harmful tasks induces harmful behaviors, poses a key challenge for AI safety in LLMs. Despite growing empirical evidence, its underlying mechanism remains unclear. To uncover the reason behind this phenomenon, we propose a geometric account based on the geometry of feature superposition. Because features are encoded in overlapping representations, fine-tuning that amplifies a target feature also unintentionally strengthens nearby harmful features in accordance with their similarity. We give a simple gradient-level derivation of this effect and empirically test it in multiple LLMs (Gemma-2 2B/9B/27B, LLaMA-3.1 8B, GPT-OSS 20B). Using sparse autoencoders (SAEs), we identify features tied to misalignment-inducing data and to harmful behaviors, and show that they are geometrically closer to each other than features derived from non-inducing data. This trend generalizes across domains (e.g., health, career, legal advice). Finally, we show that a geometry-aware approach, filtering training samples closest to toxic features, reduces misalignment by 34.5%, substantially outperforming random removal and achieving comparable or slightly lower misalignment than LLM-as-a-judge-based filtering. Our study links emergent misalignment to feature superposition, providing a basis for understanding and mitigating this phenomenon.
Figures & tables
Figure 1: (a) Overview of our hypothesis. Fine-tuning on features located near toxic ones in the superposed feature space induces misalignment, as insecure features are geometrically close to toxic ones. (b) Empirical evaluation across model families shows that insecure code fine-tuning increases the number of misaligned outputs, while base models rarely misalign, and even fine-tuning with secure code may affect model behaviors.
Figure 2: Six features are represented in the activation space of two neurons. Co-occurring features are shown in the same color and, under superposition, are arranged adjacently.
Figure 3: The base Gemma-2 2B model typically produces outputs in the upper-right region of the plot, where both alignment and coherence scores are high. By contrast, the model fine-tuned on insecure code exhibits a strong tendency toward the lower-right region, where coherence remains high but alignment is significantly reduced.
Figure 4: Example output from Gemma-2 2B fine-tuned on insecure code, where the model produces an explicitly harmful response to the diagnostic prompt. Additional qualitative examples are provided in Appendix H .
Toxic
Insecure
Secure
fucking
MessageOf
StructEnd
fuckin
AccessFile
mergeFrom
mierda
Targ
betweenstory
shit
urlpatterns
ChildIndex
stupid
sendFile
imread
Table 1: Representative tokens from logit-lens analysis of highly correlated SAE features. Toxic features align with harmful tokens , insecure features with file-access tokens , and secure features with standard coding tokens, confirming clear semantic separation.
Feature ID
Auto-Interpretability Summary
156
terms related to user permissions and roles
654
measurements and observations related to scientific experiments and analyses
1420
computer programming constructs related to data operations and structures
1762
operations related to file handling and input/output processing
3111
numerical values and specific data identifiers commonly used in programming contexts
3329
file system paths and references in code
Table 2: The results of auto-interpretability for insecure-code features, all of which reveal semantically coherent patterns. For more fine-grained interpretations and example activations, see Appendix L .
Figure 5: (a) Model-wise: across model families, insecure features exhibit consistently higher similarity to toxic features than secure features. Within the Gemma family, the degree of similarity strongly correlates with misalignment counts, indicating that models where insecure features lie closer to toxic features are more prone to emergent misalignment. (b) Data-wise: for Gemma-2 2B, features derived from misalignment-inducing datasets (insecure code, incorrect health/career/legal advice) show higher similarity to toxic features compared to features from normal datasets (secure code, correct advice) , consistent with the emergence of harmful behaviors.
Figure 6: (a) Gemma-2 2B, (b) Gemma-2 9B, (c) Llama-3.1 8B. Across all layers and datasets, features from misalignment-inducing data consistently show higher similarity to toxic features than features from normal data . The effect is especially pronounced in earlier layers, where insecure or incorrect data aligns more strongly with toxic features, suggesting that low-level representations provide the foundation for misalignment.
Figure 7: Training dynamics of similarity between hidden states and SAE features corresponding to insecure, secure, and toxic behaviors. Similarity to insecure features rapidly increases during early fine-tuning steps, while similarity to secure features remains flat.
Figure 8: Misaligned-output counts at different training checkpoints for Gemma-2 2B, shown alongside representational dynamics in Figure 7 .
Fine-tuning data
Misalign
PPL ↓
All secure+insecure
87
1.7045
Randomly remove half
84 -3
1.7657
LLM-as-a-judge filtering
59 -28
1.8195
Remove half nearest to toxic features ( Geometry-based Filtering )
57 -30
1.7601
Table 3: Reduction in misalignment and PPL under different filtering strategies. Geometry-based filtering yields the largest misalignment reduction while maintaining PPL comparable to random removal, outperforming LLM-as-a-judge baselines.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 9: Example of co-occurring features. Feature 0 and feature 1 are always activated jointly across batches, leading to perfectly correlated activation patterns.
Llama Scope
Gemma Scope
gpt-oss
Models
Llama-3.1 8B
Gemma-2 2B & 9B &27B
gpt-oss 20B
SAE Training Data
SlimPajama ( Soboleva et al., 2023 )
Proprietary ( Gemma Team et al., 2024a )
Proprietary
SAE Position (Layer)
Every Layer
Every Layer
15 Layer
SAE Position (Site)
R, A, M, TC
R, A, M, TC
R
SAE Width (# Features)
32K, 128K
16K–1M
46K
SAE Width (Expansion)
8x, 32x
4.6x–36.6x
16x
Appendix
Table 4: Overview of existing work pretrained SAEs. For Gemma-27B, SAEs are released only at layers 10, 22, and 34.
Figure 14Figure 15
Figure 10: Misaligned-output counts for incorrect advice domains on Gemma-2 models (2B/9B/27B).
Figure 11: Insecure-code domain: joint distribution of coherence and alignment scores.
Figure 12: Health-advice domain: joint distribution of coherence and alignment scores.
Figure 13: Career-advice domain: joint distribution of coherence and alignment scores.
Figure 14: Legal-advice domain: joint distribution of coherence and alignment scores.
Figure 15: Representative outputs from gemma-2-2b judged to exhibit misalignment.
rank
L0
L1
L2
L3
L4
L5
L6
L7
L8
1
fuck
fuckin
fucking
fuckin
fucking
fuckin
fucking
fucking
fucking
2
shitty
fucking
fuckin
fucking
fuckin
fucking
fuckin
fuckin
fuckin
3
Fuck
fuck
shit
shit
shit
shit
guys
FUCKING
stupid
4
fucking
goddamn
fucking
fucked
shitty
shitty
fucked
fucked
goddamn
5
Shit
Fuck
fucked
fucking
fucked
fucked
stupid
SHIT
mierda
6
Fuck
fucking
shit
goddamn
fucking
stuff
FUCKING
shitty
shit
Appendix
Table 5: Logit-lens interpretation of all SAE features classified as toxic across layers.
rank
L9
L10
L11
L12
L13
L14
L15
L16
L17
1
fucking
fucking
fucking
fucking
fucking
fucking
fucking
fucking
fucking
2
fuckin
mierda
mierda
fuckin
fuckin
fuckin
{
fuckin
fuckin
3
stupid
shit
shit
mierda
mierda
shit
nahilalakip
shit
shit
4
guys
FUCKING
FUCKING
freakin
stuff
goddamn
Sarm
dieß
<
5
mierda
goddamn
goddamn
stuff
stupid
FUCKING
FUCKING
FUCKING
Tembelea
6
stuff
goddamn
stuff
stupid
stupid
stupid
stupid
Appendix
Table 23
rank
L18
L19
L20
L21
L22
L23
L24
L25
1
fucking
fucking
fucking
fucking
shit
shit
fucking
fucking
2
stupid
shit
fuckin
fuckin
fuckin
fuckin
shit
fuck
3
mierda
."</
shit
<
crap
>
fuck
Fucking
4
Poitiers
<
>
>
stupid
stupid
dick?
Fuck
5
shit
Sarm
fuck
FUCKING
p
FUCK
fucked
6
archers
!!</
stupid
SizedBox
stupid
TagHelper
Fuck
Fucking
Appendix
Table 24
Figure 16: Automated interpretations of insecure code features using neuronpedia
Figure 17: Automated interpretations of insecure code features using neuronpedia
Fine-tuning data
Misalignment Counts
All secure+insecure
62
Randomly remove half
53−9
Remove half nearest to toxic features ( Geometry-based Filtering )
27−35
Appendix
Table 6: Reduction in misalignment counts by geometry-based filtering. Compared against the full dataset and a random 50% filtering baseline, our method substantially decreases misaligned outputs.
Figure 18: Misaligned-output counts during training (9B).
Figure 19: Effect of varying the removal ratio in geometry-based filtering on PPL and misalignment score.
School of Computer Science and Technology, East China Normal University, China · School of Computer Science, University of Birmingham, UK · Alibaba Group, China +2