Update README.md
Browse files
README.md
CHANGED
|
@@ -6,7 +6,10 @@ tags:
|
|
| 6 |
- life-events
|
| 7 |
---
|
| 8 |
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
This repository contains the models described in the paper **["Tracking Life's Ups and Downs: Mining Life Events from Social Media Posts for Mental Health Analysis"](https://aclanthology.org/2025.acl-long.345/)** (ACL 2025).
|
| 12 |
|
|
@@ -14,16 +17,21 @@ The system consists of two distinct models housed in this repository:
|
|
| 14 |
1. **Life Events Detection (`LE_detection`)**: A multi-label classifier that identifies 12 categories of life events from social media posts.
|
| 15 |
2. **Self-Status Determination (`Self-status_determination`)**: A binary classifier that determines whether the detected life event is currently being experienced by the user themselves (Self) or someone else.
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
| 18 |
|
| 19 |
This repository uses **subfolders** to store the weights for each model. You must specify the `subfolder` argument when loading.
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
| 23 |
|
| 24 |
Both models share the same architecture (`BERTDiseaseClassifier`) defined in `model.py`.
|
| 25 |
|
| 26 |
-
##
|
| 27 |
|
| 28 |
Since these models use a custom architecture (BERT + Linear Head on `[CLS]` token without pooling), **you must define or import the model class locally** before loading the weights.
|
| 29 |
|
|
@@ -96,6 +104,42 @@ for i, prob in enumerate(probs[0]):
|
|
| 96 |
print(f"Detected: {config.id2label[i]} ({prob:.4f})")
|
| 97 |
```
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
## Data Availability & Privacy Statement
|
| 100 |
|
| 101 |
This model was trained on a subset of the **[SMHD (Self-reported Mental Health Diagnoses)](https://aclanthology.org/C18-1126/)** dataset.
|
|
|
|
| 6 |
- life-events
|
| 7 |
---
|
| 8 |
|
| 9 |
+
|
| 10 |
+
# π§ PsyEvent: Life Event Recognition System
|
| 11 |
+
|
| 12 |
+
## π Model Overview
|
| 13 |
|
| 14 |
This repository contains the models described in the paper **["Tracking Life's Ups and Downs: Mining Life Events from Social Media Posts for Mental Health Analysis"](https://aclanthology.org/2025.acl-long.345/)** (ACL 2025).
|
| 15 |
|
|
|
|
| 17 |
1. **Life Events Detection (`LE_detection`)**: A multi-label classifier that identifies 12 categories of life events from social media posts.
|
| 18 |
2. **Self-Status Determination (`Self-status_determination`)**: A binary classifier that determines whether the detected life event is currently being experienced by the user themselves (Self) or someone else.
|
| 19 |
|
| 20 |
+
### Architecture
|
| 21 |
+
Both models are based on **BERT-large** (340M parameters) with a custom classification head.
|
| 22 |
+
|
| 23 |
+
## π Repository Structure
|
| 24 |
|
| 25 |
This repository uses **subfolders** to store the weights for each model. You must specify the `subfolder` argument when loading.
|
| 26 |
|
| 27 |
+
| Subfolder | Task Description | Type |
|
| 28 |
+
| :--- | :--- | :--- |
|
| 29 |
+
| `LE_detection/` | Detects **which** life events are present. | Multi-label Classification |
|
| 30 |
+
| `Self-status_determination/` | Detects **who** is experiencing the event. | Binary Classification |
|
| 31 |
|
| 32 |
Both models share the same architecture (`BERTDiseaseClassifier`) defined in `model.py`.
|
| 33 |
|
| 34 |
+
## π Quick Start (Copy & Run)
|
| 35 |
|
| 36 |
Since these models use a custom architecture (BERT + Linear Head on `[CLS]` token without pooling), **you must define or import the model class locally** before loading the weights.
|
| 37 |
|
|
|
|
| 104 |
print(f"Detected: {config.id2label[i]} ({prob:.4f})")
|
| 105 |
```
|
| 106 |
|
| 107 |
+
## π Dataset & Categories
|
| 108 |
+
The model was trained on PsyEvent, a dataset of 7,965 annotated sentences derived from SMHD. It covers 12 major life event categories:
|
| 109 |
+
|
| 110 |
+
| Life Event Categories | Representative Examples (from paper Appendix D) |
|
| 111 |
+
| :--- | :--- |
|
| 112 |
+
| `π₯ Health` | personal injury , accident or illness; became disabled; mental illenss. |
|
| 113 |
+
| `π° Financial` | loan; home purchase; car purchase; other major purchase. |
|
| 114 |
+
| `π Relocation` | move to a different town/city; move out of parent's home; lost home / became homeless; major travel. |
|
| 115 |
+
| `πΌ Career`| started a new job; promotion; voluntary/involuntary job loss; retirement. |
|
| 116 |
+
| `π Education`| begin or end school/college; change in school/college; left school (without graduating). |
|
| 117 |
+
| `π Relationship Change`| began/ended serious romantic relationship; marriage; divorce; serious argument. |
|
| 118 |
+
| `π―οΈ Death`| death of spouse/child/parent/friend/pet. |
|
| 119 |
+
| `πΆ New Birth`| gave birth / became a parent; adopted a child; became a grandparent. |
|
| 120 |
+
| `βοΈ Legal`| got arrested; lawsuit or legal action; went to jail or prison; released from jail or prison. |
|
| 121 |
+
| `π Identity`| came out as LGBTQ+; gender transition; change in political/religious/spiritual beliefs. |
|
| 122 |
+
| `π± Lifestyle Change`| change in physical habits; new pet; joined the military; vacation. |
|
| 123 |
+
| `π Societal`| natural disaster; war; major political event that had personal impact. |
|
| 124 |
+
|
| 125 |
+
## Performance (AUC)
|
| 126 |
+
LE detection model performance on each life event category:
|
| 127 |
+
| Life Event Categories | AUC(%) |
|
| 128 |
+
| :--- | :--- |
|
| 129 |
+
| Health | 92.1 |
|
| 130 |
+
| Financial | 95.7 |
|
| 131 |
+
| Relocation | 97.7 |
|
| 132 |
+
| Legal | 96.1 |
|
| 133 |
+
| Relationship Change | 95.0 |
|
| 134 |
+
| New Birth | 92.6 |
|
| 135 |
+
| Death | 99.7 |
|
| 136 |
+
| Career | 93.5 |
|
| 137 |
+
| Education | 99.2 |
|
| 138 |
+
| Lifestyle Change | 87.9 |
|
| 139 |
+
| Identity | 95.5 |
|
| 140 |
+
| Societal | 97.4 |
|
| 141 |
+
| Avg. | 95.2 |
|
| 142 |
+
|
| 143 |
## Data Availability & Privacy Statement
|
| 144 |
|
| 145 |
This model was trained on a subset of the **[SMHD (Self-reported Mental Health Diagnoses)](https://aclanthology.org/C18-1126/)** dataset.
|