[Paper Review] ModelDiff: A Framework for Comparing Learning Algorithms
ModelDiff is a framework for comparing machine learning algorithms by identifying input transformations that distinguish models trained with different learning algorithms. It uses datamodeling to detect training data dependencies and reveals fine-grained differences in model behavior due to data augmentation, pre-training, and SGD hyperparameters.
We study the problem of (learning) algorithm comparison, where the goal is to find differences between models trained with two different learning algorithms. We begin by formalizing this goal as one of finding distinguishing feature transformations, i.e., input transformations that change the predictions of models trained with one learning algorithm but not the other. We then present ModelDiff, a method that leverages the datamodels framework (Ilyas et al., 2022) to compare learning algorithms based on how they use their training data. We demonstrate ModelDiff through three case studies, comparing models trained with/without data augmentation, with/without pre-training, and with different SGD hyperparameters. Our code is available at https://github.com/MadryLab/modeldiff .
Motivation & Objective
- To formalize the problem of learning algorithm comparison as identifying distinguishing feature transformations in input space.
- To develop a general-purpose method for comparing any two learning algorithms without prior hypotheses about their differences.
- To quantify how learning algorithms use training data differently by analyzing model predictions through datamodeling.
- To enable fine-grained dissection of design choices' impact on model behavior, such as bias and generalization.
- To provide interpretable, verifiable insights into algorithmic differences via subpopulation analysis and counterfactual verification.
Proposed method
- Formalize algorithm comparison as finding input transformations that consistently alter predictions of one model but not another.
- Leverage the datamodeling framework [IPE+22] to quantify each training example's contribution to a model's prediction.
- Compute residual datamodel vectors for each test example to identify subpopulations where models differ in their reliance on training data.
- Extract principal components of residual datamodels to identify distinguishing directions in feature space.
- Use vision-language models (e.g., CLIP) to verify candidate transformations by extracting contrasting captions from distinguishing subpopulations.
- Perform counterfactual analysis to validate that designed transformations reliably alter predictions in the expected way.
Experimental results
Research questions
- RQ1How can we formally define the problem of comparing learning algorithms in terms of feature usage?
- RQ2What input transformations reliably distinguish models trained with different learning algorithms?
- RQ3How do data augmentation, pre-training, and SGD hyperparameters alter model reliance on specific training examples?
- RQ4Can we automatically surface subpopulations of test examples where models differ systematically in their prediction behavior?
- RQ5To what extent can vision-language models like CLIP assist in interpreting and verifying distinguishing feature transformations?
Key findings
- Models trained with data augmentation exhibit 15% higher average confidence in 'spider' class when a spider web is added to images, compared to 1% for models without augmentation.
- Pre-training on ImageNet increases model confidence in 'landbird' by +12% when a yellow patch is added, while fine-tuning from scratch decreases it by 4%.
- Adding a human face to the background increases 'landbird' confidence by +4% in pre-trained models but decreases it by 1% in models trained from scratch.
- Models trained with smaller learning rates show a 7% average increase in 'truck' confidence when a window-like pattern is added, compared to only 2% for larger learning rates.
- CLIP-based caption extraction successfully identifies distinguishing features such as 'yellow', 'lemon', and 'faces', aligning with manually inferred biases.
- Principal components of residual datamodels effectively surface subpopulations with coherent, interpretable differences in model behavior across all case studies.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.