Micromodels for Efficient, Explainable, and Reusable Systems: A Case Study on Mental Health (2021)

Abstract: Many statistical models have high accuracy on test benchmarks, but are not explainable, struggle in low-resource scenarios, cannot be reused for multiple tasks, and cannot easily integrate domain expertise. These factors limit their use, particularly in settings such as mental health, where it is difficult to annotate datasets and model outputs have significant impact. We introduce a micromodel architecture to address these challenges. Our approach allows researchers to build interpretable representations that embed domain knowledge and provide explanations throughout the model’s decision process. We demonstrate the idea on multiple mental health tasks: depression classification, PTSD classification, and suicidal risk assessment. Our systems consistently produce strong results, even in low-resource scenarios, and are more interpretable than alternative methods.

## introduction systems in domains such as healthcare @xcite and finance @xcite often need to make difficult decisions that can lead to severe consequences. building useful systems in these settings is difficult for two key reasons: data availability and the need for explanations. raw data is often limited and annotating it requires specialized knowledge @xcite . when a dataset is available for a task, research on models will often overfit, developing optimizations that cannot be reused for other datasets or tasks @xcite @xcite . attempts to reduce data needs by integrating domain knowledge often result in inefficient and expensive models @xcite @xcite . integrating knowledge graphs is another alternative @xcite , but poses challenges in domains in which domain knowledge is abstract or empirical @xcite . without explanations of how these models reach their decisions, stakeholders cannot fully trust them. in fact, despite recent advances in neural networks, it has been found that medical experts prefer simpler logistic regression models because they are more interpretable @xcite . in this paper, we tackle these challenges -explainability and reusability of models, robustness under low-resource scenarios, and integration of domain knowledge by proposing a new paradigm called a micromodel architecture. in this approach, a system orchestrates a collection of specialized models to build easily interpretable feature vectors that integrate domain knowledge. each micromodel is a binary classifier that represents a specific linguistic behavior. simple aggregators combine the output of micromodels to form a feature vector. finally, a task-specific model makes a prediction based on the feature vector. our design provides explanations along every step of its decision making process, including global and local feature importance scores, and evidence of how the input text contributes to the model's decisions. training this type of system involves two phases. first, in order to build each micromodel, we introduce a data collection pipeline that uses pretrained language models such as bert @xcite . this training occurs once and then the micromodels can be reused across multiple tasks within a single domain. second, the task-specific model is trained on the dataset of interest. during this phase the micromodels are not modified. we demonstrate the benefits of micromodels in the important domain of mental health. recent studies have shown a rapid increase in the prevalence of depression symptoms in various demographics @xcite , along with elevated levels of suicidal ideation @xcite . because our micromodels represent domain-level linguistic patterns, they can be reused for multiple tasks within the same domain, while requiring only half or sometimes just a quarter of the taskspecific annotation data, and also having the benefit of explainability across the entire pipeline. the primary contributions of this paper are: (1) an efficient and reusable design using micromodels as modules to tackle various tasks within a domain by integrating domain knowledge; (2) a data collection pipeline to build datasets for micromodels; ## background and related work we find inspiration in previous work that addressed explainability, reusability, efficiency under lowresource scenarios, and integration of domain expertise. we focus primarily on research that was carried out in the domain of mental health. explainability. neural networks are black-box models that lack transparency and explainability. structural analyses of neural networks @xcite , such as probing, has become a popular approach to investigate linguistic properties learned by language models @xcite @xcite @xcite . however, these analyses do not explain how the models use their latent information for their tasks and how they reach their decisions. these drawbacks are especially problematic in the mental health domain @xcite . linear models implemented with feature engineering can be analyzed via global feature importance scores, but they do not necessarily provide explanations at a query-level. model-agnostic explanation frameworks such as shap or lime values @xcite can provide query-level, or local, feature importance scores, but they are approximate explanations of the underlying model. our approach provides (1) global and local feature importance scores, and (2) evidence from input text data that led to its output. ## micromodel architecture our micromodel approach is inspired by recent work in microservice architectures-an organizational design in which applications are built from a collection of loosely coupled services @xcite . each of these services text utterance micromodel micromodel micromodel micromodel 0 1 0 1 1 0 0 0 0 1 1 1 aggregator (ratio) aggregator (other) (iii) binary vectors (v) feature vector (vi) classifiers (i) task-specific training data label (ii) micromodels (iv) aggregators task-specific classifier 0 0.33 0.66 ... ... 1 ... ... here the vectors have three elements because our example contains three utterances. aggregators (iv) summarize the binary vectors in a feature vector (v). a task specific classifier takes the feature vector as input and makes a prediction, which is compared to the true label to make an update. note that the classifier only sees the feature vector (v) and its corresponding label for training. in a similar manner, we build a collection of micromodels, with each one responsible for identifying a specific linguistic behavior. foot_0 ## evaluation we evaluate our micromodel architecture in terms of accuracy, reusability, and efficiency under lowresource scenarios. we also address the explainability properties of our model in section 5. ## step-wise explanations our micromodel architecture provides various levels of explanations during each step. we first 9 we exclude systems without paper submissions r/suicidewatch data? only yes no model (task a) (task b) (task c) to understand the reusability of each system across the three tasks, they are sorted by the average of their rankings on each task. ebms are additive models in which a nonlinear function f i is learned for each input feature i. one can calculate global feature importance scores by applying each feature function f i on every point t in the training data. we then take the average of the absolute value of f i (t) for each feature i: inspecting the plots of each f i also provides a granular explanation of our classifier. figure 5 contains examples of two of the feature functions from the depression detection task. the x-axis indicates the ratio of hits for each micromodel -in the context of this task, this represents the ratio of tweets per user that contain a specific linguistic behavior. while f diagnoses produces a strong signal when a user contains any tweets that exhibit a diagnosis statement, f labeling produces a strong signal when more than roughly 0.75% of a user's tweets contain an example of the labeling cognitive distortion. other than the ebm classifier, our approach also provides explanations throughout each step. the first step consists of the micromodels, whose explainability depends on their underlying algorithms. the choice of these models likely involves a tradeoff between accuracy and explainability. the binary vectors produced by the micromodels indicate the utterance in which a specific linguistic behavior can be found. this provides provenance for our feature vector -we can use them to look up the sentences in the original input text before they were featurized. figure 5 demonstrates this process 10 . such text data provides evidence for the model's decisions. this text data can be combined with the feature importance scores to understand how they affected the model's decisions, or to uncover patterns in the users' behaviors. as for aggregators, in this work we use simple and intuitive operations, making the resulting feature vector easy to interpret. note that without an 10 we use fabricated examples to protect the identity of twitter users in the dataset. interpretable feature vector, the feature functions f i also become difficult to understand as well. ## conclusion in this paper, we introduced a new framework that uses a collection of micromodels to tackle various tasks within the mental health domain. rather than directly applying contextualized language models to a task, we use them to rapidly collect diverse samples to build micromodels, which leads to a distributed-learning paradigm. incorporating contextual language models in our data collection allows us to capture nuanced behaviors such as cognitive distortions. furthermore, our pipeline allows us to leverage any amount of external data, rather than extracting features within the task domain. the resulting micromodels allow us to build contextual features, each of which can represent linguistic behaviors or domain knowledge. such a feature vector is intuitive to interpret while being effective for classifiers to learn from, even in low-resource scenarios in which not a lot of taskspecific annotation data is available. our approach provides explanations throughout the entire decision making process, including both global and local feature importance scores, as well as the exact locations of the text that contributed to the model's decisions. because our micromodels are built in a task-agnostic manner, they can be reused for multiple tasks within the same domain. the code for our micromodel architecture is publicly available at https://github.com/ michigannlp/micromodels.git .