Elamur Research

ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT

Paper · 2020 · Omar Khattab and Matei Zaharia

Summary

BERT-based rankers improve passage search a lot, but they run every query–document pair through a full transformer. That makes each query very slow. ColBERT tackles this cost problem with a design the authors call late interaction. BERT encodes the query and the document separately into sets of contextual token embeddings. Relevance is then computed cheaply: each query embedding takes its maximum similarity (MaxSim) over all document embeddings, and these maxima are summed. Because documents are encoded independently, their representations can be computed offline. The same pruning-friendly scoring also allows retrieval straight from the full collection through vector-similarity indexes, rather than only re-ranking BM25 output.

The model is evaluated on MS MARCO and TREC CAR. Its quality is competitive with BERT rankers and beats every non-BERT baseline. It runs about two orders of magnitude faster and uses four orders of magnitude fewer FLOPs per query. This matters because it shows deep contextual matching can be made practical for real-time search.

Key points

  • MS MARCO Ranking holds 9M passages and 1M queries from Bing logs. ColBERT is also tested on TREC CAR.
  • In re-ranking mode, ColBERT is over 170× faster than existing BERT-based rankers and needs 14,000× fewer FLOPs. The main re-ranking model reaches MRR@10 of 34.9% on the MS MARCO validation set.
  • End-to-end retrieval beats re-ranking with the same model, thanks to better recall. Its Recall@50 exceeds the official BM25 Recall@1000.
  • Indexing all of MS MARCO takes about 3 hours on one server with four GPUs.
  • With 24-dimensional vectors stored as 2-byte floats, the index takes 27 GiBs. This costs only about 1% MRR@10 versus the largest setting (286 GiBs).
  • Ablations on a 5-layer model trained for 200k iterations compare three variants against ColBERT:
    • a single-vector [CLS] model (dimension 4096);
    • average similarity in place of MaxSim;
    • removing query augmentation. All three variants score lower.

Interesting ideas

  • I1. Keep interaction at the token level but postpone it: encode both sides separately, then let each query token find its single best match and add up these scores. This keeps fine-grained matching while staying cheap and inspectable.
  • I2. Do the expensive encoding of the "document" side exactly once offline, and pay only for the short query at question time.
  • I3. Prove a design choice by ablating it against simpler rivals: a single pooled vector, and averaging in place of max.
  • I4. Measure how far vector size and numeric precision can shrink before quality drops; here an aggressive reduction cost only about 1%.
  • I5. Searching the whole collection, instead of re-ranking a fixed candidate list, recovers good items that the first-stage filter missed entirely.

For Mova

How these ideas could serve Mova, our small open language model — its files, stages and tests:

  • I1 (answer): QA on fables could align each question word with its best-matching passage token, giving an explainable trace of which word supported the answer.
  • I2 (world): the world of a text could be compiled once per story, and many questions answered against that stored structure without reparsing.
  • I3 (learn): evaluation could routinely include such weakened baselines as negative controls, showing that structured matching beats a collapsed, bag-like summary.
  • I4 (tree): gparse embeddings or cached contextual vectors could be stored at lower dimension or 2-byte precision after a similar size-vs-LAS sweep.
  • I5 (frames): coreference could check whether heuristic candidate pre-filtering drops true antecedents, and score a wider candidate set when recall suffers.

Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.

 Institutions

 Fields, topics and concepts

Cite

Cite as Omar Khattab and Matei Zaharia. 2020. ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT. SIGIR 2020.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1145/3397271.3401075 · arXiv 2004.12832

@inproceedings{khattab2020colbert,
  title = {{ColBERT: Efficient and Effective Passage Search via Contextualized Late Interaction over BERT}},
  author = {Omar Khattab and Matei Zaharia},
  booktitle = {SIGIR 2020},
  year = {2020},
  doi = {10.1145/3397271.3401075},
  eprint = {2004.12832},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1145/3397271.3401075}
}

References

