Attention Hijacking in Trojan Transformers

Weimin Lyu, Songzhu Zheng, Tengfei Ma, Haibin Ling, Chao Chen
8/9/2022
cs.LGcs.AIcs.CR
transformer-attention

No confident code implementation found for this paper.

Abstract

Trojan attacks pose a severe threat to AI systems. Recent works on Transformer models received explosive popularity and the self-attentions are now indisputable.

Show full abstract

This raises a central question: Can we reveal the Trojans through attention mechanisms in BERTs and ViTs? In this paper, we investigate the attention hijacking pattern in Trojan AIs, \ie, the trigger token ``kidnaps'' the attention weights when a specific trigger is present. We observe the consistent attention hijacking pattern in Trojan Transformers from both Natural Language Processing (NLP) and Computer Vision (CV) domains. This intriguing property helps us to understand the Trojan mechanism in BERTs and ViTs. We also propose an Attention-Hijacking Trojan Detector (AHTD) to discriminate the Trojan AIs from the clean ones.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{lyu2022attention,
  title  = {Attention Hijacking in Trojan Transformers},
  author = {Weimin Lyu and Songzhu Zheng and Tengfei Ma and Haibin Ling and Chao Chen},
  year   = {2022},
  eprint = {2208.04946},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2208.04946v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2208.04946.svg)](https://codeofpaper.com/paper/2208.04946)

Discussion