Reproducing HotFlip for Corpus Poisoning Attacks in Dense Retrieval
Li, Yongkang, Eustratiadis, Panagiotis, Kanoulas, Evangelos
–arXiv.org Artificial Intelligence
HotFlip is a topical gradient-based word substitution method for attacking language models. Recently, this method has been further applied to attack retrieval systems by generating malicious passages that are injected into a corpus, i.e., corpus poisoning. However, HotFlip is known to be computationally inefficient, with the majority of time being spent on gradient accumulation for each query-passage pair during the adversarial token generation phase, making it impossible to generate an adequate number of adversarial passages in a reasonable amount of time. Moreover, the attack method itself assumes access to a set of user queries, a strong assumption that does not correspond to how real-world adversarial attacks are usually performed. In this paper, we first significantly boost the efficiency of HotFlip, reducing the adversarial generation process from 4 hours per document to only 15 minutes, using the same hardware. We further contribute experiments and analysis on two additional tasks: (1) transfer-based black-box attacks, and (2) query-agnostic attacks. Whenever possible, we provide comparisons between the original method and our improved version. Our experiments demonstrate that HotFlip can effectively attack a variety of dense retrievers, with an observed trend that its attack performance diminishes against more advanced and recent methods. Interestingly, we observe that while HotFlip performs poorly in a black-box setting, indicating limited capacity for generalization, in query-agnostic scenarios its performance is correlated to the volume of injected adversarial passages.
arXiv.org Artificial Intelligence
Jan-8-2025
- Country:
- Asia
- Europe
- Austria (0.04)
- France > Auvergne-Rhône-Alpes
- Netherlands > North Holland
- Amsterdam (0.04)
- Spain
- Sweden > Stockholm
- Stockholm (0.04)
- United Kingdom > England
- Cambridgeshire (0.04)
- North America
- Canada
- Alberta > Census Division No. 15
- Improvement District No. 9 > Banff (0.04)
- Ontario > Toronto (0.04)
- Alberta > Census Division No. 15
- Dominican Republic (0.04)
- Mexico > Oaxaca (0.04)
- United States
- California
- San Diego County > San Diego (0.04)
- San Francisco County > San Francisco (0.14)
- District of Columbia > Washington (0.04)
- Louisiana > Orleans Parish
- New Orleans (0.04)
- New Mexico > Santa Fe County
- Santa Fe (0.04)
- New York > New York County
- New York City (0.04)
- California
- Canada
- Oceania > Australia
- South America > Chile (0.04)
- Genre:
- Research Report > New Finding (0.68)
- Industry:
- Government > Military (0.35)
- Information Technology > Security & Privacy (0.49)
- Transportation > Air (0.55)
- Technology: