A BERT-based multi-task learning framework for social media opinion mining with risk detection

Abstract This paper proposes a BERT-based multi-task learning framework for social media mining and risk detection. Unlike traditional open-loop architectures, the proposed system establishes a closed-loop feedback mechanism among crawling, analysis, and alerting modules, focusing on high-accuracy negative sentiment detection for social risk detection. A dataset of 4,238 texts is constructed, covering eight topic categories and three sentiment labels. A BERT-based multi-task framework with shared encoder and two task-specific heads jointly optimizes topic classification and sentiment analysis. Training uses AdamW (learning rate 2e-5, batch size 16, max length 128) for three epochs. The multi-task BERT model achieves 97.97% F1 for topic classification and 99.89% F1 for sentiment analysis. Negative sentiment detection reaches 100% accuracy. Compared to single-task models (98.34% and 99.76%), the multi-task model maintains comparable topic performance while improving sentiment analysis. Removing pre-training fine-tuning reduces training time by 7.9% with stable performance. The model performs two tasks in one inference, reducing deployment complexity while enabling reliable negative sentiment detection for social media opinion monitoring.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-10-16
DOI
https://doi.org/10.1038/s41598-026-76405-z
Primary Topic
Sentiment Analysis and Opinion Mining
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

A BERT-based multi-task learning framework for social media opinion mining with risk detection

Wei-Wei Liu
Scientific Reports
Sentiment Analysis and Opinion Mining
article

A BERT-based multi-task learning framework for social media opinion mining with risk detection

Wei-Wei Liu
article en

Abstract

Abstract This paper proposes a BERT-based multi-task learning framework for social media mining and risk detection. Unlike traditional open-loop architectures, the proposed system establishes a closed-loop feedback mechanism among crawling, analysis, and alerting modules, focusing on high-accuracy negative sentiment detection for social risk detection. A dataset of 4,238 texts is constructed, covering eight topic categories and three sentiment labels. A BERT-based multi-task framework with shared encoder and two task-specific heads jointly optimizes topic classification and sentiment analysis. Training uses AdamW (learning rate 2e-5, batch size 16, max length 128) for three epochs. The multi-task BERT model achieves 97.97% F1 for topic classification and 99.89% F1 for sentiment analysis. Negative sentiment detection reaches 100% accuracy. Compared to single-task models (98.34% and 99.76%), the multi-task model maintains comparable topic performance while improving sentiment analysis. Removing pre-training fine-tuning reduces training time by 7.9% with stable performance. The model performs two tasks in one inference, reducing deployment complexity while enabling reliable negative sentiment detection for social media opinion monitoring.

Scientific Reports
Education Department of Fujian Province (CN)
Openalex Percentile: Top 13%
Sentiment Analysis and Opinion Mining
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.