Efficient Few-Shot Learning Without Prompts
Paper • 2209.11055 • Published • 5
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.8346 | 0.8212 | 0.8422 | 0.8121 |
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-128",
"setfit-absa-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 | 17.9296 | 37 |
| Label | Training Sample Count |
|---|---|
| no aspect | 71 |
| aspect | 128 |
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.0030 | 1 | 0.398 | - |
| 0.1479 | 50 | 0.2831 | 0.2599 |
| 0.2959 | 100 | 0.2339 | 0.2351 |
| 0.4438 | 150 | 0.1518 | 0.2007 |
| 0.5917 | 200 | 0.0194 | 0.1999 |
| 0.7396 | 250 | 0.0033 | 0.2006 |
| 0.8876 | 300 | 0.002 | 0.2019 |
| 1.0355 | 350 | 0.0011 | 0.2098 |
| 1.1834 | 400 | 0.0008 | 0.2039 |
| 1.3314 | 450 | 0.0008 | 0.2109 |
@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