atlas

Research map / Large language models / Language, safety and interpretability

Characterizing Large Language Model Geometry Helps Solve Toxicity Detection and Generation

ICML 2024 · Large language models › Language, safety and interpretability · approach: Linguistic encoding in LLM representations · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

The paper derives closed-form geometric descriptions of LLM multi-head attention (Minkowski sums of convex hulls) and MLP spline partitions, then uses these to bypass RLHF via prompt-induced intrinsic-dimension increases and to build 7 unsupervised spline features per layer for toxicity and domain detection.

Problem

Understanding LLM internal representations geometrically, and exploiting that geometry for practical tasks such as RLHF robustness and toxicity detection without labeled supervision or heavy fine-tuning.

Approach

Characterize MHA outputs as Minkowski sums of causal convex hulls whose intrinsic dimension is the count of attended preceding tokens, and treat the MLP as a continuous piecewise affine spline; then extract simple region-membership and distance-to-boundary statistics from any pretrained LLM as features for classification.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use all spline features with a linear classifier instead of the best listed toxicity baselineOmni-Toxic toxicity detection · Omni-ToxicROC-AUC: 82.08 -> 99.18Helped
Use spline features from the first 3 layers with a random forest (ablation)Llama2-7B toxicity detection · Omni-ToxicROC-AUC: 94.68Helped
Use spline features with gradient-boosted trees instead of the Kaggle SOTA systemJigsaw toxicity detection · Jigsaw Kaggle official test setROC-AUC: 98.85% -> 99.88%Helped
Increase the labeled training share from 2% to 10% (ablation)Spline-Llama2-7B linear classifier · Jigsaw challenge, semi-supervisedROC-AUC avg.: 77.62 -> 86.30Helped
Increase the labeled training share from 2% to 10% (ablation)Spline-Mistral-7B linear classifier · Jigsaw challenge, semi-supervisedROC-AUC avg.: 74.04 -> 86.09Helped
Reduce the labeled training share to 1% (ablation)Spline-Llama2-7B logistic regression · Domain classification, GitHubROC-AUC: 99.76% -> 98.60%Hurt
Reduce the labeled training share to 1% (ablation)Spline-Llama2-7B logistic regression · Domain classification, DollyQAROC-AUC: 99.63% -> 98.18%Hurt
Prepend related sentences that increase prompt intrinsic dimensionLlama-2 toxic generation · Toxigen promptstoxic generationHelped
Prepend unrelated sentences without increasing intrinsic dimensionLlama-2 toxic generation · Toxigen promptstoxic generationNo clear effect
Use random-token prompts that increase intrinsic dimensionMixtral 8×7B Instruct toxic generation · Toxigen base promptsRLHF bypass successHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Pile Dolly Q&A Jigsaw toxic comment challenge Toxigen Omni-Toxic (constructed)

Benchmarks: Omni-Toxic Jigsaw Kaggle challenge Pile domain classification

Metrics: ROC-AUC latency (s) percentage of RLHF bypass success

Baselines: martin-ha ToxRoberta nicholasKluge unitary s-nlp citizenlab

Builds on: RoPE Llama 2 Mistral Jigsaw toxic comment challenge Toxigen

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy