一句话:提出两阶段正例-未标注学习模型 EVANS,通过伪负样本选择与弱监督对比学习检测巧合正确性,提升故障定位可靠性。
故障定位通过分析测试用例的执行信息推断故障实体与失败结果之间的因果关系,但执行信息中常含巧合正确性(CC):测试用例执行了故障实体却仍输出正确结果,从而误导故障定位。常用的通过测试用例作为负标签并不可靠,而失败测试用例作为正标签则较为确定;故障定位场景中未标注数据通常充足且主要由通过测试用例构成。为此,本文提出两阶段正例-未标注学习模型 EVANS,将失败测试用例定义为正样本,其余视为未标注数据。其核心包括:一是利用预训练模型计算的类间距离和向量距离度量,筛选高质量伪负样本;二是采用弱监督对比学习,用第一阶段获得的标注样本训练模型,并在未标注测试用例中检测 CC。实验表明,EVANS 显著优于现有 CC 检测方法。
Fault localization (FL) can identify the fault's location by analyzing the execution information from test cases in the program. This execution information serves as the foundation for FL to infer latent causal relationships between fault entities and failed results. However, this execution information contains coincidental correctness (CC), which reduces the accuracy of FL. CC arises when a test case executes faulty program entities but still produces the correct output, leading to misleading FL inferences. In widely used datasets, the presence of CC compromises the reliability of passed test cases (i.e., negative labels). In contrast, failed test cases (i.e., positive labels) remain definitive. In FL scenarios, unlabeled data is typically abundant and primarily consists of passed test cases. Therefore, systematically leveraging positive and unlabeled data for accurate CC detection is essential, which is beneficial to FL. To tackle the problem, we propose a two-stagE positiVe and unlAbeled learning model for coiNcidental correctneSs detection, EVANS. EVANS defines failed test cases as positive samples and treats the remaining ones as unlabeled data. It comprises two core modules: (1) A module for selecting high-quality pseudo-negative samples. This module leverages vector distance metrics to identify high-quality pseudo-negative test cases, using inter-class distances computed via a pre-trained model. (2) A weakly supervised contrastive learning module. This module utilizes the labeled samples from Stage (1) to train a contrastive learning model, which then detects CC in unlabeled test cases. Experimental results demonstrate that EVANS significantly outperforms current CC detection methods.
DOI 原文 ·
@inproceedings{paperbot9274,
title = {Sifting Truth from Coincidences: A Two-Stage Positive and Unlabeled Learning Model for Coincidental Correctness Detection},
author = {Chunyan Liu and Huan Xie and Yan Lei and Zhenyu Wu and Jinping Wang},
booktitle = {ASE},
year = {2025},
doi = {10.1109/ase63991.2025.00127}
}