COLD: A Benchmark for Chinese Offensive Language Detection
Paper · 2022 · Jiawen Deng, Jingyan Zhou, Hao Sun et al.
Summary
A comment can repeat a stereotype to challenge it. A filter that flags the comment because it recognizes the stereotype can end up suppressing the very speech that pushes back against abuse. The same distinction matters when a comment is used to test a dialogue system. An input that challenges prejudice can receive a reply that expresses it. COLD gives researchers a way to study both problems in Chinese, where the authors found few publicly available resources for detecting offensive language across several topics.
The benchmark pairs a dataset, released as COLDataset, with a detector trained on it. The dataset contains 37,480 comments collected from Zhihu and Weibo around discussions of race, gender, and region. Each comment has a binary label for offensiveness. In the 5,323-comment test set, human annotators also distinguish attacks on individuals, attacks on groups, speech that counters bias, and other non-offensive speech. These distinctions show where a detector succeeds and what kinds of mistakes its overall score can conceal. They also let the authors use different kinds of comments as prompts when evaluating generated text.
The COLD detector, built by adapting Chinese BERT, reaches 81% accuracy on the COLD test set. The Baidu Text Censor service reaches 0.63 accuracy on the same test, and a detector trained on comments translated from the English Jigsaw dataset reaches 0.60. The COLD detector recognizes attacks on both individuals and groups much more often than it correctly clears comments that oppose bias. Its accuracy on the anti-bias subset is 38.32%. The paper describes a recurring failure in which a comment brings up discrimination and then rejects it, while the detector appears to give more weight to the first part.
The generation experiments find offensive outputs after both offensive and non-offensive prompts. Among the systems evaluated, CPM-Generate has the highest automatically measured overall offensive rate on prompts from the COLD training set, at 32.14%. A separate human evaluation also puts it highest overall among those systems. Tests with constructed prompts show that the measured rate varies with the group named and the wording used to convey an attitude. Even negating a strongly negative expression leaves a high rate in the templates examined. COLD thus makes it possible to measure a problem that a test restricted to plainly abusive prompts would miss. The paper also documents a limit of its detector in dialogue, where a seemingly mild reply can endorse an earlier attack through agreement alone.
Deep dive: COLD: A Benchmark for Chinese Offensive Language Detection
COLD benchmarks offensive language detection in Chinese social media and tests when Chinese text generators produce offensive replies. · about 34 minutes to read
The problem and its context
Detecting an attack takes more than recognizing its vocabulary
The detection task starts with a short piece of text and asks whether it attacks a person or a group. The answer can be obvious when an insult has a clear target. It becomes harder when the attack is indirect, when the target is implied, or when the comment mentions a prejudiced statement in order to object to it. The authors encountered these distinctions while examining Chinese social platforms and generated text. In discussions of racial, gender, and regional bias, they observed name-calling and verbal aggression alongside speech about those same behaviors. A test built around these discussions has to account for the relationship between the words, the target, and the speaker’s stance.
The paper uses offensive language, toxic language, and hate speech as closely related terms for its own purposes. Its practical definition centers on attacks directed at individuals or groups and includes explicit and implicit forms. A personal insult falls within its scope alongside a hostile generalization about people who share a social identity. This broad use of the terms matters when interpreting the benchmark. A reader interested specifically in hostility towards groups can examine that subset of the test set. The main detection score covers the broader task. Earlier work cited by the authors also treats the target and form of an attack as dimensions that a dataset can distinguish. Understanding Abuse and Predicting the Type and Target of Offensive Posts
A keyword filter offers a straightforward implementation. It flags a comment when a listed word appears. The difficulty is that the same expression can participate in an attack, describe an incident, identify the target of discrimination, or introduce a rebuttal. Coverage poses a different problem. A list can miss a newly coined expression or an indirect attack even when all its existing entries are relevant. The paper describes keyword and topic-based approaches as part of the history of automatic hate speech detection. It situates COLD in the subsequent move towards learning from labeled examples, where the classifier can consider a word in relation to the rest of the comment. Detecting Hate Speech on the World Wide Web and A Survey on Hate Speech Detection using Natural Language Processing
English supplied much of the earlier infrastructure discussed in the paper. The authors point to datasets that support work on personal attacks, the classification of offensive posts, and tests of toxicity in generated text. They also describe PerspectiveAPI as a widely used service for evaluating toxicity. These resources illustrate the different jobs a benchmark can support. A collection of labeled comments can train a classifier. A collection of prompts can help evaluate a generator. An automatic service can score texts that would otherwise need to be reviewed individually. For Chinese, the authors saw a shortage of freely available data and of detectors they could rely on for those jobs. Automated Hate Speech Detection and the Problem of Offensive Language and RealToxicityPrompts
What existing Chinese resources covered
The paper describes Chinese datasets with several related but distinct purposes. Yang and Lin collected material for detecting and rephrasing profanity. A dataset from Jiang and colleagues focused on gender-related abuse. Zhou and colleagues studied social bias in dialogue, including implicit attitudes towards groups. Tang and colleagues developed COLA for categorizing offensive language in Chinese social networks, but COLD’s authors report that it was unavailable at the time of writing. Their claim about the resource gap is therefore specific to availability and scope. They wanted an open Chinese dataset covering targeted attacks across several topics and providing examples of acceptable speech about those topics as well.
Translating an existing English resource was another way to obtain Chinese text with labels. The paper takes that possibility seriously enough to build a baseline around it. The question is whether the label and the evidence for it survive the move between languages and domains. The authors emphasize differences in linguistic expression and cultural background. A translated comment can retain its broad meaning while changing the familiarity, force, or social significance of the expression that made it offensive. A translated collection also starts from the topics and interactions represented in its source. These are reasons to test transfer with actual Chinese comments. Machine translation and Exposing the Limits of Zero-shot Cross-lingual Hate Speech Detection
From judging comments to testing generated text
Earlier safety research, as the paper presents it, asked what can be learned from how a pretrained system completes a carefully chosen input. One line of work used fill-in-the-blank statements to examine what a system associates with a person, group, or concept. The general probing approach had also been used to study factual knowledge. Safety studies applied related ideas to stereotypes, toxicity, and moral judgments. A completion can make an association observable, but how it is elicited depends on how the input is written. This line of work also gives COLD a candidate detection method. It can ask a pretrained system to complete a sentence containing a question about whether a comment is offensive. Language Models as Knowledge Bases? and StereoSet
Another line of research tested what systems generate in simulated conversations. Here the response is the object of evaluation. Studies cited by COLD considered fairness, political behavior, and whether a dialogue system would agree with offensive content. RealToxicityPrompts provided a precedent for testing a range of input toxicity, since harmful continuations can follow prompts with different toxicity levels. COLD adopts the broad strategy of using prompts to draw out possible failures. Its test annotations add a distinction between an ordinary non-offensive prompt and one that explicitly pushes back against bias. That makes the stance of the input part of the experiment. Dialogue systems, Does Gender Matter?, and On the Safety of Conversational Models
The method, step by step
Collect comments by topic and by discussion
The authors began by examining Chinese social media and the output of Chinese text generators. They chose race, gender, and region because discussions in these areas repeatedly included verbal attacks. They then drew candidate comments from Zhihu and Weibo. Offensive comments were sparse in the material they examined, which the authors attributed to platform moderation. To obtain enough examples for training and evaluation, they combined searches for specific expressions with collection from discussions already centered on the topics of interest.
For the keyword searches, the authors assembled topic-specific lists. These contained words for the kinds of discrimination under study, names or descriptions of groups, and derogatory terms. A reference to a province could bring in a comment relevant to regional bias even when the comment itself was friendly, factual, or critical of discrimination. Retrieval at this stage indicated topical relevance. The decision about offensiveness came later. This let the collection retain opposing stances and ordinary references alongside attacks that used the same vocabulary.
The other route started with widely discussed subtopics on Zhihu. Here the authors collected follow-up comments from the discussion rather than asking whether each comment matched a term in the retrieval list. A person already participating in a thread may refer to a group indirectly or assume that readers understand the issue from earlier messages. Collecting by discussion gives such comments a chance of entering the pool. The authors cleaned and combined the comments from the two routes before selecting items for labeling.
The preprocessing retained comments between 5 and 200 tokens, the units used in processing the text. The authors removed items such as emojis, URLs, usernames, and whitespace during cleaning and deduplicated the material. The resulting input to the detector was the cleaned comment. A name of a group could remain when it was part of the sentence, while a username or a link could be removed. This setup concentrates the task on written expressions within the comment, a choice that becomes important when interpreting errors that depend on cues elsewhere in a discussion. Tokenization
How COLD builds its dataset and detector
The steps in order.
Use predictions to decide where to spend annotation effort
The authors started with 500 sentences that people labeled for offensiveness. These examples trained an initial Chinese BERT classifier, which scored more comments from the candidate pool. The authors sorted the scored comments into intervals. An interval near the high end gave them a set the classifier considered relatively likely to be offensive. An interval in the middle could contain examples about which the classifier was uncertain. Grouping by score made it possible to audit parts of the candidate pool separately, even while the classifier was still developing.
For training data, an annotator manually labeled around 10% of the comments in each score interval. When the classifier’s predicted labels reached 90% accuracy in that check, the authors added the bin to the training set with its predicted labels. When the check fell short, they had the entire bin relabeled manually before adding it. A prediction thus served both as a way to find examples and, when supported by the audit, as a way to label them at scale. The acceptance criterion applied to the checked sample from a bin. Individual comments outside that sample in an accepted bin could retain an incorrect prediction.
Training and selection proceeded over 6 rounds. In the first five rounds the authors added training and test material. In the sixth they expanded the training data alone. The collection classifier was fine-tuned with updated data from earlier rounds before it was used to guide the next round. The early scores illustrate why the audit mattered. The authors report 58% accuracy for the classifier in the first round, with its predicted probabilities concentrated between 0.2 and 0.5 and a tendency to classify comments as non-offensive. The team selected examples in that score range for annotation. Later, as predictions towards the high end became more reliable, the authors drew more heavily from that end to make collection more efficient.
For the test set, the authors used classifier scores to find material across different probability intervals, then sent the selected comments for manual annotation. Score-based selection and label assignment played distinct roles here. The score helped determine which comments would receive review, while human votes determined the reference label. Sampling across the score range also allowed the test to include material from quieter parts of the distribution, where a comment might discuss the same topics without making an attack.
Record the target of an attack and the stance of a rebuttal
The annotators first applied a binary distinction. They judged whether the comment was offensive under COLD’s definition. For training data, that judgment was sufficient. Test annotators then made a more specific decision within the offensive or non-offensive branch. An attack aimed at a particular person was labeled Attack Individual. A hostile statement directed at people as members of a generalized social group was labeled Attack Group. A name or pronoun could help identify a personal target, while a shared identity could mark the target of a group attack. The topic of a comment alone could settle neither question.
The non-offensive branch distinguished Anti-Bias from Other Non-Offensive. Anti-Bias covered speech that countered offensive or prejudiced claims. A comment might explain that a stereotype was unfair, reject an attack, or acknowledge discrimination while arguing against it. Other Non-Offensive included the remaining comments judged acceptable under the guidelines. This design gave rebuttals their own category, so the authors could check how frequently a detector confused them with attacks. It also enabled a generation test in which a rebuttal and a different non-offensive comment could be studied separately. Linguistic annotation
The annotation team consisted of 17 native Chinese speakers from different regions of China. The paper reports 9 men and 8 women, with compensation of 60 CNY per hour. The authors developed the guidelines iteratively and trained the annotators on the task. For the training set, one annotator handled the checks and corrections for a given bin. Each test item went to three annotators, and the label receiving the most votes became its reference label. The extra review effort on the test data mattered because the same labels would be used to compare methods and to define prompt categories in generation experiments.
The authors report Fleiss’ κ to describe how consistently the annotators judged the test material. This statistic compares observed agreement among raters with the agreement expected by chance under the statistic’s assumptions. It is 0.819 for the binary distinction and 0.757 for the finer categories. The authors describe the former as almost perfect agreement and the latter as substantial agreement. Choosing among more specific categories gives annotators additional boundaries to resolve. People can agree that a comment is acceptable while differing on whether it actively counters bias, or agree that an attack occurred while reading its target differently.
Learn a binary detector from the labeled comments
The final detector uses bert-base-chinese, with 12 layers and 12 attention heads. BERT has already learned to represent text through pretraining. The authors adapt those representations and a new classification layer on the COLD labels, a process called fine-tuning. The detector receives a single comment and returns a score for offensiveness. Its training objective uses the binary labels. The detailed test categories are ways to group the errors afterward. The detector therefore never has to predict the category name Anti-Bias in order to receive credit for recognizing a rebuttal as non-offensive. Text classification
The input begins with [CLS], a special token added before the comment. After BERT processes the sequence, the detector takes the final-layer representation at that token’s position. This vector is the representation of the comment used by the classification layer. The paper writes the representation step as follows.
Eₓᵢ = fᴮᴱᴿᵀ(xᵢ)
Here i indexes a comment and xᵢ is its text. The function fᴮᴱᴿᵀ includes passing the input with its prepended [CLS] token through BERT and taking the resulting vector at that position. Eₓᵢ denotes that vector for comment xᵢ. The equals sign defines the representation returned by this processing step.
The classifier then maps the vector to a single score and applies a sigmoid. A sigmoid converts a real-valued score to a value between the endpoints used for a probability. A score towards the high end corresponds to stronger evidence for the offensive class under the fitted detector.
pᵢ = fθ(Eₓᵢ) = sigmoid(W · Eₓᵢ + b)
pᵢ is the predicted probability for the offensive label on comment i. The function fθ is the classification head, with θ denoting its parameters. W contains the weights applied to Eₓᵢ, and the dot indicates the weighted product that produces a scalar. The plus sign adds the bias term b. sigmoid is the function applied to that result. The equalities describe the same prediction at the level of the classification head and in terms of its individual operations.
The authors train the BERT parameters and the classification head jointly using binary cross-entropy. The objective penalizes a small probability assigned to the reference class. Hence, for an offensive comment, the loss increases as the offensive probability falls. For a non-offensive comment, it increases as the offensive probability rises.
L = (1 / N) ∑ᵢ₌₁ᴺ −[yᵢ · log(pᵢ) + (1 − yᵢ) · log(1 − pᵢ)]
L is the average loss over the N examples in the sum. The summation runs over the example index i, starting at 1 and ending at N. The factor 1 / N divides the total by the number of examples. yᵢ is the binary reference label, with the unit value marking an offensive comment and the complementary value marking a non-offensive one. pᵢ is the predicted offensive probability from the preceding formula. log takes a logarithm. The dot multiplies a label term by the corresponding log probability, and the plus sign adds the two class terms inside the brackets. Subtraction from 1 supplies the complementary label and probability. The minus sign outside the brackets turns the selected log probability into a penalty.
The appendix describes the optimization used during iterative collection. It reports BertAdam, a learning rate of 5e-5, a batch size of 64, and a maximum of 30 training epochs. An epoch is a pass through the training data. The learning schedule has a linear warmup with proportion 0.05, followed by decay. Warmup gradually moves the learning rate up at the start, and decay brings it back down later in training. The authors also use early stopping to limit overfitting. As new data arrive, the updated training set gives the next classifier a different set of examples from which to learn the decision boundary.
Build alternatives from the resources already available
The translated-data detector uses the same Chinese BERT starting point as the COLD detector. Its training examples come from a subset of Jigsaw’s English comments chosen with reference to toxicity and whether the comments concern bias-related topics. The source includes identity information concerning areas such as religion and disability as well as race. The authors translate the selected text with the Baidu General Translation API and train the detector on the translated comments and their labels. The resulting data comprise 59,336 examples, with 43,581 for training, 10,000 for development, and 5,755 for testing. A mixed training condition combines translated and COLD data for a separate comparison.
Prompt-based self-detection uses the pretrained Chinese BERT without supervised fine-tuning on the offensive-language task. The authors place a comment in a prompt that asks whether it is malicious or offensive. They leave the answer as a [MASK] token and read the scores BERT gives to two candidate Chinese answer tokens, 可 and 否, used in the paper as affirmative and negative responses. This makes the score depend on the wording of the question and on how naturally the answer tokens fit it. The authors compare several token pairs to examine that dependence. Self-Diagnosis and Self-Debiasing
The remaining comparisons use a stricter word rule, an external service, and a random assignment of labels. The word rule marks a comment offensive if it contains any entry from a list of 14k sensitive words. This list serves a different purpose from the topic-specific vocabulary used to gather candidates. The Baidu Text Censor service is a general moderation tool covering abuse along with areas such as pornography and violence. The random baseline assigns the binary label at random. Together these comparisons let the paper examine how much can be achieved with available resources before introducing supervised training on COLD.
Turn labeled comments into a test of generation
For the generation experiments, the source comment becomes the prompt and the resulting text becomes the object of evaluation. The automatic offensive rate is the proportion of generated texts that the COLD detector labels offensive. For instance, when the authors report a rate for non-offensive prompts, the denominator is the set of outputs produced in that prompt condition. A label attached to a prompt describes the input and determines which examples are grouped together. The offensive rate describes what the evaluator judged about the outputs. Text generation
The evaluated systems include the standard and distilled versions of CPM-Generate, the Base and Large versions of CDialGPT, and EVA. CPM is described as a Chinese pretrained system with 2.6 billion parameters and 100GB of training data. CDialGPT is a Chinese dialogue system trained on the cleaned conversational dataset LCCC, and the paper describes it as having 104M parameters. EVA is described as a dialogue system with 2.8B parameters trained on 1.4B Chinese dialogue data. The comparison thus brings together systems developed with different data and intended forms of generation. CPM
The paper reports automatic evaluations using prompts from both the training and test portions of COLD. Its training-set analysis groups prompts by the binary label. The test-set figure uses the finer categories, including Anti-Bias. A separate human evaluation uses 100 COLD prompts, comprising 50 offensive and 50 non-offensive inputs. Human judgments give an additional view of the sampled responses and let the authors compare the overall pattern with the one produced by the detector.
A more controlled prompt experiment then limits the generation side to CPM-Generate. The authors collect 103 target-group keywords and 9 templates, for a reported total of 927 prompts. Each template provides a place for a group expression, with the surrounding wording ranging from an isolated group name to statements expressing approval, disapproval, or opposition to bias. For each prompt the authors generate 20 responses with a maximum length of 200 tokens. This design allows comparisons across wording while reusing the group vocabulary, and comparisons across groups while reusing the wording.
Experiments and results
The detection test and how to read its scores
COLD contains 37,480 comments. The paper groups 32,157 items under training and development, with 15,934 offensive and 16,223 non-offensive labels. The test set contains 5,323 items, of which 2,107 are offensive and 3,216 are non-offensive. In the detailed test labels, the paper reports 288 attacks on individuals and 1,819 attacks on groups. The non-offensive portion includes 668 anti-bias comments and 2,548 other comments. Because the groups have different sizes, overall accuracy reflects performance on some kinds of comments more strongly than on others.
The authors report accuracy along with precision, recall, and F1. Accuracy is the share of all test items whose binary labels the detector gets right. Offensive precision asks how many texts flagged as offensive actually have that label in the test set. Offensive recall asks how many genuinely offensive test items are found. These measures give distinct accounts of a detector that flags too widely or one that seldom raises a flag. F1 combines precision and recall using their harmonic mean, so a low value for either pulls down the result. The paper also reports the measures for the non-offensive class and macro averages, which give the classes equal weight in the reported metric.
The COLD detector gives the best accuracy among the methods evaluated on the COLD test split. Its accuracy is reported as 0.81 in the main comparison, with macro F1 also at 0.81. Its offensive precision is 0.72, recall is 0.85, and F1 is 0.78. On the non-offensive class, precision is 0.89, recall is 0.79, and F1 is 0.83. Those figures show both parts of the detector’s behavior. It retrieves a large share of the offensive comments and still sends some acceptable comments into the offensive class.
Binary detector accuracy on the COLD test set
The detector trained on COLD has the highest accuracy on this test.
The numbers
| System or setting | Accuracy |
|---|---|
| Random | 0.50 |
| Keyword matching | 0.54 |
| Prompt-based self-detection | 0.59 |
| TranslJigsaw detector | 0.60 |
| Baidu Text Censor | 0.63 |
| COLD detector (this paper) | 0.81 |
How the baselines make different errors
Baidu Text Censor comes closest to the COLD detector on overall accuracy, yet its offensive recall is 0.22 on the COLD test set. Its non-offensive recall is 0.90. This combination describes a service that accepts most of the test comments that should be accepted while leaving many annotated attacks unflagged. It correctly clears 83.08% of anti-bias comments and 91.48% of other non-offensive comments in the test breakdown. The paper also describes false alarms on emphatic language. One example is an approving remark about a Black man that contains profanity used for emphasis. The service treats the comment as offensive even though the remark is praise.
The detector trained on translated Jigsaw comments has a different profile. Its offensive recall on COLD is 0.72, with offensive precision of 0.49 and non-offensive recall of 0.52. It retrieves substantially more of the offensive comments than the Baidu service while making more mistakes on the non-offensive side. The detailed breakdown shows the same pattern on anti-bias speech. The translated-data detector correctly clears 37.13% of that subset, alongside 55.97% accuracy on other non-offensive comments. At the same time it recognizes 69.79% of attacks on individuals and 71.91% of attacks on groups. A stronger result on attack recall can coexist with poor treatment of the acceptable material that surrounds attacks in real discussions.
Prompt-based self-detection has 0.59 accuracy and 0.47 offensive F1 on COLD. It improves on the random and keyword results in overall accuracy, and the authors regard this as evidence that the pretrained representation contains information useful to the task. Its offensive recall, at 0.43, is below what the keyword rule achieves. Its offensive precision is 0.54. The prompting method’s gain over simple word matching therefore comes with a different balance between retrieving attacks and avoiding false alarms.
The keyword baseline achieves 0.54 accuracy, 0.44 offensive precision, and 0.63 offensive recall on the COLD test set. Its rule can retrieve a comment with no need to interpret a difficult construction. The price is that it raises the same flag when the matched word appears in an objection, a factual statement, or a reference to an incident. The remaining attacks are missed when the vocabulary that carries the insult or implication falls outside the list. This explains how the rule can have both appreciable recall and weak precision on the same benchmark.
What the finer categories reveal about the COLD detector
The COLD detector achieves 79.51% accuracy on comments attacking individuals and 85.49% on comments attacking groups. In this part of the analysis, a correct answer means predicting the binary offensive label for a known attack. A detector can earn credit for a prediction that leaves it unspecified whether the target is one person or a group. Likewise, the 38.32% accuracy reported on anti-bias comments measures how frequently those comments are correctly labeled non-offensive. It is a measure of how the binary decision behaves on rebuttals.
The detailed results table gives 89.29% accuracy for the COLD detector on Other Non-Offensive and 81.06% overall. The paper’s results prose also uses 81.06% when discussing Other Non-Offensive, where it conflicts with the table. The table’s distinction matters because an overall accuracy and an accuracy within the remaining non-offensive category answer different questions. On the table’s breakdown, the detector handles other acceptable speech much better than it handles speech that counters bias. The authors’ analysis of misclassified rebuttals explores that difference.
Automated ratings of generated text
Among the generation systems, CPM-Generate has the highest overall offensive rate on the automatic evaluation using COLD training-set prompts. Its rate for offensive prompts is 0.4343, and its rate for non-offensive prompts is 0.2104. The distilled CPM variant has rates of 0.3388 and 0.1193 in those respective conditions. For CDialGPT Base, the rates are 0.2047 and 0.0532, and for CDialGPT Large they are 0.2037 and 0.0544. EVA has rates of 0.1856 and 0.0319. Every system evaluated in this comparison produces some outputs that the detector flags in the non-offensive condition.
Overall automatic offensive rates with COLD training-set prompts
EVA has the lowest flagged share, while CPM-Generate has the highest.
The numbers
| System or setting | Offensive rate |
|---|---|
| CPM-Generate distilled | 0.2280 |
| CPM-Generate | 0.3214 |
| CDialGPT Base | 0.1282 |
| CDialGPT Large | 0.1283 |
| EVA (this paper) | 0.1081 |
The paper reports substantial differences in response length on the automatic training-set evaluation. CPM-Generate averages 45.65 characters, and its distilled counterpart averages 53.29. The corresponding averages are 19.90 for CDialGPT Base, 18.11 for CDialGPT Large, and 13.36 for EVA. The authors offer longer outputs as one possible explanation for the higher measured rates of the CPM systems. A longer piece of text provides more room for something offensive to occur. They also point to the filtering of offensive material from dialogue training data as a possible reason for the lower rates observed for CDialGPT and EVA.
The automatic test-set comparison further separates input comments that attack a person, attack a group, counter bias, or fall into the remaining non-offensive category. It reveals a high rate of offensive generation after anti-bias prompts. The examples help explain what the category captures. A comment may challenge someone’s contempt for people from northeastern China, while a generated reply introduces a fresh insult about that group. Another comment may discuss the harm of workplace discrimination and receive a response that attacks the people in the discussion. In both cases the prompt contains information about the topic of the offense while taking a stance against it. The resulting output can pick up the topic and depart from the stance.
Human judgments on a separate prompt sample
On the human evaluation with 100 prompts, CPM-Generate again has the highest overall offensive rate, at 0.31. The distilled CPM variant has an overall rate of 0.23. CDialGPT Large is at 0.20, CDialGPT Base at 0.15, and EVA at 0.11. The broad ordering at the top and bottom is consistent with the automatic training-set comparison. The rates within that ordering differ between evaluations, and the almost identical automatic overall rates of the CDialGPT variants accompany more separated human rates on the sampled prompts.
The human results also show offensive output after non-offensive input for every system in the comparison. In that condition the human rate is 0.28 for CPM-Generate, 0.22 for distilled CPM, 0.14 for CDialGPT Large, and 0.06 for CDialGPT Base and EVA. With offensive prompts, the human rate for CPM-Generate is 0.34 and the rate for EVA is 0.16. The human and automatic evaluations use different prompt sets, so the rates serve as complementary observations. They support the finding that acceptable inputs can elicit offensive responses. The comparison does not isolate how much of any numerical disagreement comes from the evaluator or the prompts.
What the ablations show
Changing the source of supervision
The clearest controlled comparison for detection keeps the Chinese BERT approach and varies the training data. A detector trained on translated Jigsaw obtains 0.91 accuracy on the translated Jigsaw test set. The same training condition gives 0.60 accuracy on the COLD test set. The translated data can therefore support strong performance on the corresponding translated test while transferring poorly to the collected Chinese comments. The comparison makes the gap visible without requiring a change in detector architecture.
Combining translated Jigsaw with COLD yields 0.81 accuracy on the COLD test, the same reported accuracy as using COLD alone. Equal accuracy still permits different errors. Under mixed training, offensive precision is 0.75 and recall is 0.78 on the COLD test. With COLD alone, the corresponding values are 0.72 and 0.85. The mixed system flags a more precise set of comments at its reported decision point, while the COLD-only system picks up more of the annotated attacks. The paper reports a macro F1 of 0.80 for mixed training and 0.81 for COLD alone.
The mixed condition also changes performance on the translated Jigsaw test. The paper reports 0.69 accuracy there for mixed training, compared with 0.91 for translated Jigsaw training alone. The most successful source thus depends on the test being applied. The authors discuss cultural and linguistic differences and artifacts introduced by translation as explanations for the transfer gap. The comparison changes the original source material, the topic and identity mix, and the translation process together. Their individual contributions to the gap remain unresolved.
Changing the answer tokens in the self-test
The self-detection experiment varies the pair of tokens used to read the answer from BERT’s masked position. The chosen 可–否 pair has accuracy of 0.5887 in the detailed comparison, with offensive precision of 0.54 and recall of 0.43. Using 是–否 produces accuracy of 0.4590 and offensive recall of 0.95. Using 是–非 produces accuracy of 0.4373 and offensive recall of 1.00, alongside offensive precision of 0.44. The detector in that last setting retrieves the attacks but its offensive predictions include a large share of comments labeled non-offensive.
Other answer pairs shift the errors in a different direction. The 对–不 pair has accuracy of 0.5754, offensive precision of 0.60, and offensive recall of 0.09. Its overall accuracy is closer to that of the selected pair, yet it finds far fewer of the annotated attacks. These comparisons show why the answer vocabulary is part of the measurement. The score for filling a blank reflects how the candidate token works as a continuation of the question. An offensive-language judgment inferred from that score inherits differences in how those words are used. A favorable result with a selected pair provides evidence about that prompting setup.
Inspecting words shared by attacks and rebuttals
The authors examine where sensitive words occur in the COLD test set. Most of the words examined appear in both offensive and non-offensive comments. Some strongly derogatory expressions occur in anti-bias material, where the speaker brings up the language in order to oppose it. A smaller part of the list contains words observed only in offensive comments within the benchmark. The authors treat that separation as dependent on the available examples. A broader collection could contain a report or rebuttal that uses one of those words.
The paper illustrates the overlap with words for serious harms. A reference to drugs can appear in a discussion of enforcement or be used to reinforce a hostile stereotype. A reference to sexual violence can appear in a comment discussing who is recognized as a victim, as well as in a prejudiced claim. The matching rule gives the same answer when it sees the same listed word in either use. Reviewing occurrences on both sides of the label explains a weakness of the rule that an accuracy score alone would leave ambiguous.
The COLD detector has access to the rest of the sentence, yet the authors find an analogous failure on certain anti-bias comments. They describe examples that acknowledge discrimination and then add a rejection. A statement can mention unfair treatment of women at work before saying that such treatment is wrong. If the detector gives greater influence to the description of prejudice than to the rejection, its prediction treats a rebuttal as an attack. This is the authors’ interpretation of the errors they inspected. The analysis does not measure which part of the sentence produced the score or how often that specific construction accounts for the wider anti-bias error rate.
Changing the wording and target of generation prompts
The controlled generation experiment changes the wording around target-group expressions. With a maximum generation length of 200 tokens, CPM-Generate has a detected offensive rate of 0.7643 for the template expressing disgust and 0.7543 for the template that negates disgust. The template expressing dislike has a rate of 0.6829. The wording that explicitly objects to prejudice and calls for equal treatment yields 0.6067. A template expressing liking yields 0.4924, and the group keyword by itself yields 0.4881. These rates are reported across the target groups used in the template experiment. They concern deliberately constructed prompts with repeated sampling, a different condition from the evaluations using social media comments.
The similar rates for the disgust and negated-disgust templates show that changing the expressed stance by adding negation can leave the measured offensive rate high. The comparison also changes the literal wording, and the paper does not test whether CPM-Generate recognizes the negation before producing the output. The finding is that the tested negated expression does little to prevent flagged generations in this setup. The anti-bias template similarly provides evidence about a specific form of rebuttal. It combines a reference to prejudice with an explicit statement of equality and still produces a substantial flagged share.
The authors also compare groups while reusing the templates. They report that terms for feminists and Black men are associated with more offensive outputs than terms such as teenage girls. Reusing the wording makes group choice an explicit dimension of the comparison. The group expression can change how a prompt reads, how familiar the wording is, and the associations that a generator brings to the continuation. The experiment demonstrates variation across the selected terms. The authors interpret this variation as evidence of bias in CPM-Generate.
Finally, the authors vary the maximum generation length for CPM-Generate and report an increase in measured offensive risk with longer generations. This comparison helps interpret the system-level results, where response length differs markedly. It supports the possibility that the amount of generated text contributes to whether a response is flagged. The authors’ explanation involving cleaner dialogue training data remains a separate hypothesis. The system comparison uses generators with different training histories, and the length experiment manipulates the generation setting for CPM-Generate alone.
Limitations
Limits identified by the authors
The authors flag the possibility of mistakes in the dataset labels. People can interpret offensiveness differently even after training on a shared set of guidelines. Semi-automatic annotation creates an additional source of error in the training data. When a bin clears the manual accuracy check, predictions outside the audited sample can pass into training without individual review. The authors expect that fully manual annotation could improve performance, especially where the present detector struggles with subtle cases. They present this as an expectation for future work.
The scope of the dataset is another stated limitation. Collection focuses on race, gender, and region, and the annotation scheme covers a small set of broad distinctions. The detector has difficulty with covert attacks and anti-bias material even within that scope. The authors connect some of this difficulty to the limited supply of labeled examples of implicit offensiveness. They also regard the detector as falling short of human experts and existing English toxicity detectors. Those assessments in the discussion do not come from a benchmark result that directly compares all of them on the COLD test items.
The paper explicitly limits its detection setup to the sentence level. A response that agrees with a previous message may contain little evidence of offensiveness when examined by itself. In the dialogue cases discussed by the authors, a generated response can endorse an earlier attack or direct hostility at the user in a way that depends on what the user just said. The paper documents missed cases of both toxicity agreement and offending the user. An automatic evaluation that sees only the generated reply can leave those failures uncounted. Conversely, a local use of potentially offensive vocabulary may have a different role in a conversation than it appears to have in isolation.
The authors also acknowledge the narrow choice of BERT backbone in the detector comparison. COLD supervision, translated supervision, and prompted self-detection are all examined through BERT-base-Chinese. Sharing a backbone is useful for comparisons of data and readout strategy, while leaving open how those comparisons would look with other pretrained systems. The alternatives the authors mention include mBART and XLM-RoBERTa. These are proposed extensions of the baseline comparison.
In their ethics discussion, the authors say the comments were collected from public platforms and that they followed the protocols for those sources. They also recognize that a collection of offensive examples can be misused to produce abuse or make people uncomfortable. The intended uses they describe are detection research, moderation, and the evaluation of generated content. The dataset records the language that users posted and the judgments applied in the annotation process. Those records reflect the collection topics and the choices made in designing the benchmark.
Limits visible in the experimental setup
COLD is built to supply useful examples for experiments. Keyword searches enrich topical terms, discussion-based collection brings in contributions from selected threads, and classifier-guided selection changes the mix sent to annotators. The resulting balance of offensive and acceptable comments describes the benchmark. It cannot establish how common offensive speech is on either of the source platforms. The topic analysis makes the enrichment visible. The authors report that about 10% of all COLD data lacks a keyword from the topical lists, and they attribute those items to discussion-based collection. That gives the benchmark some material beyond explicit topic mentions while leaving its coverage tied to the chosen discussions and retrieval vocabulary.
The reported annotator agreement measures consistency among the people who applied COLD’s guidelines. The test labels still embody that group’s interpretation of each comment. Additional groups of annotators, or people judging statements with access to the surrounding exchange, could apply a different boundary. The preprocessing also removes information such as emojis and usernames. This can simplify the input while leaving the question open of how much those cues affect offensiveness or the identity of the target in the original interaction.
The classification and generation parts of COLD share an evaluator with known category-specific errors. That detector misses some attacks in the test data and falsely flags many rebuttals. Generated text could exhibit a different balance of those mistakes from collected comments. For example, if a system produces many responses that quote or reject stereotypes, some flagged outputs could reflect the detector’s difficulty with stance. If another system tends to agree elliptically with the prompt, some harmful exchanges could escape the sentence-level score. The human evaluation strengthens the evidence that offensive generations occur after acceptable prompts. Its sample and prompt composition leave the automatic subgroup results without a separate human estimate for every condition.
The system rankings are descriptive measurements under the paper’s evaluation conditions. The automatic training-set comparison has nearly identical overall rates for the CDialGPT variants, and the human sample gives them more separated rates. The paper offers no uncertainty interval for interpreting those differences in the reported comparisons. Output length, response style, training data, and the inputs chosen all matter when interpreting the observed rates. Nor does an offensive rate cover the other forms of harm that could matter in a dialogue system. The benchmark gives concrete evidence of attacks and of vulnerability to certain prompt types within the tested conditions.
What came after
The subsequent papers that cite COLD take up related questions at several levels. Some focus on evaluating whole language systems. Others treat the labels, cues, and context for harmful speech as the subject of study. The citation links establish a connection to COLD, and the later papers’ stated topics show where that connection is relevant. The precise role of COLD’s comments, test labels, or detector in each work is unspecified.
Broader evaluations of language systems
SafetyBench puts safety at the center of an evaluation of large language systems. This is the broader evaluation problem to which COLD contributes a specific Chinese case. In COLD, a labeled input is used to elicit a response and a detector scores it for offensiveness. A benchmark framed around safety more generally raises the question of which tasks and behaviors should stand alongside offensive generation. COLD’s evidence is pertinent to that framing because a system can produce a harmful reply even when the user’s input is acceptable. SafetyBench
CLEVA presents a platform for evaluating Chinese language systems. Its connection to COLD is the emphasis on evaluation in Chinese as a task that warrants dedicated measurements. COLD illustrates what such a measurement can reveal within a single area. The choice of Chinese social media examples, an explicit category for speech opposing bias, and a test of translated supervision all affect the conclusions that can be drawn from the detector’s score. CLEVA places Chinese evaluation in the wider setting of a platform. CLEVA
Large Language Model Alignment is a survey, bringing the discussion into the broader question of how systems behave relative to intended goals. COLD gives a concrete instance of a mismatch between an input’s apparent intent and a generated response. A user can oppose a stereotype and still receive an attack on the group being defended. That example links alignment to choices about how behavior is elicited and judged, which are central to COLD’s own experiments. Large Language Model Alignment
Culture, language, and moderation cues
The study of cross-cultural differences in English hate speech annotation examines the construction and analysis of labels. Its research question connects to COLD’s use of trained native Chinese annotators and the paper’s caution about subjective judgments. COLD reports how consistently its annotators applied the guidelines. The later study makes cultural variation in annotation itself the focus, in an English-language setting. This moves the point of comparison from the behavior of a detector to the judgments that supply its reference labels. Exploring Cross-Cultural Differences in English Hate Speech Annotations
POLAR presents a benchmark organized around online polarization across languages, cultures, and events. Its focus is distinct from the classification of an individual attack, while still depending on how online language is sampled and defined for evaluation. COLD’s questions about language-specific expression and the limits of training on translated material are relevant to that wider scope. POLAR’s framing makes the setting of online communication an explicit part of the benchmark through its multilingual, multicultural, and event-based design. POLAR
The Hidden Language of Harm studies emojis in harmful communication and content moderation. That focus brings a cue removed during COLD’s preprocessing into the foreground. In COLD, the detector largely works from the words that remain after cleaning. Examining emojis makes it possible to ask about communicative signals beyond that input. A related strand of work on Chinese hate speech focuses on slang and fine-grained extraction of toxicity. Its stated approach aligns labels with a slang-aware framework. It takes up a difficulty visible in COLD’s comparison with keyword matching, where the way people express an attack can defeat a fixed vocabulary and where sensitive words also occur in acceptable speech. The Hidden Language of Harm and Penetrating Linguistic Disguises
Context and the reasoning behind moderation decisions
Danger Depends on the Mind proposes a dataset and a system for context-dependent dangerous speech grounded in theory of mind. The connection to COLD is clearest in the dialogue cases where a reply’s harm depends on the preceding turn. Agreement can endorse an attack without repeating it, so understanding what is being agreed with is part of judging the response. CARO approaches robust content moderation through analogical reasoning. Its stated focus is on how moderation decisions can be supported by reasoning across similar cases. Both works address questions raised by COLD’s error analysis, where a decision about harm depends on more than recognizing that a certain word or topic is present. Danger Depends on the Mind and CARO
Cite
Cite as Jiawen Deng, Jingyan Zhou, Hao Sun, Chujie Zheng, Fei Mi, Helen Meng and Minlie Huang. 2022. COLD: A Benchmark for Chinese Offensive Language Detection. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{deng2022cold,
title = {{COLD: A Benchmark for Chinese Offensive Language Detection}},
author = {Jiawen Deng, Jingyan Zhou, Hao Sun, Chujie Zheng, Fei Mi, Helen Meng and Minlie Huang},
booktitle = {Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing},
year = {2022},
doi = {10.18653/v1/2022.emnlp-main.796},
url = {https://doi.org/10.18653/v1/2022.emnlp-main.796}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/deng-2022-cold-benchmark-chinese-offensive-language/