Abstract
As machine learning is increasingly deployed in the real world, it is paramount that we develop the tools necessary to analyze the decision-making of the models we train and deploy to end-users. Recently, researchers have shown that influence functions, a statistical measure of sample impact, can approximate the effects of training samples on classification accuracy for deep neural networks. However, this prior work only applies to supervised learning, where training and testing share an objective function. No approaches currently exist for estimating the influence of unsupervised training examples for deep learning models. To bring explainability to unsupervised and semi-supervised training regimes, we derive the first theoretical and empirical demonstration that influence functions can be extended to handle mismatched training and testing (i.e., "cross-loss") settings. Our formulation enables us to compute the influence in an unsupervised learning setup, explain cluster memberships, and identify and augment biases in language models. Our experiments show that our cross-loss influence estimates even exceed matched-objective influence estimation relative to ground-truth sample impact.
Introduction
Understanding the "why" behind model decisions is critical for high-stakes AI deployment. Influence functions have emerged as a popular tool for this, estimating how much a specific training example affects a model's performance on a test case. However, traditional influence functions are limited to supervised learning where the training and testing objectives are identical.
In modern AI, models like BERT or Word2Vec are often trained via unsupervised objectives (e.g., next-word prediction) but evaluated on entirely different downstream tasks or metrics, such as clustering accuracy or societal bias benchmarks. This paper introduces Cross-Loss Influence Functions (CLIF), a mathematical extension that allows researchers to estimate the impact of training samples on arbitrary test metrics, bridging the gap between unsupervised training and downstream evaluation.
Methodology: The Cross-Loss Approach
Standard influence functions calculate the inverse Hessian-vector product (HVP) of the training loss to understand the model's loss landscape and multiply it by the gradient of the test loss. CLIF proves that the test loss does not need to match the training loss. Any twice-differentiable testing objective can be substituted into the formulation.
As shown in Figure 1, CLIF uses the original training objective (e.g., Skip-gram loss) to estimate how upweighting a training sample changes model parameters. It then evaluates how that change affects a different testing objective, such as the Word Embedding Association Test (WEAT) score. This enables surgical debiasing by identifying and mitigating specific training samples that amplify bias.
Experimental Setup
The authors evaluated CLIF across three distinct domains:
- Synthetic Mixture of Gaussians (MOG): Used to validate CLIF against ground-truth "leave-one-out" retraining in a Deep Embedded Clustering (DEC) task.
- Science Fiction TV Plot Summaries ($D_{SCI}$): A corpus of ~2,000 summaries used to explain nearest-neighbor relationships in word embeddings (e.g., why certain characters cluster with "villain" concepts).
- Wiki Neutrality Corpus (WNC): 180,000 Wikipedia sentence pairs used to detect and mitigate gender and racial biases in embeddings.
Key Results and Insights
Validation Against Ground Truth
A key finding is that CLIF's cross-loss approach often correlates better with ground-truth influence than traditional matched-objective methods. On the MOG dataset, CLIF achieved a Pearson correlation of >0.8 with actual influence for most classes.
Figure 4 demonstrates the high fidelity of CLIF's predictions. The predicted influence (b) closely mirrors the empirical ground truth (a) obtained by retraining the model without specific samples, identifying both mitigating (green) and amplifying (orange) points for the investigated sample (cyan).
Uncovering Hidden Bias Proxies
CLIF revealed that racial bias in embeddings (e.g., associating African-American names with unpleasant words) is often driven by unexpected training data. For instance, it surfaced sentences about religion (e.g., Islamophobia) as highly influential. Because the model had already associated certain names with religious terms, sentences linking those terms to unpleasantness transitively caused the racial bias. This highlights how manual dataset screening often fails to catch subtle, transitive biases.
State-of-the-Art Debiasing
By identifying the top bias-amplifying training samples and fine-tuning the model to mitigate them, CLIF achieved significant reductions in bias:
- Race-Pleasantness bias: Reduced from 0.53 to 0.02.
- Gender-Career bias: Reduced from 0.48 to 0.01.
Limitations
While powerful, CLIF has limitations. It relies on first-order assumptions; if a test metric depends on highly complex, second-order relationships, the identified training samples might seem nonsensical. Additionally, it requires access to the full, static training dataset, making it difficult to apply in federated or continual learning settings where data is not centrally stored or is discarded after training.
Conclusion
Cross-Loss Influence Functions provide a robust framework for explaining unsupervised models. By allowing the training and testing objectives to differ, CLIF opens new avenues for debugging, auditing, and debiasing the complex models that power modern AI applications.
Summary updated