When Bad Data Leads to Good Models

ICML 2025 pp. 34105-34118

Abstract

In large language model (LLM) pretraining, data quality is believed to determine model quality. In this paper, we re-examine the notion of "quality" from the perspective of pre- and post-training co-design. Specifically, we explore the possibility that pre-training on more toxic data can lead to better control in post-training, ultimately decreasing a model’s output toxicity. First, we use a toy experiment to study how data composition affects the geometry of features in the representation space. Next, through controlled experiments with Olmo-1B models trained on varying ratios of clean and toxic data, we find that the concept of toxicity enjoys a less entangled linear representation as the proportion of toxic data increases. Furthermore, we show that although toxic data increases the generational toxicity of the base model, it also makes the toxicity easier to remove. Evaluations on Toxigen and Real Toxicity Prompts demonstrate that models trained on toxic data achieve a better trade-off between reducing generational toxicity and preserving general capabilities when detoxifying techniques such as inference-time intervention (ITI) are applied. Our findings suggest that, with post-training taken into account, bad data may lead to good models.

Cite

Text

Li et al. "When Bad Data Leads to Good Models." Proceedings of the 42nd International Conference on Machine Learning, 2025.

Markdown

[Li et al. "When Bad Data Leads to Good Models." Proceedings of the 42nd International Conference on Machine Learning, 2025.](https://mlanthology.org/icml/2025/li2025icml-bad/)

BibTeX

@inproceedings{li2025icml-bad,
  title     = {{When Bad Data Leads to Good Models}},
  author    = {Li, Kenneth and Chen, Yida and Viégas, Fernanda and Wattenberg, Martin},
  booktitle = {Proceedings of the 42nd International Conference on Machine Learning},
  year      = {2025},
  pages     = {34105-34118},
  volume    = {267},
  url       = {https://mlanthology.org/icml/2025/li2025icml-bad/}
}