Papers › Learning Discrete Representations via Constrained Clustering for Effective and...

Learning Discrete Representations via Constrained Clustering for Effective and Efficient Dense Retrieval

12 Oct 2021arXiv:2110.05789archive 2025-07-28

Jingtao Zhan, Jiaxin Mao, Yiqun Liu, Jiafeng Guo, Min Zhang, Shaoping Ma

Dense Retrieval (DR) has achieved state-of-the-art first-stage ranking effectiveness. However, the efficiency of most existing DR models is limited by the large memory cost of storing dense vectors and the time-consuming nearest neighbor search (NNS) in vector space. Therefore, we present RepCONC, a novel retrieval model that learns discrete Representations via CONstrained Clustering. RepCONC jointly trains dual-encoders and the Product Quantization (PQ) method to learn discrete document representations and enables fast approximate NNS with compact indexes. It models quantization as a constrained clustering process, which requires the document embeddings to be uniformly clustered around the quantization centroids and supports end-to-end optimization of the quantization method and dual-encoders. We theoretically demonstrate the importance of the uniform clustering constraint in RepCONC and derive an efficient approximate solution for constrained clustering by reducing it to an instance of the optimal transport problem. Besides constrained clustering, RepCONC further adopts a vector-based inverted file system (IVF) to support highly efficient vector search on CPUs. Extensive experiments on two popular ad-hoc retrieval benchmarks show that RepCONC achieves better ranking effectiveness than competitive vector quantization baselines under different compression ratio settings. It also substantially outperforms a wide range of existing retrieval models in terms of retrieval effectiveness, memory efficiency, and time efficiency.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2110.05789")

Code

Syntology Ran 5 of 22 code samples harvested from 3 repositories linked to this paper; 17 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 4 ran with no contract checked.

By repository: official repository: 1 sample from 1 repository, 1 ran; community (archive-listed): 21 samples from 2 repositories, 4 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

jingtaozhan/repconc officialmentioned in papermentioned on GitHubpytorch report
jingtaozhan/DRhard mentioned on GitHubpytorchBSD-3-Clause report
jingtaozhan/JPQ mentioned on GitHubpytorchMIT report
jingtaozhan/LearningToRetrieve mentioned on GitHubpytorchBSD-3-Clause report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

22 samples harvested; 5 ran; 0 honoured the contract we drafted; 17 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
4ran
17unverified

Licence: 0 of the 22 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 3 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

mean_pooling jingtaozhan/repconc/src/repconc/models/dense/modeling_dense.py official repository ran · our draft was wrong MIT (permissive) · 07b0e4cab6c2d738 · report
batch_to_device jingtaozhan/JPQ/jpq/model.py community (archive-listed) ran MIT (permissive) · 784e8a98f055bde0 · report
index_retrieve jingtaozhan/DRhard/retrieve_utils.py community (archive-listed) ran BSD-3-Clause (permissive) · 62fc247c87911474 · report
pad_input_ids jingtaozhan/DRhard/preprocess.py community (archive-listed) ran BSD-3-Clause (permissive) · b201d8d93b242b70 · report
url_to_filename jingtaozhan/DRhard/star_tokenizer.py community (archive-listed) ran fingerprinted BSD-3-Clause (permissive) · e827d94caab33f59 · report
PassagePreprocessingFn jingtaozhan/DRhard/preprocess.py community (archive-listed) unverified BSD-3-Clause (permissive) · d644ea00a07b6437 · report
compute_loss jingtaozhan/JPQ/jpq/run_train.py community (archive-listed) unverified MIT (permissive) · b2c86c4e199eeb01 · report
construct_flatindex_from_embeddings jingtaozhan/DRhard/retrieve_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 5149666c4e47a3f9 · report
convert_index_to_gpu jingtaozhan/DRhard/retrieve_utils.py community (archive-listed) unverified BSD-3-Clause (permissive) · 66e8bf589981ec7f · report
get_collate_function jingtaozhan/JPQ/jpq/dataset.py community (archive-listed) unverified MIT (permissive) · a9a03792761f628c · report
get_doc_embeds jingtaozhan/JPQ/jpq/run_train.py community (archive-listed) unverified MIT (permissive) · 9e1ebe9b0455aa43 · report
hf_bucket_url jingtaozhan/DRhard/star_tokenizer.py community (archive-listed) unverified BSD-3-Clause (permissive) · b2be6c932ce41084 · report
inbatch_train jingtaozhan/DRhard/model.py community (archive-listed) unverified BSD-3-Clause (permissive) · 9004f78cc68a7b5c · report
is_remote_url jingtaozhan/DRhard/star_tokenizer.py community (archive-listed) unverified BSD-3-Clause (permissive) · 4381d1f588a7f42a · report
load_candidate_from_stream jingtaozhan/DRhard/msmarco_eval.py community (archive-listed) unverified BSD-3-Clause (permissive) · 1a34a07957ed4ee3 · report
load_index jingtaozhan/JPQ/jpq/run_retrieval.py community (archive-listed) unverified MIT (permissive) · b32da4856889747c · report
load_rank jingtaozhan/DRhard/dataset.py community (archive-listed) unverified BSD-3-Clause (permissive) · 9bbe63268d471884 · report
load_reference jingtaozhan/DRhard/msmarco_eval.py community (archive-listed) unverified BSD-3-Clause (permissive) · 4020d64dcc4b6c53 · report
load_reference_from_stream jingtaozhan/DRhard/msmarco_eval.py community (archive-listed) unverified BSD-3-Clause (permissive) · 42005ba9f770d57d · report
load_rel jingtaozhan/DRhard/dataset.py community (archive-listed) unverified BSD-3-Clause (permissive) · 3a4b386b64960337 · report
pack_tensor_2D jingtaozhan/DRhard/dataset.py community (archive-listed) unverified BSD-3-Clause (permissive) · 7f738a55dde7b691 · report
randneg_train jingtaozhan/DRhard/model.py community (archive-listed) unverified BSD-3-Clause (permissive) · 650169b0049d3567 · report

Tasks

ClusteringConstrained ClusteringInformation RetrievalOpen-Domain Question AnsweringQuantizationRetrieval

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections