This repository contains the code and evaluation scripts for our study on fine-tuning open-source Large Language Models (LLMs) for Aspect-Based Sentiment Analysis (ABSA). Our research investigates the performance of fine-tuned LLMs compared to state-of-the-art (SOTA) methods on English and German datasets, particularly in resource-scarce scenarios.
Fine-tuned LLMs outperform current SOTA methods in data-scarce scenarios, especially for complex ABSA tasks.
Performance remains stable even with reduced dataset sizes (as low as 500 or 1,000 samples).
Few-shot prompting shows promising results, though fine-tuned LLMs typically achieve better results and are more efficient.
Concise prompts are generally sufficient when combined with well-optimized hyperparameters.
An ablation study with multiple languages, domains and pre-trained LLMs confirm that performance gains extend beyond the initial setting, supporting the robustness of fine-tuned LLMs.
New SOTA F1 scores:
ACSA (82.48) and E2E (81.77) on the Rest-16 dataset
ACSA (85.45) and TASD (75.13) on the GERestaurant dataset
We evaluate our fine-tuned LLMs on four commonly-used ABSA subtasks: Aspect Category Detection (ACD), Aspect Category Sentiment Analysis (ACSA), End-To-End ABSA (E2E), and Target Aspect Sentiment Detection (TASD). Our approach involves instruction fine-tuning LLaMA-3-8B using Quantized Low-Rank Adaptation (QLoRA) to efficiently adapt the model to ABSA tasks. We conduct experiments with varying dataset sizes (500, 1,000, and full dataset) to assess performance under resource constraints. Additionally, we explore the impact of different prompt formulations and hyperparameter tuning. To assess generalizability, we conduct an ablation study across multiple languages, domains, and LLM architectures.
We use the following datasets in our evaluation:
Rest-16: English restaurant review dataset from SemEval 2016 (Pontiki et. al, 2016)
GERestaurant: German restaurant review dataset (Hellwig et. al, 2024)
π root/
βββ π data/ # Preprocessed datasets
βββ π src/ # Code for our instruction fine-tuned LLM approach
βββ π baselines/ # Code for our baseline approaches, scripts for execution as well as files for setup and dataset-preparation
βββ π scripts/ # Script files for running the evaluation of our approach, Jupyter-Notebooks for analysis of the results
βββ π results/ # In-depth results and condition parameters for each evaluation run
/scripts/setup.sh or /baselines/mvp/setup.sh)./scripts/run_train_LLM_HT.py.If you use our work, please cite:
@ARTICLE{Fehle2026-ws,
title = {{Leveraging fine-tuning of large language models for
aspect-based sentiment analysis in resource-scarce
environments}},
author = {Fehle, Jakob and Kruschwitz, Udo and Hellwig, Nils Constantin
and Wolff, Christian},
journaltitle = {Knowledge-Based Systems},
publisher = {Elsevier BV},
volume = {336},
issue = {115277},
pages = {115277},
date = {2026}
}
This repository contains the code and evaluation scripts for our study on fine-tuning open-source Large Language Models (LLMs) for Aspect-Based Sentiment Analysis (ABSA). Our research investigates the performance of fine-tuned LLMs compared to state-of-the-art (SOTA) methods on English and German datasets, particularly in resource-scarce scenarios.
Fine-tuned LLMs outperform current SOTA methods in data-scarce scenarios, especially for complex ABSA tasks.
Performance remains stable even with reduced dataset sizes (as low as 500 or 1,000 samples).
Few-shot prompting shows promising results, though fine-tuned LLMs typically achieve better results and are more efficient.
Concise prompts are generally sufficient when combined with well-optimized hyperparameters.
An ablation study with multiple languages, domains and pre-trained LLMs confirm that performance gains extend beyond the initial setting, supporting the robustness of fine-tuned LLMs.
New SOTA F1 scores:
ACSA (82.48) and E2E (81.77) on the Rest-16 dataset
ACSA (85.45) and TASD (75.13) on the GERestaurant dataset
We evaluate our fine-tuned LLMs on four commonly-used ABSA subtasks: Aspect Category Detection (ACD), Aspect Category Sentiment Analysis (ACSA), End-To-End ABSA (E2E), and Target Aspect Sentiment Detection (TASD). Our approach involves instruction fine-tuning LLaMA-3-8B using Quantized Low-Rank Adaptation (QLoRA) to efficiently adapt the model to ABSA tasks. We conduct experiments with varying dataset sizes (500, 1,000, and full dataset) to assess performance under resource constraints. Additionally, we explore the impact of different prompt formulations and hyperparameter tuning. To assess generalizability, we conduct an ablation study across multiple languages, domains, and LLM architectures.
We use the following datasets in our evaluation:
Rest-16: English restaurant review dataset from SemEval 2016 (Pontiki et. al, 2016)
GERestaurant: German restaurant review dataset (Hellwig et. al, 2024)
π root/
βββ π data/ # Preprocessed datasets
βββ π src/ # Code for our instruction fine-tuned LLM approach
βββ π baselines/ # Code for our baseline approaches, scripts for execution as well as files for setup and dataset-preparation
βββ π scripts/ # Script files for running the evaluation of our approach, Jupyter-Notebooks for analysis of the results
βββ π results/ # In-depth results and condition parameters for each evaluation run
/scripts/setup.sh or /baselines/mvp/setup.sh)./scripts/run_train_LLM_HT.py.If you use our work, please cite:
@ARTICLE{Fehle2026-ws,
title = {{Leveraging fine-tuning of large language models for
aspect-based sentiment analysis in resource-scarce
environments}},
author = {Fehle, Jakob and Kruschwitz, Udo and Hellwig, Nils Constantin
and Wolff, Christian},
journaltitle = {Knowledge-Based Systems},
publisher = {Elsevier BV},
volume = {336},
issue = {115277},
pages = {115277},
date = {2026}
}