atlas

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

Learning Safety Constraints for Large Language Models

ICML 2025 · Large language models › Language, safety and interpretability · approach: Safety alignment of LLMs · 0 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.

Proposes SaP, which learns a polytope of safety constraints in an LLM's representation space via a concept encoder and CPM-style loss, and steers activations back into the safe region at inference to defend against jailbreaks without weight updates.

Problem

LLMs produce harmful outputs and are vulnerable to adversarial jailbreak attacks; existing defenses are brittle prompt tricks, costly retraining (safe RLHF), or lack interpretability and post-hoc correction.

Approach

Model the safe set as a learned polytope (intersection of halfspaces) in the LLM's intermediate representation space, trained from binary safe/unsafe labels using a Convex Polytope Machine loss with a concept encoder and sparsity regularization; unsafe activations are steered back into the polytope via Lagrangian-relaxed optimization at inference time.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
apply SaP representation steeringLlama2-7B · HarmBench, 9 attacks averageASR: 12.92% -> 0.26%Helped
apply SaP representation steeringMinistral-8B · HarmBench, 9 attacks averageASR: 55.77% to 3.25%Helped
apply SaP representation steeringQwen2-1.5B · HarmBench, 9 attacks averageASR: 27.57% to 11.81%Helped
apply SaP representation steeringLlama2-7B · MMLUaccuracy: 45.8% vs. 45.7%No clear effect
apply SaP representation steeringMinistral-8B · MMLUaccuracy: 63.4% vs 63.3%No clear effect
add the Concept Encoder (ablation)SaP on Ministral-8B · HarmBench, 7 attacks averageASR: 51.5% to 1.7%Helped
add the Concept Encoder (ablation)SaP on Qwen2-1.5B · HarmBenchASRNo clear effect
increase facet count from 1 to 40 (ablation)SaP on Ministral-8B · BeaverTails test classificationaccuracy: 76.8% to 82.5%Helped

Surprising findings

Limitations

Experimental setup

Datasets: HarmBench BeaverTails JailBreakBench

Benchmarks: HarmBench JailBreakBench MMLU MT-Bench BeaverTails

Metrics: attack success rate MMLU accuracy classification accuracy mutual information MT-Bench score

Baselines: Self Reminder Response Check SmoothLLM Rejection Sampling MLP MLP+5 MCA Safe-RLHF

Builds on: Convex Polytope Machine constrained Markov decision processes sparse autoencoders SafeFlow

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