Skip to main content
QUICK REVIEW

[Paper Review] Fault Detection Effectiveness of Metamorphic Relations Developed for Testing Supervised Classifiers

Prashanta Saha, Upulee Kanewala|arXiv (Cornell University)|Jan 1, 2019
Software Testing and Debugging TechniquesComputer Science22 references1 citations
TL;DR

This study evaluates the fault detection effectiveness of metamorphic relations (MRs) used to test supervised classifiers, particularly k-Nearest Neighbors (k-NN), using 709 reachable mutants. Despite prior claims of high effectiveness, only 14.8% of mutants were detected, revealing that MRs based on user expectations are significantly less effective than previously reported.

ABSTRACT

In machine learning, supervised classifiers are used to obtain predictions for unlabeled data by inferring prediction functions using labeled data. Supervised classifiers are widely applied in domains such as computational biology, computational physics and healthcare to make critical decisions. However, it is often hard to test supervised classifiers since the expected answers are unknown. This is commonly known as the \emph{oracle problem} and metamorphic testing (MT) has been used to test such programs. In MT, metamorphic relations (MRs) are developed from intrinsic characteristics of the software under test (SUT). These MRs are used to generate test data and to verify the correctness of the test results without the presence of a test oracle. Effectiveness of MT heavily depends on the MRs used for testing. In this paper we have conducted an extensive empirical study to evaluate the fault detection effectiveness of MRs that have been used in multiple previous studies to test supervised classifiers. Our study uses a total of 709 reachable mutants generated by multiple mutation engines and uses data sets with varying characteristics to test the SUT. Our results reveal that only 14.8\% of these mutants are detected using the MRs and that the fault detection effectiveness of these MRs do not scale with the increased number of mutants when compared to what was reported in previous studies.

Motivation & Objective

  • To empirically assess the fault detection effectiveness of metamorphic relations (MRs) used in prior studies for testing supervised classifiers.
  • To address the limitation of prior studies that used very small numbers of mutants (e.g., 22–24) for evaluation.
  • To investigate whether MRs based on user expectations can reliably detect faults in real-world supervised classifier implementations.
  • To examine the impact of varying test data set size on MR fault detection effectiveness.

Proposed method

  • Generated 709 reachable mutants using two mutation tools—MuJava and Major—on a real-world k-NN implementation from the Weka library.
  • Applied 10 predefined MRs derived from user expectations and algorithmic properties of k-NN to generate follow-up test cases.
  • Used source test cases with varying data set sizes to evaluate the robustness of MRs under different input conditions.
  • Measured fault detection effectiveness as the percentage of mutants killed (i.e., detected) by each MR through comparison of expected vs. actual output changes.
  • Conducted a comparative analysis of mutant killing rates between MuJava and Major tools to assess consistency and dominance of specific MRs.
  • Analyzed the correlation between MRs and mutant killing rates to identify the most effective relations.

Experimental results

Research questions

  • RQ1How effective are the MRs developed based on user expectations in detecting faults in supervised classifiers?
  • RQ2Does increasing the number of mutants used in evaluation significantly alter the fault detection effectiveness compared to prior studies with small mutant sets?
  • RQ3Does the size of the input data set used as source test cases affect the fault detection effectiveness of MRs?
  • RQ4Which MRs are most effective in detecting mutants, and is there consistency across different mutation tools?
  • RQ5To what extent do MRs based on user expectations outperform MRs based on algorithmic properties?

Key findings

  • Only 14.8% of the 709 reachable mutants were detected by the 10 MRs, indicating low fault detection effectiveness despite prior claims of high efficacy.
  • The fault detection effectiveness of MRs does not scale with increasing mutant count, contradicting earlier studies that reported higher detection rates with smaller mutant sets.
  • MR7 and MR9 showed the highest mutant killing rates across both MuJava and Major tools, indicating they are the most effective among the tested relations.
  • MuJava-generated mutants had a higher overall killing rate (43.6%) compared to Major (35.1%), but for most individual MRs, Major mutants were more easily killed, suggesting MR7 dominates detection.
  • Changing the size of the randomly generated data set used as source test cases had no significant effect on the fault detection effectiveness of the MRs.
  • The results suggest that MRs based on user expectations are insufficient for reliable fault detection, and more effective MRs based on algorithmic properties are needed.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.