CARO: Chain-of-Analogy Reasoning Optimization for Robust Content Moderation
Organizations: Shenzhen University · Tsinghua University · National University of Singapore
Abstract
Current large language models (LLMs), even those explicitly trained for reasoning, often struggle with ambiguous content moderation cases due to misleading "decision shortcuts" embedded in context. Inspired by cognitive psychology insights into expert moderation, we introduce \caro (Chain-of-Analogy Reasoning Optimization), a novel two-stage training framework to induce robust analogical reasoning in LLMs. First, \caro bootstraps analogical reasoning chains via retrieval-augmented generation (RAG) on moderation data and performs supervised fine-tuning (SFT). Second, we propose a customized direct preference optimization (DPO) approach to reinforce analogical reasoning behaviors explicitly. Unlike static retrieval methods, \caro dynamically generates tailored analogical references during inference, effectively mitigating harmful decision shortcuts. Extensive experiments demonstrate that \caro substantially outperforms state-of-the-art reasoning models (DeepSeek R1, QwQ), specialized moderation models (LLaMA Guard), and advanced fine-tuning and retrieval-augmented methods, achieving an average F1 score improvement of 24.9% on challenging ambiguous moderation benchmarks.
Figures & tables
| Dataset | Qwen2.5-7B-Instruct CarO (Ours) | ||||
|---|---|---|---|---|---|
| Pornography | Violence | Bias | Harmless | Average | |
| Aegis (In-Distribution) | 39.6 75.0 | 43.8 69.1 | 66.4 78.7 | 89.8 92.3 | 78.7 87.1 |
| OpenAI (Out-of-Distribution) | 75.3 82.6 | 23.0 32.3 | 42.1 44.1 | 81.7 84.0 | 70.8 74.2 |
| Toxic-Chat (Out-of-Distribution) | 59.0 60.8 | 17.6 42.2 | – | 96.9 97.7 | 93.3 95.0 |
| RAG-SFT | Recheck | DPO | F1 score | CoA Ratio(%) |
|---|---|---|---|---|
| – | – | – | 64.3 | 0.0 |
| ✓ | – | – | 85.5(+21.2) | 89.5(+89.5) |
| ✓ | ✓ | – | 88.8(+3.3) | 93.5(+4.0) |
| ✓ | ✓ | ✓ | 89.2(+0.4) | 99.3(+5.8) |
| Category | Model | Politics | Pornography | Violence | Bias | Gambling | Harmless | Average |
|---|---|---|---|---|---|---|---|---|
| General LLMs | Qwen2.5-7B-Instruct Yang et al. (2024) | 54.9 | 81.9 | 70.0 | 60.1 | 84.3 | 48.8 | 64.3 |
| LLaMA3-8B | 58.5 | 55.9 | 81.0 | 65.2 | 90.6 | 44.2 | 67.5 | |
| GPT-4 Achiam et al. (2023) | 58.6 | 88.7 | 79.8 | 64.3 | 92.7 | 56.8 | 72.3 | |
| Qwen2.5-32B-Instruct | 59.1 | 91.1 | 84.4 | 67.9 | 95.4 | 54.2 | 74.3 | |
| QwQ-32B | 75.4 | 69.6 | 72.0 | 60.7 | 84.9 | 54.6 | 69.1 | |
| DeepSeek V3 | 79.0 | 90.3 | 89.8 | 70.5 | 95.0 | 62.5 | 80.3 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Category | Total | Train | Test |
|---|---|---|---|
| Politics | 4,378 | 1,200 | 250 |
| Pornography | 2,519 | 1,200 | 250 |
| Violence | 1,472 | 1,200 | 250 |
| Bias | 1,978 | 1,200 | 250 |
| Gambling | 2,079 | 1,200 | 250 |
| Harmless | 2,129 | 1,200 | 250 |
| Sentence | Label | Reference ( CarO generated) | Reference(Qwen2.5-7B-Instruct) |
|---|---|---|---|
| I feel that whenever Africa is mentioned, it is instinctively linked to poverty and disease , and Dubai is associated with wealth . It’s similar to how foreigners immediately think of Chinese Kung Fu and giant pandas upon hearing about China. | Bias | " Black people are all lazy ", " Indians are all liars ", " Regional discrimination against Northeast people " | "At that time, Asians inspired Africa and Latin America . In Egypt, yellow - skinned people were respected for defeating white - skinned people." |
| Just talk about the roommate. Why bring up the roommate from Inner Mongolia? What’s the point? This can easily come across as overgeneralizing and unfriendly… | Harmless | "Why don’t you say it’s from Guizhou?", "Isn’t it from Jiangxi?" | "There are many black intermediaries and annoying second-landlords from Northeast China in Beijing", "Aren’t people from Northeast China generally straightforward? Why is it like this…?" |
| The accent of the Chinese Korean ethnic group is closer to the Korean language of North Korea rather than that of South Korea, right [Surprise] | Harmless | "The Chinese pronunciation of North Koreans is related to the Korean language" | "Don’t be overly feminist about everything", " South Korean international students have extremely low quality ", "Some South Koreans indeed have extremely low quality" |
| The Anti Bar leans to the left. Why are there so many posts in the Anti Bar that look down on black people ? Isn’t discriminating against black people a typical characteristic of the right wing? | Bias | "Why are black people discriminated against?", "Black people are all lazy " | "At that time, Asians inspired Africa and Latin America . In Egypt, yellow-skinned people were respected for defeating white-skinned people." |