Seeing Is Not Always Believing: Invisible Collision Attack and Defence on Pre-Trained Models
Minghang Deng, Zhong Zhang, Junming Shao
TL;DR
This work reveals a novel, covert threat to pre-trained models by exploiting enhanced MD5 chosen-prefix collisions to create two equal-size files (one clean, one poisoned) with identical MD5 checksums, enabling selective victims to receive poisoned models. It introduces a three-phase Invisible Attack framework: generate collision pairs, publish them publicly, and deliver the poisoned variant to targeted users while keeping the checksum indistinguishable from the legitimate file. A data-driven defense is proposed, using an LSTM-based collision detector and Jaccard similarity filtering to identify collision suffix patterns, underpinned by a birthday-problem analysis that justifies the pattern discrepancy. Experimental results across NLP and vision tasks demonstrate both the attack’s effectiveness and stealth, and the defense’s transferable efficacy, underscoring the practical risk of MD5-based integrity checks for AI artifacts and calling for stronger verification methods.
Abstract
Large-scale pre-trained models (PTMs) such as BERT and GPT have achieved great success in diverse fields. The typical paradigm is to pre-train a big deep learning model on large-scale data sets, and then fine-tune the model on small task-specific data sets for downstream tasks. Although PTMs have rapidly progressed with wide real-world applications, they also pose significant risks of potential attacks. Existing backdoor attacks or data poisoning methods often build up the assumption that the attacker invades the computers of victims or accesses the target data, which is challenging in real-world scenarios. In this paper, we propose a novel framework for an invisible attack on PTMs with enhanced MD5 collision. The key idea is to generate two equal-size models with the same MD5 checksum by leveraging the MD5 chosen-prefix collision. Afterwards, the two ``same" models will be deployed on public websites to induce victims to download the poisoned model. Unlike conventional attacks on deep learning models, this new attack is flexible, covert, and model-independent. Additionally, we propose a simple defensive strategy for recognizing the MD5 chosen-prefix collision and provide a theoretical justification for its feasibility. We extensively validate the effectiveness and stealthiness of our proposed attack and defensive method on different models and data sets.
