A GPT among Annotators: LLM-based Entity-Level Sentiment Annotation

Egil Rønningstad, Erik Velldal, Lilja ØvrelidEACL 2024

TL;DR

This paper investigates how well large language models (LLMs), specifically GPT-4, can perform entity-level sentiment analysis (ELSA) on long Norwegian texts, comparing its performance to human annotators. They found that while GPT-4's performance is generally lower than human annotators, it can be a valuable tool for augmenting datasets, especially when provided with clear instructions and few-shot examples.

What Problem Does This Paper Address?

Sentiment analysis, particularly when applied to specific entities within a text (Entity-Level Sentiment Analysis or ELSA), is known to be a subjective task with moderate inter-annotator agreement. While recent work has shown LLMs can outperform crowd workers in some sentiment analysis tasks, their effectiveness on longer, nuanced texts and in less-represented languages like Norwegian for ELSA remains an open question. This paper aims to bridge this gap by evaluating GPT-4's ability to perform ELSA on a newly created Norwegian dataset, comparing its output to that of experienced human annotators.

Methods

The researchers employed GPT-4 for ELSA, experimenting with various prompting strategies. These included:

  • Language: Using both Norwegian and English prompts, while specifying the input text was Norwegian.
  • Prompting Strategy: Analyzing entities either one by one or all at once per document.
  • Knowledge Augmentation: Providing GPT-4 with condensed versions of the annotation guidelines and, in a few-shot scenario, with examples of annotated texts.

The best-performing setup (GPT-4 with Norwegian prompts, all entities per document, and few-shot examples) was then used for in-depth analysis. The LLM's outputs were compared against a manually curated "gold standard" dataset and the annotations of five human annotators using metrics like accuracy, weighted F1-score, Cohen's Kappa, and Mean Squared Error (MSE).

Datasets

The primary dataset used is a newly constructed Norwegian ELSA dataset. This dataset is derived from the NoReCfine dataset, which itself is a subset of the Norwegian Review Corpus (NoReC). The texts are professional reviews from various domains (screen, music, restaurants, literature) and are characterized by their length, averaging 27.5 sentences per text. The test split of this dataset contains 44 documents with 247 unique entities, each annotated by five human annotators.

Key Insights and Ideas

  • LLMs as Augmenters, Not Replacements (Yet): While GPT-4's performance on ELSA is not yet on par with human annotators, it shows promise for augmenting existing datasets, especially in low-resource scenarios.
  • The Power of Few-Shot Learning: Providing GPT-4 with a few annotated examples significantly improved its performance, suggesting that few-shot learning is crucial for complex tasks like ELSA.
  • Nuance in LLM Errors: Interestingly, one human annotator showed more significant deviations from the gold standard than GPT-4 in some metrics, challenging the assumption that LLM errors are always more dramatic than human ones.
  • Language and Domain Specificity: The performance of LLMs might be influenced by the language and domain of the text. While GPT-4 handled Norwegian reasonably well, its performance might differ for languages with more extensive representation in its training data.

Key Results

The best-performing GPT-4 setup (gpt0802) achieved an accuracy of 62.8% and a Cohen's Kappa of 0.425 against the curated gold standard. This is notably lower than the average human annotator performance, which had an accuracy of 80.4% and a Kappa of 0.683. However, when analyzing deviations, GPT-4's "Outside" category (labels outside the range of other annotators) was 15.8%, which, while higher than the average annotator (9.5%), was less than the outlier annotator (25.9%). The paper also highlights that GPT-4 sometimes relied on its pre-training knowledge rather than strictly the text provided, a tendency mitigated by more detailed instructions and examples.

Limitations and Future Work

The authors acknowledge several limitations:

  • Closed-Source Model: The use of ChatGPT, a closed-source commercial model, limits knowledge about its training data and model weights, and prevents fine-tuning.
  • Norwegian Language: While GPT-4 performed decently, its performance might be better for languages with larger web presences. The lack of freely available Norwegian instruction-tuned generative models is also a constraint.
  • Dataset Size: The current dataset is relatively small, and further experiments with larger datasets and more setup variations are needed.

Future work suggested includes:

  • Augmenting Datasets: Using LLMs to augment existing sentiment analysis datasets.
  • Exploring Other LLMs: Experimenting with other openly available multilingual instruction-tuned LLMs.
  • Parallel Annotation: Continuing to explore LLM-based annotation in parallel with human annotators to better understand their respective strengths and weaknesses.

Summary updated

BibTeX
@inproceedings{rnningstad2024gpt,
  author = {Egil Rønningstad and Erik Velldal and Lilja Øvrelid},
  title = {{A GPT among Annotators: LLM-based Entity-Level Sentiment Annotation}},
  booktitle = {EACL},
  year = {2024},
}
Figure