Improve model card: Add pipeline tag, library name, paper & code links, sample usage, and citation
#1
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,3 +1,41 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
pipeline_tag: zero-shot-image-classification
|
| 4 |
+
library_name: transformers
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
# Assimilation Matters: Model-level Backdoor Detection in Vision-Language Pretrained Models
|
| 8 |
+
|
| 9 |
+
This repository contains the `CLIPTextModel` artifact associated with the official implementation of **AMDET**, a novel model-level backdoor detection framework for Vision-Language Pretrained Models (VLPs), as described in the paper [Assimilation Matters: Model-level Backdoor Detection in Vision-Language Pretrained Models](https://huggingface.co/papers/2512.00343).
|
| 10 |
+
|
| 11 |
+
AMDET introduces a framework that operates without any prior knowledge of training datasets, backdoor triggers, targets, or downstream classifiers, making it highly practical for real-world security applications. It specifically reveals the feature assimilation property in backdoored text encoders, where token representations within a backdoor sample exhibit high similarity due to concentrated attention weights on the trigger token.
|
| 12 |
+
|
| 13 |
+
**Authors:** Zhongqi Wang, Jie Zhang, Shiguang Shan, Xilin Chen
|
| 14 |
+
|
| 15 |
+
**Code:** https://github.com/Robin-WZQ/AMDET
|
| 16 |
+
|
| 17 |
+
## Sample Usage
|
| 18 |
+
|
| 19 |
+
To run the backdoor detection process, you can scan a model to determine if it is backdoored. If a backdoor is detected, the script will return the pseudo-trigger embedding and its target.
|
| 20 |
+
|
| 21 |
+
First, ensure you have set up the environment as per the [GitHub repository's instructions](https://github.com/Robin-WZQ/AMDET#environment-requirement-%F0%9F%8C%8D). You will also need to prepare a model (e.g., download a poisoned model for testing as specified in the GitHub README).
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
# Make sure your current directory is the root of the cloned AMDet repository (e.g., cd AMDet).
|
| 25 |
+
python main.py
|
| 26 |
+
```
|
| 27 |
+
|
| 28 |
+
The results will be saved in a `Results` directory, including images related to the backdoor target semantic, various embedding files (`Backdoor_Embedding_init.pt`, `Backdoor_Embedding_Inversion.pt`, `Backdoor_Embedding.pt`), `Backdoor_Feature.pt`, `log.txt`, and visualization files (`hessian_spectrum.png`, `loss_landscape.png`).
|
| 29 |
+
|
| 30 |
+
## Citation
|
| 31 |
+
|
| 32 |
+
If you find this project useful in your research, please consider citing:
|
| 33 |
+
|
| 34 |
+
```bibtex
|
| 35 |
+
@article{wang2025xxx,
|
| 36 |
+
title={xxx},
|
| 37 |
+
author={Zhongqi Wang and Jie Zhang and Shiguang Shan and Xilin Chen},
|
| 38 |
+
journal={xxx},
|
| 39 |
+
year={2025},
|
| 40 |
+
}
|
| 41 |
+
```
|