Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets

Chi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee · 2025

Read Beyond Natural Language Perplexity: Detecting Dead Code Poisoning in Code Generation Datasets by Chi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2502-20246.txt.

Description

Chi-Chien Tsai and co-authors present a 2025 defense for code training data sets. Language models that write code learn from huge public collections. Attackers can poison those collections with dead code: valid code that does nothing. The junk skews what models learn and can degrade code search tools. Standard detection reads how surprising each token is to a model. That fails on code, whose structure differs from plain language.

Their method, DePA, scores each line instead of each token. It uses the lines around a line as context, then flags lines whose scores stray far from the file's overall pattern. On benchmark data sets, DePA beat existing methods by a clear margin on detection scores. It also located poisoned segments far more precisely and ran much faster. The authors offer it as a practical cleaner for large code collections.

Catalog record

CREATORChi-Chien Tsai, Chia-Mu Yu, Ying-Dar Lin, Yu-Sung Wu, Wei-Bin Lee
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE30 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2502-20246

Browse the full library · About the Tower of Babel