[Paper Review] Language Models have a Moral Dimension.
This paper reveals that large language models (LMs) implicitly learn a 'moral dimension'—a geometric direction in their embedding space that encodes societal moral and ethical norms. By identifying this direction, the model can assess the normativity of phrases without explicit fine-tuning, enabling it to act as a 'moral compass' to guide text generation toward socially acceptable outputs.
Artificial writing is permeating our lives due to recent advances in large-scale, transformer-based language models (LMs) such as BERT, its variants, GPT-2/3, and others. Using them as pretrained models and fine-tuning them for specific tasks, researchers have extended the state of the art for many NLP tasks and shown that they not only capture linguistic knowledge but also retain general knowledge implicitly present in the data. These and other successes are exciting. Unfortunately, LMs trained on unfiltered text corpora suffer from degenerate and biased behaviour. While this is well established, we show that recent improvements of LMs also store ethical and moral values of the society and actually bring a ``moral dimension'' to surface: the values are capture geometrically by a direction in the embedding space, reflecting well the agreement of phrases to social norms implicitly expressed in the training texts. This provides a path for attenuating or even preventing toxic degeneration in LMs. Since one can now rate the (non-)normativity of arbitrary phrases without explicitly training the LM for this task, the moral dimension can be used as ``moral compass'' guiding (even other) LMs towards producing normative text, as we will show.
Motivation & Objective
- To investigate whether large language models implicitly learn societal moral and ethical values from unfiltered text corpora.
- To determine if these moral values can be represented as a distinct direction in the model's embedding space.
- To develop a method for detecting non-normative or toxic language without fine-tuning the model on such data.
- To enable the use of this moral dimension as a guiding mechanism for improving the ethical behavior of language models.
Proposed method
- The authors analyze the activation patterns of language models on a diverse set of phrases, measuring their alignment with social norms.
- They identify a consistent direction in the embedding space that correlates with the normativity of phrases, derived from statistical analysis of textual embeddings.
- This moral dimension is extracted using linear probing techniques on a dataset of phrases labeled for social norm compliance.
- The method enables zero-shot classification of phrase normativity by computing the cosine similarity between a phrase’s embedding and the moral direction vector.
- The approach is applied to guide text generation by adjusting the model’s output to align with the moral direction, minimizing deviation from societal norms.
- The method is evaluated on its ability to detect toxic or non-normative language without requiring additional fine-tuning.
Experimental results
Research questions
- RQ1Can the moral and ethical values present in large language models be geometrically represented as a single direction in the embedding space?
- RQ2To what extent does this moral direction correlate with human-annotated normativity scores of phrases?
- RQ3Can this direction be used to detect non-normative or toxic language without fine-tuning the model?
- RQ4Can this moral dimension serve as a guiding signal to steer language model generations toward socially acceptable outputs?
Key findings
- The moral dimension is consistently identifiable as a distinct direction in the embedding space of large language models trained on unfiltered text.
- Phrases with higher alignment to the moral direction receive higher normativity scores from human-annotated datasets.
- The method enables zero-shot detection of non-normative language with high accuracy, without requiring task-specific fine-tuning.
- Applying the moral compass during text generation significantly reduces the likelihood of producing toxic or unethical outputs.
- The moral direction is robust across different model architectures and training data distributions.
- The approach provides a scalable, interpretable, and generalizable method for ethical alignment in language models.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.