Table of Contents
Fetching ...

Inferring Data Preconditions from Deep Learning Models for Trustworthy Prediction in Deployment

Shibbir Ahmed, Hongyang Gao, Hridesh Rajan

TL;DR

DeepInfer tackles the problem of trusting DNN predictions on unseen data by deriving data preconditions from a trained model using a novel abstract representation and weakest-precondition semantics ($wp$). It computes layer-wise preconditions via activation-specific rules and propagates them back to the input features, enabling deployment-time trust decisions based on feature-wise precondition violations and a simple decision tree. The approach is evaluated on 29 real-world models across four datasets, achieving high recall ($0.98$) and F1 ($0.84$) with minimal runtime overhead ($\approx 0.22$ s) and outperforming SelfChecker in deployment efficiency. The work contributes an offline, model-specific framework, open-source tooling (DIrepo), and a path toward reliable deployment of DNNs in safety-critical settings.

Abstract

Deep learning models are trained with certain assumptions about the data during the development stage and then used for prediction in the deployment stage. It is important to reason about the trustworthiness of the model's predictions with unseen data during deployment. Existing methods for specifying and verifying traditional software are insufficient for this task, as they cannot handle the complexity of DNN model architecture and expected outcomes. In this work, we propose a novel technique that uses rules derived from neural network computations to infer data preconditions for a DNN model to determine the trustworthiness of its predictions. Our approach, DeepInfer involves introducing a novel abstraction for a trained DNN model that enables weakest precondition reasoning using Dijkstra's Predicate Transformer Semantics. By deriving rules over the inductive type of neural network abstract representation, we can overcome the matrix dimensionality issues that arise from the backward non-linear computation from the output layer to the input layer. We utilize the weakest precondition computation using rules of each kind of activation function to compute layer-wise precondition from the given postcondition on the final output of a deep neural network. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets collected from five different sources and demonstrated the utility, effectiveness, and performance improvement over closely related work. DeepInfer efficiently detects correct and incorrect predictions of high-accuracy models with high recall (0.98) and high F-1 score (0.84) and has significantly improved over prior technique, SelfChecker. The average runtime overhead of DeepInfer is low, 0.22 sec for all unseen datasets. We also compared runtime overhead using the same hardware settings and found that DeepInfer is 3.27 times faster than SelfChecker.

Inferring Data Preconditions from Deep Learning Models for Trustworthy Prediction in Deployment

TL;DR

DeepInfer tackles the problem of trusting DNN predictions on unseen data by deriving data preconditions from a trained model using a novel abstract representation and weakest-precondition semantics (). It computes layer-wise preconditions via activation-specific rules and propagates them back to the input features, enabling deployment-time trust decisions based on feature-wise precondition violations and a simple decision tree. The approach is evaluated on 29 real-world models across four datasets, achieving high recall () and F1 () with minimal runtime overhead ( s) and outperforming SelfChecker in deployment efficiency. The work contributes an offline, model-specific framework, open-source tooling (DIrepo), and a path toward reliable deployment of DNNs in safety-critical settings.

Abstract

Deep learning models are trained with certain assumptions about the data during the development stage and then used for prediction in the deployment stage. It is important to reason about the trustworthiness of the model's predictions with unseen data during deployment. Existing methods for specifying and verifying traditional software are insufficient for this task, as they cannot handle the complexity of DNN model architecture and expected outcomes. In this work, we propose a novel technique that uses rules derived from neural network computations to infer data preconditions for a DNN model to determine the trustworthiness of its predictions. Our approach, DeepInfer involves introducing a novel abstraction for a trained DNN model that enables weakest precondition reasoning using Dijkstra's Predicate Transformer Semantics. By deriving rules over the inductive type of neural network abstract representation, we can overcome the matrix dimensionality issues that arise from the backward non-linear computation from the output layer to the input layer. We utilize the weakest precondition computation using rules of each kind of activation function to compute layer-wise precondition from the given postcondition on the final output of a deep neural network. We extensively evaluated DeepInfer on 29 real-world DNN models using four different datasets collected from five different sources and demonstrated the utility, effectiveness, and performance improvement over closely related work. DeepInfer efficiently detects correct and incorrect predictions of high-accuracy models with high recall (0.98) and high F-1 score (0.84) and has significantly improved over prior technique, SelfChecker. The average runtime overhead of DeepInfer is low, 0.22 sec for all unseen datasets. We also compared runtime overhead using the same hardware settings and found that DeepInfer is 3.27 times faster than SelfChecker.
Paper Structure (23 sections, 26 equations, 8 figures, 3 tables, 1 algorithm)

This paper contains 23 sections, 26 equations, 8 figures, 3 tables, 1 algorithm.

Figures (8)

  • Figure 1: An example motivating how we can trust a model's prediction with unseen data in the deployment stage
  • Figure 2: Overview diagram depicting the technique of data precondition inference from a trained DNN model after the training phase and how those are utilized in the deployment stage for implying trust in the model's prediction using unseen data
  • Figure 3: Grammar representing Neural network, preconditions, and postconditions
  • Figure 4: Rules for computing $\textsc{$wp$}\xspace$ over inductive type $N$, $\alpha$ over inductive type $\delta$, $\beta$ over inductive type $a(f(\overline{x}))$
  • Figure 5: Data precondition ($\delta_1$) computation from an example DNN model ($N$) with 3 layers and postcondition ($\delta$)
  • ...and 3 more figures