Moral Foundation Detection
- Moral Foundation Detection is the task of identifying and categorizing moral concerns in text and multimodal data based on Moral Foundations Theory.
- It employs various methodologies including multi-label classification, dictionary-based estimation, and mechanistic probing with transformer models.
- The field addresses challenges like annotation subjectivity, domain adaptation, and cross-lingual evaluation, while pioneering multimodal and interpretability advances.
Searching arXiv for papers on moral foundation detection and closely related moral foundation analysis benchmarks. Moral Foundation Detection is the computational task of identifying which moral concerns are expressed in text, dialogue, multimodal scenarios, or internal model representations, usually within the framework of Moral Foundations Theory (MFT). In the literature surveyed here, the task appears in several technically distinct forms: multi-label text classification over moral dimensions; dictionary-based estimation of “moral loading”; manual qualitative coding of moral principles in domain-specific discourse; benchmark design for multimodal and cross-lingual moral evaluation; and mechanistic probing of latent moral representations in LLMs (Nguyen et al., 2023). Across these formulations, the central problem is not merely to decide whether language is moral, but to recover which foundation is implicated, how strongly it is expressed, whether multiple foundations co-occur, and how those signals vary across domains, languages, modalities, and model architectures (Trager et al., 2022).
1. Conceptual basis and label spaces
The dominant theoretical substrate is Moral Foundations Theory, which in different studies is instantiated either as the classic five foundations—Care/Harm, Fairness/Cheating, Loyalty/Betrayal, Authority/Subversion, and Sanctity or Purity/Degradation—or in revised variants that split fairness into Equality and Proportionality, and in some cases introduce Liberty/Oppression or Thin Morality (Trager et al., 2022). A recurrent methodological choice is whether virtue and vice are modeled separately or collapsed into a shared foundation. Some corpora preserve the virtue/vice split, as in the Moral Foundations Twitter Corpus, whereas others collapse polarity and treat the task as detecting the presence of a foundation regardless of whether the text praises or condemns it (Nguyen et al., 2023).
Several papers operationalize moral foundation detection as a multi-label problem. In the Moral Foundations Reddit Corpus, each comment is associated with a binary vector over foundations, with majority-vote labels for Care, Equality, Proportionality, Loyalty, Authority, Purity, and Thin Morality, and an auxiliary Implicit/Explicit annotation (Trager et al., 2022). In cross-domain classification work, Twitter and Reddit labels are harmonized to a shared five-label set, , explicitly treating each instance as potentially exhibiting multiple foundations concurrently (Naranbat et al., 13 Oct 2025). In contrast, Mformer frames the task as five independent binary classification problems, one per foundation, arguing that separate classifiers outperform a single shared multi-label model by 10.7–19.3 percentage points of test AUC on the same data (Nguyen et al., 2023).
The literature also includes formulations that are not standard text classification. In qualitative OSS research, moral foundations are manually assigned at the comment level in GitHub heated issues to study their co-occurrence with toxicity categories, rather than to build an automatic detector (Ehsani et al., 2023). In cross-lingual LLM diagnostics, “moral fingerprint” vectors are obtained by regressing model verdicts on MFQ-style foundation annotations, so detection is reframed as estimating how strongly model judgments respond to each dimension (Li et al., 15 Jan 2026). In mechanistic interpretability work, moral foundations are represented as linearly decodable internal directions or sparse features in the residual stream, and detection becomes a probing problem over hidden states rather than over surface text (Hu et al., 15 Jan 2026).
2. Annotation regimes, corpora, and supervision
The field is shaped by heterogeneous annotation schemes, and many reported performance differences are inseparable from these design choices. Twitter- and Reddit-based corpora dominate supervised work. The Moral Foundations Twitter Corpus contains roughly 35,000 tweets with annotator-level counts over virtue/vice labels and non-moral content; the Moral Foundations Reddit Corpus contributes 16,123 or 17,886 English Reddit comments, depending on preprocessing and aggregation protocol, and is organized around subreddits spanning US politics, French politics, and everyday moral life (Trager et al., 2022). News corpora add sentence- or span-level moral annotations derived from highlighted passages rather than whole-document judgments (Mokhberian et al., 2022).
Annotation subjectivity is a first-order issue. “Noise Audits Improve Moral Foundation Classification” formalizes two audit metrics over annotator judgments: instance-label entropy,
and a silhouette coefficient over sentence-embedding clusters for individual label assignments, with low-silhouette judgments treated as likely annotation errors (Mokhberian et al., 2022). The paper reports that removing noisy annotations based on these metrics improves classifier performance across three widely used datasets, while random removal does not. This suggests that moral foundation detection performance is often bottlenecked as much by label quality as by model capacity.
Several studies emphasize domain adaptation at the annotation level. In OSS discussions, standard MFT is reinterpreted for software engineering discourse: insults directed at people map to Care/Harm, insults directed at code to Sanctity/Degradation, prompting others to “ditch” or “fork” a project to Loyalty/Betrayal, and Code-of-Conduct enforcement to Authority (Ehsani et al., 2023). In music lyrics, a low-resource domain, 2,721 synthetic lyrics generated by GPT-4 were used as training data and 200 real lyrics were annotated by two experts, with average Cohen’s of 0.86 across ten virtue/vice labels (Preniqi et al., 2024). In multilingual work, the Japanese Moral Foundations Dictionary was built through a semi-automated translation-and-filtering pipeline and validated on 16,033 free-text descriptions produced by 386 Japanese participants, with the highest dictionary frequency ratios appearing in the matching foundation pools and a main effect of foundation of (Matsuo et al., 2018).
Some datasets are designed not for supervised detection per se but for evaluation. MoralBench expands Moral Foundations Vignettes into a multimodal benchmark for LVLMs, conducting moral evaluation across six moral foundations and three tasks: moral judgement, moral classification, and moral response (Yan et al., 2024). The paper is benchmark-oriented rather than classifier-oriented, but it broadens the concept of moral foundation detection from text-only labeling to multimodal moral understanding.
3. Methodological families
A major divide runs between lexicon-based, supervised transformer-based, prompt-based, and mechanistic approaches.
Dictionary-based methods are historically central. The original Moral Foundations Dictionary inspired several extensions, including eMFD, which associates each lexical item with soft foundation probabilities and foundation-specific sentiment. In deepfake-related Reddit analysis, eMFDscore computes per-document foundation loadings such as care_p, fairness_p, loyalty_p, authority_p, and sanctity_p, alongside sentiment scores, moral/nonmoral ratios, and variance measures (Gamage et al., 2023). The dominant foundation of a document is then given by
and virtue versus vice is inferred from the sign of the corresponding sentiment score (Gamage et al., 2023). Earlier Twitter work used latent semantic analysis rather than direct lexicon counting: word vectors were constructed from a PPMI-weighted word–context matrix, foundation vectors were formed by summing MFD vice-word embeddings, and tweet “moral loadings” were measured by cosine similarity,
with the dominant foundation assigned by argmax over foundations (Kaur et al., 2016). These methods are interpretable and portable, but the literature repeatedly notes their fragility, incompleteness, and domain sensitivity (Nguyen et al., 2023).
Supervised transformer methods now define the state of the art on labeled text. Mformer fine-tunes five independent RoBERTa-base binary classifiers, one per foundation, using a <s>-pooled representation followed by a 768-neuron layer and a softmax classifier, optimizing categorical cross-entropy (Nguyen et al., 2023). The model improves by 4–12% in AUC over existing approaches on its training domains and by up to 17% in AUC on four out-of-domain datasets (Nguyen et al., 2023). Cross-domain transformer studies also use BERT and DistilBERT in a multi-label setting, with logits , sigmoid outputs
and BCEWithLogitsLoss,
0
to study performance and fairness under Twitter1Reddit and Reddit2Twitter transfer (Naranbat et al., 13 Oct 2025).
Prompt-based LLM methods are extensively evaluated but are usually weaker than fine-tuned encoders on this task. “The Moral Gap of LLMs” compares Claude and OpenAI mini-models against a fine-tuned DeBERTa-v3-base model on MFTC and MFRC, using ROC, PR, and DET analyses, and reports substantial gaps driven by high false negative rates and systematic under-detection of moral content, especially for loyalty and sanctity (Skorski et al., 24 Jul 2025). The same conclusion appears in the Moral Foundations Reddit Corpus paper: zero-shot, few-shot, and PEFT LLM baselines lag behind fine-tuned BERT on this subjective multi-label task (Trager et al., 2022).
Mechanistic methods reinterpret detection as a latent-space problem. “The Straight and Narrow” builds a bilingual Moral Virtue–Vice dataset and trains linear probes over last-token hidden states of Llama-3.1 to predict a 10-way class space 3 using
4
with peak 10-way accuracy of 65.6% at layer 17, far above the 10% random baseline (Hu et al., 15 Jan 2026). “Tracing Moral Foundations in LLMs” similarly constructs dense residual-stream concept vectors by difference-in-means between foundation and social-norm vignettes, and complements them with sparse autoencoder features aligned to those directions (Yu et al., 9 Jan 2026). These papers show that detection can be internal, layered, and causally manipulable, not only external and label-based.
4. Evaluation metrics and empirical patterns
Evaluation is unusually diverse. Transformer classification studies rely on AUC, Average Precision, F1, Precision, Recall, Exact Match Ratio, and loss. In Mformer, AUC is preferred because it is threshold-free and robust to class imbalance, with reported in-domain AUCs of 0.85 for Authority and Care, 0.84 for Fairness, and 0.83 for Loyalty and Sanctity on the combined test set (Nguyen et al., 2023). In multi-domain fairness work, in-domain Micro-F1 reaches 0.772 for DistilBERT on MFTC and 0.687 on MFRC, while Twitter5Reddit transfer degrades Micro-F1 by 14.9% versus only 1.5% for Reddit6Twitter, revealing strong asymmetry in transfer difficulty (Naranbat et al., 13 Oct 2025).
The same study proposes Moral Fairness Consistency,
7
8
as a diagnosis-oriented cross-domain fairness metric (Naranbat et al., 13 Oct 2025). MFC is nearly uncorrelated with standard performance metrics but has perfect negative correlation with Demographic Parity Difference and a strong negative correlation with Equalized Odds Difference in the reported experiments. Across labels, loyalty has the highest MFC at 0.96, whereas authority has the lowest at 0.78 (Naranbat et al., 13 Oct 2025). This indicates that authority is especially unstable and fairness-sensitive across domain shifts.
Per-foundation difficulty is a robust pattern across studies. Care and Fairness are generally easier, while Loyalty, Authority, and especially Sanctity or Purity are harder or more dataset-dependent (Nguyen et al., 2023). In MFRC, BERT_single achieves F1 of 0.62 on Care and 0.58 on Equality but only 0.37 on Proportionality and 0.51 on Purity, while LLM baselines remain substantially lower (Trager et al., 2022). In the LLM-vs-transformer comparison, LLM false negative rates for loyalty and sanctity frequently exceed 0.8, especially on Reddit (Skorski et al., 24 Jul 2025). This suggests that moral foundation detection difficulty is strongly tied to label prevalence, domain-specific lexical realization, and the distinction between overt and implicit moral reasoning.
Qualitative studies often replace predictive metrics with descriptive counts. In GitHub heated issues, 135 of 695 comments exhibited at least one moral principle, with counts of Care/Harm 48, Fairness/Cheating 19, Loyalty/Betrayal 23, Authority/Subversion 30, and Sanctity/Degradation 42 (Ehsani et al., 2023). In deepfake Reddit discourse, 101,869 documents were assigned dominant foundations by eMFDscore, with Care/Harm accounting for 22% of posts, Fairness/Cheating and Loyalty/Betrayal each 21%, Authority/Subversion 20%, and Sanctity/Degradation 16% (Gamage et al., 2023). These counts are not classifier scores, but they show how detection outputs are used for social analysis.
5. Domains, modalities, and applications
The topic has expanded beyond political tweets. Social media remains central, but domain-specific studies show that moral foundation detection is highly context-sensitive. In open-source software, the primary value lies in adapting MFT to distinguish, for example, person-directed harm from code-directed degradation, or fairness disputes from authority challenges within maintainer–user interactions (Ehsani et al., 2023). In deepfake-related communities, sanctity/degradation loadings highlight sexually degrading and non-consensual use cases that are not reducible to toxicity or hate speech (Gamage et al., 2023). In music lyrics, synthetic-data-trained BERT models outperform out-of-domain baselines and zero-shot GPT-4, with average weighted F1 of 0.8 and average precision in binary classification 12% higher than baselines, indicating that domain-tailored synthetic supervision can support morality learning in creative text (Preniqi et al., 2024).
Multilingual and cross-cultural work broadens both theory and evaluation. The Japanese Moral Foundations Dictionary demonstrates that lexicon construction and validation can be ported across languages, but also that binding foundations may exhibit weaker links to MFQ scores than Harm and Fairness, suggesting culture-specific lexicalization or questionnaire mismatch (Matsuo et al., 2018). “Untangling Input Language from Reasoning Language” decomposes cross-lingual moral judgment differences into story-language and reasoning-language effects using a 9 design over English and Chinese, then maps verdicts to Moral Foundations Theory via logistic regression,
0
and reports that reasoning-language effects contribute about twice the variance of input-language effects (Li et al., 15 Jan 2026). It also motivates splitting Authority into family-related and institutional subdimensions, with small but consistent AUC gains from 0.764 to 0.768 for EN/EN and 0.778 to 0.782 for CN/CN under the 7-dimensional formulation (Li et al., 15 Jan 2026). This suggests that “Authority” may be too coarse for cross-cultural detection.
Moral foundation detection is also used as an explanatory feature rather than a terminal task. In stance classification on social media, eMFD- and FrameAxis-derived moral vectors improve stance prediction at both message and user levels, with reported average gains of 1.06 points for traditional machine learning models, 5.91 points for fine-tuned LLMs, and 15.82 points for LLMs under prompting regimes (Zhang et al., 2023). In political radicalization analysis, moral speech is combined with moral behavior: Fairness, Ingroup loyalty, Authority, and Purity are treated as multidimensional proxies for radicalization, with structural Ingroup loyalty operationalized via group-level modularity and Authority via partial dominating sets in interaction networks (Interian, 2024). This is not standard moral text classification, but it extends detection into the graph-structural domain.
6. Current limitations and emerging directions
Several limitations recur. First, annotation subjectivity remains irreducible. Moral labels reflect genuine disagreement, worldview differences, and multi-dimensional readings of the same text (Mokhberian et al., 2022). This creates a tension between cleaner labels for classifier training and the preservation of moral pluralism. Second, domain shift is severe. Twitter-trained models often fail on Reddit, and social-media-trained models transfer poorly to lyrics or OSS discourse without domain adaptation (Naranbat et al., 13 Oct 2025). Third, label taxonomies remain unsettled: some studies collapse virtue and vice, some split Fairness into Equality and Proportionality, some add Thin Morality or Liberty, and some refine Authority into family and institutional variants (Trager et al., 2022).
A fourth limitation is that prompting alone is insufficient for reliable deployment. Fine-tuned encoders consistently outperform prompted LLMs, even when the latter receive engineered instructions designed to increase recall or label cardinality (Skorski et al., 24 Jul 2025). A plausible implication is that general-purpose language modeling does not automatically induce task-calibrated moral classifiers. Fifth, lexicon-based tools remain sensitive to coverage, polysemy, morphology, and cultural bias. Mformer explicitly documents large vocabulary disagreement across MFD, MFD 2.0, and eMFD, as well as social biases such as parental-gender associations that its transformer model avoids reproducing (Nguyen et al., 2023).
Emerging directions are correspondingly plural. One trajectory is better supervised modeling with broader, cleaner, and more diverse corpora, including fairness-aware evaluation and cross-domain diagnostics such as MFC (Naranbat et al., 13 Oct 2025). Another is multimodal evaluation, where models must classify or reason about morally salient text-image scenarios rather than text alone (Yan et al., 2024). A third trajectory is cross-lingual diagnosis that separates input-language from reasoning-language effects and supports foundation-level calibration across languages (Li et al., 15 Jan 2026). A fourth is mechanistic: sparse autoencoders, linear probes, and steering vectors suggest that moral foundations can be detected as internal, layered, and partly disentangled structures inside LLMs, with causal effects on outputs (Yu et al., 9 Jan 2026).
Taken together, these developments indicate that Moral Foundation Detection is no longer a single benchmark task. It is an umbrella area spanning annotation design, domain adaptation, multilingual value analysis, fairness auditing, multimodal evaluation, and mechanistic interpretability. This suggests that future progress will depend less on one universal detector than on foundation-aware systems whose label space, supervision regime, and evaluation protocol are explicitly matched to domain, modality, language, and downstream use.