Commit
·
ca91748
1
Parent(s):
b829bc1
Update README.md
Browse files
README.md
CHANGED
@@ -22,6 +22,47 @@ The details are available at [Github:FS-ABSA](https://github.com/nustm/fs-absa)
|
|
22 |
# Model Description
|
23 |
|
24 |
To bridge the domain gap between general pre-training and the task of interest in a specific domain (i.e., `restaurant` in this repo), we conducted *domain-adaptive pre-training*,
|
25 |
-
continuing pre-training the language model (i.e., T5) on the unlabeled corpus of the domain of interest (i.e., `restaurant`) with the *text-infilling objective*
|
26 |
-
(corruption rate of 15% and average span length of 1).
|
|
|
27 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
# Model Description
|
23 |
|
24 |
To bridge the domain gap between general pre-training and the task of interest in a specific domain (i.e., `restaurant` in this repo), we conducted *domain-adaptive pre-training*,
|
25 |
+
i.e., continuing pre-training the language model (i.e., T5) on the unlabeled corpus of the domain of interest (i.e., `restaurant`) with the *text-infilling objective*
|
26 |
+
(corruption rate of 15% and average span length of 1). We collect relevant 100k unlabeled reviews from Yelp for the restaurant domain, respectively.
|
27 |
+
For pre-training, we employ the [Adafactor](https://arxiv.org/abs/1804.04235) optimizer with a batch size of 80 and a learning rate of 1e-4.
|
28 |
|
29 |
+
Our model can be seen as an enhanced T5 model in the restaurant domain, which can be used for various NLP tasks related to the restaurant domain,
|
30 |
+
including but not limited to fine-grained sentiment analysis (ABSA), product-relevant Question Answering (PrQA), text style transfer, etc.
|
31 |
+
|
32 |
+
|
33 |
+
|
34 |
+
```python
|
35 |
+
>>> from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
36 |
+
|
37 |
+
>>> tokenizer = AutoTokenizer.from_pretrained("NUSTM/restaurant-t5-base")
|
38 |
+
>>> model = AutoModelForSeq2SeqLM.from_pretrained("NUSTM/restaurant-t5-base")
|
39 |
+
|
40 |
+
>>> input_ids = tokenizer(
|
41 |
+
... "The pizza here is delicious!!", return_tensors="pt"
|
42 |
+
... ).input_ids # Batch size 1
|
43 |
+
>>> outputs = model(input_ids=input_ids)
|
44 |
+
```
|
45 |
+
|
46 |
+
|
47 |
+
# Citation
|
48 |
+
|
49 |
+
If you find this work helpful, please cite our paper as follows:
|
50 |
+
|
51 |
+
```bibtex
|
52 |
+
@inproceedings{wang2023fs-absa,
|
53 |
+
author = {Wang, Zengzhi and Xie, Qiming and Xia, Rui},
|
54 |
+
title = {A Simple yet Effective Framework for Few-Shot Aspect-Based Sentiment Analysis},
|
55 |
+
year = {2023},
|
56 |
+
isbn = {9781450394086},
|
57 |
+
publisher = {Association for Computing Machinery},
|
58 |
+
address = {New York, NY, USA},
|
59 |
+
url = {https://doi.org/10.1145/3539618.3591940},
|
60 |
+
doi = {10.1145/3539618.3591940},
|
61 |
+
booktitle = {Proceedings of the 46th International ACM SIGIR Conference on Research and Development in Information Retrieval},
|
62 |
+
numpages = {6},
|
63 |
+
location = {Taipei, Taiwan},
|
64 |
+
series = {SIGIR '23}
|
65 |
+
}
|
66 |
+
```
|
67 |
+
|
68 |
+
Note that the complete citation format will be announced once our paper is published in the SIGIR 2023 conference proceedings.
|