Hypencoder: Hypernetworks for Information Retrieval
Abstract
The vast majority of retrieval models depend on vector inner products to produce a relevance score between a query and a document. This naturally limits the expressiveness of the relevance score that can be employed. We propose a new paradigm, instead of producing a vector to represent the query we produce a small neural network which acts as a learned relevance function. This small neural network takes in a representation of the document, in this paper we use a single vector, and produces a scalar relevance score. To produce the little neural network we use a hypernetwork, a network that produce the weights of other networks, as our query encoder or as we call it a Hypencoder. Experiments on in-domain search tasks show that Hypencoder is able to significantly outperform strong dense retrieval models and has higher metrics then reranking models and models an order of magnitude larger. Hypencoder is also shown to generalize well to out-of-domain search tasks. To assess the extent of Hypencoder's capabilities, we evaluate on a set of hard retrieval tasks including tip-of-the-tongue retrieval and instruction-following retrieval tasks and find that the performance gap widens substantially compared to standard retrieval tasks. Furthermore, to demonstrate the practicality of our method we implement an approximate search algorithm and show that our model is able to search 8.8M documents in under 60ms.
Community
This paper investigates a different way to model search relevance that goes beyond the ubiquitously used inner-product. Instead of using a vector to represent queries, we use small query-specific neural networks produced by a Hypernetwork encoder (Hypencoder). The document representation is then input to this small neural network to produce a final relevance score. Thanks to the small size of the query network, this scoring method is fast enough to be used for first-stage retrieval with a throughput of ~5k documents/ms. In order to be performant in larger corpora, we developed an approximate search technique that can search 8.8M passages in just 60ms.
We find that Hypencoder far exceeds bi-encoder baselines with similar training techniques and model sizes, and even surpasses bi-encoder models trained with far more compute resources or with much larger base models. Furthermore, Hypencoder has a higher relative improvement on harder retrieval tasks making it an appealing choice for instruction-conditioned retrieval, tip-of-the-tongue retrieval, and other complex retrieval tasks.
This is an automated message from the Librarian Bot. I found the following papers similar to this paper.
The following papers were recommended by the Semantic Scholar API
- Enhanced Retrieval of Long Documents: Leveraging Fine-Grained Block Representations with Large Language Models (2025)
- ASRank: Zero-Shot Re-Ranking with Answer Scent for Document Retrieval (2025)
- Investigating Mixture of Experts in Dense Retrieval (2024)
- Can Cross Encoders Produce Useful Sentence Embeddings? (2025)
- Efficient Knowledge Feeding to Language Models: A Novel Integrated Encoder-Decoder Architecture (2025)
- Hierarchical Multi-field Representations for Two-Stage E-commerce Retrieval (2025)
- Guiding Retrieval using LLM-based Listwise Rankers (2025)
Please give a thumbs up to this comment if you found it helpful!
If you want recommendations for any Paper on Hugging Face checkout this Space
You can directly ask Librarian Bot for paper recommendations by tagging it in a comment:
@librarian-bot
recommend
Models citing this paper 4
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper