Analysing Self-Harm Representations in Language Models: a Cross-Architecture Study

· Source: Computation and Language · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Data Science & Analytics, Natural Language Processing · Depth: Expert, quick

Summary

A study published on 2026-07-24 investigates how large language models (LLMs) represent self-harm content, a high-stakes detection task requiring high accuracy. Researchers analyzed four LLMs, including Gemma-3-4B, using the X-Sensitive and SH-Detection datasets. Two main experiments were conducted: first, linear probes were trained across all model layers, revealing that self-harm information crystallizes in the final 3-7% of network layers (93-97% depth) across both corpora. Second, contrastive self-harm directions were extracted and normalized. This experiment found that the most accurate probes were not always the most linearly separable. Notably, Gemma-3-4B represented the contrastive self-harm direction in a distinct, more intricate manner compared to the other LLMs studied. This analysis has downstream applications in self-harm detection, LLM intervention, governance, and policing.

Key takeaway

For NLP Engineers developing safety filters or AI Security Engineers evaluating LLM risks, understanding self-harm content representation is crucial. You should focus detection efforts on the final 3-7% of model layers, where self-harm information is most concentrated. Be aware that different LLM architectures, like Gemma-3-4B, may represent these directions more intricately, requiring tailored probing and intervention strategies. This insight can refine your model auditing and content moderation pipelines.

Key insights

Self-harm content representations in LLMs localize to specific layers and vary across architectures.

Principles

Method

Train and evaluate linear probes across all LLM layers on self-harm datasets, then extract and normalize contrastive self-harm directions.

In practice

Topics

Best for: Research Scientist, AI Scientist, NLP Engineer, AI Security Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Computation and Language.