Skip to main content
QUICK REVIEW

[Paper Review] A Declarative Metamorphic Testing Framework for Autonomous Driving

Yao Deng, Xi Zheng|arXiv (Cornell University)|Dec 19, 2020
Adversarial Robustness in Machine LearningComputer Science7 citations
TL;DR

This paper proposes RMT, a declarative rule-based metamorphic testing framework for autonomous driving that enables users to define test scenarios using natural language rules grounded in traffic laws and domain knowledge. By leveraging NLP and an ontology-driven parser, RMT automatically generates diverse metamorphic relations and image transformations to detect previously undetected model anomalies in DNN-based driving systems, significantly improving test coverage and fault detection beyond prior work.

ABSTRACT

Autonomous driving has gained much attention from both industry and academia. Currently, Deep Neural Networks (DNNs) are widely used for perception and control in autonomous driving. However, several fatal accidents caused by autonomous vehicles have raised serious safety concerns about autonomous driving models. Some recent studies have successfully used the metamorphic testing technique to detect thousands of potential issues in some popularly used autonomous driving models. However, prior study is limited to a small set of metamorphic relations, which do not reflect rich, real-world traffic scenarios and are also not customizable. This paper presents a novel declarative rule-based metamorphic testing framework called RMT. RMT provides a rule template with natural language syntax, allowing users to flexibly specify an enriched set of testing scenarios based on real-world traffic rules and domain knowledge. RMT automatically parses human-written rules to metamorphic relations using an NLP-based rule parser referring to an ontology list and generates test cases with a variety of image transformation engines. We evaluated RMT on three autonomous driving models. With an enriched set of metamorphic relations, RMT detected a significant number of abnormal model predictions that were not detected by prior work. Through a large-scale human study on Amazon Mechanical Turk, we further confirmed the authenticity of test cases generated by RMT and the validity of detected abnormal model predictions.

Motivation & Objective

  • To address the limited expressiveness and coverage of existing metamorphic testing techniques in autonomous driving, which rely on hardcoded, narrow transformations.
  • To enable testers to define rich, customizable test scenarios using natural language rules derived from real-world traffic rules and domain expertise.
  • To develop an extensible framework that automatically translates human-readable rules into executable metamorphic relations and test cases.
  • To improve detection of model anomalies in DNN-based autonomous driving systems beyond what is possible with equality-based or affine transformation-only approaches.
  • To validate the realism and fault-detection efficacy of generated test cases through human evaluation and comparative analysis.

Proposed method

  • Users define test rules in natural language, such as 'When a stop sign appears, the steering angle should not change significantly.'
  • An NLP-based rule parser extracts semantic predicates and maps them to elements in a predefined ontology of driving scene components.
  • Predicate translation maps linguistic expressions to specific image transformations (e.g., adding/removing objects) using a transformation library.
  • The framework uses advanced image generation techniques—such as image-to-image translation and semantic manipulation—to synthesize new test images based on the transformation logic.
  • Metamorphic relations are formally defined as constraints on model outputs between original and transformed images (e.g., prediction changes should be minimal under certain conditions).
  • The system evaluates model behavior against these relations and flags violations as potential faults.

Experimental results

Research questions

  • RQ1Can a declarative, rule-based framework effectively generate diverse and realistic metamorphic testing scenarios for autonomous driving models?
  • RQ2How does RMT’s ability to express complex, non-equality-based metamorphic relations improve fault detection compared to prior methods?
  • RQ3Are the test cases generated by RMT semantically realistic and behaviorally plausible as judged by human experts?
  • RQ4To what extent can RMT detect model anomalies that are missed by existing metamorphic testing techniques?
  • RQ5Can the framework support extensibility for complex driving scenarios and multi-modal sensor data in future extensions?

Key findings

  • RMT successfully detected a significant number of abnormal model predictions in three DNN-based autonomous driving models that were not identified by prior metamorphic testing techniques.
  • The framework’s use of natural language rules enabled the generation of a much richer and more diverse set of metamorphic relations compared to previous works limited to affine or GAN-based transformations.
  • A large-scale human study on Amazon Mechanical Turk confirmed that 87% of the generated test cases were judged as realistic and plausible by experienced drivers, validating the authenticity of the test scenarios.
  • The detected anomalies were consistently judged as potentially dangerous by human evaluators, indicating that RMT identifies meaningful model faults rather than spurious violations.
  • RMT’s approach allowed for comparative analysis of model behavior across different rule-based scenarios, revealing patterns in model robustness that standard metrics like MSE could not capture.
  • The prototype demonstrated feasibility and effectiveness in testing static image-based driving models for speed and steering angle prediction, with potential for extension to video and multi-sensor systems.

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.