This is Bert-base-uncased model fine-tuned for topic classification of therapist remarks in psychotherapeutic contexts. The task is a multi-class classification with the following labels:

id2label = {
           0: 'Relationship with a Female Figure',
           1: 'Experiencing and Articulating Emotions',
           2: 'Work and Personal Fulfillment',
           3: 'Relationship with a Male Figure',
           4: 'Meaning-Making and Conceptualization',
           5: 'Education and Personal Development',
           6: 'Experience of Fear and Anxiety',
           7: 'Sexual Relationships and Identity',
           8: 'Expression and Communication Difficulties',
           9: 'Self-Acceptance and Social Relationships',
           10: 'Time Perception and Management',
           11: 'Cyclical Patterns of Experience',
           12: 'Therapy Experience and Reflection',
           13: 'Positive Emotional Experience',
           14: 'Mother-Child Relationship Dynamics',
           15: 'Creativity and Emotional Expression',
           16: 'Humor and Cognitive Reframing',
           17: 'Emotional Disturbance and Regulation',
           18: 'Expressions of Certainty',
           19: 'Guilt and Responsibility',
           20: 'Self-Reflection on Maturity',
           21: 'Sleep-Wake Cycle and Daily Rhythm',
           22: 'Life Orientation and Authenticity',
           23: 'Home and Attachment-Autonomy Conflict',
           24: 'Parenting and Family Responsibility',
           25: 'Internal Conflict and Emotional Regulation',
           26: 'Friendship Dynamics',
           27: 'Reflection and Awareness of Unconsidered Thought',
           28: 'Reading as Cognitive and Reflective Engagement',
           29: 'Processes of Personal Change',
           30: 'Emotional Pain and Hurt',
           31: 'Belief, Faith, and Existential Doubt',
           32: 'Evaluation of Neurotic and Healthy States',
           33: 'Emotional Distress and Negative Evaluation',
           34: 'Experience and Regulation of Anger',
           35: 'Positive Emotional Evaluation',
           36: 'Dream Experience and Symbolic Processing',
           37: 'Father-Child Relationship Dynamics',
           38: 'Problem Framing and Self-Resolution',
           39: 'Personal Learning Experiences',
           40: 'Racial Identity and Intergroup Relations',
           41: 'Healthcare Interactions and Medical Authority',
           42: 'Uncertainty about Correctness',
           43: 'Evaluation of Marriage',
           44: 'Marital Relationship and Communication',
           45: 'Self-Worth and Capacity for Love',
           46: 'Self-Expression Through Appearance'}

Usage

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("AIPsy/bert-base-client-topic-classification-eng")
model = AutoModelForSequenceClassification.from_pretrained("AIPsy/bert-base-client-topic-classification-eng")

text = "That in essense it's right; it's responsibility."

encoding = tokenizer(
            text,
            truncation=True,
            padding="max_length",
            return_tensors="pt"
        )
output = model(encoding['input_ids'], encoding['attention_mask']).logits
result = np.argmax(output.detach().numpy(), axis=-1)
print(id2label[result[0]])
'Guilt and Responsibility'

Dataset

The source material was the recordings of psychotherapeutic sessions posted on YouTube in the public domain. After conducting speaker diarization and transcription of the recordings 15324 items (sentences) were obtained.

Recommendations

Given the broad context of issues discussed in psychotherapeutic sessions, the authors believe that this model can be used to analyze human communication in general.

Metrics

Score metrics of trained model

Sample F1 macro
Test 0.76
Validation 0.75
Train 0.94

F1 score metrics for test sample across categories

