Skip to main content
QUICK REVIEW

[Paper Review] BERT has a Moral Compass: Improvements of ethical and moral values of machines

Patrick Schramowski, Cigdem Turan|arXiv (Cornell University)|Dec 11, 2019
Topic ModelingComputer Science17 references17 citations
TL;DR

This paper demonstrates that BERT, as a state-of-the-art language representation model, encodes a more accurate and coherent moral compass than prior methods like USE and SBERT. By applying the Moral Choice Machine (MCM) to BERT embeddings, the authors identify a single, dominant principal component representing a moral dimension that aligns with deontological ethics, enabling precise classification of actions as 'do's' or 'don'ts' even in complex, context-rich phrases.

ABSTRACT

Allowing machines to choose whether to kill humans would be devastating for world peace and security. But how do we equip machines with the ability to learn ethical or even moral choices? Jentzsch et al.(2019) showed that applying machine learning to human texts can extract deontological ethical reasoning about "right" and "wrong" conduct by calculating a moral bias score on a sentence level using sentence embeddings. The machine learned that it is objectionable to kill living beings, but it is fine to kill time; It is essential to eat, yet one might not eat dirt; it is important to spread information, yet one should not spread misinformation. However, the evaluated moral bias was restricted to simple actions -- one verb -- and a ranking of actions with surrounding context. Recently BERT ---and variants such as RoBERTa and SBERT--- has set a new state-of-the-art performance for a wide range of NLP tasks. But has BERT also a better moral compass? In this paper, we discuss and show that this is indeed the case. Thus, recent improvements of language representations also improve the representation of the underlying ethical and moral values of the machine. We argue that through an advanced semantic representation of text, BERT allows one to get better insights of moral and ethical values implicitly represented in text. This enables the Moral Choice Machine (MCM) to extract more accurate imprints of moral choices and ethical values.

Motivation & Objective

  • To investigate whether state-of-the-art language models like BERT improve the representation of ethical and moral values in machine learning systems.
  • To determine if BERT’s contextual embeddings yield a more coherent and interpretable moral dimension compared to earlier models such as Universal Sentence Encoder (USE) and SBERT.
  • To extend the Moral Choice Machine (MCM) framework to detect moral bias not only at the verb level but also in complex, context-dependent phrases.
  • To identify and validate a one-dimensional moral subspace within BERT embeddings that captures deontological ethical judgments.
  • To explore the potential of using this moral subspace for ethical alignment, bias mitigation, and interactive learning in AI systems.

Proposed method

  • Adapt the Moral Choice Machine (MCM) framework to use Sentence-BERT (SBERT) embeddings instead of older models like USE or SBERT variants.
  • Apply Principal Component Analysis (PCA) to vector differences of action pairs (e.g., 'kill' vs. 'compliment') to identify a dominant principal component representing the moral dimension.
  • Use the Word Embedding Association Test (WEAT) to correlate moral bias scores with semantic associations, validating the ethical signal in embeddings.
  • Project complex moral actions (e.g., 'should I have a gun to kill people?') into the identified moral subspace to compute moral bias scores.
  • Compare the variance explained by the top principal component across different models (USE vs. BERT) to assess the clarity and coherence of the moral dimension.
  • Use human-annotated templates (e.g., 'Should I kill people?') to generate response embeddings and evaluate moral bias via cosine similarity in the moral subspace.

Experimental results

Research questions

  • RQ1Does BERT’s contextual embedding architecture produce a more coherent and interpretable moral dimension than previous models like USE and SBERT?
  • RQ2Can the Moral Choice Machine (MCM) with BERT accurately classify complex, context-dependent moral actions such as 'helping a thief' or 'traveling to North Korea'?
  • RQ3Is there a single, dominant principal component in BERT embeddings that consistently represents a moral direction across diverse ethical actions?
  • RQ4To what extent do WEAT scores correlate with moral bias scores derived from MCM, and does this correlation improve with BERT?
  • RQ5Can the identified moral subspace be used to project and interpret the moral valence of real-world, natural language moral dilemmas?

Key findings

  • BERT’s sentence embeddings explain a significantly higher proportion of variance in moral vector differences compared to USE, indicating a clearer and more dominant moral dimension.
  • The top principal component of BERT embeddings consistently separates 'do's' (e.g., 'compliment', 'welcome') from 'don'ts' (e.g., 'kill', 'murder'), forming a coherent moral axis.
  • Actions like 'kill people' and 'have a gun to kill people' are ranked as highly negative, while 'become a good parent' is ranked positively, demonstrating contextual moral reasoning.
  • The moral bias score for 'eat meat' is negative, while 'eat healthy' is positive, showing sensitivity to ethical nuance in food-related actions.
  • Traveling to North Korea is deemed inappropriate, while traveling to the United States is acceptable—this distinction is attributed to historical biases in training data, such as Wikipedia.
  • The moral subspace projection enables one-dimensional moral bias scoring, offering a scalable and interpretable method for ethical alignment in NLP systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.