Skip to content

mathworks/ai-verification-workshop

Repository files navigation

AI Verification Workshop

Verifying AI Models Before They Reach the Edge

Open in MATLAB Online

At the edge, mistakes are expensive. Once an AI model is optimized, compiled, and connected to real sensors, failures are harder to diagnose. Therefore, it is crucial that AI systems behave as intended, particularly in safety-critical and mission-critical applications.

In this interactive, hands-on workshop, you will learn how to apply AI verification techniques, with a focus on formal methods, to build confidence in neural network behavior before deployment. Using real examples from aerospace applications (ACAS Xu collision avoidance), participants progress from finding adversarial examples to formally verifying global stability across an entire operational design domain.

Learn to move beyond sampling-based testing and gain mathematical verification of neural networks correctness across the entire operational design domain, catching deployment failures that Monte-Carlo approaches miss and getting ahead of emerging safety certification standards.

Example: The ACAS Xu collision avoidance system compresses a 2GB lookup table into 45 neural networks, reducing memory by over 99%. But how do we know these networks behave correctly in all situations? On the left, Monte-Carlo-based sampling evaluates individual points but cannot guarantee coverage. On the right, formal verification mathematically validates the model across the entire input space.

Monte-Carlo-based Sampling Formal Verification (Adaptive Mesh)
Monte Carlo sampling leaves coverage gaps Formal verification covers the full ODD
Monte-Carlo-based sampling leaves gaps in coverage. Zooming in reveals regions where network output is uncertain. With higher-dimensional inputs, these gaps grow larger or require exponentially more simulations to cover the ODD. Formal methods mathematically validate that the network output is correct for ALL possible inputs, without needing to execute tests. The adaptive mesh iteratively verifies the entire ODD, leaving no gaps.

Exercises

# Exercise Description Results
1 Getting Started Generate adversarial examples that fool a digit classifier HTML
2 Local Robustness Formally prove an ACAS Xu network is robust to input perturbations HTML
3 Global Stability Verify stability across the full operational design domain HTML

Getting Started

  1. Open MATLAB® R2026a or later (or click the "Open in MATLAB Online" badge above)
  2. Run startup.m to configure paths, verify toolboxes, and download the ACAS Xu dataset
  3. Open Part1_GettingStarted.m as a Live Script and run section by section

Each exercise is self-contained. Exercises export published HTML results to results/ when run to completion.

Required Products

Optional Products

About the Data

  • MNIST Digit Classification Network — A small CNN trained on handwritten digits (0–9). Ships with Deep Learning Toolbox.
  • ACAS Xu Neural Networks — 45 fully connected networks from the Airborne Collision Avoidance System for unmanned aircraft. Each network takes 5 inputs (geometry and velocities) and outputs one of 5 steering advisories. Downloaded automatically by startup.m.

References

Copyright 2026 The MathWorks, Inc.

About

Verifying AI models before they reach the Edge

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors