Zing Forum

Reading

Vietnamese Hate Speech Detection and Explainable AI Practice Based on Qwen2.5-3B and CoT Prompting

This article introduces an innovative Vietnamese hate speech detection project that combines large language models, Chain-of-Thought (CoT) prompting, and QLoRA fine-tuning technology. It not only achieves high-precision classification but also extracts reasoning bases and implicit statements, providing an explainable AI solution for content safety in low-resource languages.

越南语仇恨言论检测可解释AIQwen2.5QLoRA思维链提示内容审核低资源语言大语言模型微调
Published 2026-04-13 20:13Recent activity 2026-04-13 20:23Estimated read 6 min
Vietnamese Hate Speech Detection and Explainable AI Practice Based on Qwen2.5-3B and CoT Prompting
1

Section 01

[Introduction] Vietnamese Hate Speech Detection and Explainable AI Practice Based on Qwen2.5-3B and CoT Prompting

This article introduces an innovative Vietnamese hate speech detection project that combines the Qwen2.5-3B large language model, Chain-of-Thought (CoT) prompting, and QLoRA fine-tuning technology. It achieves high-precision classification while extracting reasoning bases and implicit statements, providing an explainable AI solution for content safety in low-resource languages. This project addresses the issues of non-explainability and insufficient adaptability of existing solutions in Vietnamese hate speech detection, and has important reference value for content governance of low-resource languages in Southeast Asia.

2

Section 02

Project Background and Challenges

Vietnam has a high internet penetration rate and active social media, but research on Vietnamese hate speech detection is scarce. Existing solutions mostly focus on high-resource languages like English, with insufficient understanding of Vietnamese grammar, dialects, and cultural contexts. Traditional detection systems are "black-box" models that only output binary results without explaining the judgment basis, leading to no basis for user appeals, difficulty for auditors to verify, and challenges for regulators to assess fairness. Explainable AI has thus become an urgent need.

3

Section 03

Analysis of Core Technical Architecture

  1. Base Model: Qwen2.5-3B is selected for its multilingual capability (suitable for Vietnamese), high parameter efficiency, and friendly open-source ecosystem; 2. Efficient Fine-tuning: QLoRA technology (4-bit quantization + Low-Rank Adaptation + double quantization) is used, allowing fine-tuning of the 3B model on consumer-grade GPUs; 3. CoT Prompting: The model is required to generate a structured reasoning process (identify harmful elements → analyze context → extract implicit statements → comprehensive judgment), making decisions transparent and traceable.
4

Section 04

Dataset Construction and Annotation Strategy

Data sources include integration of public social media posts, native speaker crowdsourced annotation, and adversarial sample generation; The annotation dimensions are designed with multiple granularities: hate type (race/religion, etc.), attack intensity, target direction (individual/group/institution), and reasoning basis, providing supervision signals for CoT training.

5

Section 05

Experimental Results and Performance Evaluation

Classification Performance: Accuracy exceeds 90%, F1 score for hate speech is ≥0.85 (better than BERT baseline), AUC-ROC is close to 0.95; Explainability: The consistency between reasoning bases and expert annotations exceeds 80%, auditors have higher trust in results with explanations, and explainable outputs help locate model failure modes (e.g., dialect misjudgment).

6

Section 06

Application Scenarios and Practical Value

  1. Social Media Content Moderation: Real-time screening of high-risk content and generation of moderation suggestions; 2. Public Opinion Monitoring: Identifying group conflict risks and providing decision support for governments and enterprises; 3. Academic Tool: Supporting quantitative research on Vietnamese online hate phenomena.
7

Section 07

Limitations and Future Directions

Current Limitations: Limited recognition of Vietnamese dialects/slang, cross-language migration to be explored, high inference latency on edge devices; Future Directions: Build dialect annotation datasets, compress model size using model distillation, introduce multimodal information to handle rich media moderation.

8

Section 08

Project Summary

This project combines large language models, parameter-efficient fine-tuning, and CoT prompting to build an explainable hate speech detection system for low-resource languages. Qwen2.5-3B + QLoRA achieves high performance under limited resources, and CoT improves transparency. This practice has direct value for Vietnamese content safety governance and also provides methodological references for research on other low-resource languages.