Skip to content
AI Learning Ground Start learning

Research ·

Token Pooling-Aware Training for Multi-Vector Embedding Models

A Hugging Face post explains token pooling for multi-vector retrieval models and shows that pooling-aware training with Sentence Transformers improves quality at the same storage budget, raising retention from 94.6% to 97.8% at pool_factor=4.

Token Pooling-Aware Training for Multi-Vector Embedding Models
Image: Hugging Face

Multi-vector embedding models like ColBERT keep one vector per token, letting each query token match different parts of a document via MaxSim scoring. This is expressive but storage-heavy: a million documents with 200 vectors of 128 dimensions at 4-bit residual quantization require about 12.8 GB. Token pooling addresses this by merging similar token vectors, but aggressive compression can discard information the model was never trained to preserve.

The method uses HierarchicalTokenPooling with Ward hierarchical clustering, repeatedly merging groups that add the least within-group spread, then representing each group by its normalized mean. A pool_factor of 4 keeps roughly one quarter of a document's vectors, with longer documents keeping proportionally more. Alternative controls include a distance_threshold, which can be calibrated on a sample of the corpus to hit a target average vector count. The first token is protected from merging, and pooling applies only to documents, not queries.

Pooling-aware training applies a retrieval objective to compressed representations, similar in spirit to Matryoshka embeddings training at multiple widths. Each training batch contributes two losses: retrieval with original document embeddings and retrieval after compressing documents to about one quarter of their vectors. With pool_factor=4, a normally trained model retains 94.6% of unpooled NanoBEIR nDCG@10, while pooling-aware training raises that to 97.8% at the same 4x storage reduction.

For builders, this offers better retrieval from the same storage budget using a reproducible Sentence Transformers example. The post builds on Stefan Josef's Learn to Pool and LightOn's pooling regularization study, and notes adaptive pooling works with any multi-vector model, even one trained without a pooling-aware objective.

References

Read the full story at Hugging Face ↗Like, save or discuss on Buzz

#open-weights #tooling #research