Related Experiment Video
Updated: Aug 17, 2025

Assessing the Coherence of Parents' Short Narratives Regarding their Child Using the Five-Minute Speech Sample Procedure
Published on: September 19, 2019
Detecting defense mechanisms from Adult Attachment Interview (AAI) transcripts using machine learning
Anthony N Tasca1, Samantha Carlucci2,3, James C Wiley4
1School of Computer Science, Carleton University, Ottawa, Canada.
Objective:
Defensive functioning (i.e., unconscious process used to manage real or perceived threats) may play a role in the development of various psychopathologies. It is typically assessed via observer rating measures, however, human coding of defensive functioning is resource-intensive and time-consuming. The purpose of this study was to develop a machine learning approach to automate coding of defense mechanisms from interview transcripts.
Method:
Participants included a clinical sample of women with binge-eating disorder (n = 92) and a community sample without binge-eating disorder (n = 66). We trained and evaluated five RoBERTa-based models to detect the presence of defenses in 16,785 interviewer-participant talk-turn pairs nested within 192 interviews. A model detected the presence of any defense, while four additional models detected the most common defenses in this sample (repression, intellectualization, reaction formation, undoing).
Results:
The models were capable of distinguishing defenses (ROC-AUC .82-.90) but were not proficient enough to warrant replacing human coders (PR-AUC .28-.60). Follow-up analysis was performed to assess other practical uses of these models.
Discussion:
Our machine learning models could be used to assist coders. Future research should conduct a deployment study to determine if human coding of defense mechanisms can be expedited using machine learning models.
More Related Videos
12:55Multimodal Protocol for Assessing Metacognition and Self-Regulation in Adults with Learning Difficulties
Published on: September 27, 2020
11:14A Novel Experimental and Analytical Approach to the Multimodal Neural Decoding of Intent During Social Interaction in Freely-behaving Human Infants
Published on: October 4, 2015
Related Concept Videos
Theory of Romantic Attachment in Adulthood
Modeling in Therapy
Participant Modeling
Participant modeling involves therapists demonstrating calm and effective behaviors in...
Attachment
Psychodynamic Therapy
Coping Strategies: Emotion Focused