COMPASS: Computational mapping of patient-therapist alliance strategies with language modeling

Baihan Lin, Djallel Bouneffouf, Yulia Landa, Rachel Jespersen, Cheryl M. Corcoran, Guillermo Cecchi

The therapeutic working alliance—the collaborative relationship between a patient and their therapist—is widely recognized as the single most significant predictor of psychotherapy outcomes. Despite its importance, measuring this alliance has traditionally relied on post-session questionnaires like the Working Alliance Inventory (WAI). These methods are often coarse, subjective, and burdensome for both parties. To address these limitations, we introduce COMPASS (Computational Mapping of Patient-Therapist Alliance Strategies), a novel framework that leverages Large Language Models (LLMs) to directly infer the working alliance from the natural language used in psychotherapy transcripts.

The Challenge of Measuring Alliance

The traditional WAI provides a single, retrospective score for an entire hour-long session. This approach misses the "micro-ruptures" and breakthroughs that occur turn-by-turn. Furthermore, therapists and patients often hold divergent views on the session's success, a "perception gap" that standard surveys struggle to quantify objectively. COMPASS moves beyond these limitations by providing a granular, real-time linguistic analysis of therapeutic interactions.

The COMPASS Framework

The COMPASS pipeline treats established psychometric instruments as "semantic anchors" to map dialogue turns into a distributed representation space. By calculating the cosine similarity between a specific turn and WAI items (e.g., "I feel the therapist likes me"), the system can infer an alliance score for every moment of the session.

The COMPASS framework architecture, illustrating the flow from session transcripts to alliance scoring, topic modeling, and diagnosis inference.

The framework consists of three primary components:

  1. Sentence Embeddings: Using models like SentenceBERT, the system converts dialogue turns and WAI items into high-dimensional vectors.
  2. Neural Topic Modeling: Embedded Topic Models (ETM) identify latent themes in the conversation, which are then summarized into human-readable clinical categories (e.g., "Coping Mechanisms") using GPT-3.5.
  3. Sequence Modeling: Alliance trajectories are analyzed using Transformers and LSTMs to predict patient diagnoses based on the "rhythm" of the interaction.

Key Insights: The Perception Gap and Diagnosis Trajectories

Analyzing over 950 sessions from the Alexander Street Counseling dataset, COMPASS revealed several critical clinical patterns:

  • The Perception Gap: The model confirmed that therapists consistently overestimate alliance strength compared to patients, particularly regarding "Task" and "Bond" agreement ($p < 0.001$).
  • Diagnosis-Specific Patterns: Alliance trajectories vary significantly by condition. For instance, while alliance generally improves over time in schizophrenia cases, sessions involving suicidal tendencies often show a disconnect where emotional bonds decline even if long-term goals remain aligned.

Topic-Alliance Coupling

A unique feature of COMPASS is its ability to map how specific topics influence the working alliance. The researchers found that the impact of a topic is highly context-dependent.

Topic-working-alliance association diagram showing how specific therapist and patient turns for different topics correlate with alliance scores.

For example, discussing "Personal Growth" typically improves the bond for depressed patients but can decrease alliance scores for suicidal patients if introduced too early, potentially feeling invalidating during an acute crisis. This "coupling" provides actionable insights into which strategies work for specific patient profiles.

Results and Clinical Utility

COMPASS demonstrated strong predictive capabilities, achieving a diagnostic classification accuracy of 46% across four conditions (anxiety, depression, schizophrenia, and suicidality), significantly above the 25% chance level. This suggests that the evolution of the therapeutic alliance is a distinct signature of the underlying psychiatric condition. Furthermore, by reducing thousands of turns into "Principal Topic Spaces" via PCA, the framework offers interpretable roadmaps for clinicians to steer conversations more effectively.

Future Directions

While COMPASS faces challenges with linguistic nuances like negation and data imbalance in rare conditions, it paves the way for real-time clinical support. Future iterations aim to provide therapists with live dashboards that flag alliance ruptures as they happen, allowing for immediate strategic adjustments to improve treatment retention and efficacy.

Summary updated

BibTeX
@inproceedings{lin2025compass,
  author = {Baihan Lin and Djallel Bouneffouf and Yulia Landa and Rachel Jespersen and Cheryl M. Corcoran and Guillermo Cecchi},
  title = {{COMPASS: Computational mapping of patient-therapist alliance strategies with language modeling}},
  booktitle = {Translational},
  year = {2025},
  doi = {10.1038/s41398-025-03379-3},
}
Figure