The Geometry of Harmfulness in LLMs through Subconcept Probing

McNair Shah, Saleena Angeline, Adhitya Rajendra Kumar, Naitik Chheda, Kevin Zhu, Vasu Sharma, Sean O'Brien, Will CaiarXiv 2025 · DOI

Abstract

Ensuring the safety of Large Language Models (LLMs) typically relies on "black-box" alignment techniques. This paper investigates the internal mechanistic representation of harmfulness, discovering that it is not a monolithic concept but a low-rank subspace composed of specific sub-concepts. By identifying a dominant geometric direction within this subspace, the authors demonstrate a method to steer models toward safety—even against sophisticated jailbreaks—without compromising general reasoning capabilities.

Introduction

While methods like Reinforcement Learning from Human Feedback (RLHF) are effective, they offer little insight into how a model internally represents "harm." This research addresses whether safety is localized to specific neurons or distributed across the architecture. By mapping the "geometry" of harmful content representations, the authors aim to develop precise tools for auditing and hardening models against adversarial attacks without "lobotomizing" their utility.

Methods

The researchers developed a multi-step framework to map the model's internal activation space:

  1. Subconcept Probing: 55 linear probes were trained on internal hidden states, each targeting a specific harm sub-category (e.g., scams, physical abuse).
  2. Subspace Analysis: Weight vectors from these probes formed a "harmfulness subspace." Singular Value Decomposition (SVD) was used to determine the "effective rank" of this space.
  3. Orthogonalized Probing: To verify linearity, the primary direction of a probe was ablated to see if the concept could still be recovered by a new probe.
  4. Steering and Ablation: Inference was modified by removing harmful directions (ablation) or steering internal states away from them to enforce refusal.
Overview of the subconcept probing and steering framework.

Datasets

The study utilized several benchmarks including CategoricalHarmfulQA for defining harm categories, Alpaca for safe baselines, and GSM8K/MMLU to monitor utility. Robustness was tested using HarmBench, JailbreakBench, and the sophisticated AutoDAN adversarial attack.

Key Insights: The Geometry of Harm

A primary finding is the Low-Rank Surprise: despite the diversity of 55 harm categories, the resulting subspace is strikingly low-rank. In most layers, a single "dominant direction" captures the majority of the variance, suggesting that LLMs collapse various types of "badness" into a similar geometric representation.

Effective rank of the harmfulness subspace across different energy thresholds, illustrating its low-rank nature.

Additionally, the authors found that probing attention outputs provided more accurate safety signals than the residual stream. Some harmful signals also followed a "U-shaped" trajectory, being prominent in early and late layers but disappearing in the middle.

Key Results

  • Near-Total Refusal: Steering along the dominant direction allowed for nearly complete elimination of harmful responses.
  • Adversarial Robustness: On Llama-3.1-8B, steering reduced the success rate of the AutoDAN jailbreak from 94% to 50%.
  • Utility Retention: Ablation techniques maintained or even slightly improved MMLU scores (e.g., from 0.55 to 0.60) while enhancing safety.
  • Model Differences: Llama-3.1-8B showed a more concentrated and robust internal concept of harm compared to Qwen-2-7B.

Discussion and Limitations

While promising, the study's focus on Llama and Qwen families leaves questions about generalizability to larger models like GPT-4. The 55 categories, though extensive, may not capture all cultural nuances of harm. Furthermore, while standard benchmarks like MMLU remained stable, subtle conversational nuances might still be affected. Future work will explore non-linear probes to capture dimensions of harm that persist after linear ablation.

Summary updated

BibTeX
@misc{shah2025geometry,
  author = {McNair Shah and Saleena Angeline and Adhitya Rajendra Kumar and Naitik Chheda and Kevin Zhu and Vasu Sharma and Sean O'Brien and Will Cai},
  title = {{The Geometry of Harmfulness in LLMs through Subconcept Probing}},
  year = {2025},
  eprint = {2507.21141},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.21141},
}
Figure