Logic-driven Indirect Supervision: An Application to Crisis Counseling (2023)

Abstract: Ensuring the effectiveness of text-based crisis counseling requires observing ongoing conversations and providing feedback, both labor-intensive tasks. Automatic analysis of conversations—at the full chat and utterance levels—may help support counselors and provide better care. While some session-level training data (e.g., rating of patient risk) is often available from counselors, labeling utterances requires expensive post hoc annotation. But the latter can not only provide insights about conversation dynamics, but can also serve to support quality assurance efforts for counselors. In this paper, we examine if inexpensive—and potentially noisy—session-level annotation can help improve label utterances. To this end, we propose a logic-based indirect supervision approach that exploits declaratively stated structural dependencies between both levels of annotation to improve utterance modeling. We show that adding these rules gives an improvement of 3.5% f-score over a strong multi-task baseline for utterance-level predictions. We demonstrate via ablation studies how indirect supervision via logic rules also improves the consistency and robustness of the system.

## introduction text-based crisis counseling services like crisis text line foot_0 and the 988 suicide & crisis lifeline foot_1 are increasingly adopted by people seeking confidential mental health support. they help thousands of texters every day. but the volume of users challenges the ability of crisis systems to provide consistently high-quality service. for example, in our experience with the regional suicide hotline, safeut, foot_2 we found that counselors can have extended shifts involving up to eight conversations with potentially suicidal clients simultaneously! figure 1a shows an illustrative anonymized example of such a session. addressing the twin problems of managing counselor workload and ensuring quality requires training new counselors and providing feedback to existing ones. in particular, understanding suicide risk in client utterances may help counselors learn to prioritize high-risk client situations, especially when dealing with multiple chats simultaneously or when fatigued. as @xcite note, scaling such efforts requires technological assistance. previous work (e.g., @xcite @xcite has shown that nlp models can reliably assess risk in crisis chats. yet, building models for risk assessment at the utterance level is challenging because of the dearth of training data. utterance-level risk labeling requires post hoc annotation by experts who follow a coding manual; the process can be slow and expensive. in contrast, session-level risk data is relatively easier to obtain. at the end of a session, in their standard workflow, counselors can tag the risk level (e.g., low-or highrisk) for record keeping requirements. sessionlevel assessments are undeniably useful @xcite ; but the nuances of moment-to-moment situational judgments are also key for clinical training and supervision. in this paper, we ask: can the easy-to-obtain session-level risk data help improve utterance risk classifiers? these two tasks have structural dependencies between them: session-level classification of risk should be dependent on utterance-level classification, such that a session containing any highrisk utterances should be deemed high risk. this connection paves the way to extract auxiliary signal we have two disjoint datasets of annotated crisis sessions: one set is labeled at the session level (with higher or lower risk) by the counselor immediately after the chat ends, the other set is labeled post hoc at the utterance level (with one or more risk status codes shown in from the easily obtained session labels to indirectly supervise utterance models. prior work on indirect supervision with structured prediction @xcite focuses on feature-rich linear models. however, importing these ideas to the deep learning realm can be computationally untenable due to the discrete optimization step within the training loop. we propose a mechanism to instantiate this cross-task indirect supervision problem as a declarative learning objective encoded by logical constraints. for efficient training, these constraints are relaxed into differentiable losses (e.g., @xcite @xcite . figure 1b illustrates the approach. the flexibility of the framework allows us to incorporate further structural constraints inherent in the utterance-level task. we show that the auxiliary supervision via constraints significantly improves utterance risk prediction over both direct supervision and strong multitask baselines. our analysis reveals that the rules also improve model consistency and robustness. in summary, our contributions are: we introduce a framework for indirect supervision that uses relaxed logic. we instantiate it to the problem of using cheap, abundant, but noisy annotation (sessionlevel risk labels) as auxiliary signal to improve the performance on a low-resource task (utterance-level labels). we show that structural dependencies across tasks help outperform a directly supervised and a strong multi-task baselines. ## crisis counseling and coding in text-based crisis intervention, a client starts a chat session (also called an encounter) by typing a message, and the first available counselor replies to it. the session goes on till either the client finishes the conversation, or a certain amount of time elapses with no client response. the volume of messages to text-based crisis services presents quality assurance challenges and demands increased counselor training. nlp-based tools can help both with quality control and for counselor feedback during training @xcite @xcite . in particular, monitoring chat-level and also utterance (or message) suicide risk status can be critical to improve service effectiveness. to build such models, we need risk assessment annotation at two levels: at the session level and the utterance level. the former is easy to obtain, whereas the latter is not. once a session concludes, counselors tag the conversation as being higher or lower suicide risk as part of their routine reporting requirements. consequently, we can organically obtain session-level annotation, but perhaps with some noise due to provider fatigue. in contrast, labeling the suicide risk status of client utterances needs careful post hoc analysis over the session. for this process, a group of expert annotators label each utterance using a standard coding system for risk. in this work, we use the crisis chat coding scheme of @xcite . 4 specifically, the coders assign to each client utterance zero, one, or more suicide risk status codes from the section d of the coding manual. we refer to these labels as "d-codes" in this paper; with these two types of counseling annotationthe cheap and noisy session-level data, and the expensive and slow utterance-level data-we seek to use the naturally occurring session risk assessment signal to improve an utterance risk status model. datasets. we use two datasets from the regional suicide crisis hotline safeut. both contain encounters consisting of text messages between the client and possibly multiple counselors. since they were created in different development stages of safeut, they are disjoint: one with client utterances labeled for risk status and the other with labeled encounters. no encounter is annotated at both levels. the first dataset, denoted as u , contains 425 sessions labeled by seven annotators: six graduate students and a psychology professor. the average session has 23 utterances, with 13 from the client. each annotator independently labeled client utterances with a nine-dimensional label indicating a no-code or a combination of risk status dcodes ( the two types of labels are tied by structural dependencies. from the definitions of the d-codes, and their associated coding manual @xcite , we observe that certain utterance d-codes suggest a higher risk session: an encounter containing a client utterance coded with imminent risk (d 2a ), attempt in progress (d 3 ), method chosen or considered (d 6 ) or availability of means (d 6b ) must be assessed as having higher risk. conversely, a lower risk assessed encounter cannot contain an utterance coded with any high-risk d-code. beyond the cross-task dependencies, the definition of the d-codes also entails that the occurrence of certain labels logically necessitates the occurrence of certain others. for example, a client who has attempted suicide in the past had (at least) one lifetime suicide ideation. hence, an utterance coded with prior attempt(s) (d 9 ) must also be coded with lifetime ideation (d 1 ). 6 we list all the d-code dependencies in the appendix ( the structural dependencies between the tasks open the possibility of using encounter-level annotation as indirect supervision for utterance-level risk status coding. moreover, the dependencies between d-codes can be used to guide models to-wards more consistent and robust utterance risk status prediction despite the paucity of data. we ask: can we exploit the structural dependencies between the two kinds of annotation and within the d-codes to aid utterance-level prediction? ## indirect supervision via logic in this work, we introduce a logic-guided indirect supervision framework that uses cross-task dependencies to transfer signal from the session data to the utterance models. the declarative nature of the structural dependencies between the two tasks allows us to express them as predicate logic rules. the question of indirect supervision with structural constraints has been studied in the structured prediction literature @xcite . however, instantiating these approaches for neural networks is computationally expensive because of the need to perform combinatorial inference in the innermost loop of the already slow training process. instead, we build on the approach presented in @xcite and relax the rules to define sub-differentiable losses that encourage utterance and session models to satisfy them. doing so allows us to train a jointly constrained pair of models from the two data sources. the rest of this section expands on this intuition to present a declarative formulation of the problem. the next section focuses on using the formulation to design a loss function for learning. ## from logic to losses in our declarative formulation, we have three atomic predicates: hascode, nocode and risk. we model the truth value of these predicates as the output probabilities of a transformer-based classifier. we denote the relaxed truth value of the predicate classifiers with square brackets. for instance, given a session e, we denote the predicted probability that the fact risk(e, higher) holds as [risk(e, higher)]. all the constraints we have encountered will be relaxed into differentiable forms, such that the truth values of the atomic predicates define the truth value of the entire loss under the relaxation. consequently, learning the three predicates will require optimizing their parameters to maximize the truth value of the relaxed declarative loss. ## error analysis we manually examined false positive and false negative predictions of the mt+rules model on the development split of u . for this analysis, we used the model corresponding to the random seed that provided the best micro f1 performance on passive [d 2b ] vs current [d 2 ] ideation. confusion between passive and current ideation accounts for 27% of the total errors. we observe that half of these mistakes are edge cases which can be hard to discern even for a human. for example, the d 2b utterance "i am having those thoughts again. being better off dead" is classified with both d 2b and d 2 . lifetime [d 1 ] vs current [d 2 ] ideation. the inability to distinguish lifetime and current suicidal ideation (perhaps related to deficiencies in temporal reasoning) accounts for 15% of the errors. for example, the d 2 utterance "i'm worried. she has sent me a text saying she was going to commit suicide" is classified with both d 2 and d 1 . excessive no-code [no-d]. missing d-codes account for 20% of the errors. we observe that in almost all of this cases, the true label depends on previous context (e.g., "yes...","not really"). commonsense knowledge. we observe that 4% of the errors come from poor commonsense reasoning. for example, our model does not predict d 2 and d 2b for the utterances "a kid on social media posted bloody cuts, the caption said bye bye!...", and "i know i am only alive for my friends and food! lol" respectively. the table in appendix e shows additional examples of these errors. ## related work & discussion mental health nlp-based methods have proven useful to detect risk in mental health counseling. @xcite built a multi-task model to predict suicide risk on social media, and report improvements over single-task models trained on limited data. @xcite developed a multi-task model to predict therapist use of psychological interventions for each talk turn. like our multi-task model, their model simultaneously learned two different labeling schemes by building two separate encoders for respective tasks plus a shared encoder. their multi-task model also outperformed single-task models. our work goes beyond the multi-task approach and incorporates indirect supervision from structural dependencies between the two sources of annotation. indirect supervision. our work is conceptually related to an indirect supervision joint inference paradigm (e.g., @xcite which leverages domain knowledge to enforce structural dependency constraints. other efforts also use indirect supervision paradigms (as presented in @xcite ) for biomedical and mental health domains. @xcite use weak supervision from a regular-expression-based algorithm that successfully leverages noisy labels that improve suicidal ideation on clinical notes classification. @xcite use a suicide ontology-based knowledge graph for distant supervision in suicide risk detection on social comments. logic-driven learning. among a variety of logic-driven learning approaches (e.g., @xcite , our method is probably the closest to probabilistic soft logic of @xcite . this approach softens booleans to the interval [0, 1] using the lukasiewicz t-norm relaxation. this approach has shown promising results in several empirical studies, especially in low-data regimes. for example, @xcite used the product t-norm to relax logic for entailment, while @xcite showed that by introducing logic constraints, their model outperformed benchmark models on the event-event relation data that lacked joint labels. our work shows that the logic-driven learning framework can be used to transfer supervision signal between tasks with very different input (encounter vs. session) and output (binary vs. multilabel classification) characteristics. ## conclusion in this work, we study the problem of predicting utterance-level labels in a suicide crisis chat with the goal of better understanding such sessions and providing better feedback to fatigued counselors. we propose a fully declarative framework that integrates different data sources with a logic-guided loss. we experiment with two text-based crisis counseling datasets from the same source, but with different and disjoint annotations. one level of annotation-the session level-occurs naturally but is noisy, while the other level of annotationthe utterance level-is expensive but precise. our results show that exploiting the structural dependencies among the sources of annotations allows the session labels to help improve the utterance model.