Abstract Understanding the differences between machine learning (ML) models is of interest in scenarios ranging from choosing amongst a set of competing models, to updating a deployed model with new training data. In these cases, we wish to go beyond differences in overall metrics such as accuracy to identify where in the feature space do the differences occur. We formalize this problem of model differencing as one of predicting a dissimilarity function of two ML models’ outputs, subject to the representation of the differences being human-interpretable. Our solution is to learn a Joint Surrogate Tree (JST), which is composed of two conjoined decision tree surrogates for the two models. A JST provides an intuitive representation of differences and places the changes in the context of the models’ decision logic. Context is important as it helps users to map differences to an underlying mental model of an AI system. We also propose a refinement procedure to increase the precision of a JST. We demonstrate, through an empirical evaluation, that such contextual differencing is concise and can be achieved with no loss in fidelity over naive approaches.
Introduction
In the machine learning lifecycle, comparing two models is a frequent necessity. Whether selecting between different architectures (e.g., Random Forest vs. XGBoost) or evaluating a model update after retraining on new data, practitioners need to understand the nuances of model disagreement. While aggregate metrics like accuracy or F1-score provide a high-level view of performance, they fail to localize where in the feature space models diverge.
Existing surrogate methods, which approximate complex black-box models with simpler interpretable ones like decision trees, often fail in the context of differencing. Building two independent surrogate trees typically results in entirely different structures, making it nearly impossible to align them for a direct comparison. This paper introduces Interpretable Model Differencing (IMD), a method designed to provide a concise, human-readable "diff" for ML models.
Methodology: The Joint Surrogate Tree
The core innovation of IMD is the Joint Surrogate Tree (JST). Unlike traditional approaches that build independent trees, the JST constructs a single conjoined structure to approximate both models simultaneously.
- Shared Prefix: The JST begins with a common root and branches where both models share similar decision logic. This ensures the comparison is grounded in a shared context.
- Diverging "Or-Nodes": When the models' predictions begin to differ significantly, the JST introduces an "or-node." At this point, the tree splits into model-specific branches, explicitly highlighting the divergence in logic.
- Diff Rules: By traversing paths to different labels under these or-nodes, the system extracts simple "if-then" rules describing regions of disagreement.
- Refinement: An iterative refinement procedure grows the tree further only in regions of disagreement, maintaining overall simplicity while increasing local precision.
Experimental Evaluation
The authors evaluated IMD across 13 publicly available tabular classification datasets, including adult, bankm, heloc, and magic. The performance of IMD was compared against two baselines: "Separate Surrogates" (two independent trees) and "Direct Differencing" (a single tree trained to predict the 0-1 difference between models).
Key Results
The empirical evaluation demonstrated that IMD offers significant advantages in both conciseness and accuracy:
- Massive Gains in Conciseness: IMD produced significantly fewer rules than separate surrogates. On average, IMD generated approximately 21 rules compared to over 337 for the separate surrogate approach—a nearly 16x reduction in complexity with minimal loss in predictive quality.
- Superior Accuracy: IMD achieved an 89.76% improvement in F1-score for predicting differences compared to the "Direct DT" baseline. While black-box models (like Gradient Boosting) occasionally achieved higher F1-scores, IMD remained competitive while providing the necessary interpretability.
Conclusion and Future Work
Interpretable Model Differencing provides a powerful framework for understanding model disagreements by placing them within the context of shared decision logic. By forcing alignment through a joint tree structure, IMD generates concise rules that are far more accessible to human auditors than independent surrogates.
Future research directions include extending this framework to regression tasks, where differences are continuous rather than categorical, and exploring methods to apply these tree-based interpretations to unstructured data types like images or natural language.
Summary updated