mlsanityData to 7 Oct 2026

Apple of Sodom: Hidden Backdoors in Superior Sentence Embeddings via Contrastive Learning

arXiv 2210.11082 ↗First posted 20 Oct 2022cs.CL cs.CRcited by 2

On the map: LLM safety and security → Backdoor and data poisoning attacks

Abstract (arXiv)

This paper finds that contrastive learning can produce superior sentence embeddings for pre-trained models but is also vulnerable to backdoor attacks. We present the first backdoor attack framework, BadCSE, for state-of-the-art sentence embeddings under supervised and unsupervised learning settings. The attack manipulates the construction of positive and negative pairs so that the backdoored samples have a similar embedding with the target sample (targeted attack) or the negative embedding of its clean version (non-targeted attack). By injecting the backdoor in sentence embeddings, BadCSE is resistant against downstream fine-tuning. We evaluate BadCSE on both STS tasks and other downstream tasks. The supervised non-targeted attack obtains a performance degradation of 194.86%, and the targeted attack maps the backdoored samples to the target embedding with a 97.70% success rate while maintaining the model utility.

Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Placed in Backdoor and data poisoning attacks, one of 12 directions in LLM safety and security. Builds on 19 of its 28 references that are in the map. First posted on arXiv 20 Oct 2022.

Builds on

19 of 28 references.

Closest ancestors · 2

Same direction, newest first

  1. 2021BadPre: Task-agnostic Backdoor Attacks to Pre-trained NLP Foundation Models6 Oct
  2. 2021BadEncoder: Backdoor Attacks to Pre-trained Encoders in Self-Supervised Learning1 Aug

Other references · 17

  1. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  2. 2019Sentence-BERT: Sentence Embeddings using Siamese BERT-Networkscited by 9,049
  3. 2019ALBERT: A Lite BERT for Self-supervised Learning of Language Representationscited by 2,772
  4. 2017A Broad-Coverage Challenge Corpus for Sentence Understanding through Inferencecited by 2,665
  5. 2021SimCSE: Simple Contrastive Learning of Sentence Embeddingscited by 2,168
  6. 2015A large annotated corpus for learning natural language inferencecited by 1,837
  7. 2020Understanding Contrastive Representation Learning through Alignment and Uniformity on the Hyperspherecited by 1,393
  8. 2017SemEval-2017 Task 1: Semantic Textual Similarity - Multilingual and Cross-lingual Focused Evaluationcited by 998
  9. 2015Skip-Thought Vectorscited by 321
  10. 2020Weight Poisoning Attacks on Pre-trained Modelscited by 318
  11. 2018SentEval: An Evaluation Toolkit for Universal Sentence Representationscited by 294
  12. 2021ConSERT: A Contrastive Framework for Self-Supervised Sentence Representation Transfercited by 231
5 more
  1. 2018An efficient framework for learning sentence representationscited by 197
  2. 2021Poisoning and Backdooring Contrastive Learningcited by 149
  3. 2021Backdoor Pre-trained Models Can Transfer to Allcited by 79
  4. 2021Red Alarm for Pre-trained Models: Universal Vulnerability to Neuron-Level Backdoor Attackscited by 44
  5. 2022Watermarking Pre-trained Encoders in Contrastive Learningcited by 10

Built on by

Cited by year

Citing papers per year: 2023: 1; 2024: 1.

2 papers.