Test-Time Training of Contextual Embeddings
Abstract
Dense retrievers typically use fixed, context-independent embedding functions, limiting their ability to adapt to user- or corpus-specific semantics. We introduce **TTT-Retrieval**, a framework for *test-time training of contextual embeddings* that adapts a retriever directly to an unlabeled target corpus after deployment. TTT-Retrieval augments a frozen pretrained embedding model with compact, meta-trained neural memory modules. During a *write phase*, these memories are updated through self-supervision on the target corpus; during a *read phase*, they condition query embeddings on the learned corpus context. Because the adapted memories are retained across queries, adaptation cost is amortized rather than repeatedly incurred at inference time. Across personalized retrieval on LoCoMo, domain-specialized retrieval on QASPER, and open-domain retrieval on HotpotQA, TTT-Retrieval consistently improves over frozen embedding baselines and is competitive with or outperforms reranking approaches while requiring substantially less inference-time computation.
est. 32% chance this paper gets accepted at ICLR 2027.
What do you think this paper will get?
All positions stay anonymous.