AI-based code generators are an emerging solution for automatically writing programs starting from descriptions in natural language, by using deep neural networks (Neural Machine Translation, NMT). In particular, code generators have been used for ethical hacking and offensive security testing by generating proof-of-concept attacks. Unfortunately, the evaluation of code generators still faces several issues. The current practice uses output similarity metrics, i.e., automatic metrics that compute the textual similarity of generated code with ground-truth references. However, it is not clear what metric to use, and which metric is most suitable for specific contexts. This work analyzes a large set of output similarity metrics on offensive code generators. We apply the metrics on two state-of-the-art NMT models using two datasets containing offensive assembly and Python code with their descriptions in the English language. We compare the estimates from the automatic metrics with human evaluation and provide practical insights into their strengths and limitations.


翻译:基于AI的代码生成器是一种新兴解决方案,通过深度神经网络(神经机器翻译,NMT)从自然语言描述中自动生成程序。具体而言,代码生成器已被用于生成概念验证攻击,以支持道德黑客和渗透安全测试。然而,代码生成器的评估仍面临若干问题。当前实践采用输出相似性指标,即通过计算生成代码与真实参考代码的文本相似性的自动评估指标。但尚不明确应使用何种指标,以及何种指标最适用于特定场景。本研究针对恶意代码生成器,系统分析了大量输出相似性指标。我们基于两个包含恶意汇编代码和Python代码及其英文描述的数据集,将评估指标应用于两种最先进的NMT模型。通过对比自动指标评估结果与人类评估结果,本文揭示了这些指标的优势与局限性,并提供了实践性见解。

0
下载
关闭预览

相关内容

代码(Code)是专知网的一个重要知识资料文档板块,旨在整理收录论文源代码、复现代码,经典工程代码等,便于用户查阅下载使用。
专知会员服务
61+阅读 · 2020年3月19日
100+篇《自监督学习(Self-Supervised Learning)》论文最新合集
专知会员服务
167+阅读 · 2020年3月18日
强化学习最新教程,17页pdf
专知会员服务
182+阅读 · 2019年10月11日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Unsupervised Learning via Meta-Learning
CreateAMind
44+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Arxiv
1+阅读 · 2023年4月11日
An Overview on Machine Translation Evaluation
Arxiv
14+阅读 · 2022年2月22日
Arxiv
15+阅读 · 2021年7月14日
VIP会员
最新内容
《多域战场上反制小型无人机系统》150页
专知会员服务
0+阅读 · 2分钟前
战场人工智能:增强陆地作战能力的发现与要求
专知会员服务
0+阅读 · 12分钟前
以人工智能为中心的指挥控制
专知会员服务
0+阅读 · 35分钟前
《基于深度强化学习的反无人机技术研究》178页
“史诗怒火”行动与“AI中心战”模式的浮现
专知会员服务
8+阅读 · 6月10日
【CVPR2026教程】扩散模型的解析理解
专知会员服务
3+阅读 · 6月10日
马赛克战:俄乌战场透析
专知会员服务
16+阅读 · 6月10日
《利用人工智能增强军事决策》
专知会员服务
7+阅读 · 6月10日
相关基金
国家自然科学基金
0+阅读 · 2013年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2012年12月31日
国家自然科学基金
0+阅读 · 2011年12月31日
国家自然科学基金
0+阅读 · 2009年12月31日
Top
微信扫码咨询专知VIP会员