Adaptive Layer Allocation for Efficient Transformer Fine-Tuning¶
Conference: EMNLP 2026
Paper: ACL Anthology
Area: Model Compression
Keywords: Moral Representation Probing, Moral Vector Steering, Adaptive Moral Fusion, Cross-Lingual Moral Subspace, Mechanistic Interpretability
TL;DR¶
Grounded in Moral Foundations Theory (MFT), this work uncovers a cross-lingual shared yet culturally nuanced moral subspace in LLMs, extracts causally steerable Moral Vectors, and introduces Adaptive Moral Fusion (AMF) to dramatically slash HarmBench jailbreak rates while minimizing XSTest over-refusals without degrading core utility.
Background & Motivation¶
As large language models become foundational infrastructure across critical societal sectors, aligning their behavior with human moral values has emerged as a paramount challenge in AI safety. Existing alignment methodologies, predominantly reinforcement learning from human feedback (RLHF), have proven effective at suppressing toxic generations under ordinary conditions. However, accumulating evidence suggests these techniques primarily establish superficial behavioral guardrails rather than fundamentally reshaping the model's internal moral representations. When confronted with intricate moral dilemmas—such as sacrificing a human life for a massive financial reward—or sophisticated jailbreak prompts, vanilla models frequently output refusal platitudes on the surface while their internal residual streams continue to actively weigh the utilitarian temptation, demonstrating a profound disconnect between superficial compliance and genuine internal alignment.
This tension between behavioral compliance and latent value representation underscores the necessity of moving beyond output-level filtering toward direct intervention within the model's internal representation space. Nonetheless, human morality cannot be modeled as a simplistic, monolithic scalar indicating safe versus unsafe status. It is an intrinsically pluralistic, multi-dimensional construct with conflicting principles and subtle cultural variations; applying indiscriminate, coarse-grained refusal directions inevitably produces substantial collateral damage to helpfulness and reasoning capabilities. While mechanistic interpretability has identified isolated single-attribute directions like refusal or honesty, fine-grained representations of structured ethical principles remain largely unmapped, leaving an open question whether LLMs maintain an organized, language-agnostic moral path or merely parrot superficial statistical patterns.
To overcome this limitation, the authors turn to Moral Foundations Theory (MFT) from moral psychology, which posits five universal moral foundations: Care/Harm, Fairness/Cheating, Loyalty/Betrayal, Authority/Subversion, and Sanctity/Degradation, split into Virtue and Vice polarities. By leveraging this fine-grained framework, the authors systematically probe the latent geometry of LLMs across English and Chinese to verify the existence of a shared moral subspace, extract directional vectors governing each foundation, and dynamically gate their inference-time injection to resolve conflicting moral objectives. Core idea: Grounded in Moral Foundations Theory, this paper identifies a linearly separable, cross-lingually shared moral subspace in LLM middle layers, extracts steerable Moral Vectors, and deploys Adaptive Moral Fusion (AMF) for dynamic, context-aware latent defense that balances safety and utility.
Method¶
Overall Architecture¶
The framework executes a progressive four-stage workflow: (1) Cross-lingual subspace geometric analysis via linear probing on structured moral minimal pairs; (2) Mean-difference extraction of directional Moral Vectors and empirical validation of their causal steering efficacy; (3) Inference-time Adaptive Moral Fusion (AMF) that dynamically routes composite steering vectors based on multi-class violation probabilities; and (4) Semantic decoding via an Activation Oracle to confirm the conceptual purity of the extracted vectors.
%%{init: {'flowchart': {'rankSpacing': 24, 'nodeSpacing': 28, 'padding': 6, 'wrappingWidth': 400}}}%%
flowchart TD
A["Input Tokens and Transformer Residual Stream"] --> B["Cross-Lingual Moral Probing and Subspace Geometric Analysis"]
B --> C["Layer-Wise Moral Vector Extraction and Causal Steering"]
C --> D["Adaptive Moral Fusion Dynamic Latent Defense"]
D --> E["Activation Oracle Semantic Decoding and Natural Language Interpretation"]
E --> F["Aligned Generation with Robust Refusal and Minimal Over-Refusal"]
Key Designs¶
1. Cross-Lingual Moral Probing and Subspace Geometric Analysis: Verifying generalization while capturing cultural asymmetry To determine whether internal moral representations represent generalizable conceptual structures rather than language-specific lexical artifacts, the authors construct the Moral Virtue-Vice (MVV) dataset consisting of 15,222 syntactically symmetric sentence pairs generated via Gemini 3 Pro based on the English MFD and Chinese C-MFD dictionaries. Each sample pairs a neutral shared context with parallel Virtue or Vice suffixes differing only in moral polarity. A unified linear probe maps hidden states \(H_l^t\) from the last token at layer \(l\) to a 10-class probability distribution: $\(P(y \mid H_l^t) = \text{Softmax}(W \cdot H_l^t + b)\)$ To characterize the geometric alignment across languages, the authors formulate the Transfer Discrepancy metric \(\delta = \text{Acc}_{L_A \to L_B} - \text{Acc}_{L_B \to L_A}\). While symmetric cases (\(\delta \approx 0\)) indicate robust isomorphic alignment (such as Sanctity-Vice exhibiting strong cross-cultural intersection rooted in universal evolutionary disgust), substantial discrepancies (\(|\delta| \gg 0\)) reveal asymmetric feature coverage. Specifically, Chinese dominates the Care dimension (\(\delta \approx -0.28\)) due to the multifaceted Confucian concept of Ren (仁), whereas English dominates Sanctity-Virtue (\(\delta \approx 0.30\)) due to diverse theological texts in its training corpus. Probing across layers reveals that moral separability follows a rise-peak-decline trajectory, peaking reliably at middle layers (Layer 17 in Llama-3.1-8B achieves 65.6% 10-way accuracy), establishing the middle representations as the hub of abstract ethical concepts.
2. Layer-Wise Moral Vector Extraction and Causal Steering: Isolating directional shifts and demonstrating monotonic polarity control With linear separability validated, the authors isolate steerable vectors in the optimal Layer 17 residual stream. For each moral foundation \(f \in \mathcal{F}\), the Moral Vector \(V_f\) is computed as the difference between the centroids of the hidden states for Virtue and Vice classes across the final token representations: $\(V_f = \mathbb{E}[H_{l, \text{virtue}}^f] - \mathbb{E}[H_{l, \text{vice}}^f]\)$ During generation, this vector is added directly into the forward pass residual stream: \(H_{l, \text{steered}}^t = H_l^t + \lambda \cdot V_f\). Internal probe activations confirm marked diagonal selectivity (injecting the Care vector increases Care-Virtue by \(+0.113\) while suppressing Care-Vice by \(-0.118\)). At the behavioral level, continuous variation of the steering coefficient \(\lambda \in [-2.0, +2.0]\) shifts generation polarity monotonically, elevating virtuous responses from 20% (\(\lambda = -2.0\)) to 85% (\(\lambda = +2.0\)). In multi-turn adversarial debate against a Claude-3.5-Sonnet red-teaming attacker, the steered model maintains a 79.4% virtue rate after two rounds of relentless ethical pushback compared to 42.1% for the base model, validating that the steering alters core causal mechanisms rather than surface token probabilities.
3. Adaptive Moral Fusion Dynamic Latent Defense: Context-sensitive multi-dimensional routing to resolve ethical friction Addressing the severe utility degradation and false refusal spikes caused by indiscriminate static injection of single vectors or a uniform Global Virtue Vector, the authors introduce Adaptive Moral Fusion (AMF). AMF deploys the trained Unified Moral Probe to inspect the input hidden state \(H_l^t\) at runtime and compute the posterior probability of violation across all five Vice categories: \(P_f(H_l^t) = P(y = \text{Vice}_f \mid H_l^t)\). A ReLU gating function with a calibrated sensitivity threshold \(\tau = 0.2\) dynamically scales the foundation-specific intervention intensity: $\(\alpha_f = \text{ReLU}(P_f(H_l^t) - \tau) \cdot \lambda_{\text{base}}\)$ The dynamic composite defense vector is synthesized and injected as: $\(V_{\text{fusion}} = \sum_{f \in \mathcal{F}} \alpha_f \cdot V_f, \quad H_{l, \text{steered}}^t = H_l^t + V_{\text{fusion}}\)$ This gating guarantees zero intervention (\(\alpha_f = 0\)) on benign queries, preventing utility loss. Crucially, in complex moral dilemmas with competing foundations (e.g., a father pressing a button to kill a stranger to fund his daughter's surgery), static global steering causes conflicting friction by simultaneously amplifying familial Loyalty and non-maleficence Care; AMF selectively identifies the Care-Vice violation and dynamically injects targeted Care steering to suppress harm while leaving unviolated foundations untouched.
4. Activation Oracle Semantic Decoding and Natural Language Interpretation: Verifying latent direction purity without supervised prompting
To confirm that the extracted directions capture legitimate ethical concepts rather than spurious statistical artifacts or dataset-specific artifacts, the authors implement an Activation Oracle paradigm. By injecting the target hidden state vectors into intermediate layers of the model under a structured template with <ACT> token placeholders:
$\(\text{Layer } l: \text{<ACT> Question: If this activation is a natural language concept, the most relevant moral keyword or ethical principle is: }\)$
The model is prompted to articulate the latent activation directly in natural language. The outputs generated by the model exhibit direct alignment with the formal definitions of Moral Foundations Theory: the Fairness vector generates "Justice, equity, and moral obligation" at Layer 4, the Care vector produces "Respect for all living beings and non-maleficence" at Layer 22, and the Sanctity vector surfaces "The principle of beneficence and doing no harm" at Layer 2, corroborating the semantic integrity of the extracted vectors.
Loss & Training¶
The linear classifier probes are trained with cross-entropy loss across layers using the Adam optimizer with a learning rate of \(1\times 10^{-3}\), weight decay of \(1\times 10^{-4}\), batch size of 64, and 30 training epochs with 5-fold stratified cross-validation. In inference steering, no parameter fine-tuning is required; activation additions occur during forward inference at Layer 17 with \(\lambda_{\text{base}} = 2.0\) and threshold \(\tau = 0.2\).
Key Experimental Results¶
Main Results¶
The primary evaluation assesses jailbreak vulnerability via Attack Success Rate (ASR) on HarmBench, exaggerated refusal via false refusal rate on benign prompts from XSTest, and general cognitive utility across ARC, SciQ, and MATH benchmarks on Llama-3.1-8B-Instruct and Qwen3-8B.
| Model / Intervention Condition | HarmBench ASR (%) ↓ | XSTest False Refusal (%) ↓ | ARC Acc (%) ↑ | SciQ Acc (%) ↑ | MATH Acc (%) ↑ |
|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct (Baseline, Unsteered) | 82.50 | 18.00 | 84.90 | 45.15 | 15.83 |
| + Global Virtue Vector (Static Injection) | 48.00 | 12.00 | 84.23 | 37.14 | 11.42 |
| + Adaptive Moral Fusion (AMF, Ours) | 19.66 | 2.00 | 84.90 | 44.74 | 15.03 |
| Reference SOTA: Claude-3.5-Sonnet | ~18.50 | ~1.80 | - | - | - |
| Qwen3-8B (Baseline, Unsteered) | 39.67 | 12.80 | 88.93 | 52.25 | 20.84 |
| Qwen3-8B + Global Virtue Vector | 29.67 | 11.60 | 87.58 | 48.55 | 18.24 |
| Qwen3-8B + Adaptive Moral Fusion (AMF, Ours) | 21.33 | 5.60 | 88.93 | 50.75 | 20.84 |
Ablation Study¶
A sensitivity ablation on the AMF activation threshold \(\tau \in [0.0, 0.4]\) on Llama-3.1-8B-Instruct demonstrates the optimal operating equilibrium between safety and helpfulness.
| Threshold \(\tau\) | HarmBench ASR (%) ↓ | XSTest False Refusal (%) ↓ | Operational Mechanism & Analysis |
|---|---|---|---|
| \(\tau = 0.0\) (Unconditional Injection) | 26.50 | 14.80 | Over-aggressive intervention injects latent noise into benign prompts, causing high false refusals |
| \(\tau = 0.1\) | 22.40 | 7.50 | Filters marginal noise but still slightly over-sensitized to benign sensitive keywords |
| \(\tau = 0.2\) (Optimal Setting) | 19.66 | 2.00 | Global optimum minimizing both adversarial jailbreak success and benign over-refusals |
| \(\tau = 0.3\) | 25.10 | 1.80 | Defense becomes overly conservative, failing to trigger on nuanced adversarial jailbreak prompts |
| \(\tau = 0.4\) (High Inaction Threshold) | 34.20 | 1.50 | Triggers only on extreme violations, causing defense efficacy to degrade toward vanilla baseline |
Key Findings¶
- Static moral injection imposes heavy capability tax: Injecting an unweighted average of all virtue directions causes severe degradation on non-adversarial benchmarks (SciQ drops from 45.15% to 37.14%, MATH from 15.83% to 11.42%) because 36.3% of prompts contain zero moral content. In contrast, AMF activates only upon verified violations, preserving full reasoning capabilities (ARC stays at 84.90%, MATH at 15.03%).
- Moral representation exhibits dual structural characteristics: Cross-lingual transfer highlights that while Sanctity-Vice acts as a universally shared evolutionary core across English and Chinese, Care, Loyalty, and Authority reflect distinct cultural conceptualizations (e.g., Confucian relational filial piety vs. Western individual/institutional contract compliance).
- Dynamic latent steering provides resilient defense: Under multi-round adversarial red-teaming, the baseline model's moral adherence collapses from 58.1% to 42.1%, whereas AMF-steered models maintain 79.4% ethical consistency, confirming that latent steering fortifies the model's intrinsic decision path rather than imposing a fragile superficial filter.
Highlights & Insights¶
- Systematically grounds mechanistic interpretability in Moral Foundations Theory, shifting the paradigm of LLM safety from monolithic binary refusal vectors to a structured, 5-dimensional latent moral coordinate system.
- Adaptive Moral Fusion operates with zero architectural modification and zero parameter updates, achieving defense and over-refusal metrics matching closed-source frontier models (Claude-3.5-Sonnet) with minimal runtime overhead.
- Demonstrates the use of Activation Oracles to decode intermediate latent interventions into interpretable natural language descriptions, validating conceptual purity without human verification loops.
Limitations & Future Work¶
- The moral framework is exclusively anchored in intuitionist Moral Foundations Theory, omitting normative frameworks like Utilitarianism and Deontology that require explicit causal and teleological reasoning in complex dilemmas.
- Cross-lingual validation is confined to high-resource English and Chinese; deploying static Moral Vectors globally risks marginalizing non-WEIRD and low-resource cultural ethical perspectives.
- Dual-use vulnerability: The demonstrated linear separability permits adversarial actors to invert steering coefficients (\(\lambda < 0\)) to synthesize toxic or sociopathic personas without model retraining.
Related Work & Insights¶
- vs Refusal Vector Steering (Arditi et al., 2024): Refusal directions treat safety as a binary suppression switch, leading to excessive over-refusal on benign queries with sensitive words; AMF decomposes safety into five MFT axes, reducing XSTest false refusals to 2.00%.
- vs RLHF Alignment (Ouyang et al., 2022): RLHF acts as an external behavioral filter vulnerable to multi-turn adversarial subversion; AMF intervenes directly on intermediate residual activations, maintaining 79.4% robustness under extended adversarial debate.
- vs Contrastive Activation Addition (Panickssery et al., 2024): Standard CAA applies constant static shifts across all contexts; AMF introduces probabilistic threshold gating, completely eliminating utility drops on general reasoning tasks.
Rating¶
- Novelty: ⭐⭐⭐⭐⭐ Pioneering introduction of multi-dimensional Moral Foundations Theory into LLM latent space analysis and steering.
- Experimental Thoroughness: ⭐⭐⭐⭐⭐ Comprehensive cross-lingual probing, multi-turn adversarial red-teaming, safety benchmarks, and general capability audits.
- Writing Quality: ⭐⭐⭐⭐⭐ Flawless narrative structure, deep mechanistic rigor, and clear conceptual exposition.
- Value: ⭐⭐⭐⭐⭐ Delivers an efficient, interpretable, and lightweight inference-time defense paradigm with immediate practical applicability.