AST-PAC: 基于抽象语法树的成员推断
AST-PAC: AST-guided Membership Inference for Code
AI总结:
AST-PAC通过利用抽象语法树生成语法有效的校准样本,提升代码模型的成员推断性能,尤其在处理复杂代码时表现更优。
摘要:
代码大型语言模型经常在包含受限制许可的源代码大规模数据集上进行训练。这引发了紧迫的数据治理和版权挑战。成员推断攻击(MIAs)可以作为一种审计机制,用于检测模型中的未经授权的数据使用。虽然像损失攻击这样的攻击提供了一个基准,但更深入的方法如极化增强校准(PAC)在代码领域仍被低估。本文提出了一项探索性研究,评估这些方法在3B-7B参数代码模型上的表现。我们发现,尽管PAC总体上优于损失基准,但其效果依赖于增强策略,这些策略忽视了代码的严格语法,导致在更大、更复杂的文件上性能下降。为了解决这一问题,我们引入了AST-PAC,一种针对领域的适应方法,利用基于抽象语法树(AST)的扰动生成语法有效的校准样本。初步结果表明,AST-PAC随着语法规模的增长而提高,而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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。