Tracing Moral Foundations in Large Language Models
Organizations: Department of Computer Science, University of Southern California · Department of Psychology, University of Southern California · Center for Computational Language Sciences, University of Southern California
Abstract
Large language models often produce human-like moral judgments, but it is unclear whether this reflects an internal conceptual structure or superficial ``moral mimicry.'' Using Moral Foundations Theory (MFT) as an analytic framework, we study how moral foundations are encoded, organized, and expressed across 14 base and instruction-tuned LLMs spanning four model families (Llama, Qwen2.5, Qwen3-MoE, Mistral) and scales from 7B to 70B. We employ a multi-level approach combining (i) layer-wise analysis of MFT concept representations and their alignment with human moral perceptions, (ii) pretrained sparse autoencoders (SAEs) over the residual stream to identify sparse features that support moral concepts, and (iii) causal steering interventions using dense MFT vectors and sparse SAE features. We find that models represent and distinguish moral foundations in a manner that aligns with human judgments, and that this moral geometry naturally emerges from pretraining and is selectively rewired by post-training. At a finer scale, SAE features show clear semantic links to specific foundations, suggesting partially disentangled mechanisms within shared representations. Finally, steering along either dense vectors or sparse features produces predictable shifts in foundation-relevant behavior, demonstrating a causal connection between internal representations and moral outputs. Together, our results provide mechanistic evidence that moral concepts in LLMs are distributed, layered, and partly disentangled, suggesting that pluralistic moral structure can emerge as a latent pattern from the statistical regularities of language alone.
Figures & tables
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Words | VADER | |
|---|---|---|---|
| Care | 242 | ||
| Fairness | 217 | ||
| Loyalty | 216 | ||
| Authority | 217 | ||
| Sanctity | 217 | ||
| Social Norms | 216 |
| Metric | Strongest model | Strongest foundation | Weakest foundation |
|---|---|---|---|
| Qwen2.5-7B (0.589) | Authority (0.385) | Loyalty (0.239) | |
| Cohen’s | Qwen2.5-7B (0.589) | Authority (0.389) | Loyalty (0.251) |
| AUC | Qwen2.5-7B (0.661) | Authority (0.611) | Loyalty (0.562) |
| Model | Baseline | at | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Instruction-tuned models | |||||||||||
| Llama-3.1-70B-Instruct | 28 | 79.10 | |||||||||
| Llama-3.1-8B-Instruct | 14 | 62.90 | |||||||||
| Qwen2.5-32B-Instruct | 32 | 80.95 | |||||||||
| Qwen2.5-14B-Instruct | 15 | 75.15 | |||||||||
| Model | Baseline | at | |||||||
|---|---|---|---|---|---|---|---|---|---|
| -0.20 | -0.10 | -0.05 | 0.00 | +0.05 | +0.10 | +0.20 | |||
| Instruction-tuned models | |||||||||
| Llama-3.1-8B-Instruct | 16 | 65.20 | |||||||
| Qwen2.5-7B-Instruct | 16 | 70.35 | |||||||
| Base models | |||||||||
| Llama-3.1-8B-Base | 16 | 63.45 | |||||||
| Model | Univ | Benev | HO_ST | Trad | Conf | HO_Cons | Ideol | #ok/7 |
|---|---|---|---|---|---|---|---|---|
| Llama-3.1-8B-Instruct | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| Llama-3.1-8B-Base | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| Llama-3.1-70B-Instruct | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| Llama-3.1-70B-Base | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ||
| Qwen2.5-7B-Instruct | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| Qwen2.5-7B-Base | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Original MFV Items (Care–Emotional Harm) | Generated Items (MFV-130 Expansion) |
|---|---|
| You see a teenage boy chuckling at an amputee he passes by while on the subway. | You see a teen laughing loudly as a person fumbles with their groceries on the sidewalk. |
| You see a girl laughing at another student forgetting her lines at a school play. | You see a girl pointing and smirking when a stranger drops their phone on the train. |
| You see a woman commenting out loud about how fat another woman looks in her jeans. | You see a woman muttering that a passenger’s clothes look ridiculous as they walk by. |
| You see a man quickly canceling a blind date as soon as he sees the woman. | You see a man whispering insults while glancing at a woman boarding the bus. |
| You see a man snickering as he passes by a cancer patient with a bald head. | You see a man rolling his eyes and loudly commenting that a passerby looks pathetic. |
| Field | Description / Constraints |
|---|---|
| short_label | A brief (5–10 words) descriptor of the pattern. |
| long_description | A 1–2 sentence summary of the feature’s semantics. |
| mft_alignment | The primary moral foundation detected. Enum: { care , fairness , loyalty , authority , sanctity , none } |
| mft_polarity | The valence of the moral content. Enum: { virtue , vice , mixed , none } |
| rationale | Reasoning for the classification grounded in specific snippets. |
| evidence_ids | List of snippet indices (1–6 items) supporting the rationale. |
| Layer | Feature ID | MFT | Conf. | Label (GPT, human-validated) | Peak-centered sample text (trimmed) |
|---|---|---|---|---|---|
| 23 | 44965 | Care | 0.93 | Graphic descriptions of extreme suffering and atrocity | Fly strike kills thousands of rabbits. …The eggs hatch into maggots which eat their way into the poor rabbit’s flesh. The rabbit dies from being eaten alive—a slow, painfully horrific death … |
| 11 | 8003 | Authority | 0.90 | Polite , expert-style, authoritative explanatory answers to questions | …he only needs to be organized …Please share any suggestions …Ah, organization …Dealing with clutter and putting things in order is an issue for almost everyone … |
| 15 | 41465 | Care | 0.90 | Descriptions of large-scale suffering and atrocities | …the Holocaust, concentration camps, Nazi unfathomable brutality … |
| 19 | 90260 | Authority | 0.90 | Organizational management systems, methods, and processes | …improvements in fields such as …safe minimum levels of maintenance …operating procedures and strategies …capital maintenance regimes and plans … |
| 23 | 90226 | Authority | 0.86 | Definitions and hierarchies of roles and positions | When thinking of a company organizational chart …All positions ultimately lead up to an executive member. The executive is considered the leader of the company … |
| 19 | 68970 | Authority | 0.86 | Attributions of authoritative sources and institutions | Imperial Abbey of Essen …Imperial Abbey of the Holy Roman Empire …Gained princely status … |
| Layer | Feature ID | MFT | Conf. | Label (GPT, human-validated) | Peak-centered sample text (trimmed) |
|---|---|---|---|---|---|
| 3 | 72227 | Authority | 0.93 | Mentions of govern ments and national leaders | The government’s former climate-change adviser; the Government’s initiative to develop 100 cities… |
| 15 | 130669 | Care | 0.93 | Condemning bullying , harmful , coercion , and abusive mistreatment | Denounce bullying and promote kindness, respect, and protection of students or workers from harm (e.g., anti-bullying policies and reminders to not hurt others) |
| 27 | 85517 | Care | 0.93 | Definitions and examples of empathy / compassion | Compassion is described as sympathetic consciousness of others’ distress plus a desire to relieve it, along with related traits like sensitivity and non-judgment |
| 3 | 43421 | Authority | 0.90 | References to “The Govern ment …” as actor/subject | Neutrally reporting or explaining actions of the government, such as official initiatives, policies, or reversals |
| 27 | 17185 | Care | 0.90 | Medical explanations of injuries and health / safety risks | Workshop safety to avoid injury; playground injuries and prevention for children |
| 27 | 54738 | Care | 0.90 | Natural disasters and their destructive impact, and care for people facing disasters | Natural disasters and their harmful consequences: PTSD from traumatic events including natural disasters; social media helping people during floods |
| Layer | Feature ID | MFT | Conf. | Label (GPT, human-validated) | Peak-centered sample text (trimmed) |
|---|---|---|---|---|---|
| 15 | 42641 | Authority | 0.79 | Formal institutions , systems, or organized practices such as government | The senate and the house of representatives … call for a debate and vote bipartisan group of members are calling for a debate and vote …. |
| 3 | 4383 | Authority | 0.86 | References of experts, formal research, or authoritative institutions | Experts say there has not been a reliable count … New Irish Government policy is to plant 600,000 native trees |
| 11 | 123331 | Authority | 0.63 | Historical or institutional authority and control | The Bolsheviks renamed the village Wladimirowka and subjected its citizens to the tyrannies of the Stalinist era. |
| 23 | 6462 | Authority | 0.78 | Foundational principles, origins, and institutional milestones | Creating relevant information for decision-making … manager of operations analysis and planning utah transit authority. |
| 19 | 2272 | Care | 0.79 | Programs, resources, or organized efforts aimed at educating, protecting , or improving conditions for children or broader communities | Conducting Social Investigation and Class Analysis in urban poor communities… feudal oppression and other political crimes |
| 23 | 20681 | Care | 0.78 | Helping others through educational guidance and instructional explanation on safety -oriented policy | …facilitate and increase … involvement of small scale fishermen in the decision-making processes by exchanging experiences, provide opportunities for education and provide a platform for networking … |
| Layer | Feature ID | MFT | Conf. | Label (GPT, human-validated) | Peak-centered sample text (trimmed) |
|---|---|---|---|---|---|
| 39 | 704 | Authority | 0.71 | Founding or introduction of institutions and systems | New Irish Government policy is to plant 600,000 native trees around Ireland within 3 years, edged on by the Green Party. |
| 39 | 1016 | Authority | 0.78 | Founding or creation of institutions and systems | U.S. President Donald Trump is working to designate … as a foreign terrorist organization… |
| 39 | 9095 | Authority | 0.79 | Institutional programs, institutes, and formal initiatives | The Berlin Psychoanalytic Institute (later the Göring Institute) was founded in 1920 to further the science of psychoanalysis in Berlin. |
| 39 | 30227 | Authority | 0.78 | Founding or establishment of institutions and movements | U.S. President Donald Trump is working to designate …, a move that would bring sanctions against … |
| 39 | 30369 | Authority | 0.71 | Institutional programs, initiatives, and formal organizations | New Irish Government policy is to plant 600,000 native trees around Ireland within 3 years, edged on by the Green Party. |
| 3 | 1733 | Care | 0.78 | Public health , safety , and risk communication | “Most parents and guardians know that immunization is still the best way to protect children against vaccine-preventable diseases such as whooping cough and measles,” said… |
Moral Reasoning in Language Models
Moral reasoning in language models studies how AI systems judge dilemmas, weigh competing values, explain decisions, and stay consistent across contexts.
See all 124 papers