Can Text Encoders be Deceived by Length Attack?Download PDF

01 Mar 2023 (modified: 30 May 2023)Submitted to Tiny Papers @ ICLR 2023Readers: Everyone
Keywords: contrastive learning, document representation learning, sentence representation learning
TL;DR: We find that contrastive learning is prone to length attacks and propose an editing method to effectively mitigate it.
Abstract: Albeit \textit{de facto} to use in training dense retrieval models, we observe that contrastive learning is prone to length overfitting, making it vulnerable to adversarial length attacks. We examine the behaviour of this phenomenon and propose an editing method to mitigate this problem. We find that our method can effectively improve the robustness of models against length attacks. Its effectiveness can be attributed to reduced length information in the embeddings, more robust intra-document token interaction, and enhanced isotropy at trained length range.
8 Replies

Loading