Counterfactual Explanation Clustering for Consistent Model Updates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing counterfactual explanation techniques are limited to explaining a single prediction, providing limited insight into model predictions across a population, are inefficient for creating textual explanations, and fail to address model updates or user preferences, leading to inflexible and infeasible recommendations.

Innovation Solution

A computing system aggregates multiple counterfactual samples, uses clustering models to assign them to sub-populations, generates explanations based on user preferences, and trains machine learning models with alternating loss functions to ensure consistent output across model updates, while controlling feature changes based on user preferences.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If existing counterfactual explanation techniques are used to explain a single prediction, then the explanation for that specific prediction is provided, but the insight into model predictions across a population is limited

Engineering Contradiction:
Improveinformation about model predictions across populationVSAvoidcomplexity of explanation system
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent segments the population of data samples into multiple clusters based on their feature characteristics. Each cluster represents a sub-population with similar patterns, allowing counterfactual explanations to be generated and aggregated at the cluster level rather than individually for each sample. This segmentation enables comprehensive population-level insights while managing complexity through grouping similar cases together.

Inventive Principle:
Principle #1Segmentation

2Measurement precision

If counterfactual samples are generated for each individual data sample, then detailed explanations are provided, but the process is labor intensive and inefficient

Engineering Contradiction:
Improveprecision of explanationVSAvoidefficiency of explanation generation
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent merges multiple individual counterfactual samples into cluster-level aggregations. By combining samples within each cluster and generating representative explanations at the cluster level rather than individually for each sample, the system maintains explanatory precision while dramatically improving efficiency. The merged cluster explanations capture the essential patterns that would otherwise require numerous individual explanations.

Inventive Principle:
Principle #5Merging (Combining)

3Reliability

If machine learning models are updated or replaced over time, then model performance is improved, but the counterfactual samples generated by previous models become inconsistent

Engineering Contradiction:
Improvemodel performanceVSAvoidconsistency of model output
Core Design Contradiction:
ReliabilityVSStability of the object's composition

Solution Approach 1:

The patent creates cluster definitions and explanations that are universal across multiple model versions. By establishing stable feature clusters based on inherent data patterns rather than model-specific predictions, the system ensures that counterfactual explanations remain consistent and meaningful even when the underlying machine learning model is updated or replaced. The cluster structure serves as a stable framework that transcends individual model iterations.

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

4Adaptability or versatility

If counterfactual techniques provide recommendations without considering user preferences, then the explanations are comprehensive, but the recommendations are inflexible and infeasible

Engineering Contradiction:
Improveflexibility of recommendationsVSAvoidinformation about user preferences
Core Design Contradiction:
Adaptability or versatilityVSLoss of information

Solution Approach 1:

The patent applies local quality by incorporating user preferences into the counterfactual generation process at the individual user level while maintaining cluster-level aggregation. User-specific constraints and preferences are integrated into the feature modification process, allowing the system to generate feasible recommendations that respect user circumstances. This localized adaptation ensures recommendations are both comprehensive and practically implementable for each user within their cluster.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS12579479B2Counterfactual samples for maintaining consistency between machine learning models
Publication Date: 2026.03.17 CAPITAL ONE SERVICES LLC
  • US12579479B2 patent drawing
  • US12579479B2 patent drawing
  • US12579479B2 patent drawing

AI summary

In some aspects, a computing system may aggregating multiple counterfactual samples so that machine learning explanations can be generated for sub-populations. In addition, methods and systems described herein use machine learning and counterfactual samples to determine text to use in an explanation for a model's prediction. A computing system may also train machine learning models to not only determine whether a request to perform an action should be accepted, but also to generate output that is consistent with output generated by previous machine learning models. Further, a computing system may generate counterfactual samples based on user preferences. A computing system may obtain preferences and then apply a penalty or adjustment parameter such that when a counterfactual sample is created, the computing system is forced to change one or more features indicated by the preferences to create the counterfactual sample.