Table of Contents
Fetching ...

The Straight and Narrow: Do LLMs Possess an Internal Moral Path?

Luoming Hu, Jingjie Zeng, Liang Yang, Hongfei Lin

TL;DR

This work investigates whether LLMs harbor intrinsic moral representations by mapping latent morality through Moral Foundations Theory (MFT) and validating across English and Chinese. It introduces a Unified Moral Probe to detect ten moral classes, then derives steerable Moral Vectors $V_f$ guiding internal activations via inference-time steering on a chosen layer, with Dynamic AMF gating to balance safety and helpfulness. The approach demonstrates that moral concepts are linearly separable in middle layers, revealing a shared yet language-specific subspace, and shows that Adaptive Moral Fusion can substantially reduce jailbreak success (e.g., HarmBench ASR to $19.66\%$) while minimizing unnecessary refusals on benign prompts. Activation Oracle confirms that Moral Vectors encode meaningful ethical concepts, and the method yields a practical intrinsic defense against unsafe outputs, albeit with caveats about cultural scope, model-dependence, and dual-use risks that warrant careful governance.

Abstract

Enhancing the moral alignment of Large Language Models (LLMs) is a critical challenge in AI safety. Current alignment techniques often act as superficial guardrails, leaving the intrinsic moral representations of LLMs largely untouched. In this paper, we bridge this gap by leveraging Moral Foundations Theory (MFT) to map and manipulate the fine-grained moral landscape of LLMs. Through cross-lingual linear probing, we validate the shared nature of moral representations in middle layers and uncover a shared yet different moral subspace between English and Chinese. Building upon this, we extract steerable Moral Vectors and successfully validate their efficacy at both internal and behavioral levels. Leveraging the high generalizability of morality, we propose Adaptive Moral Fusion (AMF), a dynamic inference-time intervention that synergizes probe detection with vector injection to tackle the safety-helpfulness trade-off. Empirical results confirm that our approach acts as a targeted intrinsic defense, effectively reducing incorrect refusals on benign queries while minimizing jailbreak success rates compared to standard baselines.

The Straight and Narrow: Do LLMs Possess an Internal Moral Path?

TL;DR

This work investigates whether LLMs harbor intrinsic moral representations by mapping latent morality through Moral Foundations Theory (MFT) and validating across English and Chinese. It introduces a Unified Moral Probe to detect ten moral classes, then derives steerable Moral Vectors guiding internal activations via inference-time steering on a chosen layer, with Dynamic AMF gating to balance safety and helpfulness. The approach demonstrates that moral concepts are linearly separable in middle layers, revealing a shared yet language-specific subspace, and shows that Adaptive Moral Fusion can substantially reduce jailbreak success (e.g., HarmBench ASR to ) while minimizing unnecessary refusals on benign prompts. Activation Oracle confirms that Moral Vectors encode meaningful ethical concepts, and the method yields a practical intrinsic defense against unsafe outputs, albeit with caveats about cultural scope, model-dependence, and dual-use risks that warrant careful governance.

Abstract

Enhancing the moral alignment of Large Language Models (LLMs) is a critical challenge in AI safety. Current alignment techniques often act as superficial guardrails, leaving the intrinsic moral representations of LLMs largely untouched. In this paper, we bridge this gap by leveraging Moral Foundations Theory (MFT) to map and manipulate the fine-grained moral landscape of LLMs. Through cross-lingual linear probing, we validate the shared nature of moral representations in middle layers and uncover a shared yet different moral subspace between English and Chinese. Building upon this, we extract steerable Moral Vectors and successfully validate their efficacy at both internal and behavioral levels. Leveraging the high generalizability of morality, we propose Adaptive Moral Fusion (AMF), a dynamic inference-time intervention that synergizes probe detection with vector injection to tackle the safety-helpfulness trade-off. Empirical results confirm that our approach acts as a targeted intrinsic defense, effectively reducing incorrect refusals on benign queries while minimizing jailbreak success rates compared to standard baselines.
Paper Structure (70 sections, 8 equations, 9 figures, 13 tables)

This paper contains 70 sections, 8 equations, 9 figures, 13 tables.

Figures (9)

  • Figure 1: Conceptual illustration of Moral Vector steering. When facing a moral dilemma, the vanilla model, despite refusing, still weighs the utilitarian benefit (left). By injecting a Moral Vector, the model is actively steered towards a "Virtue" state, triggering an immediate and intrinsic refusal (right).
  • Figure 2: The framework and mechanistic analysis of Moral Vectors. Left Panel (Methodology): (a) We align English and Chinese moral representations to identify a shared subspace. (b) We extract Moral Vectors by computing the contrast between "Vice" and "Virtue" centroids. (c) These vectors are used to steer the model's internal state, while (d) Adaptive Moral Fusion (AMF) dynamically gates this intervention to balance safety and helpfulness. Right Panel (Mechanism): A visualization of morality encoded within the Moral Vector in different hidden layers. All Moral Vectors demonstrate alignment with the MFT definition (e.g., Fairness encoding "Justice").
  • Figure 3: Our approach follows a progressive logic: validating the moral subspace (Zone 1) to enable vector extraction (Zone 2), which grounds the dynamic steering (Zone 3) and final verification (Zone 4).
  • Figure 4: The radar charts visualize the transfer discrepancy between English and Chinese moral subspaces across five moral foundations for Virtue and Vice.
  • Figure 5: Impact of Moral Vector injection on internal representations. The heatmap shows that steering vectors ($\lambda=2.0$) precisely amplify their target moral categories (diagonal) while revealing implicit correlations between foundations like Fairness and Authority (off-diagonal).
  • ...and 4 more figures