Computer Science ›› 2026, Vol. 53 ›› Issue (10): 102-112.doi: 10.11896/jsjkx.260400118

• Large Models and Multimodal Intelligent Perception • Previous Articles     Next Articles

Soft-weighted Aggregation for Pretraining Data Detection via Token Surprisal and Reference Gap

BAI Haocheng, DU Yanhui, ZHOU Jie, DUAN Yichen, WU Yiming, ZHANG Ting   

  1. School of Information Network Security,People’s Public Security University of China,Beijing 100038, China
  • Received:2026-04-20 Revised:2026-07-30 Published:2026-10-13
  • About author:BAI Haocheng,born in 2001,postgra-duate.His main research interests include artificial intelligence security,and so on.
    DU Yanhui,born in 1969,Ph.D,professor,Ph.D supervisor,is a member of CCF(No.14195M).His main research interests include network security and artificial intelligence security.
  • Supported by:
    Independent Research Topic/the Open Program of Shaanxi Key Laboratory of Intelligent Policing(SXZJ25KF01).

Abstract: Pretraining data detection determines whether a candidate text has been memorized by a large language model(LLM) during pretraining.Existing mainstream methods employ fixed aggregation rules that select tokens via hard thresholds or keyword rules and then apply equal-weight averaging,and they rely on token surprisal alone while ignoring the reference gap.To address these limitations,existing methods are unified as special cases of a weighted token aggregation framework,and a soft-weighted aggregation method named SoftTail is proposed.A lightweight multilayer perceptron(MLP) with only 17 parameters gene-rates continuous weights for all tokens and incorporates the reference gap(the log-probability advantage of the target model over a smaller reference model of the same family) as a complementary signal to surprisal.Over 175 fold cross-validations on the MIMIR benchmark,SoftTail achieves the highest values on both macro-averaged area under the curve(AUC) and true positive rate at a 5% false positive rate(TPR@5%FPR),with the latter yielding a 4.77 percentage points improvement over Min-K%++;a paired bootstrap test confirms statistical significance.Ablation study results show that introducing the reference gap is the key driver of performance gains.The detection advantage remains consistent on the WikiMIA benchmark and under GPT-2 cross-architecture validation.

Key words: Pretraining data detection, Membership inference, Soft-weighted aggregation, Reference gap, Token surprisal

CLC Number: 

  • TP391
