Fine-tuning can implant a behavior that ordinary prompting does not reveal. Contrastive Decoding Diffing (CDD) is an open Python toolkit that audits a fine-tuned language model by comparing it with a reference, rather than by inspecting the fine-tuned model alone. CDD implements two auditors: a logit-space contrastive decoder, and a rank-k truncation of each LoRA update that never materializes the full weight difference. Around those auditors it adds a single run-record schema, a configuration hash so that sweep caches cannot silently reuse a different hyperparameter setting, and three text-level detectors for green-list watermarks, agent-policy violations, and four alignment failure modes. This paper specifies the algorithms as implemented, the software boundaries, and the checks that are actually present in the repository. On a constructed four-token distribution, the largest log-ratio outranks the trained mode only for α > 6.603568 and only inside the top-k gate. Rank-1 truncation reproduces a LoRA update if and only if the stable rank is 1; the constructed adapter has stable rank 1.42 and retains energy 0.704. On a simulated 2-layer model, five fine-tune steps leave an implanted secret at greedy rate 0 on 256 trigger prompts, while α = 8 and k = 4 select it on all 256. Forty steps make that secret the greedy output with and without the trigger. The watermark, agent, and alignment detectors are heuristic scorers covered by unit tests, not by a human-rated evaluation.
No takes yet. Share an insight, caveat, or question.
AKRAM SHERIFF (2026) studied this question.
Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context: