Model-agnostic Explainable AI
AIME
Approximate Inverse Model Explanations
AIME explains a trained black-box model by learning an approximate inverse operator that maps model outputs back to explanatory input-feature structures.
From one common explanation model, AIME provides global, class-wise, representative, and instance-wise local explanations.

Use cases
When should you use AIME?
Use AIME when your research needs to compare Global, class-wise, and Local explanations under one common model-agnostic explanation basis.
AIME is particularly useful when your research requires two or more of the following:
- global and local explanations under a common explanation model;
- feature importance for each output class;
- comparison of multiple classes or multiple instances;
- a model-agnostic method that does not require gradients;
- representative input patterns for model outputs;
- reusable explanations for many instances after fitting the operator; or
- regularized, robust, or uncertainty-aware explanation variants.
Overview
What is AIME?
AIME is a model-agnostic XAI framework for understanding black-box models from their observed inputs and outputs.
Instead of only analyzing how an input changes a model output in the forward direction, AIME estimates an approximate inverse operator from model outputs to explanatory input-feature structures.
AIME does not require gradients, internal network layers, or access to the model architecture. It uses observed predictions such as class probabilities or regression outputs.
Fit one common explanation model, then use it to obtain Global, class-wise, representative, and Local explanations under the same explanatory basis.
Capabilities
What can AIME provide?
Global explanations
Identify the input features important to model behavior across the reference dataset.
Class-wise explanations
Obtain a distinct feature-importance profile for each output class.
Local explanations
Explain a particular instance using the same fitted explanation model.
Representative input patterns
Reconstruct input-side feature patterns associated with outputs or classes.
Robust and regularized variants
Use HuberAIME, RidgeAIME, or Huber-RidgeAIME for outliers or ill-conditioning.
Uncertainty-aware explanations
BayesianAIME provides credible intervals for global and local explanations.
Positioning
How is AIME different from SHAP and LIME?
These methods answer different research questions. The choice should follow the explanation objective, not an assumption that one method is universally superior.
| Method | Research objective | Explanation basis |
|---|---|---|
| LIME | Explain the model locally around one instance | An independently fitted local surrogate |
| SHAP | Allocate a prediction among input features | Shapley-based additive attribution |
| AIME | Compare Global, class-wise, and Local explanations | One reusable approximate inverse explanation operator |
Use LIME for a local surrogate, SHAP for additive contribution allocation, and AIME when explanations across multiple levels must share a common basis.
Get started
Try AIME
Install the current Python package from PyPI:
The package is model-agnostic and can use prediction outputs such as predict_proba.
Notebooks
Available notebooks
- Titanic quick start — train a black-box model and generate global, local, representative, and inverse-operator explanations.
- AIME versus SHAP and LIME — compare the different explanation objects.
- BayesianAIME uncertainty — visualize credible intervals for global and local explanations.
Theory
Theoretical foundation
The algebraic foundation of AIME is developed in AIME², which formulates explainability through a weighted and regularized Explainability Operator.
Citation
Original AIME paper
T. Nakanishi, “Approximate Inverse Model Explanations (AIME): Unveiling Local and Global Insights in Machine Learning Models,” IEEE Access, vol. 11, pp. 101020–101044, 2023.
DOI: 10.1109/ACCESS.2023.3314336
BibTeX
Licensing
Software and licensing
AIME is available through GitHub and PyPI. The current repository uses a dual-licensing model: noncommercial use is permitted under the PolyForm Noncommercial License 1.0.0, while commercial use requires a separate written license.