开发者近日推出了一款升级版的AI代码注释检测工具,用于区分代码注释是由人类编写还是由人工智能生成1。该检测器基于公开数据和改进的基础架构构建,达到了77%的平衡精度1。具体而言,该分类器对人类编写的注释判别正确率为73%,对AI生成注释的判别正确率为80%1。当分类器的置信度达到80%或以上时,误判率进一步降至5%1。
该分类模型采用多种自然语言处理特征进行训练,包括词频、字符n-gram和词性标签等1。分类器使用来自七种源的数据进行训练,涵盖人类编写的注释以及来自GPT 5.6、Gemini 3.7、Claude 5、Kimi K2.7、Grok 4.6和GLM 5.2等多个AI模型生成的注释1。经过量化和词汇表过滤优化后,模型大小仅为355 KB1。
该工具以web应用形式发布,所有数据处理均在用户浏览器本地进行,无需公开源代码1。开发者估计理论数据集收集成本约为30美元,但实际成本显著更高1。
A developer has released an improved classifier designed to distinguish between human-written and AI-generated code comments.1 The detector achieves 77% balanced accuracy, with human-written comments correctly identified 73% of the time and AI-generated comments accurately detected 80% of the time.1 When the model's confidence level reaches 80% or higher, the misclassification rate drops to just 5%.1
The classifier was trained using comments from seven different sources: human authors, GPT 5.6, Gemini 3.7, Claude 5, Kimi K2.7, Grok 4.6, and GLM 5.2.1 The model incorporates multiple natural language processing features, including word frequency, character n-grams, and part-of-speech tags.1 After quantization and vocabulary filtering, the model size was reduced to 355 KB.1
The tool is deployed as a web application where all data processing occurs locally within the user's browser, eliminating the need to publish source code or transmit input data externally.1 While the theoretical cost of collecting the dataset was approximately $30, the actual expenses were substantially higher.1
评论
还没有评论,欢迎留下第一条。