Table of Contents
Fetching ...

PL-FGSA: A Prompt Learning Framework for Fine-Grained Sentiment Analysis Based on MindSpore

Zhenkai Qin, Jiajing He, Qiao Fang

TL;DR

This work proposes PL-FGSA, a MindSpore-native prompt-learning framework for fine-grained sentiment analysis that unifies aspect extraction, sentiment classification, and causal explanation under a single prompt-guided model with a lightweight TextCNN encoder. By reformulating FGSA as a multi-task prompt-augmented generation problem, PL-FGSA achieves strong performance on SST-2, SemEval-2014 Task 4, and MAMS, including in low-resource and CPU-only settings, while enhancing interpretability through generated explanations. The approach emphasizes parameter efficiency, cross-task synergy, and industrial deployment potential thanks to MindSpore's graph optimization and Ascend compatibility. The results demonstrate robust generalization across granularities and offer a scalable, interpretable solution for real-world opinion mining tasks with practical deployment significance.

Abstract

Fine-grained sentiment analysis (FGSA) aims to identify sentiment polarity toward specific aspects within a text, enabling more precise opinion mining in domains such as product reviews and social media. However, traditional FGSA approaches often require task-specific architectures and extensive annotated data, limiting their generalization and scalability. To address these challenges, we propose PL-FGSA, a unified prompt learning-based framework implemented using the MindSpore platform, which integrates prompt design with a lightweight TextCNN backbone. Our method reformulates FGSA as a multi-task prompt-augmented generation problem, jointly tackling aspect extraction, sentiment classification, and causal explanation in a unified paradigm. By leveraging prompt-based guidance, PL-FGSA enhances interpretability and achieves strong performance under both full-data and low-resource conditions. Experiments on three benchmark datasets-SST-2, SemEval-2014 Task 4, and MAMS-demonstrate that our model consistently outperforms traditional fine-tuning methods and achieves F1-scores of 0.922, 0.694, and 0.597, respectively. These results validate the effectiveness of prompt-based generalization and highlight the practical value of PL-FGSA for real-world sentiment analysis tasks.

PL-FGSA: A Prompt Learning Framework for Fine-Grained Sentiment Analysis Based on MindSpore

TL;DR

This work proposes PL-FGSA, a MindSpore-native prompt-learning framework for fine-grained sentiment analysis that unifies aspect extraction, sentiment classification, and causal explanation under a single prompt-guided model with a lightweight TextCNN encoder. By reformulating FGSA as a multi-task prompt-augmented generation problem, PL-FGSA achieves strong performance on SST-2, SemEval-2014 Task 4, and MAMS, including in low-resource and CPU-only settings, while enhancing interpretability through generated explanations. The approach emphasizes parameter efficiency, cross-task synergy, and industrial deployment potential thanks to MindSpore's graph optimization and Ascend compatibility. The results demonstrate robust generalization across granularities and offer a scalable, interpretable solution for real-world opinion mining tasks with practical deployment significance.

Abstract

Fine-grained sentiment analysis (FGSA) aims to identify sentiment polarity toward specific aspects within a text, enabling more precise opinion mining in domains such as product reviews and social media. However, traditional FGSA approaches often require task-specific architectures and extensive annotated data, limiting their generalization and scalability. To address these challenges, we propose PL-FGSA, a unified prompt learning-based framework implemented using the MindSpore platform, which integrates prompt design with a lightweight TextCNN backbone. Our method reformulates FGSA as a multi-task prompt-augmented generation problem, jointly tackling aspect extraction, sentiment classification, and causal explanation in a unified paradigm. By leveraging prompt-based guidance, PL-FGSA enhances interpretability and achieves strong performance under both full-data and low-resource conditions. Experiments on three benchmark datasets-SST-2, SemEval-2014 Task 4, and MAMS-demonstrate that our model consistently outperforms traditional fine-tuning methods and achieves F1-scores of 0.922, 0.694, and 0.597, respectively. These results validate the effectiveness of prompt-based generalization and highlight the practical value of PL-FGSA for real-world sentiment analysis tasks.

Paper Structure

This paper contains 20 sections, 12 equations, 3 figures, 1 table.

Figures (3)

  • Figure 1: The overall architecture of the PL-FGSA framework. Task-specific prompts are prepended to raw sentences to guide the model across different subtasks. The shared encoder extracts local features via convolution and max pooling, which are then passed to dedicated output heads for ATE, ASC, and CEG.
  • Figure 2: An illustrative example of prompt-conditioned input construction for three FGSA subtasks: aspect extraction (AEP), sentiment classification (SCP), and causal explanation generation (CEP).
  • Figure 3: Visualization of PL-FGSA’s performance on SST-2, SemEval, and MAMS datasets across four evaluation metrics: Accuracy, Precision, Recall, and F1 Score.