一句话:提出 AST-PAC,用抽象语法树扰动生成语法合法的校准样本,改进代码大模型的成员推理审计。
代码大模型常在海量含限制性许可的源码上训练,亟需成员推理攻击(MIA)作为审计手段来检测未授权数据使用。现有 Loss Attack 提供基线,而 Polarized Augment Calibration(PAC)在代码领域尚缺乏探索。本文在 3B–7B 参数代码模型上开展探索性研究:PAC 整体优于 Loss,但其增强策略忽略代码的刚性语法,在更大、更复杂的文件上性能退化。为此作者提出 AST-PAC,通过基于抽象语法树(AST)的扰动生成语法合法的校准样本。初步结果显示,随语法规模增大 AST-PAC 提升而 PAC 下降,但 AST-PAC 对小文件扰动不足,在字母数字密集代码上表现欠佳。作者据此指出,语法感知与规模自适应的校准是代码模型来源审计可靠化的前提。
Code Large Language Models are frequently trained on massive datasets containing restrictively licensed source code. This creates urgent data governance and copyright challenges. Membership Inference Attacks (MIAs) can serve as an auditing mechanism to detect unauthorized data usage in models. While attacks like the Loss Attack provide a baseline, more involved methods like Polarized Augment Calibration (PAC) remain underexplored in the code domain. This paper presents an exploratory study evaluating these methods on 3B-7B parameter code models. We find that while PAC generally outperforms the Loss baseline, its effectiveness relies on augmentation strategies that disregard the rigid syntax of code, leading to performance degradation on larger, complex files. To address this, we introduce AST-PAC, a domain-specific adaptation that utilizes Abstract Syntax Tree (AST) based perturbations to generate syntactically valid calibration samples. Preliminary results indicate that AST-PAC improves as syntactic size grows, where PAC degrades, but under-mutates small files and underperforms on alphanumeric-rich code. Overall, the findings motivate future work on syntax-aware and size-adaptive calibration as a prerequisite for reliable provenance auditing of code language models.