Uncovering Values: Detecting Latent Moral Content from Natural Language with Explainable and Non-Trained Methods (2022)

Abstract: Moral values as commonsense norms shape our everyday individual and community behavior. The possibility to extract moral attitude rapidly from natural language is an appealing perspective that would enable a deeper understanding of social interaction dynamics and the individual cognitive and behavioral dimension. In this work we focus on detecting moral content from natural language and we test our methods on a corpus of tweets previously labeled as containing moral values or violations, according to Moral Foundation Theory. We develop and compare two different approaches: (i) a frame-based symbolic value detector based on knowledge graphs and (ii) a zero-shot machine learning model fine-tuned on a task of Natural Language Inference (NLI) and a task of emotion detection. The final outcome from our work consists in two approaches meant to perform without the need for prior training process on a moral value detection task.

## introduction morality as a set of social and acceptable behavioral norms @xcite is part of the commonsense knowledge that determines dynamics of action among social agents in areas like societal interaction @xcite , individual conception of rightness and wrongness @xcite , moral taste and emotions @xcite , political commitment @xcite , public figure credibility @xcite and narratives for explainable causal dependence of events or processes @xcite . understanding this pervasive moral layer in both in person and onlife @xcite interaction occurrences constitutes a pillar for a good integration * the authors are listed in alphabetical order. of ai systems in human societal communication and cultural environment. however, the difficulties in identifying data with a latent moral content, as well as cultural dependence, political orientation and the inherent subjectivity of the annotation work, make this an especially tough undertaking. in our work we aim at addressing these critical issues in the most versatile and transparent way and, to the best of our knowledge, the two approaches we propose are unprecedented in moral values detection. the first approach employs a zero-shot learning technique. this concerns a problem setup in which a model performs classification on labels it has never seen before. by correctly interpreting the meaning of the labels and text, the classifier decides the truth value of any incoming label. this opens to the fulfillment of tasks with controversial or scarce data. we enhance the model by adding to the original text some meaningful information concerning the emotional component. the second approach is based on an unsupervised and domain-independent system which leverages semantic web technologies and existing linguistic resources. the implementation of this method meets the suggested explainability criteria by providing a semantic knowledge graph capable of clearly describing both lexical and conceptual triggers behind the prediction. finally we test both methods on a relevant twitter dataset previously labeled with @xcite . our key contributions are as follows: the paper is organized as follows. section 2 summarizes the results achieved in this field at the current state-of-the-art. in section 3 we describe some baseline models, tools and resources used in our methods. section 4.1 briefly describes the moral foundation theory theoretical background, while section 4.2 and 4.3 focus on the zero-shot and the frame based methods, respectively. in section 6 results of the evaluation on a manually annotated twitter dataset are provided and discussed, while in section 7 we delineate some possible future improvements. ## related works previous work on identifying moral values of mft in texts was based on word count @xcite or used features based on embodiments of words and sequences @xcite . more generally, we have observed that the most common methodological approaches in this field are divided into unsupervised and supervised methods. unsupervised methods rely on systems not supported by external framing annotations. this approach includes architectures based on the frame axis technique @xcite , such as those of mokhberian and colleagues @xcite and priniski and colleagues @xcite . this type of approach projects words onto microframe dimensions characterized by two opposing sets of words. a framing score moral foundations captures the ideological and moral inclination of the texts examined. part of the studies take as a point of reference the extended version of the moral foundation dictionary (mfd) @xcite , which consists of words concerning the virtues and vices of the five dyads of mft and a sixth dimension relating to the terms of general morality. the contribution of kobbe and colleagues @xcite , which aims to link mfd entries to wordnet in order to extend and disambiguate the lexicon, is also placed in a dictionary-based approach framework. another unsupervised approach is explained by the work of hulpus and colleagues @xcite , who provide a way to explore how moral values are captured by knowledge graphs. the study investigates and evaluates the relevance of the entities contained in wordnet 3.1, conceptnet and dbpedia with respect to the mft. supervised methods aim to create and optimize frameworks based on external knowledge databases. the main datasets in this field are: (i) the textual corpus @xcite , which contains 93,000 tweets from us politicians in the years 2016 and 2017, and (ii) the moral foundation twitter corpus (mftc) @xcite , which consists of 35,000 tweets from 7 distinct domains. in this context, the work of roy and colleagues @xcite extends the dataset created by @xcite and applies a methodology for identifying moral values based on drail, a declarative framework for deep structured prediction proposed by @xcite . the approach adopted is mainly based on the text and information available with the unlabeled corpus such as topics, political affiliations of the authors and time of the tweets. our research focuses on the use of unsupervised methods. in particular, our frame-based approach is close to the work of hulpus and colleagues @xcite for the use of knowledge graphs to explore latent moral (and semantic) content. however, our work enables a greater degree of knowledge integration due to disambiguation of lexical units, frame evocation, factual knowledge integration and foundational alignments, part of the text exploration process through the creation of a knowledge graph. finally, our work provides an alternative to frame axis's technique @xcite . nevertheless, unlike this methodology, which implements a method based on a predefined set of terms suited for the task, we use a technology that has no a priori affinity with the suggested work. this allows us to overcome the drawbacks of utilizing a well-defined dictionary as the foundation for the entire approach and investigate the more advanced possibilities offered by an unsupervised method. ## reference models we employ a zero-shot model based on the method developed by @xcite , which involves the use of pre-trained nli models as ready-made zero-shot sequence classifiers. the approach works by using the input text as an nli premise to classify the sequence and by developing a hypothesis starting from every possible label. in particular, the authors discuss three different aspects of classification: topic, emotion and situation detection. for each task, the model is subjected to two distinct principles: (i) label-partially-unseen, where labels concerned are partially exposed to the model during a further training step, and (ii) label-fully-unseen, in which the model is completely unaware of the categories. given the lack of a specific training phase, the second approach is particularly useful in the absence of large amounts of good quality data that can be used during model implementation. our frame-based value detector model is based on knowledge graph generation from natural language using the fred tool @xcite enriched with knowledge from framester @xcite as a strongly connected rdf/owl @xcite knowledge graph that can be queried via its online sparql endpoint foot_0 . fred @xcite is a system for hybrid knowledge extraction from natural language, based on both statistical and rule-based components, which generates rdf/owl knowledge graphs, embedding entity linking, word-sense disambiguation, and frame/semantic role detection. framester is a linked data hub that provides a formal semantics for frames @xcite , based on fillmore's frame semantics @xcite . it creates/reengineers linked data versions of linguistic resources, such as wordnet @xcite , ontowordnet @xcite , verbnet @xcite , babelnet @xcite , etc, jointly with factual knowledge bases (e.g. dbpedia @xcite , yago @xcite ). framester also includes imageschemanet @xcite , a cognitive layer connecting image schematic sensorimotor patterns to the above-mentioned linguistic resources. recently, a novel layer, valuenet foot_1 , has been added on top of framester. it includes moral and cultural values, and formalizes @xcite ) and curry's theories @xcite , aligning values to framester frames, along with a foundational ontology backbone, i.e. dolce-zero @xcite . ## experiments and results to examine the effectiveness of our approaches in the moral value detection task, we focus on the challenge of recognizing them in the moral foundation twitter corpus (mftc) @xcite . the dataset, consisting of 35k tweets, is organized into seven distinct thematic topics covering a wide range of moral concerns. each tweet is labeled from three to eight different annotators trained to detect and categorize texts following the guidelines outlined by moral foundation theory. the mftc includes ten different moral value categories, as well as a label for textual material that does not evoke a morally meaningful response. to account for their semantic independence, each tweet in the corpus was annotated with both values and violations. to set performance baselines, we treat the annotations of the tweets by calculating the majority vote for each moral value, where the majority is considered 50% (i.e. tweet "i have no respect for the home run king" is labeled by four different annotators. two of them regard the text as "non-moral" while the others as "subversion". hence, we consider the tweet labeled as "non-moral, subversion" because each of these labels corresponds to 50% of the annotation). the presented tests are carried out by evaluating different combinations suggested by the models mentioned in sect. 4). in particular, the emotion-zero-shot model displays the results obtained by exposing the zero-shot model to an input text that has had its emotional component explained. the emotion-zero-shot+ architecture refers to the combination of the two methods mentioned above and corresponds to the third approach discussed in sect. 4.2. the frame-based system recalls the results obtained from the application of the tool described in sect. 4.3. given the lack of a reasonable state-of-the-art baseline of non-trained systems, we report a random lower-bound, obtained by predicting each label with a probability corresponding to the fraction of entries in the ground truth represented by the test set with that label. finally, in furthermore, since the original dataset is annotated considering a 50% percentage of agreement among annotators, some of the sentences shows a combination composed by "non-moral" + some other value or violation. while for the zero-shot models the "non-moral" label is used as a feature itself, the combination of non-morality and any kind of morality was in conflict with the conceptual structure of the frame-based detector. we therefore modified the original dataset eliminating the "nonmoral" label while co-occurring with some value or violation, and repeated the experiment. the results of all the applied methods can be explored in their extended files 7 . although performances differ, the two methods perform similarly in terms of f1, with an overall score of 45%. specifically, emotion-zero-shot+ and frame-based outperform the other models for four out of eleven labels, with f1 scores ranging from 0.12 to 0.53 for the first and from 0.11 to 0.50 for the second. these two architectures result in an improvement of 10 % compared to the emotionzero-shot model and 20 % compared to the zeroshot model, and they performs vastly better than random. ## discussion as expected, the results for the single labels vary according to the difficulties encountered by classifiers in the interpretation of their meaning. for example, moral values such as "harm" or "care" convey more generic content and are therefore easier to identify. conversely, concepts like "degradation" or "subversion" contain shades of meaning that are more difficult to grasp. the results drawn from the zero-shot models make this problem evident and difficult to solve as the intrinsic nature of machine learning models does not encompass a direct understanding of their decision-making phases. one possible solution would be to subject the models to few-shot learning, which is a fine-tuning with a little amount of data relevant for the moral values detection task. however, this would not be part of our main need, which is to develop flexible approaches that do not require training. despite the task's complexity, the results imply that not only can moral values be detected in natural language texts, but also that models developed for nli may be adapted to other tasks through the unintentional acquisition of abstract conceptions and concepts connected to the field of social value. results obtained from the frame-based value detector are provided as additional material foot_7 . value triggers are listed in the "trigger" column, while value detection is shown in the "prediction" column. the full knowledge graph can be retrieved by passing the tweet content in column "tweet_text" as input to the fred online demo foot_8 , ticking the "align to framester" option. a necessary caveat is that, being the value labeling a subjective task, a certain amount of disagreement should always be taken into account. in this regard, the detection shows better results on those values whose extension seems more generic, e.g. a more broad concept like "harm", than a more opaque one like "purity", as described in sect. 4.1. additionally, the performance results could depend on two factors. the first factor is the success of the fred tool in producing a knowledge graph from a fragmented syntax like the one used in tweets. in fact, even when a well formed graph is produced, if the value trigger is not in the main sentence e.g. it is an adjective of a pronoun in a subordinate sentence, it is possible that its disambiguation / frame evocation is not shown in the graph, due to internal fred saliency heuristics. the second factor is that human value labeling is a task carried out with a certain subjective threshold. if we consider the example: "horrible amount of anti-islam bigotry are paris attacks. isis murder more muslims than anyone else.", value labels for this sentence are "cheating" and "harm", while the detector predicts "cheating", "harm" and "purity". this happens because, along with triggers like the fs:offenses and fs:killing framester frames, wn:murder-noun-1 word-net synset and the dbr:bigotry dbpedia entity, the dbpedia entry dbr:muslim is also retrieved, which according to "purity" definition (see sect. 4.1) covers the semantics of a more spiritual aspect of life, and it is therefore a "purity" trigger. ## conclusions and future work in our work we detect latent moral content from natural language in a versatile and transparent way, proposing two approaches (zero-shot and heuristic) that do not require training. the approaches assume haidt's moral foundation theory as a reference for moral values, and have been tested on the moral foundation twitter corpus. results are unprecedented in using domain independent methods. future work will include improving the performance of the zero-shot models through the creation of a technique capable of comprehending the intricacies of the most contentious moral values. furthermore, we plan to build an implementation that gives greater weight to the most significant aspects of the sentence, in order to more simply detect the prevailing moral value. for the frame-based value detector more precise results could be achieved via different refinements such as a set of heuristics based on the syntax, and consequently on the frame structure of the sentence, which would allow new and more complex inferences. the commitment to some value could, for example, be expressed by the negation of the value violation, or via a negative polarity of a verb which takes as argument some value trigger. some other possibility to improve the results could be in a quantitative or qualitative way, namely introducing a scoring system based on the amount of trigger occurrences per value, or weighting differently the type of trigger (wordnet synset, framenet frame, etc.). finally, an interesting possibility is to conjugate the approaches and this could drive to various possibilities, for example the introduction of a layer in the aforementioned value trigger scoring system, able to guide the prediction of the final output, as well as using the knowledge base, in particular the extended lexical coverage from valuenet graphs to improve zero-shot models performance. a possible way could be to analyze the frame responsible for the value triggering by measuring its relevance inside the sentence via machine learning techniques. to conclude, further experiments can be done on different types of datasets as well as extending the employed dataset, and to compare with different methodological approaches, including supervised methods.