long-context embedding-models attention-sink retrieval-embeddings contrastive-retrieval trainable-prefix token-activation representation-interference
Abstract
Embedding models compress variable-length text into fixed-size vector representations, but this compression can entangle semantic content with residual token-level information, such as artifacts arising from attention sink behavior. We propose a simple method that prepends trainable [DUMP] tokens to the input during embedding model training. The method keeps the model architecture, pooling strategy, and training loss unchanged, while optimizing the added tokens through the standard contrastive retrieval objective. By introducing trainable prefix positions that interact with regular tokens during encoding, [DUMP] tokens help reduce the influence of residual or uninformative token-level signals on the final retrieval representation. Experiments on standard retrieval and long-context benchmarks show that our method consistently improves over finetuned baselines across encoder and decoder embedding models. Further analysis shows that [DUMP] tokens alter token-level activation and attention patterns associated with low-information tokens. These results suggest that trainable prefix tokens provide a lightweight way to improve retrieval representations.
한국어 요약
한 줄 요약
학습 가능한 [DUMP] 토큰을 사용해 임베딩 모델의 표현 간섭을 줄이고 검색 성능을 향상시킨다.
핵심 기여도
- [DUMP] 토큰을 입력에 학습 가능 전접사로 추가하여 잔여 토큰 정보의 영향을 줄임.
- 기존 모델 구조, 풀링 전략, 학습 손실을 변경하지 않고 기존 대조 학습 목적에 따라 토큰을 최적화.
- 표준 검색 벤치마크에서 평균 2.46%, 장문 검색 설정에서 2.41% 개선.
- [DUMP] 토큰이 [CLS] 토큰으로부터의 주의를 재분배하고, 저정보 토큰의 L2 노름을 감소시킴.
핵심 아이디어
임베딩 모델은 텍스트를 고정 크기 벡터로 압축하는 과정에서, 의미 없는 토큰 정보(예: 주의 흡수 현상)가 의미 있는 정보와 혼합되어 표현 간섭을 유발할 수 있다. 이를 해결하기 위해, 저자들은 입력에 학습 가능한 [DUMP] 토큰을 전접사로 추가하여, 이 토큰들이 잔여 또는 비정보적인 토큰 신호를 흡수하도록 유도한다. [DUMP] 토큰은 풀링 전에 토큰이 컨텍스트화되는 과정에 참여하며, 의미 없는 토큰의 주의를 재분배함으로써 최종 임베딩 표현의 정확도를 높인다. 이 접근법은 모델 구조나 학습 목적을 변경하지 않으며, 기존 대조 학습 목적에 따라 토큰을 최적화하므로, 구현이 용이하고 확장 가능하다는 장점이 있다.
기술적 접근법
- 학습 가능한 [DUMP] 토큰을 입력에 전접사로 추가.
- 토큰은 풀링 전에 컨텍스트화 과정에 참여.
- 모델 아키텍처, 풀링 전략, 학습 손실을 변경하지 않음.
- 대조 학습 목적에 따라 [DUMP] 토큰을 최적화.
- [DUMP] 토큰 수는 성능에 비단조적 영향을 미침.
주요 결과
- 표준 검색 벤치마크에서 평균 2.46% 개선 (예: EuroBERT 0.5786 → 0.5884).
- 장문 검색 설정에서 평균 2.41% 개선 (예: ettin-decoder 0.3330 → 0.3498).
- [DUMP] 토큰은 저정보 토큰의 L2 노름을 감소시키고, [CLS] 토큰으로부터의 주의를 재분배함.
의의 및 한계
- [DUMP] 토큰은 모델 구조 변경 없이 임베딩 표현을 개선하는 경량화된 방법.
- 토큰 수에 따른 성능 변화가 비단조적이라는 점에서, 최적의 토큰 수 결정이 필요.
- 토큰이 잔여 정보를 흡수하는 메커니즘은 내부 표현 변화와 관련이 있으며, 외부 성능 향상에 기여함.
- 장문 입력에서의 효과가 두드러지나, 입력 길이에 따른 추가 연구 필요.
실용적 활용
- 검색 엔진, 추천 시스템, 문서 검색 등에서 임베딩 모델의 표현 정확도를 향상시킬 수 있음.
- 기존 모델을 구조 변경 없이 개선할 수 있어, 산업 현장에서 즉각적으로 적용 가능.
- 특히, 장문 텍스트 처리가 필요한 애플리케이션에서 유용.