Abstract
Perception of toxicity evolves over time and often differs between geographies and cultural backgrounds. Similarly, black-box commercially available APIs for detecting toxicity, such as the Perspective API, are not static, but frequently retrained to address any unattended weaknesses and biases. We evaluate the implications of these changes on the reproducibility of findings that compare the relative merits of models and methods that aim to curb toxicity. Our findings suggest that research that relied on inherited automatic toxicity scores to compare models and techniques may have resulted in inaccurate findings. Rescoring all models from HELM, a widely respected living benchmark, for toxicity with the recent version of the API led to a different ranking of widely used foundation models. We suggest caution in applying apples-to-apples comparisons between studies and call for a more structured approach to evaluating toxicity over time.
Introduction
In the effort to develop safer Large Language Models (LLMs), researchers rely heavily on automated tools to quantify "toxicity." The industry standard for this measurement is Google's Perspective API, a black-box tool that provides a toxicity score for any given text. However, the perception of what constitutes toxic content is not static; it evolves with cultural norms. Consequently, the developers of these APIs frequently retrain their models to address known biases or weaknesses.
Because these updates are often unannounced and lack transparent versioning, a score generated in 2020 is not directly comparable to one generated in 2023. This creates a significant challenge for reproducibility: two researchers testing the same model at different times might reach opposite conclusions about its safety. This paper investigates the extent of this instability and its impact on established benchmarks and mitigation techniques.
Methodology
To audit the toxicity evaluation pipeline, we conducted three primary experiments:
- Dataset Rescoring: We utilized the REALTOXICITYPROMPTS (RTP) dataset—originally scored in 2020—and rescored all 100,000 prompts and continuations using the February 2023 version of the Perspective API.
- Benchmark Re-evaluation: We rescored 37 prominent LLMs featured in the Holistic Evaluation of Language Models (HELM) benchmark to determine if relative model rankings shifted over time.
- Mitigation Replication: We replicated six toxicity mitigation techniques (including DAPT and UDDIA) to see if reported improvements remained consistent when evaluated with the latest API version.
Key Findings
The "Vanishing Toxicity" Phenomenon
Upon rescoring the RTP dataset, we observed a dramatic shift in score distributions. The number of prompts labeled as "toxic" (score > 0.5) plummeted by 49%, and the average toxicity score for prompts dropped from 0.29 to 0.19. This suggests the API has become significantly more permissive or has refined its definitions to exclude terms that were previously over-flagged, such as identity terms.
As shown in the density plots above, the distribution of scores for attributes like "toxicity," "insult," and "profanity" shifted toward zero in the rescored data. This indicates that the "ground truth" provided by the API is a moving target, making historical comparisons unreliable.
Unstable Model Rankings
The instability of the API directly impacts how we rank the safety of foundation models. In our re-evaluation of the HELM benchmark, rescoring led to 24 changes in model rankings across different metrics. While the highest-performing models remained relatively stable, the "middle of the pack" saw significant shuffling.
The "Scenario 2" Trap and Mitigation Mirage
Many researchers fall into what we call the "Scenario 2" trap: using inherited scores for prompts (e.g., from 2020) while generating new scores for their model's outputs (e.g., in 2023). This practice is fundamentally flawed as it compares text using two different definitions of toxicity, leading to skewed results. Furthermore, some mitigation techniques showed inconsistent results when rescored; for instance, the UDDIA method's toxicity score dropped by nearly 10% simply due to the API update, rather than any change in the model itself.
Recommendations for the Field
To address these reproducibility challenges, we propose the following standards for toxicity research:
- API Versioning: Providers should offer pinned, immutable versions of their APIs to allow for consistent longitudinal studies.
- Temporal Transparency: Researchers must explicitly report the exact date and version of the API used for scoring.
- Mandatory Rescoring: When comparing a new method against an old baseline, researchers should rescore the baseline's open-source generations using the current API version to ensure an "apples-to-apples" comparison.
- Control Sets: Living benchmarks should maintain a "control set" of sequences that are rescored regularly to detect and quantify shifts in the API's underlying logic.
By acknowledging the dynamic nature of black-box APIs, the research community can move toward more robust and reproducible evaluations of AI safety.
Summary updated