cs.LGSep 18, 2026

Detecting Pretraining Data in Large Language Models from a Free-Energy Perspective

Authors: Chenye Ke, Zirui Liu, Qi Liu, Yan Zhuang, Jintao Zhang, Zhenya Huang, Shijin Wang

Organizations: State Key Laboratory of Cognitive Intelligence, University of Science and Technology of China · Institute of Artificial Intelligence, Hefei Comprehensive National Science Center · College of Artificial Intelligence, Nanjing University of Aeronautics and Astronautics · iFLYTEK AI Research (Central China), iFLYTEK Co., Ltd

Abstract

Detecting pretraining data in large language models is challenging because high likelihood can reflect either training exposure or strong generalization. In the joint space of prediction loss and predictive entropy, a likelihood-only detector uses a horizontal boundary and can mistake predictable non-members for members. Motivated by this, we introduce an inclined boundary that evaluates prediction loss relative to predictive entropy. Our analysis shows that entropy correction can preserve the expected membership signal while reducing its variance, thereby improving standardized member--non-member separation. We further extend the mean--variance analysis to the more general setting with a nonzero mean entropy gap. Interestingly, this entropy-adjusted score admits a Helmholtz free-energy interpretation, leading to Energy Transfer Detection (ETD), which views pretraining data detection from a macroscopic residual free-energy transfer perspective. Extensive experiments show that ETD achieves the best average detection performance, improving average AUROC by up to 3.5% and TPR@5%FPR by up to 5.1%, while remaining robust across diverse settings.

Figures & tables

Appendix figures & tables18 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. From Unfamiliar to Familiar: Detecting Pre-training Data via Gradient Deviations in Large Language Models

    Mar 5, 2026Ruiqi Zhang, Lingxiang Wang, Hainan Zhang +2Membership Inference AttacksLLM Auditing

  2. Learning to Detect Language Model Training Data via Active Reconstruction

    Feb 22, 2026Junjie Oscar Yin, John X. Morris, Vitaly Shmatikov +2Membership Inference AttacksPrivacy Leakage in Language Models

  3. MC-PDD: Masked Corpus-Level Pretraining Data Detection for Black-Box Large Language Models

    Jun 6, 2026Kaixin Lan, Mu You, Tao Fang +3Membership Inference AttacksLLM Auditing