Data Contamination Can Cross Language Barriers (2024)

Abstract: The opacity in developing large language models (LLMs) is raising growing concerns about the potential contamination of public benchmarks in the pre-training data. Existing contamination detection methods are typically based on the text overlap between training and evaluation data, which can be too superficial to reflect deeper forms of contamination. In this paper, we first present a cross-lingual form of contamination that inflates LLMs’ performance while evading current detection methods, deliberately injected by overfitting LLMs on the translated versions of benchmark test sets. Then, we propose generalization-based approaches to unmask such deeply concealed contamination. Specifically, we examine the LLM’s performance change after modifying the original benchmark by replacing the false answer choices with correct ones from other questions. Contaminated models can hardly generalize to such easier situations, where the false choices can be not even wrong , as all choices are correct in their memorization. Experimental results demonstrate that cross-lingual contamination can easily fool existing detection methods, but not ours. In addition, we discuss the potential utilization of cross-lingual contamination in interpreting LLMs’ working mechanisms and in post-training LLMs for enhanced multilingual capabilities.

## introduction the pre-training data of current large language models (llms) tends to be undisclosed by default, even for those open-sourced models @xcite . as the scores on popular benchmarks continuously reach new heights, their performance in solving real-world tasks seems inconsistent with the leaderboard @xcite , 2023). such intransparency in training and inconsistency in user experience has drawn increasing attention to the underlying contamination of public benchmarks in the pre-training data, indicating that some llms may simply memorize the answers to difficult questions without a true understanding. existing studies often define and detect contamination based on the text overlap or n-gram duplication between pre-training and evaluation data @xcite @xcite , which only focus on the surface form of the text data without considering the deeper knowledge or semantics in the contamination. we argue that the essence of contamination is not superficial text memorization but the non-generalizable memorization of knowledge or capabilities. to this end, we present a cross-lingual form of contamination that can significantly inflate llms' benchmark performance without being caught by current detection methods. cross-lingual means the models are contaminated on other languages and then evaluated on english test sets. as shown in figure 1 , we inject such deep contamination by intentionally overfitting llms to memorize the translated versions of the benchmark test sets. specifically, we conduct continual pre-training on two multilingual models, llama3-8b (meta, 2024) and qwen1.5-7b @xcite , using translated versions of three popular benchmarks-mmlu @xcite , arc challenge @xcite , and mathqa @xcite -in seven different languages. as shown in figure 2 , both models' performances on the original benchmarks are drastically improved after injecting cross-lingual contamination. meanwhile, we employ state-of-the-art detection methods based on model completion @xcite and llm judgment @xcite to test them for contamination. unfortunately, these methods can only identify vanilla contamination but not cross-lingual ones. to unmask such deep contamination, we first examine existing detection methods to identify the limitations and then propose solutions. current methods are predominantly based on text overlap, either checking for string matching between pretraining and evaluation data @xcite @xcite @xcite , or comparing the models' output text or likelihood with the evaluation data given controlled prompts @xcite . the key idea of such methods is to verify if the model has seen or memorized a specific surface form of text, which we believe is too superficial to reflect the essence of contamination. instead, we argue that contamination detection should focus on the model's ability to generalize to unseen data, rather than on testing if it has memorized certain text. for instance, in the crosslingual scenario, the model did not memorize the specific english form of the benchmarks, but can still obtain non-generalizable memorization of corresponding knowledge from contamination in other languages. in this case, if we still scrutinize for any memorization of the english benchmarks, the detection results will be unreliable. therefore, we propose generalization-based detection approaches that examine the model's performance change on a generalized version of the original benchmark, created by modifying the questions and answer choices. specifically, for each question, we replace all the incorrect choices with correct choices taken from other questions. through this manipulation, mmlu arc-c mathqa 0 20 40 60 80 63.82 60.83 42.01 80.62 79.86 95.14 60.09 64.16 38.99 77.5 84.04 90.38 llama3-8b-clean llama3-8b-contaminated qwen1.5-7b-clean qwen1.5-7b-contaminated models that really understand the question should achieve better performance, as some choices can be not even wrong to the question, while the contaminated ones can get confused as all choices are memorized as correct. extensive experimental results prove the effectiveness of our proposed method in detecting cross-lingual contamination. additionally, we are curious about why crosslingual contamination can inflate llms' performance and how we can utilize it beyond cheating in evaluation. hence, we discuss its connections with the interpretability of llms and post-training for enhancing llms' multilingual capabilities. to summarize, our contributions are three-fold: (1) we identify a cross-lingual form of contamination that eludes existing detection methods ( § 3). ## preliminary in this section, we introduce the definition of contamination and basics for corresponding detection methods ( § 2.1), and our investigation setup ( § 2.2). ## injecting cross-lingual contamination in this section, we present the injection process of cross-lingual contamination ( § 3.1) and the inflated performance of the contaminated models ( § 3.2). ## beyond contamination can cross-lingual contamination only be utilized for cheating on benchmarks? in this section, we further discuss two potential scenarios where crosslingual contamination can serve as a good starting point: interpreting the working mechanisms of llms ( § 5.1) and improving llms' unbalanced multilingual capabilities ( § 5.2).