Papers › Can AI Relate: Testing Large Language Model Response for Mental Health Support

Can AI Relate: Testing Large Language Model Response for Mental Health Support

20 May 2024arXiv:2405.12021archive 2025-07-28

Saadia Gabriel, Isha Puri, Xuhai Xu, Matteo Malgaroli, Marzyeh Ghassemi

Large language models (LLMs) are already being piloted for clinical use in hospital systems like NYU Langone, Dana-Farber and the NHS. A proposed deployment use case is psychotherapy, where a LLM-powered chatbot can treat a patient undergoing a mental health crisis. Deployment of LLMs for mental health response could hypothetically broaden access to psychotherapy and provide new possibilities for personalizing care. However, recent high-profile failures, like damaging dieting advice offered by the Tessa chatbot to patients with eating disorders, have led to doubt about their reliability in high-stakes and safety-critical settings. In this work, we develop an evaluation framework for determining whether LLM response is a viable and ethical path forward for the automation of mental health treatment. Our framework measures equity in empathy and adherence of LLM responses to motivational interviewing theory. Using human evaluation with trained clinicians and automatic quality-of-care metrics grounded in psychology research, we compare the responses provided by peer-to-peer responders to those provided by a state-of-the-art LLM. We show that LLMs like GPT-4 use implicit and explicit cues to infer patient demographics like race. We then show that there are statistically significant discrepancies between patient subgroups: Responses to Black posters consistently have lower empathy than for any other demographic group (2%-13% lower than the control group). Promisingly, we do find that the manner in which responses are generated significantly impacts the quality of the response. We conclude by proposing safety guidelines for the potential deployment of LLMs for mental health response.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2405.12021")

Code

Syntology Ran 10 of 10 code samples harvested from 1 repository linked to this paper; 0 have no recorded run. Of those that ran: 10 ran with no contract checked.

By repository: official repository: 10 samples from 1 repository, 10 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

skgabriel/mh-eval officialmentioned in papermentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

10 samples harvested; 10 ran; 0 honoured the contract we drafted; 0 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

10ran

Licence: 0 of the 10 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from skgabriel/mh-eval. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

check_valid skgabriel/mh-eval/code/scrape.py official repository ran Apache-2.0 (permissive) · b91147af3b048b85 · report
get_data skgabriel/mh-eval/code/eval_eval.py official repository ran Apache-2.0 (permissive) · 640c19ab121b9bf7 · report
get_data skgabriel/mh-eval/code/eval_eval_gpt35.py official repository ran Apache-2.0 (permissive) · e688c227f6397a37 · report
get_data skgabriel/mh-eval/code/eval_eval_gpt4.py official repository ran Apache-2.0 (permissive) · 4580bbbc4017d06c · report
get_data skgabriel/mh-eval/code/eval_eval_mental_llama.py official repository ran Apache-2.0 (permissive) · 73040f3031aa16e2 · report
rescore skgabriel/mh-eval/code/process_experts.py official repository ran Apache-2.0 (permissive) · 0502178177e573d1 · report
toxic_label skgabriel/mh-eval/code/process_eval_set.py official repository ran Apache-2.0 (permissive) · 499da536406e8df0 · report
unf_age skgabriel/mh-eval/code/process_demo.py official repository ran fingerprinted Apache-2.0 (permissive) · b67c30ee8e360032 · report
unf_gender skgabriel/mh-eval/code/process_demo.py official repository ran fingerprinted Apache-2.0 (permissive) · d17b0b92e13eaf71 · report
unf_race skgabriel/mh-eval/code/process_demo.py official repository ran fingerprinted Apache-2.0 (permissive) · daa20d8b26aa3803 · report

Tasks

ChatbotLanguage ModelingLanguage ModellingLarge Language Model

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutGPT-4Label SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections