Lune

AAAI2022Top-tier venue

Sublinear Time Approximation of Text Similarity Matrices

Archan Ray, Nicholas Monath, Andrew McCallum, Cameron Musco

Abstract

We study algorithms for approximating pairwise similarity matrices that arise in natural language processing. Generally, computing a similarity matrix for n data points requires Ω(n 2 ) similarity computations. This quadratic scaling is a significant bottleneck, especially when similarities are computed via expensive functions, e.g., via transformer models. Approximation methods reduce this quadratic complexity, often by using a small subset of exactly computed similarities to approximate the remainder of the complete pairwise similarity matrix. Significant work focuses on the efficient approximation of positive semidefinite (PSD) similarity matrices, which arise e.g., in kernel methods. However, much less is understood about indefinite (non-PSD) similarity matrices, which often arise in NLP. Motivated by the observation that many of these matrices are still somewhat close to PSD, we introduce a generalization of the popular Nyström method to the indefinite setting. Our algorithm can be applied to any similarity matrix and runs in sublinear time in the size of the matrix, producing a rank-s approximation with just O(ns) similarity computations. We show that our method, along with a simple variant of CUR decomposition, performs very well in approximating a variety of similarity matrices arising in NLP tasks. We demonstrate high accuracy of the approximated similarity matrices in the downstream tasks of document classification, sentence similarity, and cross-document coreference. † Now at Google.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

2 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Efficient Nearest Neighbor Search for Cross-Encoder Models using Matrix Factorization cites Dense Passage Retrieval for Open-Domain Question Answering
  • Adaptive Retrieval and Scalable Indexing for k-NN Search with Cross-Encoders cites Efficient Nearest Neighbor Search for Cross-Encoder Models using Matrix Factorization
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers2

  1. Efficient Nearest Neighbor Search for Cross-Encoder Models using Matrix FactorizationNishant Yadav, Nicholas Monath, Rico Angell, Manzil Zaheer et al.EMNLP 2022 · 4 citations
  2. Adaptive Retrieval and Scalable Indexing for k-NN Search with Cross-EncodersNishant Yadav, Nicholas Monath, Manzil Zaheer, Rob Fergus et al.ICLR 2024 · 2 citations

Builds on3

  1. ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
  2. Dense Passage Retrieval for Open-Domain Question AnsweringVladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis et al.EMNLP 2020 · 142 citations
  3. Kernel Methods Through the Roof: Handling Billions of Points EfficientlyGiacomo Meanti, Luigi Carratino, Lorenzo Rosasco, Alessandro RudiNeurIPS 2020 · 138 citations

Related papers

  1. Bridging the Gap Between Hyperdimensional Computing and Kernel Methods via the Nyström MethodQuanling Zhao, Anthony Hitchcock Thomas, Ari Brin, Xiaofan Yu et al.AAAI 2025 · 2 citations
  2. Skyformer: Remodel Self-Attention with Gaussian Kernel and Nyström MethodYifan Chen, Qi Zeng, Heng Ji, Yun YangNeurIPS 2021 · 74 citations
  3. Nyströmformer: A Nyström-based Algorithm for Approximating Self-AttentionYunyang Xiong, Zhanpeng Zeng, Rudrasis Chakraborty, Mingxing Tan et al.AAAI 2021 · 675 citations
  4. Kernel similarity matching with Hebbian networksKyle Luther, H. Sebastian SeungNeurIPS 2022 · 3 citations
  5. Fast Deterministic CUR Matrix Decomposition with Accuracy AssuranceYasutoshi Ida, Sekitoshi Kanai, Yasuhiro Fujiwara, Tomoharu Iwata et al.ICML 2020 · 14 citations
Dusk over the sea between two cliffs drawn in fine vertical lines