Diff Mining Reveals Finetuning Objectives in Language Models

Greg Kocher, Robert West, Cl\'ement Dumas, Julian Minder· August 28, 2026 View original

Key takeaways

  • Diff Mining identifies finetuning objectives by comparing logit differences between models.
  • The framework works on large models and only requires access to output logits.
  • It can detect salient tokens that act as a fingerprint of the finetuning process.
  • Diff Mining is effective for finetune domain detection and uncovering injected biases.

Who benefits

AI/ML DevelopmentCybersecurityComplianceContent Moderation

Summary

Diff Mining is a new framework that identifies what a finetuned language model has learned by comparing its output logits to those of its base model. This method effectively surfaces salient tokens, acting as a fingerprint of the finetuning process, even on unrelated text, and helps detect unwanted behaviors.

Finetuning is a standard practice for adapting large language models (LLMs) to specific tasks or behaviors. However, understanding precisely what new behaviors emerge during this process, especially concerning the potential for unwanted or biased outcomes, remains a significant challenge. Many existing methods for analyzing model changes require access to internal model structures, limiting their applicability to large, proprietary models. A new framework, dubbed Diff Mining, offers a simple yet powerful solution. It works by comparing the output logits (raw prediction scores) of a finetuned model against its base model on a reference corpus. This comparison highlights tokens that are significantly amplified or suppressed by the finetuning, effectively creating a 'fingerprint' of the training objectives. Crucially, this analysis can be performed even on text outside the finetuning domain, and it only requires access to the model's outputs, making it scalable to very large models. Diff Mining operates in two stages: first, extracting per-context logit differences, and second, aggregating these signals to form an interpretable set of tokens. The aggregation can use simple frequency methods or more advanced techniques like Non-negative Matrix Factorization to disentangle multiple finetuning objectives. Empirical results show Diff Mining outperforms state-of-the-art model diffing methods in identifying relevant tokens for domain detection and effectively uncovers injected biases, proving its utility as an auditing tool for finetuned LLMs.

Why it matters

This framework provides a crucial tool for auditing and understanding the impact of finetuning on large language models, helping professionals ensure model safety, identify biases, and verify that models are learning intended behaviors without introducing unintended ones.

How to implement this in your domain

  1. 1Integrate Diff Mining into your LLM finetuning pipeline to audit changes in model behavior.
  2. 2Use the framework to identify and mitigate potential biases or unwanted behaviors introduced during finetuning.
  3. 3Apply Diff Mining to verify that finetuned models are learning the desired domain-specific knowledge.
  4. 4Develop automated alerts based on Diff Mining outputs to flag suspicious token amplifications.
  5. 5Share insights from Diff Mining with compliance and ethics teams to ensure responsible AI deployment.

Original post by Greg Kocher, Robert West, Cl\'ement Dumas, Julian Minder

"arXiv:2608.26462v1 Announce Type: new Abstract: Finetuning has become the gold standard for refining existing behaviors and inducing new ones in language models, yet it often remains unclear exactly which behaviors emerge during this process. As models grow ever more capable, und…"

View on X

Originally posted by Greg Kocher, Robert West, Cl\'ement Dumas, Julian Minder on X · view source

Want to go deeper?

Turn these trends into skills with Learnijoy's hands-on AI & tech courses.

Explore courses

More in AI Research

AI ResearchAI Engineering & DevTools

Emotional Preferences Regulate Goal Priorities in Reinforcement Learning Agents

This paper proposes a computational framework where higher-level goals autonomously generate state-dependent emotional preferences to regulate the priorities of competing lower-level objectives in reinforcement learning agents. It demonstrates how this emergent preference function exhibits contextual priority switching and improves performance over fixed-preference strategies in multi-objective exploration environments.

Shiqi Liu, Yihua Tan, Hu Fu, Guanyu QiAug 28, 2026
AI Engineering & DevToolsAI Research

New Framework Unifies Task Detection and Adaptation for Continual Learning

This paper proposes FiUni, a Fisher-guided unified framework for task-free continual learning in LLMs that combines batch-level task detection with parameter-efficient adaptation. FiUni uses Fisher information matrix (FIM) properties to dynamically determine whether to reuse, expand, or create new low-rank adaptation (LoRA) subspaces, effectively mitigating catastrophic forgetting without explicit task boundaries.

Dezheng Han, Anbang Zhang, Zhihao Zhu, Shuaishuai GuoAug 28, 2026
AI Engineering & DevToolsAI Research

Soft EMG Interface Enables Machine Learning-Powered Silent Speech Recognition

This paper introduces a soft, active electromyography (EMG) interface worn on the hand that enables word-level silent speech recognition (SSR) using machine learning. The device acquires stable EMG signals from a fingertip electrode near the lips, achieving 97.2% accuracy on a 30-word vocabulary and demonstrating real-time drone control in noisy environments.

Yuta Kurotaki, Shusuke Yamakoshi, Reitaro Yoshida, Yutaka Isoda, Tamami Takano, Yuji Isano, Yusuke Miyake, Kentaro Kuribayashi, Hiroki OtaAug 28, 2026