DeCoMa:通过双通道代码抽象检测与净化代码数据集水印
DeCoMa: Detecting and Purifying Code Dataset Watermarks through Dual Channel Code Abstraction
AI总结:
DeCoMa提出双通道代码抽象方法,通过将代码映射为标准化模板并识别异常关联,实现代码数据集水印的高效检测与净化,在14个场景中达到100%召回率且无需模型训练。
摘要:
水印是一种用于帮助识别数据点来源的技术,可用于帮助防止受保护数据集被滥用。现有基于后门研究思想的代码水印方法,将隐蔽触发器嵌入作为水印。尽管这些方法对稀释攻击和后门检测具有较高的抵抗力,但其鲁棒性尚未得到充分评估。为填补这一空白,我们提出了 DeCoMa,一种用于检测和净化代码数据集水印的双通道方法。为克服代码水印隐蔽性和隐藏性所造成的高障碍,DeCoMa 利用对代码的双通道约束,将代码样本泛化并映射为标准化模板。随后,DeCoMa 通过识别标准化模板中成对元素之间的异常关联来提取隐藏水印。最后,DeCoMa 通过移除所有包含已检测到水印的样本来净化被水印的数据集,从而实现对受保护代码的静默占用。我们进行了广泛的实验来评估 DeCoMa 的有效性和效率,覆盖 14 种代码水印和 3 个代表性智能代码任务(共 14 个场景)。实验结果表明,DeCoMa 在 14 个代码水印检测场景中实现了 100% 的稳定召回率,显著优于基线方法。此外,DeCoMa 能够有效攻击嵌入率低至 0.1% 的代码水印,同时在净化后的数据集上训练后保持相当的模型性能。此外,由于 DeCoMa 的检测不需要模型训练,其效率显著高于所有基线方法,加速比从 31.5 倍到 130.9 倍不等。这些结果表明需要为代码模型开发更先进的水印技术,同时 DeCoMa 可作为未来评估的基线。代码可在 https://github.com/xiaoyuanpigo/DeCoMa 获取。
英文摘要:
Watermarking is a technique to help identify the source of data points, which can be used to help prevent the misuse of protected datasets. Existing methods on code watermarking, leveraging the idea from the backdoor research, embed stealthy triggers as watermarks. Despite their high resilience against dilution attacks and backdoor detections, the robustness has not been fully evaluated. To fill this gap, we propose DeCoMa, a dual-channel approach to Detect and purify Code dataset waterMarks. To overcome the high barrier created by the stealthy and hidden nature of code watermarks, DeCoMa leverages dual-channel constraints on code to generalize and map code samples into standardized templates. Subsequently, DeCoMa extracts hidden watermarks by identifying outlier associations between paired elements within the standardized templates. Finally, DeCoMa purifies the watermarked dataset by removing all samples containing the detected watermark, enabling the silent appropriation of protected code. We conduct extensive experiments to evaluate the effectiveness and efficiency of DeCoMa, covering 14 types of code watermarks and 3 representative intelligent code tasks (a total of 14 scenarios). Experimental results demonstrate that DeCoMa achieves a stable recall of 100% in 14 code watermark detection scenarios, significantly outperforming the baselines. Additionally, DeCoMa effectively attacks code watermarks with embedding rates as low as 0.1%, while maintaining comparable model performance after training on the purified dataset. Furthermore, as DeCoMa requires no model training for detection, it achieves substantially higher efficiency than all baselines, with a speedup ranging from 31.5 to 130.9X. The results call for more advanced watermarking techniques for code models, while DeCoMa can serve as a baseline for future evaluation. Code is available at https://github.com/xiaoyuanpigo/DeCoMa
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。