提出MANTRA框架,用多阶段自适应降噪提升代码大模型训练效果
MANTRA: a Framework for Multi-stage Adaptive Noise TReAtment During Training
- 在微调过程中嵌入噪声诊断与自适应剔除机制
- 通过损失动态与聚类识别持久噪声点,提升模型性能
- 适用于代码摘要和提交意图分类任务,减少数据清洗负担
深度学习模型在软件工程任务中的可靠应用依赖高质量训练数据。然而大规模代码库不可避免引入噪声或错误标注样本,降低模型准确率与鲁棒性。尽管噪声标签学习(NLL)在其他领域已有广泛研究,但在软件工程(SE)及用于SE任务的大语言模型(LLMs)中仍较少涉及。本文提出MANTRA——一种多阶段自适应噪声处理框架,将噪声诊断与缓解直接融入代码预训练模型(PTM)和代码大模型(code-LLMs)的微调过程。我们首先分析不同噪声水平对模型收敛与损失轨迹的影响,随后采用基于样本损失动态与高斯混合模型聚类的自适应丢弃策略,剔除持续噪声样本同时保留干净数据。在代码摘要与提交意图分类任务上实验表明,部分LLMs对噪声更敏感,但经MANTRA处理后,所有模型性能均得到提升。该框架帮助研究者与实践者减轻数据集误差影响,节省数据清洗时间,最大化微调效果。
原文摘要 · Abstract (English)
The reliable application of deep learning models to software engineering tasks hinges on high-quality training data. Yet, large-scale repositories inevitably introduce noisy or mislabeled examples that degrade both accuracy and robustness. While Noise Label Learning (NLL) has been extensively studied in other fields, there are a few works that investigate NLL in Software Engineering (SE) and Large Language Models (LLMs) for SE tasks. In this work, we propose MANTRA, a Multi-stage Adaptive Noise TReAtment framework that embeds noise diagnosis and mitigation directly into the fine-tuning process of code-Pretrained Language Models (PTM) and code-LLMs. We first investigate the effect of noise at varying levels on convergence and loss trajectories of the models. Then we apply an adaptive dropout strategy guided by per-sample loss dynamics and Gaussian Mixture Model clustering to exclude persistently noisy points while preserving clean data. Applying to code summarization and commit intent classification, our experiments reveal that some LLMs are more sensitive to noise than others. However, with MANTRA, the performance of all models in both tasks is improved. MANTRA enables researchers and practitioners to reduce the impact of errors introduced by the dataset in training, saves time in data cleaning and processing, while maximizing the effect of fine-tuning.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。