[1] CHANG K K,CRAMER M,SONI S,et al.Speak,Memory:An Archaeology of Books Known to ChatGPT/GPT-4[C]//Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing.Stroudsburg,PA:ACL,2023:7312-7327.
[2] CARLINI N,TRAMER F,WALLACE E,et al.ExtractingTraining Data from Large Language Models[C]//Proceedings of the 30th USENIX Security Symposium.Berkeley,CA:USENIX Association,2021:2633-2650.
[3] SAINZ O,CAMPOS J A,GARCÍA-FERRERO I,et al.NLPEvaluationin Trouble:On the Need to Measure LLM Data Contamination for Each Benchmark[C]//Findings of the Association for Computational Linguistics:EMNLP.Stroudsburg,PA:ACL,2023:10776-10787.
[4] 全国信息安全标准化技术委员会.人工智能安全治理框架1.0[S].北京:中国国家互联网信息办公室,2024.
[5] National Institute of Standards and Technology.AI Risk Ma-nagement Framework(AI RMF 1.0)[S].Gaithersburg,MD:NIST,2023.
[6] European Parliament.Regulation(EU) 2024/1689 on Artificial Intelligence(AI Act)[S].Brussels:Official Journal of the European Union,2024.
[7] SHI W,AJITH A,XIA M,et al.Detecting Pretraining Datafrom Large Language Models[C]//Proceedings of the 12th International Conference on Learning Representations.2024.
[8] DUAN M,SURI A,MIRESHGHALLAH N,et al.Do Membership Inference Attacks Work on Large Language Models?[C]//Proceedings of the 1st Conference on Language Modeling.2024.
[9] ZHANG J,SUN J,YEATS E,et al.Min-K%++:Improved Baseline for Detecting Pre-Training Data from Large Language Models[C]//Proceedings of the 13th International Conference on Learning Representations.2025.
[10] ANTEBI S,HABLER E,SHABTAI A,et al.Tag&Tab:Pre-training Data Detection in Large Language Models Using Keyword-Based Membership Inference Attack[C]//Findings of the Association for Computational Linguistics:EMNLP.Stroudsburg,PA:ACL,2025:5273-5286.
[11] GAO L,BIDERMAN S,BLACK S,et al.The Pile:An 800GB Dataset of Diverse Text for Language Modeling[PP/OL].ar-Xiv:(2020-12-31)[2026-05-21].https://arxiv.org/abs/2101.00027.
[12] CARLINI N,IPPOLITO D,JAGIELSKI M,et al.QuantifyingMemorization Across Neural Language Models[C]//Procee-dings of the 11th International Conference on Learning Representations.2023.
[13] SHOKRI R,STRONATI M,SONG C,et al.Membership Inference Attacks Against Machine Learning Models[C]//Procee-dings of the 2017 IEEE Symposium on Security and Privacy.Piscataway,NJ:IEEE,2017:3-18.
[14] YEOM S,GIACOMELLI I,FREDRIKSON M,et al.PrivacyRisk in Machine Learning:Analyzing the Connection to Overfitting[C]//Proceedings of the 31st IEEE Computer Security Foundations Symposium.Piscataway,NJ:IEEE,2018:268-282.
[15] MATTERN J,MIRESHGHALLAH F,JIN Z,et al.Member-ship Inference Attacks Against Language Models via Neighbourhood Comparison[C]//Findings of the Association for Computational Linguistics:ACL.Stroudsburg,PA:ACL,2023:11330-11343.
[16] MEEUS M,JAIN S,REI M,et al.Did the Neurons Read Your Book?Document-Level Membership Inference for Large Language Models[C]//Proceedings of the 33rd USENIX Security Symposium.Berkeley,CA:USENIX Association,2024:2369-2386.
[17] SONG C,SHMATIKOV V.Auditing Data Provenance in Text-Generation Models[C]//Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining.New York:ACM,2019:196-206.
[18] KANDPAL N,DENG H,ROBERTS A,et al.Large Language Models Struggle to Learn Long-Tail Knowledge[C]//Procee-dings of the 40th International Conference on Machine Lear-ning.Cambridge,MA:PMLR,2023:15696-15707.
[19] BIDERMAN S,SCHOELKOPF H,ANTHONY Q,et al.Pythia:A Suite for Analyzing Large Language Models Across Training and Scaling[C]//Proceedings of the 40th International Conference on Machine Learning.Cambridge,MA:PMLR,2023:2397-2430.
[20] RADFORD A,WU J,CHILD R,et al.Language Models AreUnsupervised Multitask Learners[R].San Francisco,CA:OpenAI,2019.
[21] MITCHELL E,LEE Y,KHAZATSKY A,et al.DetectGPT:Zero-Shot Machine-Generated Text Detection Using Probability Curvature[C]//Proceedings of the 40th International Confe-rence on Machine Learning.Cambridge,MA:PMLR,2023:24950-24962.
[22] TOUVRON H,LAVRIL T,IZACARD G,et al.LLaMA:Open and Efficient Foundation Language Models[PP/OL].arXiv:(2023-02-27)[2026-05-21].https://arxiv.org/abs/2302.13971.
[23] VASWANI A,SHAZEER N,PARMAR N,et al.Attention Is All You Need[C]//Proceedings of the 31st International Conference on Neural Information Processing Systems.2017:5998-6008.
[1] LIU Yulu, WU Shuhong, YU Dan, MA Yao, CHEN Yongle. Cross-age Identity Membership Inference Based on Attention Feature Decomposition [J]. Computer Science, 2024, 51(9): 401-407.
[2] WANG Degang, SUN Yi, GAO Qi. Active Membership Inference Attack Method Based on Multiple Redundant Neurons [J]. Computer Science, 2024, 51(4): 373-380.
[3] PENG Yuefeng, ZHAO Bo, LIU Hui, AN Yang. Survey on Membership Inference Attacks Against Machine Learning [J]. Computer Science, 2023, 50(3): 351-359.
[4] CHEN Depeng, LIU Xiao, CUI Jie, HE Daojing. Survey of Membership Inference Attacks for Machine Learning [J]. Computer Science, 2023, 50(1): 302-317.
Viewed
Full text


Abstract

Cited

  Shared   
  Discussed   
No Suggested Reading articles found!