arXiv:2501.00298cs.SEcs.AI2025-01被引 2

让代码分析模型在部署后仍保持高精度,应对硬件和代码变化。

Enhancing Deployment-Time Predictive Model Robustness for Code Analysis and Optimization

  • 通过统计方法识别易出错的测试样本,定位潜在误判。
  • 仅重标注5%的错误样本,即可恢复模型训练时的性能水平。
  • 适用于需长期稳定运行的代码优化场景,如编译器或静态分析工具。

监督学习在代码分析与优化任务中表现优异,但其模型易受硬件或应用负载微小变化影响,例如新CPU架构或代码模式,导致预测准确率下降,削弱模型鲁棒性。我们提出Prom,一个开源库,旨在增强部署阶段预测模型对上述变化的鲁棒性与性能。Prom通过统计评估识别可能误判的测试样本,并利用这些样本的反馈信息进行增量学习以改进已部署模型。我们在5个代码分析与优化任务上,对13个代表性机器学习模型应用Prom。评估表明,Prom平均可成功识别96%(最高达100%)的误判样本。通过仅对最多5%的识别样本进行重标注并执行增量学习,部署模型性能可恢复至训练阶段水平。

原文摘要 · Abstract (English)

Supervised machine learning techniques have shown promising results in code analysis and optimization problems. However, a learning-based solution can be brittle because minor changes in hardware or application workloads -- such as facing a new CPU architecture or code pattern -- may jeopardize decision accuracy, ultimately undermining model robustness. We introduce Prom, an open-source library to enhance the robustness and performance of predictive models against such changes during deployment. Prom achieves this by using statistical assessments to identify test samples prone to mispredictions and using feedback on these samples to improve a deployed model. We showcase Prom by applying it to 13 representative machine learning models across 5 code analysis and optimization tasks. Our extensive evaluation demonstrates that Prom can successfully identify an average of 96% (up to 100%) of mispredictions. By relabeling up to 5% of the Prom-identified samples through incremental learning, Prom can help a deployed model achieve a performance comparable to that attained during its model training phase.

代码分析模型鲁棒性增量学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。