SyncAI.news, a Varaisys broadcasting
SetFitABSA: Few-Shot Aspect Based Sentiment Analysis using SetFit
HF

Hugging Face Blog

· 1 min read

AI LabsHugging Face Blog

SetFitABSA: Few-Shot Aspect Based Sentiment Analysis using SetFit

SetFitABSA is an efficient technique to detect the sentiment towards specific aspects within the text.

Aspect-Based Sentiment Analysis (ABSA) is the task of detecting the sentiment towards specific aspects within the text. For example, in the sentence, "This phone has a great screen, but its battery is too small", the aspect terms are "screen" and "battery" and the sentiment polarities towards them are Positive and Negative, respectively.

ABSA is widely used by organizations for extracting valuable insights by analyzing customer feedback towards aspects of products or services in various domains. However, labeling training data for ABSA is a tedious task because of the fine-grained nature (token level) of manually identifying aspects within the training samples.

Intel Labs and Hugging Face are excited to introduce SetFitABSA, a framework for few-shot training of domain-specific ABSA models; SetFitABSA is competitive and even outperforms generative models such as Llama2 and T5 in few-shot scenarios.

Compared to LLM based methods, SetFitABSA has two unique advantages:

🗣 No prompts needed: few-shot in-context learning with LLMs requires handcrafted prompts which make the results brittle, sensitive to phrasing and dependent on user expertise. SetFitABSA dispenses with prompts altogether by generating rich embeddings directly from a small number of labeled text examples.

🏎 Fast to train: SetFitABSA requires only a handful of labeled training samples; in addition, it uses a simple training data format, eliminating the need for specialized tagging tools. This makes the data labeling process fast and easy.

In this blog post, we'll explain how SetFitABSA works and how to train your very own models using the SetFit library. Let's dive in!

How does it work?

SetFitABSA's three-stage training process

Training

1. Aspect candidate extraction

2. Aspect/Non-aspect classification

aspect_candidate:training_sentence

3. Sentiment polarity classification

Running inference

Model Input:

Model Output:

Original source

This story was published by Hugging Face Blog. SyncAI.news shows a preview; the complete article is on the publisher's site.

Read the full story on huggingface.co

Similar News