GPT - D : Inducing Dementia-related Linguistic Anomalies by Deliberate Degradation of Artificial Neural Language Models (2022)

Abstract: Deep learning (DL) techniques involving fine-tuning large numbers of model parameters have delivered impressive performance on the task of discriminating between language produced by cognitively healthy individuals, and those with Alzheimer’s disease (AD). However, questions remain about their ability to generalize beyond the small reference sets that are publicly available for research. As an alternative to fitting model parameters directly, we propose a novel method by which a Transformer DL model (GPT-2) pre-trained on general English text is paired with an artificially degraded version of itself (GPT-D), to compute the ratio between these two models’ perplexities on language from cognitively healthy and impaired individuals. This technique approaches state-of-the-art performance on text data from a widely used “Cookie Theft” picture description task, and unlike established alternatives also generalizes well to spontaneous conversations. Furthermore, GPT-D generates text with characteristics known to be associated with AD, demonstrating the induction of dementia-related linguistic anomalies. Our study is a step toward better understanding of the relationships between the inner workings of generative neural language models, the language that they produce, and the deleterious effects of dementia on human speech and language characteristics.

## introduction alzheimer's disease (ad) dementia affects every aspect of cognition, including language use. over 50 million people are currently diagnosed with ad dementia, and this number is expected to triple by 2050 @xcite @xcite . furthermore, over half of the individuals living with dementia are undiagnosed @xcite . while ad has no known cure, timely diagnosis can prevent or alleviate adverse outcomes ranging from anxiety over unexplained symptoms to family discord and catastrophic events @xcite @xcite . however, diagnosis of ad dementia is time-consuming and challenging for patients and physicians alike, and currently relies on patient and caregiver reports, extensive neuropsychological examinations, and invasive imaging and diagnostic procedures @xcite . automated analysis of spoken language can potentially provide accurate, easy-to-use, safe and cost-effective tools for monitoring ad-related cognitive markers. in particular, studies have demonstrated that supervised machine learning methods can learn to differentiate accurately between patients with dementia and healthy controls @xcite , with particularly strong performance from recent deep learning (dl) models @xcite . however, the large number of parameters employed in dl presents a danger of overfitting to the small datasets concerned, and hinders interpretability of model predictions -both critical concerns for clinical artificial intelligence applications @xcite . as an alternative to fitting model parameters directly, we propose a novel method by which a pretrained transformer @xcite model, gpt-2 @xcite is paired with an artificially degraded version of itself (gpt-d), to compute the ratio of model perplexities on language from cognitively healthy and impaired individuals. we anticipate that semantic information lost with dementia progression may be localized to particular layers of a neural language model, and that one can simulate this information loss by systematically modifying parameters in these layers. specifically, we hypothesize that impairing certain layers of a dl model can result in linguistic deficits that are also observed in dementia. we further hypothesize that unlike prior work fitting model parameters to labeled "cooke theft" transcripts, this approach will detect task-agnostic linguistic anomalies, permitting evaluation of language from casual conversations. we evaluate these hypotheses by targeting individual layers for induction of dementia-related linguistic anomalies, resulting in a degraded model -gpt-d. we then assess the ability of a paired perplexity approach combining gpt-2 with gpt-d to identify transcripts from participants with dementia. in addition, we assess generalization performance, and consider the extent to which the best-performing degraded model reflects linguistic anomalies known to occur in ad dementia: usage of higher frequency words, and repetitiveness. the contributions of this work can be summarized as follows: a) we develop a novel method for automated detection of dementia-related linguistic anomalies, involving deliberate degradation of a pre-trained transformer model; b) this method exhibits state-of-the-art (sota) within-set performance for models trained on text alone, and is distinguished by its ability to generalize from cognitive tasks to conversational data; c) the degradation process induces linguistic anomalies observed in dementia in language generated by gpt-d foot_0 . ## background building on a rich body of evidence that machine learning methods can learn to distinguish between language from healthy controls and dementia patients (for a review, see @xcite ; @xcite ), recent work leveraging pre-trained transformer models has demonstrated improvements in performance over prior approaches. @xcite fine-tuned the bert @xcite model on the training set of the ad recognition through spontaneous speech (adress) challenge @xcite , which was developed, in part, to address the lack of standardized train/test splits and subset definitions in prior work using dementiabank @xcite . @xcite report an accuracy of 83.3% on the test set, an improvement over machine learning models with expert-defined features. performance can also be further boosted by introducing more data from the same picture description task @xcite . these findings suggest a promising direction, as models can be developed without extensive feature engineering. however, additional task-specific data are not always available. dl models with millions of parameters are vulnerable to overfitting with small data sets, which may be difficult to detect as they are hard to interpret. however, some dl models can be distilled into a single interpretable feature: language model (lm) perplexity (ppl). ppl is a measurement of how well a language sample fits a trained lm. intuitively, a model trained on language from cognitively healthy participants should be "surprised" by language from participants with dementia, and the opposite should also be true. accordingly, the difference between the paired perplexities from "cognitively healthy" and "dementia" language models produces sota results on the task of identifying transcripts from participants with dementia @xcite , effectively condensing neural network parameters to a single diagnostically useful feature. contemporary deep lms such as gpt-2 are already trained on large amounts of text, that has presumably been authored predominantly by cognitively healthy individuals. the difficulty with leveraging these models within the paired perplexity paradigm arises from the lack of a correspondingly large set of text from participants with dementia. we negotiate this difficulty by deliberately degrading a transformer model to limit its semantic processing capabilities, obviating the need for large amounts of dementiaspecific training data. we show that the resulting models can effectively identify transcripts from participants with dementia, generalize across language samples and tasks, and generate text with linguistic characteristics of this condition. ## discussion our key findings are as follows. first, we show that the paired perplexity approach using the ratio between the gpt-2 and gpt-d model perplexities approaches sota performance on adress, leveraging gpt-2's extensive pre-training without requiring a comparably large data set from dementia patients. second, this approach generalizes from "cookie theft" picture description data to casual conversation, in contrast to bert/distilbert fine-tuning. finally, artificial impairment of gpt-2's self-attention induces linguistic anomalies observed in dementia. the best-performing cumulative pattern for the adress training set resulted in accuracy of 0.85 in the test set, exceeding the best bert results reported on this test set (x @xmath0.833 @xcite ). however, our approach contrasts with approaches that train or fine-tune language models using a specific dataset, and test on held-out components of the same set. while our approach does require some labeled data through which to determine the best-performing layers to impair, our results demonstrate generalization to other datasets and populations as well as a different type of dis-course -spontaneous conversations. gpt-d is reliably less perplexed by dementia-related linguistic anomalies across all of these sets than gpt-2. this facilitates broader application of the paired perplexity approach than was previously possible, and suggests our approach is more sensitive to taskagnostic dementia-related linguistic anomalies than bert/distilbert fine-tuning. in contrast to impairing embeddings or individual attention layers, the maximum discriminating effect was achieved by impairing multiple attention layers (either combinatorially or cumulatively), which is consistent with prior observations that transformer layers encode different syntactic and semantic linguistic features in multiple lower and middle layers @xcite @xcite . thus, impairing a single layer may not be enough to achieve the full effect. since both syntactic and semantic context is encoded in the transformer decoder layers we expected to find different patterns of artificial impairment to be most effective in vastly different types of discourse represented by the db and ccc datasets; however, we were surprised to find that only impairing the self-attention layers had the desired effect on the results in contrast to impairing embeddings or feed-forward network components. the results presented in in other previous work on the db and the adress datasets, the authors attempted to predict individual mmse scores in addition to discriminating between cases and controls @xcite . we could not perform a comparable analysis in the current study on account of focusing on using the paired perplexity measure as a single threshold to distinguish between cases and controls, while predicting mmse is not the main focus of our study, we did find negative correlations between the paired perplexity measures and the mmse scores, providing additional evidence that artificially impairing the attention mechanism of the gpt-2 model simulates cognitive effects of dementia detectable in language. our findings are also consistent with previous work indicating that transformer models are able to predict neural responses during language comprehension and generalize well across various datasets and brain imaging modalities @xcite . thus, our work is another step in the direction of achieving better understanding of the relationship between the inner workings of generative artificial neural language models and the cognitive processes underlying human language production. impairing how contextual information is stored in the self-attention mechanism in silico creates similar deficits to what is observed in dementia. the next important step is perhaps to investigate how contextual information encoding is impaired in vivo in ad dementia. the encouraging results on the ccc dataset point to the possibility of developing a tool for analysing patients' daily spontaneous conversations in a task-agnostic fashion. generalizable across tasks and domains and easy-to-interpret language-based instruments for detecting anomalies potentially consistent with dementia can be most useful in clinical situations where the patient or family member raise a concern about unexplained changes in cognition. a simple to administer (or self-administer) language-based instrument for objective confirmatory testing (either at a single point in time or over a period of time) would be helpful to a clinician working in an overburdened and time-constrained clinical environment (e.g., primary care) to be able to validate or refute those cognitive concerns with added confidence. it is critical, however, that the instrument used for confirmatory testing makes as few assumptions as possible regarding the person's linguistic background or communicative style, or the type of discourse used for analysis (i.e., picture description vs. conversation). the work presented here has several limitations. the sizes of the datasets are small compared to those typically encountered in open domain nlp tasks. in this paper, we did not focus on mild cognitive impairment but acknowledge that it is an important and active area of research that has shown promise in detecting early signs of dementia @xcite @xcite . also, all datasets are in american english, which could limit the applicability of our models to dementia-related differences in other forms of english, and would certainly limit their applicability to other languages. in addition, behavioral characteristics including language anomalies can arise as a result of deficits in multiple brain mechanisms and, while they can contribute to a diagnosis of a neurodegenrative condition as a screening tool, they cannot be used in isolation to establish a definitive diagnosis. while gpt-d resembles language behaviors commonly observed in dementia patients, gpt-2 and gpt-d should not be considered as accurate and comprehensive representations of human language and cognition, or as models that capture features specific to various forms of neurodegeneration. lastly, we also notice that the pre-trained lm is heavily gender-biased, a problem that we hope ongoing efforts to improve the fairness of ai (e.g. @xcite ) will address over time. ## conclusion we developed a novel approach to automated detection of linguistic anomalies in ad, involving deliberately degrading a pre-trained transformer, with sota performance on the adress test set, and generalization to language from conversational interviews. this, and the detection of dementiarelated linguistic characteristics in text generated by gpt-d, suggests that our method is sensitive to task-agnostic linguistic anomalies in dementia, broadening the scope of application of methods for automated detection of dementia beyond language from standardized cognitive tasks.