Counterfactual Data Generation for Neural Network Reliability

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Deep learning models lack effective metrics and practices to measure the degree to which they have learned the desired input-to-output relationship, leading to over-parametrization and complex, nonlinear decision boundaries, which results in a gap between actual learning and perceived learning.

Innovation Solution

The method generates a counterfactual image data sample using a neural network, incorporating an uncertainty regularizing term in the loss function to reduce adversarial effects and produce meaningful explanations of the model's decision boundary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If deep learning models use large number of parameters to improve classification accuracy, then model capability is improved, but decision boundary complexity increases and reliability decreases

Engineering Contradiction:
Improveprediction reliabilityVSAvoiddecision boundary complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent replaces traditional mechanical perturbation methods with a learned perturbation system using a generator neural network. Instead of applying fixed or random perturbations, the generator network learns optimal perturbations that systematically probe decision boundaries, substituting brute-force mechanical exploration with intelligent, adaptive learning-based exploration.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the parameter space by introducing uncertainty estimates as additional output parameters from the classifier network. This allows the system to not only predict class labels but also quantify prediction confidence, enabling dynamic adjustment of perturbation strength based on predicted uncertainty levels.

Inventive Principle:
Principle #35Parameter changes

2Loss of information

If traditional perturbation methods are used to explain classification, then explanation generation is simple, but adversarial effects produce meaningless explanations

Engineering Contradiction:
Improveexplanation qualityVSAvoidadversarial effects
Core Design Contradiction:
Loss of informationVSObject-generated harmful factors

Solution Approach 1:

The patent introduces an intermediary generator network that acts as a mediator between the input data and the perturbation process. This intermediary learns to generate meaningful perturbations that preserve semantic information while achieving classification changes, filtering out adversarial artifacts that would otherwise corrupt the explanation quality.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements feedback loops where uncertainty estimates from the classifier inform the generator's perturbation strategy. The generator uses this feedback to adjust perturbation magnitude and direction, avoiding regions that produce adversarial effects while focusing on semantically meaningful boundary transitions.

Inventive Principle:
Principle #23Feedback

3Loss of information

If uncertainty estimation is added to the loss function to reduce adversarial effects, then explanation quality improves, but computational complexity increases

Engineering Contradiction:
Improveexplanation qualityVSAvoidcomputational complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent merges the uncertainty estimation function with the existing classification task by adding uncertainty output to the same neural network layer that produces class predictions. This consolidation allows both functions to share computational resources and be trained simultaneously through a unified loss function, reducing overall computational overhead.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The classifier network is designed with multi-functionality, serving both as a standard classifier and an uncertainty estimator. This universal network structure eliminates the need for separate uncertainty modeling components, reducing computational complexity while maintaining explanation quality through integrated training objectives.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Data Source

PatentEP3796228B1Device and method for generating a counterfactual data sample for a neural network
Publication Date: 2025.02.19 ROBERT BOSCH GMBH
  • EP3796228B1 patent drawingFigure 1
  • EP3796228B1 patent drawingFigure 2
  • EP3796228B1 patent drawingFigure 3

AI summary

According to various embodiments, a method for generating a counterfactual data sample for a neural network based on an input sensor data sample is described comprising determining, using the neural network, a class prediction for the input sensor data sample, determining, in addition to the class prediction, an estimate of the uncertainty of the class prediction, generating a candidate counterfactual data sample for which the neural network determines a different class prediction than for the input sensor data sample, determining a loss function, wherein the loss function comprises the estimate of the uncertainty of the class prediction by the neural network for the candidate counterfactual data sample, modifying the candidate counterfactual data sample to obtain a counterfactual data sample based on the determined loss function and outputting the counterfactual data sample.