paperbot · PL 论文追踪

全部论文 待读 收藏

P2 StackPlagger: A System for Identifying AI-Code Plagiarism on Stack Overflow

StackPlagger:一个识别 Stack Overflow 上 AI 代码抄袭的系统
ASE 2025 40th IEEE/ACM International Conference on Automated Software Engineering (ASE)2025匹配度 2/10 · 该论文关注 Stack Overflow 短代码片段的 AI 生成代码检测与部署,属于代码剽窃检测/软件工程工具,并未涉及静态分析、Agentic 程序、浮点程序分析、贝叶斯程序分析或 LLM 辅助形式化验证等核心方向。虽然使用了预训练嵌入和面向对抗提示的数据集,但与用户研究画像仅存在较弱的代码分析/LLM 工具交叉。引用 0 inbox
Aman Swaraj, Harsh Goyal, Sumit Chadgal, Sandeep Kumar
crossref: 2026-09-12

AI 速览

一句话:提出融合代码风格计量特征与预训练嵌入的集成方法,检测 Stack Overflow 短代码片段中的 AI 生成代码,并部署为 Chrome 插件。

识别 Stack Overflow(SO)等技术论坛上的 AI 代码抄袭对平台可信度至关重要。已有 AI 生成代码检测研究多针对代码仓库与竞赛中较长、独立的样本,而 SO 代码片段往往短小、碎片化且依赖具体上下文,检测更为困难;同时现有方法也未充分考虑经混淆或对抗性提示、刻意模仿人类风格以逃避检测的代码。为此,作者首先构建了一个包含 8000 对 SO-ChatGPT 片段的数据集,使用多种对抗性提示生成。与以往仅依赖预训练模型的方法不同,本文提出一种集成方法,将代码的风格计量特征(stylometric features)与预训练嵌入相结合以提升检测性能。最后,作者将微调后的模型部署为名为 StackPlagger 的 Google Chrome 扩展,可在 SO 回答中标记 AI 生成代码并显示 AI 置信度分数。

问题
Stack Overflow 上的代码片段短小、碎片化且上下文相关,加之存在刻意模仿人类风格的混淆或对抗性提示代码,使得现有面向长样本的 AI 生成代码检测方法难以奏效。
方法
构建由多种对抗性提示生成的 8000 对 SO-ChatGPT 片段数据集,并提出将代码风格计量特征与预训练嵌入相结合的集成检测模型。
评估
在自建的 SO-ChatGPT 片段数据集上评估检测性能,并将微调模型部署为 Chrome 扩展 StackPlagger,用于标记 AI 生成代码并展示置信度分数。
原文摘要(Abstract)

Identifying AI code plagiarism on technical forums like Stack Overflow (SO) is critical, as it can directly impact the platform’s trust and credibility. While previous studies have explored AI-generated code detection, they have focused on long, standalone samples from repositories and competitions. In contrast, SO snippets are often short, fragmented, and context-specific, which can make detection more challenging. Furthermore, existing methods have also not adequately addressed the concern of obfuscated or adversarially prompted code that are crafted to mimic human style and evade detection. To address these gaps, we first introduce a curated dataset of 8000 SO-ChatGPT snippet pairs generated using multiple adversarial prompts. While earlier methods solely relied on pre-trained models, we propose an ensemble approach combining stylometric features of code along with the pre-trained embeddings to improve detection performance. Finally, we deploy our fine-tuned model as a Google Chrome extension called ‘StackPlagger’, which can flag AI-generated code in SO answers and display AI confidence scores. Video demonstration and the associated artifacts of our tool can be found at https://youtu.be/6O9Urp2mvbI and https://github.com/harsh-g1/StackPlagger, respectively.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot9397,
  title = {StackPlagger: A System for Identifying AI-Code Plagiarism on Stack Overflow},
  author = {Aman Swaraj and Harsh Goyal and Sumit Chadgal and Sandeep Kumar},
  booktitle = {ASE},
  year = {2025},
  doi = {10.1109/ase63991.2025.00386}
}