BERT ective: Language Models and Contextual Information for Deception Detection (2021)

Abstract: Spotting a lie is challenging but has an enormous potential impact on security as well as private and public safety. Several NLP methods have been proposed to classify texts as truthful or deceptive. In most cases, however, the target texts’ preceding context is not considered. This is a severe limitation, as any communication takes place in context, not in a vacuum, and context can help to detect deception. We study a corpus of Italian dialogues containing deceptive statements and implement deep neural models that incorporate various linguistic contexts. We establish a new state-of-the-art identifying deception and find that not all context is equally useful to the task. Only the texts closest to the target, if from the same speaker (rather than questions by an interlocutor), boost performance. We also find that the semantic information in language models such as BERT contributes to the performance. However, BERT alone does not capture the implicit knowledge of deception cues: its contribution is conditional on the concurrent use of attention to learn cues from BERT’s representations.

## introduction one of the main research lines tries to increase the collection of deception cues in terms of number and variety. for example, several successful studies show how to exploit multi-modal signals, jointly analyzing verbal, video, and audio data @xcite . for the same reason, several early studies tried to identify deception cues through manual feature annotation, like irony or ambiguity @xcite . while these approaches offer a broad and interpretable description of the phenomenon, their main limitation lies in data collection and preprocessing difficulty. surprisingly, so far, little attention has been paid to expanding the targets' linguistic context, which is the easiest source of additional cues and data. even in dialogues, which by definition are exchanges between different speakers/writers, the main focus is typically on the target text. none consider the preceding statements, be they issued by the same speaker of an interlocutor. we hypothesize that linguistic context can be useful for text classification. based on a data set of dialogues in italian courts, we train models that incorporate knowledge both from the target sentence and different configurations of the previous ones. we use hierarchical transformers and neural models based on bert for text-pair representations and compare with the previous state-of-the-art methods and other non-contextual neural models, including bert for single text representation. we distinguish different kinds of context, depending on the window size and the speaker's identity (same one as of the target sentence or different). we find that context carries useful information for deception detection, but only if it is narrow and produced by the same author of the target text. we also find that bert's semantic knowledge helps the classification, but only when it is combined with neural architectures suitable to discover stylistic patterns beyond the texts' content that are potentially associated with deception. to our knowledge, this is the first study that tests these methods on data collected from real, highstakes conditions for the subjects and not from a laboratory or game environment. contributions the contributions of this paper are as follows: ## dataset we use the decour dataset @xcite , which includes courtroom data transcripts of 35 hearings for criminal proceedings held in italian courts. this provides a unique source of real deception data. the corpus is in italian. it consists of dialogues between an interviewee and some interviewers (such as the judge, the prosecutor, the lawyer). each dialogue contains a sequence of utterances of the different speakers. these utterances are called turns. by definition, adjacent turns come from different speakers. each turn contains one or more utterances. each utterance by the interviewee is labeled as true, false or uncertain. the utterances of the other speakers are not labeled. the authors anonymized the data and released them here. ## experimental conditions fornaciari and poesio (2013) use binary classification (false utterances versus the true and uncertain ones, aggregated together into one class of nonfalse utterances, see section 2, we also identify seven kinds of different contexts that should help the classification task, together with the target utterance. they are as follows: speaker's previous utterance -s-utt. in this condition, we consider the utterance preceding the target only if the speaker is the same interviewee. if another speaker issues the previous utterance, it is not collected, and the target utterance remains without context. speaker's previous utterances -s-utts. similarly to the previous condition, we only collect the interviewee's utterances, but if the target utterance is preceded by more than one utterance (within the same turn), they are all collected. in other words, we collect all the turn's utterances until the target one. speaker's previous utterances + turn -s-utturn. in these conditions, we consider all the possible speaker's utterances and the previous turn, which belongs to another speaker. if there are no previous speaker's utterances, we only collect the previous turn. this would make the instance equal to those created according to the last condition. previous turn -turn. we collect the whole previous turn, regardless of the possible previous speaker's utterances. this is the only condition where, by definition, the context is not produced by the interviewee him/herself. ## metrics and baselines we evaluate the model on four metrics: accuracy, precision, recall and, f-measure. while accuracy is a standard metric, its informative power is limited when the data set is imbalanced, and the class of interest is the minority class, like in this case. in fact, the majority class's performance conceals the real performance on the minority one. even so, it can be a problematic baseline to beat, as the simple heuristic of always predicting the majority class can result in high accuracy. in decour, non-false utterances are the majority class with 68.66% of the instances. therefore, this is the accuracy we would obtain always predicting the majority class. we use this majority-class prediction as a baseline. for the models' overall evaluation, we rely on the f-measure, which reflects the real proficiency of the models balancing the correct predictions in the two classes. besides the majority class prediction, which reaches an f-measure of 40.71, we also compare our models with the previous state-of-the-art. we use the highest performance in f-measure from fornaciari and poesio (2013). in that experiment, they jointly used bag-of-words -bow features and the lexical features provided by the liwc @xcite and applied an svm classifier @xcite . the accuracy of that model is 70.18% and the f-measure 62.98 ( ## methods we perform the classification with several neural models. for all the models that do not rely on the bert contextual embeddings @xcite , we used the pre-trained fast text embeddings @xcite as initialization weights, and we fine-tuned them during the training process. we did not fine-tune the contextual bert embeddings for reasons of computational load. however, the high number of the models' parameters required a low learning rate, which we manually adjusted to 1.e -4, and a small batch size, which was 8. the drop-out probability was 0.1. ## results the results are drawn in the first group of experiments contains the baselines from the literature and simple neural networks. the second and the third group show the transformers-based and the bert-based models, respectively. we report accuracy, precision, recall, and the f-measure. as a benchmark for the significance test, we use the literature baseline from @xcite the asterisks represent the significance levels, computed via bootstrap sampling for @xmath0.05 and @xmath1.01. following @xcite , who recommend avoiding too small sample sizes, we set our sample at 50% of the corpus. ## the language of deception we adopt two methods to depict the deceptive language: 1) we compute the information gain (ig) of word n-grams @xcite , and 2) we apply the sampling and occlusion (soc) algorithm @xcite . information gain measures the entropy of (se-quences of) terms between the different classes. the more imbalanced the presence of such terms for one label class at the other's expense, the higher the ig value. even though the patterns detected by the neural models are not necessarily interpretable in terms of human common sense, we also use soc to highlight the words that the models find to be the most influential for their output. soc gives a post-hoc explanation of the weight of specific words in a sentence for the classification task by considering the prediction difference after replacing each word with a mask token @xcite . since the outcomes depend on the context words, but @xcite are interested in the single words' relevance, they do not use the whole context but sample words from it. in this way, they reduce the context's weight, emphasizing that of the word itself. figure 2 shows two examples of correctly classified sentences, one deceptive and one truthful. the model interprets the red words as indicative of deception, the blue ones of truthfulness. they are coherent with the intuition provided by the ig. however, they cannot be interpreted as representative of our most complex models' inner functioning, as soc relies on a standard bert-based classifier. ## discussion our results show that the transformers-based models, in the hierarchical and non-hierarchical form, obtain good results in the classification task. even the non-hierarchical model is significantly better than the previous state-of-the-art. however, the bert-based models are those that show the best and the worst results. the worst ones come from the bert for single-text and a simple dense output layer. on the other hand, when the fully connected layer is substituted by multi-layer, multi-head transformers, while the bert output is the same, the performance improves substantially (non-contextual models, red histograms in we also ran experiments with text-pair bert + dense layer. we do not report the details since they do not add to the results: performance is low, while text-pair bert with transformers gives the best outcomes (blue histograms). these results suggest that: true tri-gram translation ig*100 false tri-gram translation ig*100 in quel periodo at that time 3.245 non ricordo . i don't remember. 21.858 non ho capito i don't understand 2.884 non lo so i don't know 10.831 è vero che it is true that 2.884 non l' ho i didn't 09.257 mi sembra che it seems to me that 2.884 non mi ricordo i didn't remember 08.674 tant' è vero so much so that 2.523 non posso dire i cannot say 07.789 in carcere , in prison, 2.162 il mio amico my friend. 07.627 c' è la there is the 2.162 io l' ho i did. 06.843 e niente , ultimately, 2.162 lo ricordo . ...remember it. 06.677 ho capito . i understand. 2.162 mi ricordo proprio i just remember 06.674 di sì . (i think) so. 2.162 l' ho allontanato i pushed him away 06.674 our results concerning bert's usefulness with context are different from those obtained by @xcite , who work on diplomacy board-game deception data. their study associated bert to lstm-based contextual models, and they did not find a bert contribution in their model's performance. they tried to fine-tune it, and they hypothesized that the lack of performance improvement was motivated by the "relatively small size" of the training data. this hypothesis could be correct, but our outcome allows us to formulate another hypothesis. their data set concerns an online game, where the range of topics in the dialogues is presumably restricted and specific. this limitation would not allow bert's broad knowledge to give a concrete contribution. in contrast, the data set we use comes from real life. the number of possible topics in court is the widest. under such conditions, it is reasonable that bert's semantic information can play a much more relevant role: this gives a different intuition about the kind of use-cases where bert can be useful. regarding the use of contexts to improve deception detection, it turns out that they can be useful, but they need to be carefully handled. in fact, not any context helps. it is not advisable to generically "collect something" before the target text. to select the previous sentence(s), regardless of the speaker, means to incorporate noise that is more harmful than helpful for the task. our best models are those that only consider the utterances of the speaker him/herself. moreover, even in that case, the context's contribution improves according to its proximity to the target sentence. the overall performance model that only uses the speaker's first previous utterance is slightly better than that of the models considers all of them. this evidence is made even stronger by the observation that, in most cases, there is no previous speaker's utterance, as he/she responds with a single utterance to a statement or question of an interlocutor. to be precise, only 921 utterances of 3015 are preceded by another utterance by the same subject. so in more than two-thirds of the cases, the target utterance has no context from the same speaker and has to be considered standing alone, similarly to non-contextualized models. in other words, meaningful context is often absent but can contribute remarkably to reach better performance, which suggests that context is crucial for the task. in other words, the fact that the additional information, even if present in less than one-third of the cases, is enough to outperform the other models and to reach the best results suggests that this is the way to obtain the best help from the context when present. the loss of performance when the contexts include the previous turn is also coherent with the results with the contexts based on a given number of previous utterances: incorporating the statements/questions of the other persons does not help detect deception. if any, the right cues for detecting deception are in the target sentence itself or just nearby. also, the contextual information's usefulness is conditioned by using the right models. bert and the trainable transformers need to be used together. the attention mechanism that follows bert is the trainable part of the network and detects the stylometric patterns of deception. however, we speculate that the bert's contextual word representations act as a regularizer, which reduces the probability that the information from outside the target sentence, carried by non-contextual embeddings, is overestimated. ## related work the first computational linguistics study on deception detection was @xcite . they asked subjects to write truthful and deceptive essays and evaluated them using the linguistic enquiry and word count (liwc), a lexicon that assigns texts several linguistic and psychological scores. liwc is a popular tool in deception detection, also used in @xcite , which we compare to. there are two main research lines: one relies on artificially produced data, often using crowdsourcing services, and the other focuses on data sets from real-life situations. the common bottleneck for data set creation is the availability of ground truth, i.e., knowing the truth behind a subject's statements. for this reason, many studies rely on data collected in laboratory conditions @xcite . while these studies allow us to gain intuitions about the deceptive language features, there are no real or relevant consequences for the liars. their validity concerning high-stakes conditions is therefore unclear. artificially created texts are likely not interchangeable with those from natural conditions @xcite . the notion of deception itself is used in a broad sense and includes studies that focus on a different kind of deception. a popular area, for example, concerns the detection of fake news @xcite the field is expanding to include models that does not detect deceit strictly speaking, but trolls in social media @xcite . @xcite is more similar to our study. they collected videos from public court trials and built a multi-modal model that relies on verbal (unigrams and bigrams) and non-verbal features (decision trees (dt) and random forest (rf)). @xcite used the same data set, but with neural models to represent video, audio, and textual features. in particular, they extracted verbal features relying on pre-trained word embeddings and convolutional neural networks. they reached an accuracy of 96.14%. these studies are particularly interesting for the type of data set and the multi-modal approach. however, neither take the linguistic context of the statements into consideration. @xcite used the data set of @xcite , where 170 pairs of subjects play a "lying game". this study addresses deception in di-alogues. i.e., the texts are structured as a sequence of turns, each containing one or more statements of a single participant. for the analysis, the authors selected several easily interpretable linguistic features, allowing the authors to draw a description of the deceptive language and feed a random forest classifier. this considers both single and multiple turns, finding that the last ones allowed to reach the best performance in their data set (f1-score of 72.33%). however, this is a laboratory experiment that is not a high-stakes scenario for the participants: this limits the possibilities of comparison with our study. from a methodological point of view, our study is similar to that by @xcite . they collect data from an online negotiation game, where the participants' success depends on their ability to lie. they use state-of-the-art neural models, which also consider contextual information. however, subjects are not in a high-stakes condition in their study, so their findings are not directly comparable to our use case. ## conclusion in this paper, we explore the performance of language models in detecting lies using a unique data set that contains sentences that come from real hearings created by @xcite and anonymized for a research setting. we show that context is key to creating models that can detect deception and that bert with some added attention layers can effectively beat different baselines. however, there is no evidence that the deception cues derive from dialogic interaction, as the most useful contributions come from the speaker him/herself. to examine in depth this aspect is a line for future research.