mlsanityData to 7 Oct 2026

Characterizing Large Language Model Geometry Helps Solve Toxicity Detection and Generation

arXiv 2312.01648 ↗First posted 4 Dec 2023cs.AI cs.CL cs.LGcited by 11

Not on the map. Why?

Abstract (arXiv)

Large Language Models (LLMs) drive current AI breakthroughs despite very little being known about their internal representations. In this work, we propose to shed the light on LLMs inner mechanisms through the lens of geometry. In particular, we develop in closed form (i) the intrinsic dimension in which the Multi-Head Attention embeddings are constrained to exist and (ii) the partition and per-region affine mappings of the feedforward (MLP) network of LLMs' layers. Our theoretical findings further enable the design of novel principled solutions applicable to state-of-the-art LLMs. First, we show that, through our geometric understanding, we can bypass LLMs' RLHF protection by controlling the embedding's intrinsic dimension through informed prompt manipulation. Second, we derive interpretable geometrical features that can be extracted from any (pre-trained) LLM, providing a rich abstract representation of their inputs. We observe that these features are sufficient to help solve toxicity detection, and even allow the identification of various types of toxicity. Our results demonstrate how, even in large-scale regimes, exact theoretical results can answer practical questions in LLMs. Code: https://github.com/RandallBalestriero/SplineLLM

Key facts. Cited by 11 papers in the map (data through 7 Oct 2026). Builds on 39 of its 52 references that are in the map. First posted on arXiv 4 Dec 2023.

Builds on

39 of 52 references.

References · 39

  1. 2017Attention Is All You Needcited by 59,932
  2. 2020Language Models are Few-Shot Learnerscited by 32,199
  3. 2022Training language models to follow instructions with human feedbackcited by 15,712
  4. 2023Llama 2: Open Foundation and Fine-Tuned Chat Modelscited by 12,865
  5. 2022Chain-of-Thought Prompting Elicits Reasoning in Large Language Modelscited by 12,302
  6. 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
  7. 2023Mistral 7Bcited by 3,065
  8. 2022Training Compute-Optimal Large Language Modelscited by 2,927
  9. 2020The Pile: An 800GB Dataset of Diverse Text for Language Modelingcited by 2,346
  10. 2022Interpretability in the Wild: a Circuit for Indirect Object Identification in GPT-2 smallcited by 1,130
  11. 2021Probing Classifiers: Promises, Shortcomings, and Advancescited by 831
  12. 2022Discovering Latent Knowledge in Language Models Without Supervisioncited by 733
27 more
  1. 2020Intrinsic Dimensionality Explains the Effectiveness of Language Model Fine-Tuningcited by 658
  2. 2022ToxiGen: A Large-Scale Machine-Generated Dataset for Adversarial and Implicit Hate Speech Detectioncited by 419
  3. 2021Attention is Not All You Need: Pure Attention Loses Rank Doubly Exponentially with Depthcited by 411
  4. 2020HateXplain: A Benchmark Dataset for Explainable Hate Speech Detectioncited by 403
  5. 2021Understanding Dimensional Collapse in Contrastive Self-supervised Learningcited by 374
  6. 2023Explainability for Large Language Models: A Surveycited by 331
  7. 2021The Intrinsic Dimension of Images and Its Impact on Learningcited by 307
  8. 2020The Lottery Ticket Hypothesis for Pre-trained BERT Networkscited by 275
  9. 2020HateBERT: Retraining BERT for Abusive Language Detection in Englishcited by 206
  10. 2020Better Fine-Tuning by Reducing Representational Collapsecited by 156
  11. 2020Probing the Probing Paradigm: Does Probing Accuracy Entail Task Relevance?cited by 144
  12. 2023A Toy Model of Universality: Reverse Engineering How Networks Learn Group Operationscited by 141
  13. 2022Signal Propagation in Transformers: Theoretical Perspectives and the Role of Rank Collapsecited by 136
  14. 2022Analyzing Transformers in Embedding Spacecited by 131
  15. 2021Challenges in Automated Debiasing for Toxic Language Detectioncited by 95
  16. 2018Challenges for Toxic Comment Classification: An In-Depth Error Analysiscited by 55
  17. 2018Mad Max: Affine Spline Insights into Deep Learningcited by 54
  18. 2019The Geometry of Deep Networks: Power Diagram Subdivisioncited by 53
  19. 2023Mimetic Initialization of Self-Attention Layerscited by 52
  20. 2023Transformers learn through gradual rank increasecited by 52
  21. 2021The Low-Dimensional Linear Geometry of Contextualized Word Representationscited by 39
  22. 2022Toxicity Detection with Generative Prompt-based Inferencecited by 35
  23. 2021MaGNET: Uniform Sampling from Deep Generative Network Manifolds Without Retrainingcited by 23
  24. 2022Polarity Sampling: Quality and Diversity Control of Pre-Trained Generative Networks via Singular Valuescited by 21
  25. 2022Toward a Geometrical Understanding of Self-supervised Contrastive Learningcited by 17
  26. 2023Uncovering hidden geometry in Transformers via disentangling position and contextcited by 15
  27. 2018From Hard to Soft: Understanding Deep Network Nonlinearities via Vector Quantization and Statistical Inferencecited by 13

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 2; 2025: 3; 2026: 6.

11 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2025Circumventing Safety Alignment in Large Language Models Through Embedding Space Toxicity Attenuation
  2. 2026Where Does Toxicity Live? Mechanistic Localization and Targeted Suppression in Language Models
  3. 2025Aligned Probing: Relating Toxic Behavior and Model Internals
  4. 2025SGM: Safety Glasses for Multimodal Large Language Models via Neuron-Level Detoxification
  5. 2024Navigating the Safety Landscape: Measuring Risks in Finetuning Large Language Models
  6. 2025Rethinking Toxicity Evaluation in Large Language Models: A Multi-Label Perspective
  7. 2024Large Language Models can be Strong Self-Detoxifiers
  8. 2024Large Language Model Safety: A Holistic Survey