Medical Dialogue Generation via Dual Flow Modeling (2023)

Abstract: Medical dialogue systems (MDS) aim to provide patients with medical services, such as diagnosis and prescription. Since most patients cannot precisely describe their symptoms, dialogue understanding is challenging for MDS. Previous studies mainly addressed this by extracting the mentioned medical entities as critical dialogue history information. In this work, we argue that it is also essential to capture the transitions of the medical entities and the doctor’s dialogue acts in each turn, as they help the understanding of how the dialogue flows and enhance the prediction of the entities and dialogue acts to be adopted in the following turn. Correspondingly, we propose a Dual Flow enhanced Medical (DFMed) dialogue generation framework. It extracts the medical entities and dialogue acts used in the dialogue history and models their transitions with an entity-centric graph flow and a sequential act flow, respectively. We employ two sequential models to encode them and devise an interweaving component to enhance their interactions. Experiments on two datasets demonstrate that our method exceeds baselines in both automatic and manual evaluations.

## introduction medical dialogue systems (mds) have drawn considerable research attention with the increasing demand for telemedicine, especially after the outbreak of the covid-19 pandemic @xcite @xcite @xcite , as they can provide much more people with in-time and affordable access to medical services such as health consultation, diagnosis, and prescription. for mds, an efficient understanding of the dialogue history is challenging, as patients usually cannot describe their symptoms precisely and tend to convey lots of redundant information unnecessary for diagnosis @xcite . to extract the critical information in the lengthy dialogue, previous research focused on identifying the important medical entities mentioned in the context, such as diseases, medicine, and symptoms @xcite @xcite . in our work, we argue that capturing the transitions of the medical entities and the doctor's dialogue acts in each turn (as depicted in figure 1 ) is also essential for the construction of mds, which was largely overlooked by previous studies. in medical dialogues, the flows of medical entities and dialogue acts both follow particular transition patterns. for the medical entity flow, entities to appear in the following utterance are usually closely related to the ones mentioned recently. as in figure 1 , the entities mentioned in adjacent dialogue rounds are logically related, being neighboring nodes in the medical knowledge. for the dialogue act flow, though variations are allowed to some extent, it usually needs to follow the medical consultation framework suggested in @xcite . modeling these two types of transitions would be helpful in dialogue understanding as they effectively capture how the dialogue history flows. moreover, learning their transition patterns would also enhance the prediction of the dialogue acts and the medical entities to be adopted in the future turn. based on the above intuition, we propose a dual flow enhanced medical (dfmed) dialogue generation framework. at each dialogue turn, it extracts the medical entities and the dialogue acts used in the dialogue history, and models their transitions with an entity-centric graph flow and a sequential act flow, respectively. two sequential models are constructed to encode their transitions, with an interweaving component to enhance their interactions. the output representations are then used to predict the entities and the acts to be adopted in the following turn, which are employed to guide the response generation through gate control. our main contributions are summarized as follows: ## related work medical dialogue systems aim to provide medical services for patients. early studies focus on automatic diagnosis in the form of a task-oriented dialogue system, and the purpose is to collect hidden symptoms in minimal turns and make a diagnosis at the end @xcite @xcite . wei et al. (2018) creates a dataset annotated with symptom phrases and constructs a reinforcement learning based mds. xu et al. (2019) improves the topic transition in mds by introducing a medical knowledge graph. with the release of large-scale medical dialogue datasets (e.g., meddialog (zeng et al., 2020), meddg (liu et al., 2020), and kamed (li et al., 2021)), dialogue response generation attracts increasing attention. liu et al. (2020) frames medical dialogue generation as entity prediction and entity-aware response generation. furthermore, liu et al. (2021) unifies the dialogue context understanding and entity reasoning through a heterogeneous graph. li et al. (2021) considers medical entities in patient and doctor utterances as states and actions and presents semi-supervised variation reasoning with a patient state tracker and a physician action network. the proposed model, vrbot, achieves comparable performance without entity supervision. lin et al. (2021) analyses a low-resource challenge in medical dialogue generation and develops an entity-involved meta-learning framework to enhance diagnostic experience sharing between different diseases. although many studies have tried to improve medical dialogue generation by incorporating predicted medical entities, they simply treat entities in different turns as nodes in one entity graph with no entity transition modeling. besides, few works focus on sequential entity-guided dialogue act prediction and sequential act-involved entity selection. our framework exploits the transition and interaction of entity and act flows to strengthen dialogue understanding and guide response generation. dialogue acts. we summarize several common dialogue acts implied in medical dialogues. one type is medical-related dialogue acts. we design acts that represent a function in a medical documentation standard, the soap note @xcite , and occur throughout the dialogue. for example, state a required medical test and prescribe medications in the "plan" function of the soap note are included in our designed acts. the other type is general open-domain dialogue acts. we choose some acts introduced by @xcite and further refine them, such as merging acts that behave as social obligation management into chitchat. eventually, we obtain 7 dialogue acts for flow modeling, and later experiments demonstrate the effectiveness of guidance for response generation. detailed description of each dialogue act can be found in appendix a.2. ## method the proposed method learns two flows (i.e., a medical entity flow and a dialogue act flow) to model the propagation of medical entities and medicalrelated interactions and guide response generation with the corresponding hints. as shown in figure 2 , the overall framework contains two modules. the dual flow modeling module learns the entity and act transitions and infers probable entities and acts. the response generation module outputs a response under the guidance of the selected entities and predicted acts. ## conclusion in this paper, we propose a dual flow enhanced medical dialogue generation framework, dfmed, that models a medical entity flow and a dialogue act flow to improve the relevant entity selection and dialogue act prediction. besides, we design an interweaver to strengthen interactions of two flows. the selected entities and predicted acts are applied to guide response generation. experiments validate the effectiveness of our dfmed on two datasets.