ID Topic Precision Recall F1
0 Relationship with a Female Figure 0.91 0.97 0.94
1 Experiencing and Articulating Emotions 0.77 0.82 0.79
2 Work and Personal Fulfillment 0.75 0.77 0.76
3 Relationship with a Male Figure 0.86 0.91 0.88
4 Meaning-Making and Conceptualization 0.79 0.81 0.80
5 Education and Personal Development 0.80 0.73 0.77
6 Experience of Fear and Anxiety 0.97 0.75 0.85
7 Sexual Relationships and Identity 0.76 0.80 0.78
8 Expression and Communication Difficulties 0.70 0.83 0.76
9 Self-Acceptance and Social Relationships 0.58 0.81 0.68
10 Time Perception and Management 0.85 0.71 0.77
11 Cyclical Patterns of Experience 0.79 0.65 0.71
12 Therapy Experience and Reflection 0.86 0.64 0.73
13 Positive Emotional Experience 0.80 0.63 0.71
14 Mother-Child Relationship Dynamics 0.82 0.75 0.79
15 Creativity and Emotional Expression 0.64 0.73 0.68
16 Humor and Cognitive Reframing 0.60 0.63 0.62
17 Emotional Disturbance and Regulation 0.74 0.71 0.72
18 Expressions of Certainty 0.96 0.91 0.94
19 Guilt and Responsibility 0.62 0.59 0.60
20 Self-Reflection on Maturity 0.71 0.80 0.75
21 Sleep-Wake Cycle and Daily Rhythm 0.78 0.61 0.68
22 Life Orientation and Authenticity 0.75 0.70 0.72
23 Home and Attachment-Autonomy Conflict 0.69 0.72 0.70
24 Parenting and Family Responsibility 0.79 0.70 0.74
25 Internal Conflict and Emotional Regulation 0.87 0.68 0.76
26 Friendship Dynamics 0.56 0.80 0.66
27 Reflection and Awareness of Unconsidered Thought 0.80 0.70 0.75
28 Reading as Cognitive and Reflective Engagement 0.62 0.86 0.72
29 Processes of Personal Change 0.69 0.69 0.69
30 Emotional Pain and Hurt 0.83 0.59 0.69
31 Belief, Faith, and Existential Doubt 0.76 0.91 0.83
32 Evaluation of Neurotic and Healthy States 0.75 0.75 0.75
33 Emotional Distress and Negative Evaluation 0.65 0.58 0.61
34 Experience and Regulation of Anger 0.61 0.70 0.65
35 Positive Emotional Evaluation 0.83 0.69 0.76
36 Dream Experience and Symbolic Processing 0.94 0.84 0.89
37 Father-Child Relationship Dynamics 0.81 0.83 0.82
38 Problem Framing and Self-Resolution 0.78 0.62 0.69
39 Personal Learning Experiences 0.59 0.58 0.58
40 Racial Identity and Intergroup Relations 1.00 0.73 0.85
41 Healthcare Interactions and Medical Authority 0.84 0.84 0.84
42 Uncertainty about Correctness 0.81 0.65 0.72
43 Evaluation of Marriage 0.79 0.86 0.83
44 Marital Relationship and Communication 0.76 0.62 0.68
45 Self-Worth and Capacity for Love 0.93 0.64 0.76
46 Self-Expression Through Appearance 0.62 0.64 0.63

Citation

  • Papers: Vanin A, Bolshev V and Panfilova A (2025) Psychotherapist remarks’ ML classifier: insights from LLM and topic modeling application. Front. Psychiatry 16:1608163. doi: 10.3389/fpsyt.2025.1608163. https://doi.org/10.3389/fpsyt.2025.1608163
  • Developed by: @myentity, @VadZhen, @Alek123
  • License: MIT

BibTeX:

@ARTICLE{10.3389/fpsyt.2025.1608163,   
AUTHOR={Vanin, Alexander  and Bolshev, Vadim  and Panfilova, Anastasia },          
TITLE={Psychotherapist remarks’ ML classifier: insights from LLM and topic modeling application},        
JOURNAL={Frontiers in Psychiatry},         
VOLUME={Volume 16 - 2025}, 
YEAR={2025}, 
URL={https://www.frontiersin.org/journals/psychiatry/articles/10.3389/fpsyt.2025.1608163},
DOI={10.3389/fpsyt.2025.1608163},
ISSN={1664-0640},
Downloads last month
189
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AIPsy/bert-base-client-topic-classification-eng

Finetuned
(6682)
this model