Sentiment classification of stock forum text based on a parameter-decoupled ERNIE-Transformer architecture

Abstract To address the challenges of diverse domain-specific terminology, highly colloquial expressions, and limited annotated samples in sentiment analysis of stock forum texts, this study proposes an ERNIE-Transformer sentiment classification model that integrates ERNIE and Transformer architectures. First, a systematic data preprocessing pipeline was developed, including sentiment label annotation, text cleaning, tokenization, stop-word removal, and sequence length normalization, to construct a high-quality classification corpus. Second, the knowledge-enhanced pretrained ERNIE model was employed as a fixed feature extractor to transform the preprocessed texts into high-dimensional dense vector representations, effectively capturing domain-specific semantics and contextual dependencies in Chinese financial texts. Third, a multi-layer stacked Transformer encoder was introduced as a lightweight classifier. Through the multi-head self-attention mechanism, the encoder performs secondary discriminative feature extraction and adaptive weight allocation on the sentence-level embeddings generated by ERNIE, thereby strengthening semantic signals that contribute significantly to classification decisions. Finally, grid search was applied to optimize key hyperparameters, while early stopping and learning rate scheduling strategies were incorporated to improve the model’s generalization capability.Experiments conducted on a dataset of 6,000 investor comments collected from the Eastmoney Stock Forum, consisting of three sentiment categories (positive, neutral, and negative) with an approximate distribution ratio of 35%/30%/35%, demonstrate that the proposed model achieves accuracy, precision, recall, and F1-score values of 92.75%, 89.14%, 87.21%, and 88.12%, respectively. Compared with the ERNIE fine-tuning baseline, the proposed model improves accuracy, precision, recall, and F1-score by 0.17, 0.70, − 0.25, and 0.20% points, respectively. Compared with the BERT-based Transformer baseline, it achieves improvements of 1.67, 3.35, 3.01, and 3.20% points in the four evaluation metrics. The experimental results indicate that the proposed approach achieves high classification accuracy for financial forum text sentiment analysis. Its decoupled architecture provides an efficient and accurate solution for investor sentiment monitoring.

Authors

Institutions

Publication Details

Journal
Journal of Electrical Systems and Information Technology
Published
2026-09-16
DOI
https://doi.org/10.1186/s43067-026-00399-x
Primary Topic
Stock Market Forecasting Methods
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
article

Sentiment classification of stock forum text based on a parameter-decoupled ERNIE-Transformer architecture

Ling Wenchao, Xiumei Li, Kun Chen, Chen Fei
Journal of Electrical Systems and Information Technology
Stock Market Forecasting Methods
article

Sentiment classification of stock forum text based on a parameter-decoupled ERNIE-Transformer architecture

Ling Wenchao, Xiumei Li, Kun Chen, Chen Fei
article en

Abstract

Abstract To address the challenges of diverse domain-specific terminology, highly colloquial expressions, and limited annotated samples in sentiment analysis of stock forum texts, this study proposes an ERNIE-Transformer sentiment classification model that integrates ERNIE and Transformer architectures. First, a systematic data preprocessing pipeline was developed, including sentiment label annotation, text cleaning, tokenization, stop-word removal, and sequence length normalization, to construct a high-quality classification corpus. Second, the knowledge-enhanced pretrained ERNIE model was employed as a fixed feature extractor to transform the preprocessed texts into high-dimensional dense vector representations, effectively capturing domain-specific semantics and contextual dependencies in Chinese financial texts. Third, a multi-layer stacked Transformer encoder was introduced as a lightweight classifier. Through the multi-head self-attention mechanism, the encoder performs secondary discriminative feature extraction and adaptive weight allocation on the sentence-level embeddings generated by ERNIE, thereby strengthening semantic signals that contribute significantly to classification decisions. Finally, grid search was applied to optimize key hyperparameters, while early stopping and learning rate scheduling strategies were incorporated to improve the model’s generalization capability.Experiments conducted on a dataset of 6,000 investor comments collected from the Eastmoney Stock Forum, consisting of three sentiment categories (positive, neutral, and negative) with an approximate distribution ratio of 35%/30%/35%, demonstrate that the proposed model achieves accuracy, precision, recall, and F1-score values of 92.75%, 89.14%, 87.21%, and 88.12%, respectively. Compared with the ERNIE fine-tuning baseline, the proposed model improves accuracy, precision, recall, and F1-score by 0.17, 0.70, − 0.25, and 0.20% points, respectively. Compared with the BERT-based Transformer baseline, it achieves improvements of 1.67, 3.35, 3.01, and 3.20% points in the four evaluation metrics. The experimental results indicate that the proposed approach achieves high classification accuracy for financial forum text sentiment analysis. Its decoupled architecture provides an efficient and accurate solution for investor sentiment monitoring.

Journal of Electrical Systems and Information TechnologyVol. 13(1)
Dalian Jiaotong University (CN)
Reduced inequalities
Openalex Percentile: Top 7%
Stock Market Forecasting Methods
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.