---
title: "Conversational Bots for Psychotherapy: A Study of Generative"
description: "A study of GPT-2 and DialoGPT for psychotherapy dialogue, comparing automatic scores with clinicians’ judgments of the replies."
canonical: "https://research.elamur.ai/free/en/papers/das-2022-conversational-bots-psychotherapy-study-generative/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/das-2022-conversational-bots-psychotherapy-study-generative/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / Conversational Bots for Psychotherapy: A Study of Generative Transformer Models Using Domain-specific Dialogues

# Conversational Bots for Psychotherapy: A Study of Generative Transformer Models Using Domain-specific Dialogues

Paper · 2022 · Avisha Das, Salih Selek, Alia R. Warner et al.

**Authors:** Avisha Das, Salih Selek, Alia R. Warner, Xu Zuo, [Yan Hu](https://md.research.elamur.ai/free/en/authors/yan-hu/), Vipina Kuttichi Keloth, Jianfu Li, W. Jim Zheng and [Hua Xu](https://md.research.elamur.ai/free/en/authors/hua-xu/) · **Year:** 2022 · **Venue:** Proceedings of the 21st Workshop on Biomedical Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 21st Workshop on Biomedical Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.bionlp-1.27/)
- [PDF](https://aclanthology.org/2022.bionlp-1.27.pdf)
- [DOI 10.18653/v1/2022.bionlp-1.27](https://doi.org/10.18653/v1/2022.bionlp-1.27)

## Summary

A reply can sound attentive and still miss what matters to the person speaking. Das and colleagues study whether [chatbots](https://md.research.elamur.ai/free/en/concepts/chatbot/) that generate their own replies can learn to respond in ways that resemble psychotherapy. They start with GPT-2, which was trained on web text, and DialoGPT, which already had training on Reddit conversations. They adapt these systems using mental health discussions from Reddit and English-language transcripts of therapy and counseling videos from Alexander Street. The transcripts give the systems examples of how a counseling exchange unfolds, including what a speaker says after someone describes a difficulty.

The authors compare ordinary training on the transcripts with a procedure that gives each system an additional task. Given the recent conversation, the system learns to distinguish the reply that actually followed from a reply drawn from another exchange. It also learns to generate the recorded continuation. The authors test both approaches with two ways of choosing the words of a new reply. They evaluate the resulting text on held-out counseling transcripts and on an independent set of conversations written in response to stressful scenarios.

The strongest configurations on the automatic tests generally came from DialoGPT. On the held-out video test, DialoGPT with the added reply-selection task and top-k sampling reached a sentence-average [BLEU score](https://md.research.elamur.ai/free/en/concepts/bleu/) for word pairs of 16.83%. The corresponding beam-search configuration scored 16.31%, and the paper’s human-response comparison scored 12.19%. Beam search produced the higher word-pair diversity score of the two adapted DialoGPT configurations. The metrics therefore favored different ways of generating a reply, and the human comparison depended on what was measured.

A psychiatrist and a psychologist then assessed short exchanges generated by the strongest configurations. They looked for relevant questions, evidence of listening and reflection, and overall psychotherapy competence. The judges generally favored DialoGPT’s exchanges, but they found generic advice and information sharing where a therapeutic response called for more. One exchange began with relevant questions about substance use and ended with advice the authors judged unhealthy. The clearest result is the gap between producing a plausible continuation and responding with consistent therapeutic skill.

## Deep dive: Conversational Bots for Psychotherapy: A Study of Generative Transformer Models Using Domain-specific Dialogues

A study of GPT-2 and DialoGPT for psychotherapy dialogue, comparing automatic scores with clinicians’ judgments of the replies. · about 35 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Why the next reply matters

The paper begins with an access problem. People experiencing depression, anxiety, or other psychological difficulties can face stigma around seeking professional help. The authors also describe a shortage of clinical staff. They place automated conversation alongside other attempts to make support more accessible. The question they can investigate with their data is narrower than whether a chatbot expands access to care. They ask whether a system can produce replies with recognizable features of a counseling exchange, and how those features can be assessed.

The examples that motivate the study involve a speaker disclosing something difficult over several turns. Each disclosure can change what counts as an appropriate follow-up. A reply may need to acknowledge what the speaker has just said, ask a question that advances understanding, or reflect an account back in a way that invites clarification. A conversational opening and a sympathetic phrase can help establish contact, but the substance of the next reply depends on the details the speaker has volunteered. Choosing which detail to follow is part of the task.

Earlier [dialogue systems](https://md.research.elamur.ai/free/en/topics/dialogue-systems/) provided a starting point for this problem. The authors trace the history back to ELIZA, which Joseph Weizenbaum developed in 1966 to simulate a Rogerian psychotherapist. The paper describes many available agents as using pre-defined rules or branching dialogue paths. Such a design specifies in advance how the conversation may proceed. The concern raised in the paper is that restricted exchanges can become shallow or ineffective when people describe situations that call for a more responsive follow-up.

The related work also gives examples of specialized applications. Some studies looked at conversational agents for psychoeducation and adherence. Other systems used three-dimensional interfaces, including work involving virtual agents. The paper discusses research on detecting neuropsychiatric disorders and on responding to social or emotional cues. These projects address different tasks. A system that presents information, supports adherence, or recognizes signs of a condition is evaluated for the job it was designed to do. Das and colleagues focus on the text that follows a disclosure in a counseling conversation.

#### Why conversation training is only a starting point

The move towards [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/) gives researchers another way to build a reply. A generative system assigns probabilities to possible continuations and can compose an answer conditioned on what has already been said. GPT-2 offered a starting point for generating substantial text from a prompt. DialoGPT adapted that architecture to conversations drawn from Reddit. Its source material contains replies to earlier messages, giving it practice with the structure that a next-turn task requires. [DialoGPT](https://md.research.elamur.ai/free/en/papers/zhang-2019-dialogpt-large-scale-generative-pre/)

The authors see a risk in carrying those general training sources into counseling. Online text can contain aggression or callous responses. Training on conversational material can teach a system how a reply is phrased while exposing it to behavior that would be inappropriate in psychotherapy. Even well-intentioned peer support can take a different form from professional counseling. A user on a forum may share an experience or offer a direct suggestion. A therapist may use the same moment to ask about the speaker’s interpretation of events. The source of a conversation matters because it shapes the kinds of responses available for the system to learn.

The difficulty also involves following the conversation over time. The paper mentions resolving references to earlier people or events, drawing on common knowledge, and using information from several turns back. In counseling, a useful follow-up may depend on how a speaker’s latest account changes what they said earlier. Such connections make the problem more demanding than assembling a fluent answer to the last sentence in isolation. Training on recent dialogue gives the system access to these connections, while the evaluation has to test whether its replies make appropriate use of them.

#### Where examples of counseling can come from

The paper describes in-domain data as scarce and sensitive. Sources used in earlier conversation research include exchanges collected through crowdsourcing, recordings of motivational interviewing, and interactions conducted by text message. Each source makes a particular form of dialogue available. A crowd-written exchange can represent a response to an emotional scenario. A recording preserves the wording of a particular encounter. A text-message corpus captures an interaction conducted through writing. The choice affects the style, length, and roles that a system encounters during training.

Pérez-Rosas and colleagues assembled counseling conversations of differing quality and described how to identify skills such as questioning and reflective listening. The paper also discusses a corpus that Mousavi and colleagues collected from exchanges involving therapists and participants. These precedents matter because they treat counseling dialogue as something that can be studied through the behavior of its speakers. An exchange may show a good follow-up, an attempt at reflection, or a missed opportunity. A task-based assessment can ask a judge to look for these observable features.

Other work studied empathy as it appeared in conversations between people in online mental health communities. Those discussions make naturally occurring exchanges about distress and support available for analysis. They also show that empathy can be studied in the language of a response, even when the exchange takes place outside a formal counseling session. The paper draws on that work when choosing Reddit communities and describing previous uses of their conversations. [A Computational Approach to Understanding Empathy Expressed in Text-Based Mental Health Support](https://md.research.elamur.ai/free/en/papers/sharma-2020-computational-approach-understanding-empathy-expressed/)

Alexander Street offers the study a source of therapy and counseling transcripts with a different conversational setting. The authors use it to put examples of counseling exchanges into the training process and to hold out entire videos for testing. The division between sources is consequential. Reddit supplies large amounts of mental health discussion, while the videos supply the target style of interaction for transcript adaptation. The independent set adds a third source of evidence, written conversations elicited by prompts about stressful experiences.

#### How earlier evaluation tools shape the question

The authors describe earlier efforts to evaluate conversational systems automatically. ChatEval brings together measures such as vocabulary diversity, overlap with a reference, and similarity between text representations. GRADE, discussed separately in the paper, uses a graph-based approach to evaluating coherence in open-domain dialogue. Both belong to a line of work that tries to make properties of an exchange measurable. The experiments in this study use the ChatEval measures. [GRADE](https://md.research.elamur.ai/free/en/papers/huang-2020-grade-automatic-graph-enhanced-coherence/)

A reference reply is particularly useful when the goal is to compare systems under repeatable conditions. The researcher can give each system the same history and check how its continuation relates to what someone actually said. In a counseling exchange, however, several replies could make sense at the same moment. One could ask about a detail, while another could reflect the speaker’s feelings. Their wording might differ substantially even when both fit. The paper addresses this issue through a second kind of evaluation that gives experts several turns and asks them to judge the interaction itself.

The resulting research question concerns two kinds of evidence. Automatic comparisons can show whether choices about training and generation change properties of the reply on held-out data. Human assessment can show whether selected exchanges exhibit relevant questioning, reflection, empathy, and competent handling of a disclosure. A system can improve at one part of that evaluation while still failing at the other. The paper’s design makes the relationship between the two observable.

### The method, step by step

#### Turning online discussions into conversations

The first corpus begins with posts and comments from mental health communities on Reddit. The researchers collected 68,835 posts and 809,646 comments using the Pushshift Reddit API. They grouped the communities by topic into coping and therapy, mood disorders, psychosis and anxiety, and trauma and abuse. These names describe the sets of communities the authors sampled. The training task uses the text of their conversations as examples of replies. [The Pushshift Reddit Dataset](https://md.research.elamur.ai/free/en/papers/baumgartner-2020-pushshift-reddit-dataset/)

The category statistics show where much of the material came from. Coping and therapy accounted for 49,426 collected posts, with 38,750 remaining after filtering, and the paper lists 625,149 comments for that category. Mood disorders accounted for 6,000 collected posts, 3,519 filtered posts, and 37,350 comments. The corresponding figures were 3,048 collected posts, 1,925 filtered posts, and 31,112 comments for psychosis and anxiety. Trauma and abuse contributed 10,361 collected posts, 6,758 filtered posts, and 116,035 comments. These figures describe the distribution of collected material across discussion topics. They give a reader some sense of which kinds of forum exchange would be especially visible during adaptation.

A Reddit thread has branches. Two replies to the same parent comment can open separate lines of discussion. If all the comments are placed in chronological order, consecutive messages may appear to answer one another even when they belong to different branches. The researchers follow the links from an earlier message to its replies to produce chains of messages. In a chain, each reply can be considered alongside the conversation leading to it. This supplies histories and continuations in a form that can be used for next-reply training.

The authors follow DialoGPT’s preprocessing procedure for the forum material. They exclude examples with a URL in either the source or the target, as well as examples without a word from a list of common [English](https://md.research.elamur.ai/free/en/topics/english/) words. They drop empty comments and comments that serve as upvotes. They also exclude material shorter than five words or longer than 200 words. The resulting chains are a filtered view of these communities. A very brief acknowledgment, for instance, can belong to a real conversation even when the filter excludes it from training.

This Reddit stage has a specific role in the comparison. GPT-2 starts from pretraining on general web text, so the authors adapt it on the mental health threads to establish their GPT-2 baseline. DialoGPT has already been trained on a much broader collection of Reddit conversations. The authors take that existing DialoGPT starting point into the video-transcript experiments. The two paths therefore share the later transcript source while starting from different exposure to online conversation.

#### Preparing the counseling transcripts

The authors select material from the Counseling and Therapy channel on Alexander Street. The channel contained 2,253 videos. The researchers gathered 1,284 English-language videos and transcripts from sessions recorded from 1980 to 2018. They focused on material related to training in therapy and counseling and removed short videos they judged uninformative. The retained set consists of 1,130 transcripts containing 180,765 dialogue turns.

A turn supplies the text from one contribution to an exchange. In training, consecutive turns let the system see both a statement and how the exchange continued. The video itself provides the source for the transcript. The training input is the cleaned text, with pauses and some characters removed. After cleaning, the authors report 2,914,307 words across the retained transcripts and a vocabulary size of 30,438. The vocabulary figure describes the corpus as reported by the authors. The system’s encoding of that text happens separately.

The authors split the data by video. Training receives 80% of the transcripts, or 904 videos. Development receives 10%, or 112 videos, and is used to choose settings. Testing receives 10%, or 114 videos. Dividing the source material by video keeps turns from a particular held-out video together. This matters when an original conversation can supply several overlapping histories. Cases derived from a test video belong to the test side of the partition.

The source contributes something different from the forum chains. Counseling dialogues give the system examples of responses within a session, including exchanges in which gathering information and following up are part of the interaction. The aim of training on these transcripts is to make the probability of a continuation sensitive to that style of conversation. When evaluating the experiments, the source of the transcript establishes a domain and the held-out split establishes which material was reserved for testing.

#### Starting from GPT-2 and DialoGPT

GPT-2 and DialoGPT generate text using a decoder built from [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) blocks. Attention allows the system to draw on earlier positions in its input while predicting what comes next. In an exchange, those earlier positions can contain both the latest statement and remarks that give it meaning. The decoder uses this material to predict the next piece of text. Once a piece is selected, it becomes additional context for the next prediction. The general architecture comes from the line of work introduced in [Attention Is All You Need](https://md.research.elamur.ai/free/en/papers/vaswani-2017-attention-all-need/).

The paper uses the medium, 345M-parameter configuration for its comparisons. For GPT-2 medium, it lists 24 layers, an embedding dimension of 1024, and 64 as the batch-size-per-GPU entry in the configuration specification. The embedding dimension is the size of the vectors used to represent input within the system. The batch-size entry in that specification is distinct from the batch size the authors report for the ordinary transcript training run.

GPT-2’s original corpus is described as 8 million pages of scraped web text. In contrast with that source, the existing DialoGPT training corpus is reported as 147M multi-turn dialogues drawn from Reddit discussions from 2005 to 2017. This difference is one reason the two starting points are interesting. GPT-2 has learned to continue text from general web sources, while DialoGPT begins with more direct experience of continuing a conversation. Their common decoder architecture lets the authors apply comparable transcript adaptation and generation procedures.

The systems use [subword tokenization](https://md.research.elamur.ai/free/en/concepts/subword-tokenization/) based on byte-pair encoding. A token is a piece of text represented as an input or output unit. A frequent word can be represented as a unit, while an unfamiliar word can be broken into smaller pieces that the system can represent. This makes the size of the vocabulary used for encoding a different question from how many distinct words appear in the cleaned transcripts. The paper connects its encoding scheme to [Neural Machine Translation of Rare Words with Subword Units](https://md.research.elamur.ai/free/en/papers/sennrich-2016-neural-machine-translation-rare-words/).

For its GPT-2 experiments, the study uses a Python implementation of GPT-2. Its DialoGPT implementation comes from the PyTorch adaptation distributed by Hugging Face. These are implementation starting points for the authors’ adaptation experiments. The research change concerns the data, the training setup, and the comparison of generated replies.

#### Training a system to produce a reply

The first adaptation procedure is ordinary [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/). Starting with weights already learned from earlier text, the authors continue training on the counseling transcripts. For GPT-2, this follows the adaptation on the collected mental health subreddits. For DialoGPT, it follows the existing Reddit conversation training. The common transcript stage gives each starting system experience with the setting in which the authors want to generate replies.

The training signal is the recorded continuation. Given text from a conversation, the generative system is trained to assign probability to what follows. In that sense the transcript provides its own supervision. Where the exchange continued with a question or a reflection, that language is part of the target the system learns to produce. A recording supplies what was said at that point. The procedure does not attach a separate judgment of therapeutic merit to each utterance.

The ordinary transcript settings carry the label FT-V. FT refers to the paper’s ordinary fine-tuning setup, and V indicates the use of video transcripts. The designation describes how the system obtains its weights. Decoding comes later, so either way of producing a reply can be applied to an FT-V system.

#### Adding a task that tests which reply fits the history

The second procedure draws on TransferTransfo, a previous approach for adapting a generative system to dialogue. The earlier setup used information about the speaker’s persona. Das and colleagues omit the persona input and retain a fixed stretch of conversation history. The information available for choosing a reply therefore comes from what has already been said in the exchange.

The authors set the training history length as follows.

```
N = 5
```

N denotes the number of preceding utterances used as history in a training example. The equals sign assigns that count the value 5. The paper sometimes calls these units sentences. Their role in the procedure is to give the system a sequence of preceding contributions before it encounters the continuation.

The recorded reply immediately after that history occupies this position.

```
N + 1
```

N again denotes the history length. The plus sign and the 1 identify the very next position after the history. The reply at that position is the gold response, meaning the continuation recorded in the source conversation. The term identifies the origin of the response and its place in the training example.

The authors also draw a distractor at random from utterances in other conversations. The system sees the same preceding history associated with a recorded continuation and with a continuation from elsewhere. The borrowed reply is still language from a conversation. To succeed at the selection task, the system must learn to prefer the response associated with this history. A randomly borrowed sentence can sometimes fit an exchange by coincidence, and its status in the training example follows from where it was sampled.

The history and response candidates are encoded with the GPT-2 tokenizer and represented as inputs to a system with two output heads. A head is the part of the system that produces predictions for a particular objective from the shared internal representation. The generative head learns to produce the continuation. The predictive head learns to select the recorded reply over the distractor. Both objectives contribute training signals. The paper describes a combined generative and predictive loss, where a loss is the quantity training seeks to reduce. It does not specify a numerical weighting formula for combining the losses.

This procedure makes the context useful in two ways. It supplies the preceding language from which the next text is generated and the evidence from which a candidate reply is judged to belong to the conversation. The training distinction is between recorded and sampled replies. A judgment about whether either is therapeutic remains a separate evaluation task. The authors label these transcript configurations TL-V, using TL for their transfer learning setup with the extra objective.

From source conversations to evaluated counseling replies The steps in order.

#### Setting the adaptation runs

The authors train on a single A100-SXM4 GPU. They report 10 epochs for the adaptation runs, with the number of epochs chosen using held-out development data. An epoch is a pass through the training data. For ordinary fine-tuning the reported batch size is 16. A batch groups examples before a training update. The initial learning rate is 2e −5, a setting that controls the size of updates to the learned weights. The schedule changes the rate over training. The ordinary setup uses a Noam schedule with 2000 warm-up steps, selected using validation loss.

For transfer learning, the paper reports a rate of 6.25e −5, an Adam optimizer, and a PiecewiseLinear schedule. An optimizer uses the training signal to update the weights. A learning-rate schedule governs how the update rate changes during the run. The two procedures share the number of epochs and differ in their reported optimization settings. The authors also convert their conversation data to HDF5 to manage data loading and GPU memory.

The reported times give a sense of the practical cost in this setup. Ordinary GPT-2 fine-tuning took about 27 hours, while the GPT-2 transfer run took approximately 38 hours. The corresponding rates of work for DialoGPT are reported as approximately 34 hours for ordinary fine-tuning and about 49 hours for transfer learning. These are run times for the hardware and procedures the authors used. Each transfer run includes the additional prediction objective as part of a broader training configuration.

#### Choosing how to generate a reply

At test time the system must turn a distribution over possible next tokens into a reply the reader can see. The authors compare top-k sampling and beam search. Each begins with the same kind of prediction about the next token, and each repeatedly extends a partial reply. The methods differ in what they keep from those predictions and how that determines the finished text.

With top-k sampling the decoder restricts the choice to the k highest-scoring tokens at the current position and samples within that set. Here k is 10. The next prediction then uses the sampled token as part of its context. Temperature controls how concentrated the sampling distribution is. The authors use the default temperature of 1.0. Sampling allows two continuations from the same prompt to differ because the next token is drawn from several possibilities. The paper discusses this choice in connection with earlier work on the quality of generated text. [The Curious Case of Neural Text Degeneration](https://md.research.elamur.ai/free/en/papers/holtzman-2019-curious-case-neural-text-degeneration/)

Beam search keeps several candidate sequences as the reply grows. At each step it extends the candidates and retains high-scoring partial sequences for further consideration. The beam width, also set to 10, governs how many partial sequences can stay under consideration at a time. The same value therefore controls different objects in the two procedures. In sampling it limits eligible next tokens at a step. In beam search it limits the partial replies being carried forward.

The widths were chosen empirically during tuning. Both decoding methods are applied to the medium systems. A comparison between decoders for the same training setup asks how the choosing procedure changes the output. A comparison between training setups under the same decoder asks how the learned predictions change within a common generation procedure. The experiment reports both kinds of comparison.

### Experiments and results

#### The held-out transcripts and the independent conversations

The in-domain test set contains 114 Alexander Street videos, with 18,237 utterances and 312,276 words. The authors take a preceding stretch of dialogue and generate a reply for the next position. They describe selecting conversations with at least 5 utterances and using a context sequence for next-utterance generation. The original continuation at the chosen position is the reference. Each automatic comparison concerns a single generated utterance under that setup.

This is a way to ask how replies behave with a recorded interaction as context. The histories are taken from the transcripts, so the previous turns in this test do not depend on the system’s earlier predictions. It follows that the test can compare the next replies directly, while the effect of repeatedly using the system’s own contributions as context is a different question. The expert assessment supplies a separate view of generated exchanges that span several turns.

For the human automatic-score comparison, the authors select 50 conversations from the held-out video set. They describe using the preceding recorded utterance and comparing it with the human response that follows. The row labelled HUMAN should be read in light of that procedure. It gives the measures a point of comparison based on recorded human utterances. For overlap metrics in particular, the value depends on how the two human utterances used in the comparison relate to each other.

The independent Empathic Conversation set was created for a different test. Researchers wrote conversations in response to prompts about stressful situations involving health, work, trauma, or abuse. The group had 5 participants and each wrote 5 conversations, for the reported set of 25. Each conversation had 5 or more utterances. The authors report an average of 7.2 utterances per conversation and 12.3 words per utterance. This is human-authored dialogue elicited for evaluation, with a different source and format from the videos.

The independent set tests whether the relative performance of configurations carries to another style of conversation. A prompt-based exchange may compress what would unfold over more turns in a recording. Its way of expressing a problem and arriving at a reply can therefore differ. A score change between the datasets can reflect several properties of the samples and their references. The paper uses the set to supplement the held-out transcript comparison.

The automatic results include the baseline settings and the settings adapted to the video transcripts, with both generation procedures. The baseline GPT-2 has the study’s mental health Reddit adaptation. The baseline DialoGPT comes from its earlier Reddit dialogue training. FT and TL identify how a system was adapted to transcripts. The labels Vid. and Emp. identify the two data sources in the results. Keeping those distinctions in view matters when a strong result is associated with a particular training procedure, method of decoding, and dataset.

#### What the automatic metrics measure

The authors use ChatEval to report several views of the output. The sentence-average BLEU-2 score measures how much the generated reply overlaps in wording with the recorded continuation, considering words and adjacent word pairs. The score is calculated at the sentence level and averaged for the reported comparison. A high score gives evidence of closer wording under the metric. A reply can address a similar idea in a different way and receive less credit for overlap. A repeated phrase can also match the reference without making the reply appropriate in context.

Lexical diversity uses Distinct-n. An [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/) is a sequence of neighboring tokens. The measure described in the paper can be written as follows.

```
Distinct-n = unique n-gram count / response token length
```

Distinct-n is the lexical-diversity measure at the selected sequence length n. The count in the numerator gives the number of different sequences of that length in the response. The slash means that this count is divided by the denominator, the response length expressed in tokens. The equals sign states the definition. The paper takes n to be 1 for individual tokens and 2 for adjacent pairs. In the results, Dist-1 and Dist-2 are the corresponding diversity scores expressed as percentages.

The normalization makes the diversity result about variety relative to the amount of output. Distinct word pairs can come from a specific, attentive reply or from a reply that moves through unrelated suggestions. Both can add variety. Diversity is thus informative about a property of the text. A qualitative assessment is needed to tell whether the variety comes from material that helps the exchange.

The paper also compares the generated and recorded replies using cosine similarity. Word2Vec, trained on the conversation data, supplies [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/). These are vectors that represent words numerically. Cosine similarity measures how closely the compared vectors point in the same direction. The reported average gives a view of how close the generated text is to the reference in that representation. It can reflect a shared topic even where exact wording differs. It has no separate term for the counseling role played by the sentence.

Average response length rounds out the automatic results. A decoder can produce an acknowledgment where another produces a question followed by an explanation. The length statistic helps describe these tendencies. There is no preferred direction for length across all cases. A short acknowledgment may be well placed in one history, while a longer follow-up may be useful in another. The length numbers are most informative alongside the other measures and the samples themselves.

#### Reference overlap on the video test

The clearest improvements in reference overlap appear in the adapted DialoGPT settings. For DialoGPT with top-k sampling on the held-out videos, the BLEU-2 score is 9.04% at baseline, 12.03% after ordinary transcript fine-tuning, and 16.83% with the transfer setup. For beam search the corresponding video scores are 9.06%, 13.16%, and 16.31%. Each sequence compares training setups under the same decoder. The figures show that both routes to transcript adaptation can improve reference overlap for this starting system.

BLEU-2 for DialoGPT settings on the Alexander Street video test The transfer settings lead their respective decoder groups, with top-k sampling highest on this metric.

**The numbers**

| System or setting | BLEU-2 % |
| --- | --- |
| DialoGPT baseline, top-k | 9.04 |
| DialoGPT ordinary fine-tuning, top-k | 12.03 |
| DialoGPT transfer, top-k (this paper) | 16.83 |
| DialoGPT baseline, beam search | 9.06 |
| DialoGPT ordinary fine-tuning, beam search | 13.16 |
| DialoGPT transfer, beam search | 16.31 |
| HUMAN comparison | 12.19 |

The GPT-2 comparisons show that the effect of adding the selection objective depends on the setting. On the video test with top-k sampling, the GPT-2 baseline has BLEU-2 of 7.14%, ordinary transcript fine-tuning scores 8.02%, and the transfer setting reaches 11.17%. With beam search, the GPT-2 baseline is 6.85%, ordinary transcript fine-tuning reaches 10.73%, and the transfer setting scores 10.18%. For this last comparison the ordinary setting has the higher video overlap score. It is an exception to a reading in which the transfer procedure improves the metric consistently across the study.

DialoGPT’s video transfer results both exceed the automatic human comparison in BLEU-2. The human comparison uses recorded speech as part of a procedure that pairs utterances in an exchange. A speaker can respond to what was just said with few of the same words. A generated reply can share more wording with the recorded continuation on an overlap metric. The ordering is meaningful for how BLEU-2 behaves in the test. The comparison leaves the quality of the counseling to the assessment designed for that purpose.

The authors describe transfer learning and beam search as helping DialoGPT overall. The overlap results show why the word “overall” matters. In the ordinary DialoGPT setting, beam search gives the higher video BLEU-2 score. In the transfer setting, sampling gives the higher score. Each claim refers to a particular part of the experiment. An aggregate reading across several measures can favor a configuration whose lead comes from properties other than the highest result for reference overlap.

#### Diversity, similarity, and length on the video test

The diversity figures show a clear strength for beam search in the adapted DialoGPT runs. For the video test, the transfer setting with beam search reaches 18.3% on Distinct-1 and 25.7% on Distinct-2. The corresponding transfer run with top-k sampling has 15.1% and 16.4%. For the HUMAN comparison, Distinct-1 is 14.9%, while Distinct-2 is 41.2%. The single-token measure can therefore put an adapted system ahead of the human comparison while the word-pair measure puts the human comparison well ahead.

Distinct-2 for transfer settings and the human comparison on the Alexander Street video test Beam search gives DialoGPT the highest generated word-pair diversity, and the human comparison has the highest value shown.

**The numbers**

| System or setting | Distinct-2 % |
| --- | --- |
| GPT-2 transfer, top-k | 16.8 |
| GPT-2 transfer, beam search | 17.6 |
| DialoGPT transfer, top-k | 16.4 |
| DialoGPT transfer, beam search (this paper) | 25.7 |
| HUMAN comparison | 41.2 |

The ordinary adaptation comparisons add a qualification. For DialoGPT with beam search, video Distinct-2 goes from 19.2% at baseline to 23.1% after ordinary fine-tuning and 25.7% in the transfer setup. With top-k sampling it goes from 8.9% to 13.3% and then to 16.4%. The choice of decoder is associated with a large separation between these series even at baseline. Transcript training changes the diversity score within each series. The observed diversity of the resulting output therefore depends on both adaptation and decoding.

Cosine similarity gives another ranking. On the video test, DialoGPT transfer with top-k sampling scores 0.719, and the corresponding beam-search setting scores 0.683. For beam search the baseline is 0.752 and the ordinary fine-tuning setting is 0.730. The human comparison is 0.801. A reader looking only at the beam-search Distinct-2 results would see a steady increase across those training settings. A reader looking at cosine similarity would see the opposite ordering within that set of beam-search runs. The measurements describe different properties of the replies.

Response length also varies across those configurations. The average generated reply length for DialoGPT transfer is 10.6 with top-k sampling and 11.4 with beam search on the video test. The human comparison has an average length of 7.3. GPT-2 transfer has reported averages of 8.1 with sampling and 8.8 with beam search on that split. These figures put the output differences in context without turning length into a target. A longer reply can devote more space to a particular concern, and it can also spend that space on material that the speaker did not ask for.

#### Behavior on the independent test

The independent conversations reproduce several parts of the video pattern. For DialoGPT with top-k sampling, the Empathic Conversation BLEU-2 scores for the baseline, ordinary fine-tuning, and transfer settings are 9.34%, 12.61%, and 17.71%, respectively. For beam search the corresponding results are 9.13%, 12.02%, and 17.15%. With both decoders, the transfer setting gives the highest overlap result within its group. As on the video split, sampling gives the higher of the two transfer BLEU-2 scores. The HUMAN entry reported for this set is 10.43%.

The diversity comparisons favor beam search within the DialoGPT transfer pair on the independent test. Distinct-1 is 10.3% with beam search and 7.4% with sampling. Distinct-2 is 28.8% with beam search and 17.7% with sampling. The reported human values are 15.8% and 33.2%, respectively. The ordering between decoders in the transfer settings is consistent with the video diversity comparisons. The human comparison is higher on both diversity measures on the independent set, whereas the video test has a different result for Distinct-1.

The paper describes the independent scores as generally lower and attributes this tendency to the shorter conversations. The pattern varies by measure. Both DialoGPT transfer BLEU-2 values and both transfer Distinct-2 values are higher on the independent set than on the video test. The corresponding Distinct-1 values are lower. The data let the reader see which specific comparisons change between the two sources. The sources differ in how the exchanges were created as well as in their conversational lengths.

The independent cosine similarities again show that the transfer setup can lead on some measures while another setting leads on others. For DialoGPT, the beam-search ordinary fine-tuning run scores 0.771 on the independent set. The beam-search transfer run scores 0.662, and the top-k transfer run scores 0.701. The HUMAN cosine similarity is 0.726. Taken with the diversity and overlap scores, these results explain why the authors treated their automatic evaluation as a way to select candidates for expert review.

#### What the psychotherapy experts assessed

The authors select three systems for human assessment, all trained using the transfer procedure. They are DialoGPT with beam search, DialoGPT with top-k sampling, and GPT-2 with beam search. The judges see them under anonymous labels. The authors use 10 opening statements drawn from the Alexander Street material, covering stressors such as addiction, alcohol consumption, and cyberbullying. Each system generates a sample for each prompt, resulting in 30 samples for the judges.

The judges are a psychiatrist and a psychologist. They receive the generated exchanges from the different systems for the same situation so that they can compare how each handles the context. The generated conversations have an average length of 5 utterances. Showing the exchange gives the judges more information than the single-turn automatic test. An opening question can be relevant by itself, while the response it elicits can reveal that a later turn misses the point. A judgment of the exchange can take both events into account.

The assessment adapts questions used to evaluate psychotherapy residents. Communication concerns whether the exchange uses relevant questions to learn why the person is there and to make sense of what they say. Basic psychotherapy skills include active listening, open-ended inquiry, reflection, restatement, summarizing, and empathy. Overall competence asks for an appraisal of the exchange as psychotherapy. The judges rate each sample on a scale from 1 to 5 for each criterion. The low end denotes a lack of effectiveness, and the high end denotes very strong effectiveness.

The authors calculate agreement in two ways. Cohen’s κ is reported as 0.286, and Krippendorff’s α as 0.34. κ is the symbol for the first agreement statistic, and α represents the second. Both address how consistently the judges applied their assessments while accounting for agreement that could occur by chance. The authors characterize the values as fair agreement. They report a preference for the DialoGPT exchanges, alongside comments that highlight unhealthy advice and responses that were generic or mainly informational. The paper summarizes that preference in prose and gives examples of the behavior that drew concern.

#### How the sample exchanges illuminate the scores

In the appendix exchange about low mood, a system asks about activities the speaker enjoys. The speaker describes a trip involving diving and explains that they stayed on the boat. An activity they ordinarily enjoy did not help them feel better, which the speaker finds frightening. The reply moves toward discovering a new interest. At the level of topic, it follows the thread about hobbies. At the level of the person’s account, it leaves the fear and the change in their response to a valued activity largely unaddressed. The example makes clear why topical fit can be easier to recognize than therapeutic fit.

The bereavement exchange illustrates a different pattern. The system initially acknowledges difficulty and invites the speaker to elaborate. When the speaker describes the sudden death of their mother, the reply includes sympathy and offers several general avenues for support. The text is plausible as a supportive response. Its attention shifts to broadly applicable suggestions soon after the speaker has described the suddenness and cumulative weight of several losses. The example shows how an empathetic opening can coexist with a generic remainder.

In the substance-use example, the system initially gathers information about drinking and other drug use. It picks up on the speaker’s attempt to reduce drinking. The exchange then moves from acknowledgment to an unsolicited suggestion about future cannabis use, which the authors flag as inappropriate. The sequence matters because an evaluation restricted to the early questions would see some relevant information gathering. The later reply changes the assessment of the interaction, even though its wording is connected to subjects already discussed.

These examples explain the practical difference between the two evaluations. The automatic results can locate systems whose replies are diverse or share wording with a recorded response. The experts can examine how a reply uses what the person disclosed and what it encourages the person to do. In the examples, a response can sound supportive or pick up the right topic while still moving the conversation in an unhelpful direction.

### What the ablations show

#### Changing the adaptation while keeping the decoder fixed

The paper offers comparisons of complete training settings and decoding choices. It does not report a component-by-component ablation of the transfer procedure. The closest comparison at training time is between the ordinary transcript run and the transfer run for the same starting system and decoder. This asks what changes when the package of adaptations includes candidate selection alongside generation. The comparison is useful because the two runs share the transcript source and the medium system size.

For DialoGPT with either decoder, the transfer setting improves BLEU-2 relative to ordinary transcript training on both test sets. The diversity measures also improve in several of the DialoGPT comparisons. The combination of results supports the claim that the transfer setting changes the replies in ways the automatic tests can detect. It also shows why the effects should be read metric by metric. With DialoGPT and beam search, the ordinary setting has the higher cosine similarity on both test sets.

The GPT-2 runs sharpen the interpretation. With beam search, moving from ordinary transcript fine-tuning to transfer training lowers video BLEU-2 from 10.73% to 10.18%. On the independent conversations the ordering reverses, with scores of 8.96% for ordinary fine-tuning and 11.76% for transfer. This is evidence that the effect of the training setting depends on both the starting system and the evaluation sample. It gives the result more detail than a general claim that candidate selection improves overlap.

Because the transfer setting changes the learning rate and schedule along with the objective, the comparison measures the combined effect of that procedure. The paper gives no run that changes only the distractor task while keeping optimization fixed. It also does not vary the length of the history or compare distractors of different difficulty. An explanation in which the candidate task teaches closer attention to context is consistent with the design. The experiments measure the performance of the resulting setup, with several changes operating together.

#### Changing the decoder while keeping training fixed

The decoder comparison gives a more direct view of an inference-time choice. Within a trained configuration, sampling and beam search use the same learned system. Changing between them changes which predictions contribute to the output. This makes it possible to observe a decoding effect even for the baseline settings, where transcript training and the added selection task have yet to enter the comparison.

For the DialoGPT transfer settings, beam search produces the higher Distinct-2 score on both datasets. Sampling produces the higher BLEU-2 score on both. These comparisons show a recurring tradeoff in the measured replies. Beam search produces relatively more distinct adjacent pairs, while the sampled replies match the recorded continuations more closely under the sentence-average overlap measure. Each result depends on the specific decoder widths and the sampling temperature used in the paper.

The choice of starting system is another comparison, with a qualification. The same medium size is used for GPT-2 and DialoGPT, and both are evaluated after adaptation to the same transcript source. Their earlier training histories remain different. DialoGPT’s stronger results in a number of settings show what happens when the authors use that dialogue-oriented starting point. The experiments cannot allocate the effect among the prior corpus size, its conversational structure, and the rest of the prior training procedure.

#### What the qualitative comparison adds

The expert assessment extends the comparison from isolated replies to exchanges. Each situation is shown across the chosen systems, which helps the judges compare what different configurations make of the same opening. Since all of those configurations use the transfer procedure, the assessment is evidence about the therapeutic behavior of the selected systems. It gives no direct human rating comparison between ordinary transcript training and transfer training.

The reported preference for DialoGPT applies within this selected group. The examples expose behavior the automatic rankings cannot characterize by themselves. A system can ask relevant questions early and still offer inappropriate advice later. A response can acknowledge the speaker’s feelings and then fall back on generic information. The agreement figures also show that the experts’ assessments varied. Together these observations give the evaluation a different outcome from choosing the strongest system for any single automatic measure.

### Limitations

#### Limits identified by the authors

The authors identify the availability of counseling data as a central constraint. Mental health and psychotherapy conversations are sensitive, and access to examples is limited. The study uses a collected subset of Reddit discussions and the therapy and counseling material the authors selected from Alexander Street. The authors propose expanding the range of mental health discussions and using more clinical and therapeutic data. Their proposal reflects a gap between the breadth of the existing online training material and the specialized behavior they aim to elicit.

The authors also emphasize the weakness exposed by human evaluation. The selected systems generated generic advice, routine information sharing, and advice the judges considered unhealthy. These findings qualify the strong automatic performance of some DialoGPT configurations. The paper explicitly cautions against treating scores that exceed a human comparison as evidence that the generated replies are qualitatively superior to human replies. The metrics and the clinical judgments address different properties of an exchange.

The discussion gives a cautious interpretation of the variation in expert ratings. The authors suggest that confusing exchanges may have made it harder for judges to understand the purpose of the system’s contributions. The score pattern and the comments show that the examples were difficult to evaluate in a uniform way. The explanation is a possibility offered by the authors. The study does not test whether confusion, differences in clinical judgment, or another factor accounts for the variation.

The authors describe post-processing and abstraction as possible directions for improvement. They also frame accessibility and availability, including in emergencies, as reasons to pursue the research. Those goals appear in their discussion of future work. The reported experiments measure generated text and expert assessment of samples. They supply no evidence of an emergency intervention, care delivery in practice, or a change in anyone’s health after an interaction.

#### Limits visible in the study design

The counseling corpus comes from a selected English-language collection with a particular range of recording dates and training-oriented material. The held-out split tests performance on videos taken from that collection. It therefore supplies evidence about continuation within this source. The collection procedure does not establish how the systems would respond across other languages, service settings, or ways people discuss distress. The independent test broadens the source of conversation, but its scenarios were written by researchers under prompts.

The Reddit corpus has its own boundaries. Coping and therapy make up the largest of the reported groups by collected posts and comments. The chains also undergo filters based on length, links, and common English words. These choices determine which replies the system can learn from during the study’s GPT-2 adaptation. The categories describe forums, so they cannot be read as a set of verified clinical cases or as labels assigning a diagnosis to a particular speaker.

The target of transcript training is the reply that appears in the source. It is reasonable to use that reply as an example of how the exchange continued. Its role as a target does not certify its therapeutic quality. Random distractors are likewise labelled by provenance. They can come from another exchange yet still happen to be appropriate, or they can be easy to reject for reasons unrelated to counseling. Success at preferring the recorded continuation leaves open how well the system recognizes a poorly judged reply that sounds relevant.

The automatic evaluation uses one observed continuation at a time. A different continuation could reflect the speaker accurately or ask a useful question using different vocabulary. This matters most for interpreting low overlap scores in a task with multiple plausible replies. Similarity and diversity each provide another measurement, but neither addresses the therapeutic function of the exchange directly. The use of a preceding human turn in the automatic human comparison further limits the meaning of that row. It represents the score under a particular pairing procedure, instead of a maximum that the metric is expected to assign to effective speech.

The automatic single-turn test also supplies real dialogue history. That is a useful condition for comparing immediate continuations, yet errors in a continuing conversation can change what happens next. A question may steer the other person away from their concern. A premature suggestion may make a later follow-up more difficult. The rated exchanges give the judges more context, and their average length of 5 utterances still places the assessment within brief samples.

The expert panel consists of the psychiatrist and psychologist, whose agreement the authors describe as fair. They judge 30 samples generated from 10 source statements. This assessment is valuable for identifying behavior that a lexical measure overlooks, including an explicit example of unhealthy advice. The scope of the sample places limits on how precisely the study can characterize relative competence or how often failures would occur across settings. The paper reports expert perceptions of exchanges rather than outcomes for people who received counseling from the systems.

The choice to take the top automatic performers into expert review also limits what the study can say about the relationship between the two kinds of measurement. The assessment reveals shortcomings among systems selected for strong automatic scores. It does not establish whether a system with weaker text metrics would have done better with the judges, since the ordinary and baseline settings were outside that comparison. For the same reason, the qualitative preference cannot isolate the effect of adding the candidate-selection objective on competence.

The study gives an account of two levels of performance under specific conditions. On the held-out data, transcript adaptation and decoder choice alter the wording, diversity, and similarity of generated replies. In the selected exchanges, experts observe some useful conversational behavior alongside failures in how the system responds to the person’s situation. Evidence about the first level cannot fill gaps in the second, and neither evaluation measures sustained therapeutic benefit.

### What came after

No later citing study is documented here, so there is no follow-up result to attribute to this work.

## Cite

Cite as Avisha Das, Salih Selek, Alia R. Warner, Xu Zuo, Yan Hu, Vipina Kuttichi Keloth, Jianfu Li, W. Jim Zheng and Hua Xu. 2022. Conversational Bots for Psychotherapy: A Study of Generative Transformer Models Using Domain-specific Dialogues. Proceedings of the 21st Workshop on Biomedical Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2022.bionlp-1.27](https://doi.org/10.18653/v1/2022.bionlp-1.27)

```bibtex
@inproceedings{das2022conversational,
  title = {{Conversational Bots for Psychotherapy: A Study of Generative Transformer Models Using Domain-specific Dialogues}},
  author = {Avisha Das, Salih Selek, Alia R. Warner, Xu Zuo, Yan Hu, Vipina Kuttichi Keloth, Jianfu Li, W. Jim Zheng and Hua Xu},
  booktitle = {Proceedings of the 21st Workshop on Biomedical Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.bionlp-1.27},
  url = {https://doi.org/10.18653/v1/2022.bionlp-1.27}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
