Efficient Few-Shot Learning Without Prompts
Paper
•
2209.11055
•
Published
•
4
This is a SetFit model that can be used for Aspect Based Sentiment Analysis (ABSA). This SetFit model uses sentence-transformers/all-MiniLM-L6-v2 as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification. In particular, this model is in charge of filtering aspect span candidates.
The model has been trained using an efficient few-shot learning technique that involves:
This model was trained within the context of a larger system for ABSA, which looks like so:
| Label | Examples |
|---|---|
| aspect |
|
| no aspect |
|
| Label | F1_Micro | F1_Macro | Precision_Macro | Recall_Macro |
|---|---|---|---|---|
| all | 0.8517 | 0.8441 | 0.8483 | 0.8410 |
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
from setfit import AbsaModel
# Download from the 🤗 Hub
model = AbsaModel.from_pretrained(
"ronalhung/setfit-absa-restaurants-aspect",
"ronalhung/setfit-absa-restaurants-polarity",
)
# Run inference
preds = model("The food was great, but the venue is just way too busy.")
| Training set | Min | Median | Max |
|---|---|---|---|
| Word count | 4 | 19.4181 | 45 |
| Label | Training Sample Count |
|---|---|
| no aspect | 167 |
| aspect | 254 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0007 | 1 | 0.3998 | - |
| 0.0345 | 50 | 0.3187 | 0.3072 |
| 0.0689 | 100 | 0.2744 | 0.2600 |
| 0.1034 | 150 | 0.2494 | 0.2504 |
| 0.1378 | 200 | 0.2459 | 0.2408 |
| 0.1723 | 250 | 0.2242 | 0.2210 |
| 0.2068 | 300 | 0.1802 | 0.1815 |
| 0.2412 | 350 | 0.1085 | 0.1787 |
| 0.2757 | 400 | 0.0435 | 0.1918 |
| 0.3101 | 450 | 0.0143 | 0.1832 |
| 0.3446 | 500 | 0.0063 | 0.1971 |
| 0.3790 | 550 | 0.004 | 0.1945 |
| 0.4135 | 600 | 0.002 | 0.2005 |
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}
Base model
sentence-transformers/all-MiniLM-L6-v2