MAGIC: Marginal-Guided Compression with Optimal Transport for Efficient Visual Document Retrieval

Xu Yuan, Hua Liu, Wenqi Fan, Qing Li
9/17/2026
cs.CVcs.IR

Official code: xandery-geek/MAGIC (3 stars, Python, Apache-2.0, last commit 2026-09-27).

Abstract

Recent visual document retrieval (VDR) systems such as ColPali use multi-vector page embeddings, in which patch-level vectors enable fine-grained evidence matching but incur substantial index storage and MaxSim scoring overhead. Post-hoc merging offers a practical route to efficient VDR by reducing this cost without retraining the retriever, but its uniform reconstruction objectives are poorly aligned with the sparse, non-uniform patch usage induced by late-interaction retrieval.

Show full abstract

Under aggressive compression, this misalignment can preserve rarely used patches while concentrating retrieval activity on too few retained representatives. To address this misalignment, we propose Marginal-Guided Compression with Optimal Transport (MAGIC), a training-free post-hoc compressor for efficient retrieval with frozen multi-vector embeddings. MAGIC derives a MaxSim-induced compression surrogate and optimizes it through a two-marginal entropic optimal-transport formulation, where a retrieval-demand source marginal prioritizes high-use patches and a balanced target marginal regularizes retained-facet usage. Across ViDoRe benchmarks, keep ratios, and retrieval backbones, MAGIC consistently outperforms strong post-hoc compressors, with particularly large gains in the aggressive-compression regime; component ablations verify the complementary effects of its two marginals. We release the code at: https://github.com/xandery-geek/MAGIC.

View on arXivView PDF

Code Implementations(1)

xandery-geek/MAGICOfficial100%
Apache-2.0

MAGIC: Marginal-Guided Compression with Optimal Transport for Efficient Visual Document Retrieval

30PythonSep 6, 20262 months agoApache-2.0
compression-algorithmretrieval-augmented-generationvisual-document-retrieval

Similar Papers

Cite this paper

@article{yuan2026magic,
  title  = {MAGIC: Marginal-Guided Compression with Optimal Transport for Efficient Visual Document Retrieval},
  author = {Xu Yuan and Hua Liu and Wenqi Fan and Qing Li},
  year   = {2026},
  eprint = {2609.21018},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.21018v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.21018.svg)](https://codeofpaper.com/paper/2609.21018)

Discussion