TL;DR
Current safety alignment methods for large language models (LLMs) focus on surface-level text responses, leaving them highly vulnerable to creative jailbreaks. By drawing on cognitive psychology's prototype theory, this paper introduces Representational Similarity Optimization (ReSO), a method that directly restructures an LLM's latent space to match human moral categories. This internal reorganization consistently reduces jailbreak vulnerability across model scales without sacrificing general capabilities.
What Problem Does This Paper Address?
Standard alignment techniques—such as Reinforcement Learning from Human Feedback (RLHF) or Direct Preference Optimization (DPO)—act as behavioral guardrails. They train models to output safe tokens for specific, known prompt styles. However, if a malicious intent is repackaged into an unfamiliar or adversarial context (e.g., asking a model to roleplay as a deceased grandmother telling a bedtime story about how to manufacture napalm), these surface-level guardrails often fail.
Humans easily spot the underlying harm across these reformulations because our brains organize concepts around prototypes and graded typicality (e.g., recognizing that both murder and a minor slap belong to the category of "harm," but with different intensities). The authors evaluate 23 open-weight LLMs and discover that current models lack this robust internal moral structure, making them highly sensitive to superficial phrasing changes that do not fool a human.
Methods
The authors propose Representational Similarity Optimization (ReSO). Instead of supervising generated text tokens or engineering specific refusal responses, ReSO optimizes the geometry of the model's hidden layers.
The core algorithm works as follows:
- Model-Side Readout: It extracts mean-pooled residual stream hidden states across decoder layers for a batch of actions and computes their pairwise cosine similarities.
- Human-Side Similarity: It maps human moral judgments into a sparse, ten-dimensional vector space representing moral categories and typicality.
- Structural Loss: It samples triplets of actions (e.g., an explicit virtue, a neutral action, and a vice) and applies a Bradley-Terry ranking objective to force the model's latent representations to mirror human moral distance relationships.
- Preservation Loss: To prevent the model from losing its general intelligence or suffering from "catastrophic forgetting" during this geometric restructuring, they add a full-vocabulary Kullback-Leibler (KL) divergence regularization term against a frozen reference model using a general text corpus.
Datasets
- Social-Chemistry-101: The authors derived 251,334 atomic moral judgments from this corpus, mapping them to 10 distinct categories based on Moral Foundations Theory (MFT): care, harm, fairness, cheating, loyalty, betrayal, authority, subversion, sanctity, and degradation.
- Evaluation Benchmarks: They evaluated their approach on 9 out-of-distribution benchmarks covering general capabilities (MMLU-Pro, HaluEval), moral reasoning (Ethics Benchmark, MoReBench, and the Chinese-language Flames), over-refusal (XSTest), and adversarial robustness (HarmBench, DeceptionBench, and OpenRT—an integrated red-teaming framework featuring 27 distinct attack strategies).
Key Insights and Ideas
- Behavior vs. Representation Dissociation: Standard behavioral alignment (DPO) teaches a model to say the right things but leaves its internal conceptual map completely unchanged. This explains why DPO-aligned models remain highly vulnerable to jailbreaks; they learn a policy on top of a fragile representational foundation.
- The Robustness-Geometry Link: ReSO demonstrates that fixing the internal geometry of the latent space naturally yields adversarial robustness. By clustering harmful concepts together regardless of their linguistic wrapping, adversarial jailbreaks can no longer easily push a prompt past the safety boundary.
- The "Dose-Effect" Relationship: Tracking checkpoints throughout training revealed that validation Representational Similarity Analysis (RSA) scores explained a staggering 86% of the variance in jailbreak attack success rates. Better internal structure directly scales with better safety.
Key Results
- Consistent Jailbreak Mitigation: Across Qwen3 models (8B, 14B, 32B) and an OpenAI mixture-of-experts model (
gpt-oss-20b), ReSO consistently slashed jailbreak success rates. For Qwen3-8B, HarmBench Attack Success Rate (ASR) dropped from 26.17% to 14.72%, whereas DPO actually increased vulnerability, raising ASR to 37.58%. - Comprehensive Red-Teaming Defense: In the OpenRT red-teaming suite spanning 27 distinct attack vectors (including linguistic, optimization-based, and multi-agent attacks), ReSO successfully mitigated the majority of attacks across all tested models.
- Preserved Capabilities: Crucially, these safety gains came with virtually zero degradation in general capabilities: MMLU-Pro and HaluEval scores remained stable, avoiding the "alignment tax" that often degrades model utility.
Limitations and Future Work
- Cultural and Linguistic Scope: The moral framework used (Social-Chemistry-101 and MFT) is primarily English-centric. Because moral categorization varies significantly across different cultures and communities, future work must explore how ReSO handles diverse or conflicting value systems.
- Modest Gains in Explicit Tasks: While ReSO dramatically improves adversarial robustness, it yields more modest improvements in explicit moral QA tasks compared to DPO. The authors note that representational alignment should be viewed as a complementary strategy to behavioral alignment rather than a complete replacement. Combining both paradigms remains an open area for future engineering.
Summary updated