Skip to main content
QUICK REVIEW

[Paper Review] Testing Monotonicity of Machine Learning Models

Arnab Sharma, Heike Wehrheim|arXiv (Cornell University)|Feb 27, 2020
Adversarial Robustness in Machine Learning32 references4 citations
TL;DR

This paper proposes verification-based testing for monotonicity in black-box machine learning models by inferring a white-box decision tree approximation and using SMT solving to systematically generate counterexamples. The approach outperforms adaptive random and property-based testing in detecting monotonicity violations, demonstrating higher effectiveness and efficiency on 90 models.

ABSTRACT

Today, machine learning (ML) models are increasingly applied in decision making. This induces an urgent need for quality assurance of ML models with respect to (often domain-dependent) requirements. Monotonicity is one such requirement. It specifies a software as 'learned' by an ML algorithm to give an increasing prediction with the increase of some attribute values. While there exist multiple ML algorithms for ensuring monotonicity of the generated model, approaches for checking monotonicity, in particular of black-box models, are largely lacking. In this work, we propose verification-based testing of monotonicity, i.e., the formal computation of test inputs on a white-box model via verification technology, and the automatic inference of this approximating white-box model from the black-box model under test. On the white-box model, the space of test inputs can be systematically explored by a directed computation of test cases. The empirical evaluation on 90 black-box models shows verification-based testing can outperform adaptive random testing as well as property-based techniques with respect to effectiveness and efficiency.

Motivation & Objective

  • To address the lack of systematic testing techniques for monotonicity in black-box ML models, a critical requirement in domains like finance and healthcare.
  • To enable model-agnostic monotonicity validation independent of the underlying ML algorithm or architecture.
  • To improve test effectiveness by systematically generating targeted test cases rather than relying on random or coverage-driven sampling.
  • To provide a formal, verifiable method for detecting monotonicity violations using SMT technology on an approximated white-box model.
  • To iteratively refine the white-box model using confirmed counterexamples, enhancing test suite coverage and accuracy.

Proposed method

  • Infer a white-box decision tree model from black-box model predictions using training data derived from the model under test.
  • Translate the decision tree into a logical formula expressible in SMT logic for formal verification.
  • Use an SMT solver to compute potential counterexamples to monotonicity by checking if increasing an input attribute decreases the output prediction.
  • Systematically vary detected counterexamples using symbolic execution-like strategies to expand test coverage and explore neighboring input regions.
  • Validate inferred counterexamples in the original black-box model; if confirmed, store as valid monotonicity violations.
  • If no valid counterexamples are found, retrain the white-box model with new data including the confirmed test cases to improve approximation quality.

Experimental results

Research questions

  • RQ1Can verification-based testing outperform adaptive random and property-based testing in detecting monotonicity violations in black-box ML models?
  • RQ2How effective is the use of an inferred white-box decision tree in approximating complex black-box models for monotonicity testing?
  • RQ3To what extent does systematic variation of counterexamples improve test suite coverage and detection of monotonicity failures?
  • RQ4How does the iterative refinement of the white-box model impact the accuracy and efficiency of monotonicity testing?
  • RQ5Can the proposed method be applied effectively across diverse ML models trained with both monotonicity-aware and standard algorithms?

Key findings

  • The proposed verification-based testing approach detected monotonicity violations more effectively than adaptive random testing and property-based testing on 90 black-box models.
  • The method achieved higher detection rates with fewer test cases, indicating improved efficiency in identifying monotonicity failures.
  • Systematic variation of counterexamples significantly increased test suite coverage and the likelihood of uncovering hidden violations.
  • Iterative retraining of the white-box model improved approximation fidelity, reducing false negatives and enhancing detection accuracy.
  • The approach demonstrated strong performance across diverse models, including those trained with both monotonicity-aware and standard learning algorithms.
  • The use of SMT solving on the inferred white-box model enabled precise, formal verification of monotonicity constraints, surpassing heuristic-based approaches.

Better researchstarts right now

From reading papers to final review, dramatically reduce your research time.

No credit card · Free plan available

This review was created by AI and reviewed by human editors.