42 references, from the paper's own bibliography.

  1. authorpersonFiras Abuzaid, personGeet Sethi, personPeter Bailis, and personMatei Zaharia. year2019. To Index or Not to Index: Optimizing Exact Maximum Inner Product Search. In booktitle2019 IEEE 35th International Conference on Data Engineering (ICDE). IEEE, pages1250–1261. OpenAlex ↗ · Scholar ↗
  2. authorpersonZhuyun Dai and personJamie Callan. year2019a. Context-Aware Sentence/Passage Term Importance Estimation For First Stage Retrieval. journalarXiv preprint arXiv:1910.10687 (year2019). OpenAlex ↗ · Scholar ↗
  3. authorpersonZhuyun Dai and personJamie Callan. year2019b. Deeper Text Understanding for IR with Contextual Neural Language Modeling. journalarXiv preprint arXiv:1905.09217 (year2019). OpenAlex ↗ · Scholar ↗
  4. authorpersonZhuyun Dai, personChenyan Xiong, personJamie Callan, and personZhiyuan Liu. year2018. Convolutional neural networks for soft-matching n-grams in ad-hoc search. In booktitleProceedings of the eleventh ACM international conference on web search and data mining. pages126–134. OpenAlex ↗ · Scholar ↗
  5. authorpersonJacob Devlin, personMing-Wei Chang, personKenton Lee, and personKristina Toutanova. year2018. Bert: Pre-training of deep bidirectional transformers for language understanding. journalarXiv preprint arXiv:1810.04805 (year2018). our card
  6. authorpersonLaura Dietz, personManisha Verma, personFilip Radlinski, and personNick Craswell. year2017. TREC Complex Answer Retrieval Overview.. In booktitleTREC. OpenAlex ↗ · Scholar ↗
  7. authorpersonJiafeng Guo, personYixing Fan, personQingyao Ai, and personW Bruce Croft. year2016. A deep relevance matching model for ad-hoc retrieval. In booktitleProceedings of the 25th ACM International on Conference on Information and Knowledge Management. ACM, pages55–64. OpenAlex ↗ · Scholar ↗
  8. authorpersonJiafeng Guo, personYixing Fan, personLiang Pang, personLiu Yang, personQingyao Ai, personHamed Zamani, personChen Wu, personW Bruce Croft, and personXueqi Cheng. year2019. A deep look into neural ranking models for information retrieval. journalarXiv preprint arXiv:1903.06902 (year2019). OpenAlex ↗ · Scholar ↗
  9. authorpersonSebastian Hofstätter and personAllan Hanbury. year2019. Let's measure run time! Extending the IR replicability infrastructure to include performance aspects. journalarXiv preprint arXiv:1907.04614 (year2019). OpenAlex ↗ · Scholar ↗
  10. authorpersonSebastian Hofstätter, personNavid Rekabsaz, personCarsten Eickhoff, and personAllan Hanbury. year2019a. On the effect of low-frequency terms on neural-IR models. In booktitleProceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval. pages1137–1140. OpenAlex ↗ · Scholar ↗
  11. authorpersonSebastian Hofstätter, personMarkus Zlabinger, and personAllan Hanbury. year2019b. TU Wien@ TREC Deep Learning'19–Simple Contextualization for Re-ranking. journalarXiv preprint arXiv:1912.01385 (year2019). OpenAlex ↗ · Scholar ↗
  12. authorpersonPo-Sen Huang, personXiaodong He, personJianfeng Gao, personLi Deng, personAlex Acero, and personLarry Heck. year2013. Learning deep structured semantic models for web search using clickthrough data. In booktitleProceedings of the 22nd ACM international conference on Information & Knowledge Management. pages2333–2338. OpenAlex ↗ · Scholar ↗
  13. authorpersonShiyu Ji, personJinjin Shao, and personTao Yang. year2019. Efficient Interaction-based Neural Ranking with Locality Sensitive Hashing. In booktitleThe World Wide Web Conference. ACM, pages2858–2864. OpenAlex ↗ · Scholar ↗
  14. authorpersonXiaoqi Jiao, personYichun Yin, personLifeng Shang, personXin Jiang, personXiao Chen, personLinlin Li, personFang Wang, and personQun Liu. year2019. Tinybert: Distilling bert for natural language understanding. journalarXiv preprint arXiv:1909.10351 (year2019). our card
  15. authorpersonJeff Johnson, personMatthijs Douze, and personHervé Jégou. year2017. Billion-scale similarity search with GPUs. journalarXiv preprint arXiv:1702.08734 (year2017). our card
  16. authorpersonDiederik P Kingma and personJimmy Ba. year2014. Adam: A method for stochastic optimization. journalarXiv preprint arXiv:1412.6980 (year2014). our card
  17. authorpersonRon Kohavi, personAlex Deng, personBrian Frasca, personToby Walker, personYa Xu, and personNils Pohlmann. year2013. Online controlled experiments at large scale. In booktitleSIGKDD. OpenAlex ↗ · Scholar ↗
  18. authorpersonSean MacAvaney, personAndrew Yates, personArman Cohan, and personNazli Goharian. year2019. Cedr: Contextualized embeddings for document ranking. In booktitleProceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval. ACM, pages1101–1104. OpenAlex ↗ · Scholar ↗
  19. authorpersonPaul Michel, personOmer Levy, and personGraham Neubig. year2019. Are Sixteen Heads Really Better than One?. In booktitleAdvances in Neural Information Processing Systems. pages14014–14024. our card
  20. authorpersonBhaskar Mitra and personNick Craswell. year2019. An Updated Duet Model for Passage Re-ranking. journalarXiv preprint arXiv:1903.07666 (year2019). OpenAlex ↗ · Scholar ↗
  21. authorpersonBhaskar Mitra, personNick Craswell, et al. year2018. An introduction to neural information retrieval. journalFoundations and Trends® in Information Retrieval volume13, number1 (year2018), pages1–126. OpenAlex ↗ · Scholar ↗
  22. authorpersonBhaskar Mitra, personFernando Diaz, and personNick Craswell. year2017. Learning to match using local and distributed representations of text for web search. In booktitleProceedings of the 26th International Conference on World Wide Web. International World Wide Web Conferences Steering Committee, pages1291–1299. OpenAlex ↗ · Scholar ↗
  23. authorpersonBhaskar Mitra, personCorby Rosset, personDavid Hawking, personNick Craswell, personFernando Diaz, and personEmine Yilmaz. year2019. Incorporating query term independence assumption for efficient retrieval and ranking using deep neural networks. journalarXiv preprint arXiv:1907.03693 (year2019). OpenAlex ↗ · Scholar ↗
  24. authorpersonTri Nguyen, personMir Rosenberg, personXia Song, personJianfeng Gao, personSaurabh Tiwary, personRangan Majumder, and personLi Deng. year2016. MS MARCO: A Human-Generated MAchine Reading COmprehension Dataset. (year2016). our card
  25. authorpersonRodrigo Nogueira and personKyunghyun Cho. year2019. Passage Re-ranking with BERT. journalarXiv preprint arXiv:1901.04085 (year2019). our card
  26. authorpersonRodrigo Nogueira, personJimmy Lin, and personAI Epistemic. year2019a. From doc2query to docTTTTTquery. (year2019). our card
  27. authorpersonRodrigo Nogueira, personWei Yang, personKyunghyun Cho, and personJimmy Lin. year2019b. Multi-Stage Document Ranking with BERT. journalarXiv preprint arXiv:1910.14424 (year2019). OpenAlex ↗ · Scholar ↗
  28. authorpersonRodrigo Nogueira, personWei Yang, personJimmy Lin, and personKyunghyun Cho. year2019c. Document Expansion by Query Prediction. journalarXiv preprint arXiv:1904.08375 (year2019). our card
  29. authorpersonMatthew E Peters, personMark Neumann, personMohit Iyyer, personMatt Gardner, personChristopher Clark, personKenton Lee, and personLuke Zettlemoyer. year2018. Deep contextualized word representations. journalarXiv preprint arXiv:1802.05365 (year2018). our card
  30. authorpersonYifan Qiao, personChenyan Xiong, personZhenghao Liu, and personZhiyuan Liu. year2019. Understanding the Behaviors of BERT in Ranking. journalarXiv preprint arXiv:1904.07531 (year2019). OpenAlex ↗ · Scholar ↗
  31. authorpersonColin Raffel, personNoam Shazeer, personAdam Roberts, personKatherine Lee, personSharan Narang, personMichael Matena, personYanqi Zhou, personWei Li, and personPeter J Liu. year2019. Exploring the limits of transfer learning with a unified text-to-text transformer. journalarXiv preprint arXiv:1910.10683 (year2019). our card
  32. authorpersonStephen E Robertson, personSteve Walker, personSusan Jones, personMicheline M Hancock-Beaulieu, personMike Gatford, et al. year1995. Okapi at TREC-3. journalNIST Special Publication (year1995). our card
  33. authorpersonRaphael Tang, personYao Lu, personLinqing Liu, personLili Mou, personOlga Vechtomova, and personJimmy Lin. year2019. Distilling task-specific knowledge from BERT into simple neural networks. journalarXiv preprint arXiv:1903.12136 (year2019). OpenAlex ↗ · Scholar ↗
  34. authorpersonAshish Vaswani, personNoam Shazeer, personNiki Parmar, personJakob Uszkoreit, personLlion Jones, personAidan N Gomez, personŁukasz Kaiser, and personIllia Polosukhin. year2017. Attention is all you need. In booktitleAdvances in neural information processing systems. pages5998–6008. our card
  35. authorpersonYonghui Wu, personMike Schuster, personZhifeng Chen, personQuoc V Le, personMohammad Norouzi, personWolfgang Macherey, personMaxim Krikun, personYuan Cao, personQin Gao, personKlaus Macherey, et al. year2016. Google's neural machine translation system: Bridging the gap between human and machine translation. journalarXiv preprint arXiv:1609.08144 (year2016). OpenAlex ↗ · Scholar ↗
  36. authorpersonChenyan Xiong, personZhuyun Dai, personJamie Callan, personZhiyuan Liu, and personRussell Power. year2017. End-to-end neural ad-hoc ranking with kernel pooling. In booktitleProceedings of the 40th International ACM SIGIR conference on research and development in information retrieval. pages55–64. OpenAlex ↗ · Scholar ↗
  37. authorpersonPeilin Yang, personHui Fang, and personJimmy Lin. year2018. Anserini: Reproducible ranking baselines using Lucene. journalJournal of Data and Information Quality (JDIQ) volume10, number4 (year2018), pages1–20. OpenAlex ↗ · Scholar ↗
  38. authorpersonWei Yang, personKuang Lu, personPeilin Yang, and personJimmy Lin. year2019. Critically Examining the" Neural Hype" Weak Baselines and the Additivity of Effectiveness Gains from Neural Ranking Models. In booktitleProceedings of the 42nd International ACM SIGIR Conference on Research and Development in Information Retrieval. pages1129–1132. OpenAlex ↗ · Scholar ↗
  39. authorpersonZeynep Akkalyoncu Yilmaz, personWei Yang, personHaotian Zhang, and personJimmy Lin. year2019. Cross-domain modeling of sentence-level evidence for document retrieval. In booktitleProceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP). pages3481–3487. OpenAlex ↗ · Scholar ↗
  40. authorpersonOfir Zafrir, personGuy Boudoukh, personPeter Izsak, and personMoshe Wasserblat. year2019. Q8bert: Quantized 8bit bert. journalarXiv preprint arXiv:1910.06188 (year2019). our card
  41. authorpersonHamed Zamani, personMostafa Dehghani, personW Bruce Croft, personErik Learned-Miller, and personJaap Kamps. year2018. From neural re-ranking to neural ranking: Learning a sparse representation for inverted indexing. In booktitleProceedings of the 27th ACM International Conference on Information and Knowledge Management. ACM, pages497–506. OpenAlex ↗ · Scholar ↗
  42. authorpersonLe Zhao. year2012. titleModeling and solving term mismatch for full-text retrieval. thesistypePh.D. Dissertation. schoolCarnegie Mellon University. OpenAlex ↗ · Scholar ↗

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/khattab-2020-colbert-efficient-effective-passage/