CITA: A framework for generating attack and defense data for Chinese implicit toxicityHarder to Defend: Towards Chinese Toxicity Attacks via Implicit Enhancement and Obfuscation Rewriting
CITA generates Chinese implicit toxic text in three stages, with an average ASR of 69.48% across seven detectors (Table 1).
Attack in the red-team evaluation sense: given a Chinese context, the red-team model generates a response so that text independently judged as harmful is judged as safe by the detector. The evaluated detector does not participate in policy optimization; the adversarial detector in ITE only provides a training-time reward. The detector receives the candidate text itself. The victim systems are the seven toxicity detectors.
- Chinese toxicity can rely not on explicit insults but on semantic indirectness and surface obfuscation to preserve harmful intent. The authors believe that existing Chinese resources have limited coverage of these two strategies, and detectors need evaluation that goes beyond explicit wording.
- CITA first pairs toxic posts with contexts for supervised fine-tuning to preserve harmful intent, then uses GRPO to increase indirectness, and finally uses four rewriting agents for homophone, transposition, simplified-traditional mixing, and emoji variants. Evaluation detectors do not participate in this optimization.
- Across the seven detectors, the full CITA average ASR is 69.48%, higher than HIL's 59.51% and HIL+ITE's 68.36% (Table 1). The authors state that the main increase comes from ITE. CITD achieves an average accuracy of 91.97% on the five public test sets (Table 4).
- The authors note that some newly released models were not evaluated, generation was limited to offline single-turn, and defense only used supervised fine-tuning. The experiments covered seven detectors, five public Chinese toxicity datasets, and a scale comparison of Qwen3 from 4B to 32B.
- Evaluated models
- TencentBaiduGemini 3.1 ProClaude Opus 4.6GPT-5.4DeepSeek-R1Qwen3-8BQwen3-4BQwen3-14BQwen3-32BCITD
- Benchmarks
- COLDSWSRSCCDCNTPToxiCN
- Metrics
- ASRclassification accuracy
The researchers propose CITA, a Chinese implicit toxicity attack framework, which enhances the obscurity of expression while preserving harmful intent and adding controlled surface variants through three stages: harmful intent learning, implicit toxicity enhancement, and obfuscation variant rewriting. On the evaluation samples generated by CITA, the seven tested detectors showed significant missed detections, with an average attack success rate (ASR) of 69.48%. Human evaluation also confirmed that harmfulness was preserved and that obscurity and evasiveness increased. As a downstream defense application, the researchers fine-tuned a Chinese implicit toxicity defense model, CITD, using red-team data generated by CITA, showing that such data can improve robustness through additional training. The authors emphasize that CITA is a controlled red-team evaluation and defense data generation framework, not a deployable evasion tool.
Paper analysis
What problem does this paper attempt to solve?
Chinese detectors are prone to missed detection when facing semantic indirectness and surface obfuscation; CITA is used for controlled red-team evaluation.
Chinese toxicity detection lacks controlled evaluation that simultaneously applies semantic indirectness and surface obfuscation.
- Occurrence scenario: The authors state that toxicity in platforms and LLM deployments is not limited to explicit abuse; hostility can be retained after removing obvious words. Chinese has two additional types of pressure: semantic indirectness, where meaning is implied, and surface obfuscation, such as homophones and character-shape perturbations; the authors argue that existing Chinese safety resources have high annotation costs and limited coverage of these strategies.
- Existing gaps: The authors state that implicit toxicity generation, Chinese toxicity benchmarks, and surface rewriting are usually studied separately. There is more work on implicit toxicity in English, while Chinese implicit toxicity remains less explored.
- This paper proposes: The authors propose a controlled red-teaming framework CITA (Chinese Implicit Toxicity Attack), consisting of Harmful Intent Learning, Implicit Toxicity Enhancement, and Obfuscation Variant Rewriting, for detector evaluation and defense data generation. The authors state it is not a deployable evasion tool. Downstream, the generated data is used to fine-tune CITD.
- Threat model:
- Goal: Generate Chinese responses that still contain harmful intent and cause the detector to output safe. ASR only counts samples independently judged harmful by J_tox and judged safe by the detector.
- Knowledge: The detectors used in the final ASR do not participate in policy optimization. ITE's adversarial detector f_adv only provides training-time rewards and is separate from the evaluation detectors.
- Capability: The input is a Chinese discussion context; after the model generates a response, indirectness optimization and specified types of surface rewriting can be applied. The detector f receives the candidate text itself, including existing obfuscation.
- Victim systems: Seven toxicity detectors, including commercial moderation APIs, closed-source LLMs, and open-source Chinese-oriented LLMs.
What related research exists?
The paper discusses LLM red-teaming, implicit toxicity, and Chinese obfuscation detection; the authors state that these lines of work are usually done separately.
The paper divides related work into LLM security red teaming and Chinese toxicity detection with surface obfuscation, and positions generative evaluation accordingly.
LLM security and red-team generation
- Perez et al. (2022): used language models to generate red-team test cases, expanding coverage of possible risks.
- RealToxicityPrompts (Gehman et al., 2020) and ToxiGen (Hartvigsen et al., 2022): the former used real web prompts to evaluate toxic degeneration in neural text; the latter used models to generate adversarial and implicit hate samples.
- HarmBench (Mazeika et al., 2024) and Wen et al. (2023): the former is an automated red-teaming and refusal robustness benchmark; the latter studies LLM generation of implicit toxic text missed by existing detectors and claims reinforcement learning can further enhance this behavior.
Chinese toxicity detection and surface obfuscation
- Chinese resources: Zhou et al. (2022), Jiang et al. (2021), Lu et al. (2023), Yang et al. (2025b), and Bai et al. (2025) are summarized as covering dialogue bias, fine-grained toxicity, cyberbullying, and span-level target-aware hate.
- English implicit hate: Sap et al. (2020) and Vidgen et al. (2021) shift from explicit insults to implicit hate and social context reasoning.
- Chinese cloak and perturbation: ToxiCloakCN (Xiao et al., 2024), multi-perturbation detection (Yang et al., 2025c), homophone graphs with toxic word lists (Ma et al., 2025), and pinyin mask detection (Guo et al., 2025). The authors state these works mainly detect or recover rewritten toxic text.
Baseline methods and benchmarks
- Detection comparison data: COLD, SWSR, SCCD, CNTP, and ToxiCN, used as public ASR comparisons for the seven detectors, not as another set of generators.
- Defense comparisons: the same Qwen3-8B backbone fine-tuned separately on each public training set, plus a five-source balanced mixture, Mixed.
The authors place this paper on red-team generation, but scope it to Chinese implicit toxicity: handling both semantic indirectness and Obfuscation Variant Rewriting, and using it for detector evaluation and defense training, rather than only detection or recovery.
How does the paper address this problem?
CITA is divided into HIL, ITE, and OVR: first preserve harmful intent, then increase indirectness and perform four types of surface rewriting.
CITA is a three-stage generative red-teaming approach: first learn to produce harmful responses in natural contexts, then use rewards to increase semantic indirectness, and finally apply controlled surface variants. The authors state the goal is to audit detectors and generate defense data, not to build a deployable attack system.
Problem setup and success criteria
- Input and output: Given a Chinese discussion context q, the red-team model π_θ generates a response y. Stage s is HIL, HIL+ITE, or full CITA. HIL and ITE count each sample as one response; full CITA counts each retained OVR variant separately, because the surface forms differ.
- ASR: Computed only on samples independently judged as harmful. ASRs(f)=|{y∈ Ys:Jtox(y)=1∧ f(y)=safe}|/|{y∈ Ys:Jtox(y)=1}|. The meaning is: the denominator excludes harmless generations, and the numerator is the number among them judged safe by the detector. J_tox does not serve as a GRPO reward model.
- Denominator size: The paper gives 725 toxic samples for HIL and 1,055 for ITE; the full CITA denominator is the set of retained OVR variants independently judged harmful, and the main text does not give the count.
Harmful Intent Learning
- Data: Context-response pairs are constructed from existing Chinese toxic posts, sourced from Jiang et al. (2021), Deng et al. (2022), Lu et al. (2023), Yang et al. (2025b,c). Samples with incomplete content are first removed, then split into training and evaluation.
- Context: For each retained toxic post y, GPT-4o-mini generates a short Chinese context q, required to plausibly elicit y while preserving the original target and stance and not introducing unrelated harmful content. Pairs that are inconsistent, duplicated, change harmfulness, or lack contextual support are discarded; ambiguous samples are deleted rather than repaired.
- Training: Standard autoregressive supervised fine-tuning on the filtered D_hil. Implemented with batch size 16, learning rate 1×10−5, 3 epochs.
Implicit Toxicity Enhancement
- Reward: For the same q, a set of responses is sampled, and the reward is the weighted sum of the detector-evasion term and the quality term. r(y,q;fadv)=λeva reva(y;fadv)+λqual rqual(y,q). r_eva is 1 when f_adv judges safe and −1 when it judges toxic; r_qual is (s_qual−1)/4, ranging from 0 to 1. s_qual is scored 1–5 by an LLM on four dimensions: harmful intent preservation, indirectness, naturalness, and no obvious toxicity markers. A score of 1 corresponds to failure or non-toxicity, and 5 corresponds to all four dimensions being satisfied.
- Optimization: Within-group mean and standard deviation are used for normalized advantages, then updates follow GRPO (Shao et al., 2024). The reference model is the HIL model, and probability-ratio clipping and KL regularization are used. Implementation uses 8 rollouts per prompt, batch size 8, learning rate 1×10−6, KL coefficient 0.05, 1 epoch.
- Isolation: f_adv and the quality judge are both GPT-4o-mini in implementation and are used only for ITE training. The final ASR detectors and J_tox are separate from them. The main text points λ_eva and λ_qual to the appendix without giving values. Appendix E gives the generation and quality reward prompts; sentence-level constraints therein are not elaborated here.
Obfuscation Variant Rewriting
- Four variant types: Homophone Replacement (replace with homophones or near-homophones), Character Transposition (swap adjacent characters within sensitive segments while maintaining readability), Traditional Mixing (convert simplified to traditional or mix), Emoji-based Substitution (replace toxicity- or identity-related words with emojis pointing to the same target or attitude). Given an ITE output y and type c, the corresponding agent produces y^(c)=R_c(y).
- Agents: All four rewriting agents are initialized from Qwen3-0.6B and fine-tuned with type-specific supervised learning on paired original and obfuscated expressions from CNTP. Implementation uses 3,000 randomly selected samples per type, batch size 16, learning rate 1×10−5, 3 epochs. The paper states that manual quality checks were also performed, requiring that rewrites be readable, preserve harmful intent, and match the specified type. Appendix E gives the rewriting prompts.
Implementation scale
- Split: After filtering, 13,603 pairs are obtained, with 12,242 for training and 1,361 evaluation contexts (Table 5). Candidate toxic responses come from five public sets, with post-filtering proportions of COLD 19.74%, SWSR 18.12%, SCCD 19.74%, CNTP 18.75%, ToxiCN 23.66%.
- Backbone: Both the CITA generator and CITD are initialized from Qwen3-8B. HIL and ITE are evaluated on the same held-out context set. Manual verification is performed after each stage; toxic samples increase from 725 in HIL to 1,055 in ITE, which are then fed to OVR. Experiments are run on eight NVIDIA A100 GPUs.
What experiments did the paper conduct?
The average ASR of full CITA across seven detectors is 69.48%; the authors state the main increase comes from ITE.
Experimental setup
- Detectors: Tencent and Baidu, two commercial moderation APIs; closed-source Gemini 3.1 Pro, Claude Opus 4.6, GPT-5.4 (identified in Appendix C as gemini-3.1-pro-preview, claude-opus-4-6, gpt-5.4); open-source DeepSeek-R1 and Qwen3-8B (corresponding in Appendix C to deepseek-ai/DeepSeek-R1, Qwen/Qwen3-8B). 7 in total.
- Generator relationship: The CITA generator is initialized from Qwen3-8B and then undergoes HIL/ITE. The paper does not state that the Qwen3-8B detector in Table 1 uses these fine-tuned weights.
- Data: Public baselines are COLD, SWSR, SCCD, CNTP, ToxiCN. Generation evaluation uses 1,361 held-out contexts; the ASR denominator is independently toxicity-judged samples, 725 for HIL and 1,055 for ITE. Section 4.1 states that the final CITA is the average performance across the four OVR variants.
- Metrics: ASR is computed only on toxicity-judged samples; higher means more missed detections judged safe. The authors state that this metric is used only for evaluation. Defense experiments use classification accuracy.
- Review: Training-time quality scoring and adversarial detection are done by GPT-4o-mini and are not used in the final ASR. The main text does not give the judgment prompts or thresholds for the seven detectors. Human quality annotation uses 3 annotators with Chinese linguistics backgrounds. The paper does not report the number of ASR repetitions.
Main results
According to Table 1, units are ASR (%). The SCCD column is the public baseline with the highest average ASR, not the highest public set for each detector.
Swipe horizontally to read the table
Detector HIL HIL+ITE CITA SCCD Tencent 84.14 90.33 91.78 86.40 Baidu 83.72 90.05 91.16 90.20 Gemini 3.1 Pro 70.90 79.15 78.65 63.70 Claude Opus 4.6 55.17 64.93 67.75 40.20 GPT-5.4 55.86 67.49 68.77 61.60 DeepSeek-R1 34.21 41.80 41.61 31.80 Qwen3-8B 32.55 44.80 46.66 43.10 - Average: The authors report a CITA average ASR of 69.48%, HIL of 59.51%, and HIL+ITE of 68.36%. The authors state that the increase from HIL to HIL+ITE is 8.85%, and OVR only goes from 68.36% to 69.48%, so ITE carries most of the pressure, with OVR as a subsequent surface pressure test. The authors state that CITA is 9.91% higher than the SCCD average ASR of 59.57%.
- Exceptions: Gemini 3.1 Pro's CITA is 78.65%, lower than HIL+ITE's 79.15%; DeepSeek-R1 is 41.61%, lower than HIL+ITE's 41.80%. Not every detector is higher on the full pipeline.
- Detector differences: The authors state that commercial APIs have higher missed detections; on CITA, Tencent is 91.78% and Baidu is 91.16%. The authors state that DeepSeek-R1 and Qwen3-8B are relatively more robust, still at 41.61% and 46.66% on CITA. In Table 1, on SCCD, Qwen3 is 43.10%, higher than Claude's 40.20%; on COLD, the highest is Baidu at 75.30%, and Tencent is 64.30%, lower than Gemini's 68.20%.
Human evaluation
- What was measured: 3 annotators rate HIL, HIL+ITE, and full CITA on a five-point Likert scale, with dimensions of harmfulness, implicitness, naturalness, and evasiveness. Annotations are first averaged per sample, then averaged across items within a stage. Krippendorff's α is 0.783, 0.808, 0.813, 0.833 (Table 6). The paper does not report the number of annotated samples.
- Results: The authors state that ITE is higher than HIL on all four dimensions, giving implicitness from 3.47 to 4.00, evasiveness from 3.03 to 3.77, and naturalness from 3.95 to 4.20. After OVR, evasiveness reaches 4.05 and naturalness drops from 4.20 to 3.59; full CITA harmfulness is 3.97.
- Authors' interpretation: The authors state that OVR is a trade-off between surface obfuscation and fluency, with harmful intent still preserved; this human study is used to validate the generated data and is separate from the detector ASR in Table 1.
Obfuscation variants and intent categories
- Four rewriting types: Table 2 covers only GPT-5.4, Claude Opus 4.6, Gemini 3.1 Pro, and Qwen3. The four-type average ASR ranges from 63.60% to 68.11%; Homophone Replacement has the highest average at 68.11%, and Emoji-based Substitution has the lowest average at 63.60%. The four-type column averages match the CITA values in Table 1: Gemini 78.65%, GPT 68.77%, Claude 67.75%, Qwen3 46.66%.
- Inconsistency with the authors' claims: The authors state that Traditional-Simplified Mixing performs best on Gemini and Qwen3. In Table 2, Gemini's Trad. is 79.81%, the highest of the four types for that detector; Qwen's Trad. is 45.59%, lower than Homo.'s 52.99%. The authors state that no single strategy is consistently dominant, which is consistent with the different highest types across detectors.
- Intent categories: Table 3 manually classifies original posts into Direct Attack, Discrimination, Stereotype, and Sarcasm, and reports HIL, ITE, and OVR on GPT-5.4, Claude Opus 4.6, and Gemini 3.1 Pro. For the sarcasm category from HIL to ITE, GPT goes from 60.49% to 82.73%, and Claude from 58.02% to 80.91%. The authors state that sarcasm is often the hardest, and direct attack is relatively lower on GPT and Claude. Gemini's Discrimination goes from 83.52% in ITE to 82.87% in OVR, and Stereotype from 77.91% to 76.16%, so not all categories are higher after OVR. The paper does not report the number of samples per category.
Defense training
- Setup: Qwen3-8B is trained with CITA toxic samples as positives and non-toxic samples from public training sets as negatives, class-balanced, to obtain CITD. Baselines use the same backbone, class balance, training count, budget, and optimization settings, fine-tuned on each of the five public sets or Mixed. Non-toxic samples come from the training split and direct overlap with the five test sets is removed. Each test set has 1,000 toxic plus 500 non-toxic samples. The authors state that this experiment does not perform attack optimization against the public test detectors. Blue-team training uses batch size 8, learning rate 1×10−5, 2 epochs. The paper does not give the specific training count.
- Results: CITD average accuracy is 91.97%, and Mixed is 90.83% (Table 4). CITD on SWSR, SCCD, and ToxiCN is 91.33%, 93.73%, and 91.47%, higher than the other training rows in the table.
- Exceptions: On COLD, in-domain fine-tuning is 94.33%, higher than CITD's 88.80%; on CNTP, in-domain is 97.60% and Mixed is 98.53%, higher than CITD's 94.53%. The authors state that generated data is a supplement, not a replacement for benchmark-specific supervision.
Other ablations and analyses
- Reward ablation (Table 7, ITE, detectors are GPT, Claude, Qwen): after removing the quality reward, the human toxicity-judged proportion is 9.60%, and the paper does not report ASR; after removing the evasion reward, the toxicity-judged proportion is 52.75%, and the three-detector average ASR is 53.11%; with the full reward, the toxicity-judged proportion is 77.51%, the average ASR is 59.07%, and human harmfulness, implicitness, naturalness, and evasiveness are 4.15, 4.00, 4.20, 3.77.
- Rewriter ablation (Table 8, GPT, Claude, Qwen): zero-shot Qwen3-0.6B average ASR is 45.35%, and the fine-tuned OVR agents achieve 61.06%.
- Scale (Appendix G.3): The authors state that Qwen3-14B has the highest ASR on all four groups in the figure, with public-set average 42.12% and obfuscated rewriting variants 65.14%; Qwen3-32B is 51.00% on obfuscated rewriting variants. The authors state that increasing parameter count does not monotonically reduce ASR. On Qwen3-4B, 14B, and 32B, the ITE increase over HIL is 6.64%, 10.65%, and 11.55%.
- Appendix G.4 uses two qualitative examples to compare HIL, ITE, and the four OVR surface rewrites; the example sentences are not reproduced here.
What are some points that can be further explored?
The authors note that some new models were not evaluated, generation is limited to offline single-turn, and defense only used supervised fine-tuning.
Limitations and future directions noted by the authors
- Model scope: Due to access and compute constraints, some newly released large language models were not evaluated; the authors plan to add more models when resources allow (Limitations).
- Interaction format: The current implicit toxicity red-teaming data focuses on offline single-turn; the authors state that future work should incorporate more realistic multi-turn dialogues and multimodal community contexts (Limitations).
- Defense training: Defense experiments are limited to supervised fine-tuning; the authors state that future work will explore broader post-training techniques, as well as iterative red-team/blue-team training (Limitations).
Experimental coverage
- Detectors: The main ASR table covers Tencent, Baidu, Gemini 3.1 Pro, Claude Opus 4.6, GPT-5.4, DeepSeek-R1, Qwen3-8B, 7 in total (Section 4.1, Table 1).
- Data and denominators: Public baselines are COLD, SWSR, SCCD, CNTP, ToxiCN; generation evaluation uses 1,361 held-out contexts, and the ASR denominators for HIL and ITE are 725 and 1,055 toxicity-judged samples (Sections 3.2, 3.6). The paper does not give the full CITA OVR toxicity-judged denominator count, nor does it report ASR repetition counts.
- Same-family scale: Appendix G.3 and Figure 8 compare Qwen3-4B, Qwen3-8B, Qwen3-14B, Qwen3-32B. Variant diagnostics Table 2 and category analysis Table 3 do not include Tencent, Baidu, DeepSeek-R1.
- Defense and human evaluation: Defense is supervised fine-tuning on Qwen3-8B, with 1,000 toxic plus 500 non-toxic samples per test set (Section 4.6, Table 4). Human quality annotation is 3 annotators, four-dimensional Likert, and Krippendorff's α is reported (Section 4.3, Table 6). The paper does not report the number of human-evaluated samples, nor inter-annotator agreement on the toxicity judgments used as the ASR denominator.
- Training-side models and hyperparameters: Context generation, ITE quality judging, and the adversarial detector use GPT-4o-mini; OVR agents are fine-tuned from Qwen3-0.6B. ITE uses 8 rollouts per prompt, KL coefficient 0.05, 1 epoch (Section 3.6, Appendix D). The main text does not give specific values for λ_eva, λ_qual, and detector thresholds, only pointing to the appendix.
Summarize the main content of the paper
CITA generates implicit and surface-rewritten Chinese toxic samples, with an average ASR of 69.48% across seven detectors.
CITA is a controlled red-teaming framework for Chinese toxicity detectors, used to create evaluation samples and defense training data; the authors state that it is not intended as a deployable attack tool.
- Problem: Toxicity can retain hostility even after removing obvious wording. The authors argue that Chinese has both semantic indirectness and surface obfuscation, while existing generation, benchmark, and rewriting work typically covers only one of these aspects.
- Method: HIL pairs public toxic posts with GPT-4o-mini-written contexts and performs supervised fine-tuning on Qwen3-8B. ITE uses GRPO, with rewards from whether the training-time adversarial detector judges the output as safe, plus a four-dimensional quality score; evaluation detectors do not enter this optimization. OVR uses four agents fine-tuned from Qwen3-0.6B, performing homophone substitution, adjacent-character transposition, simplified-traditional mixing, and emoji substitution. ASR is computed only on samples independently judged as harmful.
- Detection results: In Table 1, the full CITA average ASR across seven detectors is 69.48%, HIL is 59.51%, and HIL+ITE is 68.36%. The authors state that the main increase comes from ITE. On CITA, Tencent is 91.78%, Baidu is 91.16%, DeepSeek-R1 is 41.61%, and Qwen3-8B is 46.66%. For Gemini and DeepSeek-R1, full CITA is not higher than their respective HIL+ITE.
- Human evaluation and defense: Full CITA harmfulness is 3.97; after OVR, evasiveness is 4.05, and naturalness drops from 4.20 to 3.59. CITD achieves an average accuracy of 91.97% on the five public test sets, and Mixed achieves 90.83%, but on COLD and CNTP it does not exceed the strongest in-domain or mixed baseline.
- Authors' conclusions: The authors argue that effective detector evasion should preserve harmful intent while increasing indirectness and evasiveness; semantic indirectness is the main pressure, with surface obfuscation as an additional pressure afterward. The authors argue that Chinese toxicity evaluation should include implicit samples beyond explicit words, and that validated generated data can serve as defense supervision.