Table of Contents
Fetching ...

si4onnx: A Python package for Selective Inference in Deep Learning Models

Teruyuki Katsuoka, Tomohiro Shiraishi, Daiki Miwa, Shuichi Nishino, Ichiro Takeuchi

TL;DR

si4onnx addresses the gap in quantifying statistical significance of ROI detections in deep learning by applying selective inference to ROIs identified by anomaly detection, segmentation, or CAM. It automates the derivation of selection events for piecewise-linear DL models via Auto-Conditioning and parametric programming, enabling exact selective $p$-values from ONNX-exported models. The framework demonstrates that selective $p$-values are uniformly distributed under the null and retain power under the alternative, outperforming naive and Bonferroni approaches in illustrative simulations. This provides a practical, framework-agnostic tool for validating ROI-based explanations and decisions in high-stakes AI tasks, with potential for broader model support and post-processing extensions.

Abstract

In this paper, we introduce si4onnx, a package for performing selective inference on deep learning models. Techniques such as CAM in XAI and reconstruction-based anomaly detection using VAE can be interpreted as methods for identifying significant regions within input images. However, the identified regions may not always carry meaningful significance. Therefore, evaluating the statistical significance of these regions represents a crucial challenge in establishing the reliability of AI systems. si4onnx is a Python package that enables straightforward implementation of hypothesis testing with controlled type I error rates through selective inference. It is compatible with deep learning models constructed using common frameworks such as PyTorch and TensorFlow.

si4onnx: A Python package for Selective Inference in Deep Learning Models

TL;DR

si4onnx addresses the gap in quantifying statistical significance of ROI detections in deep learning by applying selective inference to ROIs identified by anomaly detection, segmentation, or CAM. It automates the derivation of selection events for piecewise-linear DL models via Auto-Conditioning and parametric programming, enabling exact selective -values from ONNX-exported models. The framework demonstrates that selective -values are uniformly distributed under the null and retain power under the alternative, outperforming naive and Bonferroni approaches in illustrative simulations. This provides a practical, framework-agnostic tool for validating ROI-based explanations and decisions in high-stakes AI tasks, with potential for broader model support and post-processing extensions.

Abstract

In this paper, we introduce si4onnx, a package for performing selective inference on deep learning models. Techniques such as CAM in XAI and reconstruction-based anomaly detection using VAE can be interpreted as methods for identifying significant regions within input images. However, the identified regions may not always carry meaningful significance. Therefore, evaluating the statistical significance of these regions represents a crucial challenge in establishing the reliability of AI systems. si4onnx is a Python package that enables straightforward implementation of hypothesis testing with controlled type I error rates through selective inference. It is compatible with deep learning models constructed using common frameworks such as PyTorch and TensorFlow.

Paper Structure

This paper contains 29 sections, 30 equations, 9 figures, 1 algorithm.

Figures (9)

  • Figure 1: Example 2: Anomaly Detection by Variational Auto-Encoder (VAE)
  • Figure 2: Example 3: Segmentation by U-Net
  • Figure 3: Example 1: Saliency Region by Class Activation Map (CAM)
  • Figure 5: VAE
  • Figure 6: U-Net
  • ...and 4 more figures