Practice with Graph-based ANN Algorithms on Sparse Data: Chi-square Two-tower model, HNSW, Sign Cauchy Projections
Not on the map. Why?
Abstract (arXiv)
Sparse data are common. The traditional ``handcrafted'' features are often sparse. Embedding vectors from trained models can also be very sparse, for example, embeddings trained via the ``ReLu'' activation function. In this paper, we report our exploration of efficient search in sparse data with graph-based ANN algorithms (e.g., HNSW, or SONG which is the GPU version of HNSW), which are popular in industrial practice, e.g., search and ads (advertising). We experiment with the proprietary ads targeting application, as well as benchmark public datasets. For ads targeting, we train embeddings with the standard ``cosine two-tower'' model and we also develop the ``chi-square two-tower'' model. Both models produce (highly) sparse embeddings when they are integrated with the ``ReLu'' activation function. In EBR (embedding-based retrieval) applications, after we the embeddings are trained, the next crucial task is the approximate near neighbor (ANN) search for serving. While there are many ANN algorithms we can choose from, in this study, we focus on the graph-based ANN algorithm (e.g., HNSW-type). Sparse embeddings should help improve the efficiency of EBR. One benefit is the reduced memory cost for the embeddings. The other obvious benefit is the reduced computational time for evaluating similarities, because, for graph-based ANN algorithms such as HNSW, computing similarities is often the dominating cost. In addition to the effort on leveraging data sparsity for storage and computation, we also integrate ``sign cauchy random projections'' (SignCRP) to hash vectors to bits, to further reduce the memory cost and speed up the ANN search. In NIPS'13, SignCRP was proposed to hash the chi-square similarity, which is a well-adopted nonlinear kernel in NLP and computer vision. Therefore, the chi-square two-tower model, SignCRP, and HNSW are now tightly integrated.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 15 of its 48 references that are in the map. First posted on arXiv 13 Jun 2023.
Builds on
15 of 48 references.
References · 15
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2022Text and Code Embeddings by Contrastive Pre-Trainingcited by 358
- 2020DeCLUTR: Deep Contrastive Learning for Unsupervised Textual Representationscited by 249
- 2020Pre-training Tasks for Embedding-based Large-scale Retrievalcited by 153
- 2020General Multi-label Image Classification with Transformerscited by 126
- 2017Fast Approximate Nearest Neighbor Search With The Navigating Spreading-out Graphcited by 103
- 2014Deep Fragment Embeddings for Bidirectional Image Sentence Mappingcited by 99
- 2018Learning Tree-based Deep Model for Recommender Systemscited by 99
- 2018Hierarchical Bilinear Pooling for Fine-Grained Visual Recognitioncited by 47
- 2019Joint Optimization of Tree-based Index and Deep Model for Recommender Systemscited by 37
- 2020Learning Optimal Tree Models Under Beam Searchcited by 26
Built on by
Citing papers per year: 2023: 1; 2024: 1.
2 papers.