Counterfactual Alert Explanations Using Classifier-Autoencoder Models

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional systems fail to provide intuitive and accurate counterfactual explanations for computer alerts generated by machine learning algorithms, particularly for tabular data with categorical variables, leading to unrealistic or deceptive recommendations, and struggle with high computational costs that prevent real-time or near-real-time responses.

Innovation Solution

An artificial neural network architecture combining a classifier and autoencoder is trained jointly to generate in-sample counterfactual explanations by transforming inputs into a lower-dimensional latent space, using gradient descent and adversarial training to ensure recommendations are coherent and computationally efficient.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional gradient descent methods are used to generate counterfactual explanations, then the computational process is straightforward, but the generated counterfactuals are unrealistic and out-of-sample for tabular data with categorical variables

Engineering Contradiction:
Improverealism of counterfactual explanationsVSAvoidcomplexity of neural network architecture
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system segments the counterfactual generation process into two distinct neural network components: an autoencoder that learns the data distribution and generates realistic samples, and a classifier that provides gradient guidance for the counterfactual search. This segmentation allows each component to specialize, ensuring realistic counterfactuals while maintaining computational efficiency.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The autoencoder acts as an intermediary between the input data and the counterfactual generation process. By encoding inputs into a latent space and decoding them back, it ensures that generated counterfactuals remain within the realistic data distribution, preventing unrealistic or out-of-sample explanations.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If standard counterfactual generation methods are used, then the implementation is simple, but the computational cost is high and real-time response is not achieved

Engineering Contradiction:
Improvespeed of counterfactual generationVSAvoidtime for model training and inference
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system performs preliminary action by pre-training the autoencoder on the entire dataset before counterfactual generation. This pre-training establishes the data distribution model in advance, allowing rapid counterfactual generation during inference without repeating expensive training procedures, thus enabling real-time responses.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system substitutes traditional iterative optimization methods with a neural network-based approach. The trained autoencoder and classifier work together to generate counterfactuals in a single forward pass, replacing computationally expensive mechanical optimization loops with efficient neural network inference.

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

3Measurement precision

If machine learning algorithms are used to detect computer alerts, then detection accuracy is improved, but visibility into the underlying cause is lost

Engineering Contradiction:
Improveaccuracy of alert detectionVSAvoidvisibility into underlying cause
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The system provides feedback by generating counterfactual explanations that show what changes would prevent an alert. This feedback loop gives users actionable insights into the underlying causes of alerts, transforming the black-box detection process into an interpretable system that guides remediation efforts.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system changes parameters by identifying which input features need to be modified to change the alert outcome. By analyzing the counterfactual examples, the system reveals which parameter changes would prevent the alert, providing visibility into the underlying causes while maintaining high detection accuracy.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS12572796B2Methods and systems for generating recommendations for counterfactual explanations of computer alerts that are automatically detected by a machine learning algorithm
Publication Date: 2026.03.10 CAPITAL ONE SERVICES LLC
  • US12572796B2 patent drawing
  • US12572796B2 patent drawing
  • US12572796B2 patent drawing

AI summary

Methods and systems are described herein for generating recommendations for counterfactual explanations to computer alerts that are automatically detected by a machine learning algorithm. The methods and systems use an artificial neural network architecture that trains a hybrid classifier and autoencoder. For example, one model (or artificial neural network), which is a classifier, is trained to make predictions. A second model (or artificial neural network), which is an autoencoder, is trained to reconstruct its inputs. As the second model is trained to reconstruct its inputs means, the second model is implicitly trained to determine what in-sample data looks like. By combining these networks and train them jointly, the system generates predictions (e.g., counterfactual explanations) that are in-sample.