Distilling Fine-grained Sentiment Understanding from Large Language Models

Yice Zhang, Guangyu Xie, Hongling Xu, Kaiheng Hou, Jianzhu Bao +3 more
12/24/2024
cs.CL

Official code: HITSZ-HLT/FSA-Distillation (4 stars, last commit 2025-06-12).

Abstract

Fine-grained sentiment analysis (FSA) aims to extract and summarize user opinions from vast opinionated text. Recent studies demonstrate that large language models (LLMs) possess exceptional sentiment understanding capabilities. However, directly deploying LLMs for FSA applications incurs high inference costs. Therefore, this paper investigates the distillation of fine-grained sentiment understanding from LLMs into small language models (SLMs). We prompt LLMs to examine and interpret the sentiments of given reviews and then utilize the generated content to pretrain SLMs. Additionally, we develop a comprehensive FSA benchmark to evaluate both SLMs and LLMs. Extensive experiments on this benchmark reveal that: (1) distillation significantly enhances the performance of SLMs in FSA tasks, achieving a 6.00\% improvement in $F_1$-score, and the distilled model can outperform Llama-2-7b with only 220M parameters; (2) distillation equips SLMs with excellent zero-shot sentiment classification capabilities, enabling them to match or even exceed their teacher models. These results suggest that distillation from LLMs is a highly promising direction for FSA. We will release our code, data, and pretrained model weights at https://github.com/HITSZ-HLT/FSA-Distillation.

View on arXivView PDF

Code Implementations(1)

Released code for「Distilling Fine-grained Sentiment Understanding from Large Language Models」.

40Shell, PythonDec 24, 20241 years ago

Similar Papers

Cite this paper

@article{zhang2024distilling,
  title  = {Distilling Fine-grained Sentiment Understanding from Large Language Models},
  author = {Yice Zhang and Guangyu Xie and Hongling Xu and Kaiheng Hou and Jianzhu Bao and Qianlong Wang and Shiwei Chen and Ruifeng Xu},
  year   = {2024},
  eprint = {2412.18552},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.18552v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2412.18552.svg)](https://codeofpaper.com/paper/2412.18552)

Discussion