Abstract
The study demonstrates the capability of LLMs, particularly Llama-2, in accurately extracting information on suicidality from psychiatric records while preserving data privacy. This suggests their application in surveillance systems for psychiatric emergencies and improving the clinical management of suicidality by improving systematic quality control and research.
Introduction: The Challenge of Unstructured Psychiatric Data
In modern psychiatry, critical clinical information is frequently embedded within unstructured free-text admission notes rather than structured databases. While structured data like ICD-10 codes are easily searchable, they often fail to capture the nuanced descriptions of a patient’s mental state, particularly regarding suicidality. Clinicians often use complex linguistic structures, such as double negations or subtle behavioral observations, which traditional Natural Language Processing (NLP) tools struggle to interpret without extensive manual feature engineering.
Furthermore, the use of high-performing cloud-based LLMs (e.g., GPT-4) is often prohibited in clinical settings due to the extreme sensitivity of psychiatric records. This study addresses these challenges by evaluating the performance of locally-hosted, privacy-preserving LLMs in identifying suicide risk from real-world clinical text.
Methodology and Study Design
The researchers implemented a "local-first" infrastructure using the llama.cpp framework, allowing 70-billion-parameter models to run on consumer-grade hardware within the hospital's secure environment. This approach ensures that sensitive patient data never leaves the internal network.
The study utilized a dataset of 100 randomly selected psychiatric admission notes from the University Hospital Carl Gustav Carus Dresden. To establish a "ground truth" (GT), each note was independently reviewed by a resident and a consultant psychiatrist to determine the presence of suicidality.
Prompt Engineering Strategies
A central component of the research was determining the most effective way to "prompt" the LLM. The authors compared five distinct strategies:
- Zero-shot (P0): A direct question without prior examples.
- Few-shot (P1–P3): Providing one, two, or three fictitious examples to guide the model's output format and reasoning.
- Chain-of-Thought (P4): Instructing the model to "think step-by-step" before providing a final answer.
The models tested included the standard Llama-2-70b-chat and two variants fine-tuned for the German language: SauerkrautLM and Emgerman.
Key Results and Insights
The Emgerman model, combined with the P3 (three-shot) prompting strategy, achieved the highest performance:
- Accuracy: 87.5%
- Sensitivity: 83.0%
- Specificity: 91.8%
The Chain-of-Thought Paradox
One of the most surprising findings was that Chain-of-Thought (CoT) prompting (P4) degraded performance for Llama-2 on this specific task. While CoT typically improves performance on complex reasoning tasks, in this clinical context, it appeared to introduce unnecessary noise. The models performed significantly better when provided with direct examples (few-shot learning) rather than being asked to explain their reasoning.
Local Viability
The study confirms that 70B parameter models are sufficiently accurate for clinical research when deployed locally. These models proved adept at navigating "linguistic idiosyncrasies," such as identifying a "wish to be dead" as a marker of suicidality even when the specific word "suicide" was absent.
Limitations and Future Directions
While promising, the study is a proof-of-concept limited by a small sample size (100 reports). Future research will focus on:
- Granularity: Moving beyond binary (Yes/No) classification to identify a spectrum of risk (e.g., ideation vs. intent).
- Sensitivity Tuning: For clinical "early warning" applications, models may need to be tuned for higher sensitivity to minimize missed cases, even if this increases false positives.
- Multi-center Validation: Testing the models on data from different institutions to ensure generalizability across varying clinical writing styles.
Summary updated