Commit
·
2c37784
1
Parent(s):
52c42f9
Upload README.md
Browse files
README.md
CHANGED
@@ -1,4 +1,50 @@
|
|
1 |
---
|
|
|
2 |
language:
|
3 |
- en
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
license: cc-by-nc-4.0
|
3 |
language:
|
4 |
- en
|
5 |
+
library_name: transformers
|
6 |
+
tags:
|
7 |
+
- mental health
|
8 |
+
- social media
|
9 |
+
---
|
10 |
+
# DisorBERT
|
11 |
+
|
12 |
+
[DisorBERT](https://aclanthology.org/2023.acl-long.853/) We propose a double-domain adaptation of a language model. First, we adapted the model to social media language, and then, we adapted it to the mental health domain. In both steps, we incorporated a lexical resource to guide the masking process of the language model and, therefore, to help it in paying more attention to words related to mental disorders.
|
13 |
+
|
14 |
+
We follow the standard fine-tuning a masked language model of [Huggingface’s Transformers library](https://huggingface.co/learn/nlp-course/chapter7/3?fw=pt).
|
15 |
+
|
16 |
+
We used the models provided by HuggingFace v4.24.0, and Pytorch v1.13.0. In particular, for training the model we used a batch size of 256, Adam optimizer, with a learning rate of $1e^{-5}$, and cross-entropy as a loss function. We trained the models for three epochs using a GPU NVIDIA Tesla V100 32GB SXM2.
|
17 |
+
|
18 |
+
## Usage
|
19 |
+
# Use a pipeline as a high-level helper from transformers import pipeline
|
20 |
+
pipe = pipeline("fill-mask", model="citiusLTL/DisorBERT")
|
21 |
+
|
22 |
+
-------
|
23 |
+
# Load model directly
|
24 |
+
from transformers import AutoTokenizer, AutoModelForMaskedLM
|
25 |
+
|
26 |
+
tokenizer = AutoTokenizer.from_pretrained("citiusLTL/DisorBERT")
|
27 |
+
model = AutoModelForMaskedLM.from_pretrained("citiusLTL/DisorBERT")
|
28 |
+
|
29 |
+
## Paper
|
30 |
+
|
31 |
+
For more details, refer to the paper [DisorBERT: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media](https://aclanthology.org/2023.acl-long.853/).
|
32 |
+
|
33 |
+
```
|
34 |
+
@inproceedings{aragon-etal-2023-disorbert,
|
35 |
+
title = "{D}isor{BERT}: A Double Domain Adaptation Model for Detecting Signs of Mental Disorders in Social Media",
|
36 |
+
author = "Aragon, Mario and
|
37 |
+
Lopez Monroy, Adrian Pastor and
|
38 |
+
Gonzalez, Luis and
|
39 |
+
Losada, David E. and
|
40 |
+
Montes, Manuel",
|
41 |
+
booktitle = "Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)",
|
42 |
+
month = jul,
|
43 |
+
year = "2023",
|
44 |
+
address = "Toronto, Canada",
|
45 |
+
publisher = "Association for Computational Linguistics",
|
46 |
+
url = "https://aclanthology.org/2023.acl-long.853",
|
47 |
+
doi = "10.18653/v1/2023.acl-long.853",
|
48 |
+
pages = "15305--15318",
|
49 |
+
}
|
50 |
+
```
|