Token-level Correlation-guided Compression for Efficient Multimodal Document Understanding

Renshan Zhang, Yibo Lyu, Rui Shao, Gongwei Chen, Weili Guan, Liqiang Nie · DOI

Abstract

Multimodal Large Language Models (MLLMs) face significant computational challenges when processing high-resolution documents due to the "token explosion" caused by image cropping. This paper presents a parameter-free, "plug-and-play" compression module that adaptively reduces visual tokens by an average of 66%. By analyzing patch-patch and CLS-patch correlations, the system identifies and discards redundant information, such as whitespace, while maintaining the integrity of critical text and layout structures.

Introduction

The current state-of-the-art in document understanding involves cropping large images into numerous sub-images to preserve the legibility of small text. However, this approach generates thousands of visual tokens, many of which represent empty margins or repetitive background patterns. Feeding this massive sequence into a Large Language Model (LLM) is both computationally expensive and inefficient. Existing compression techniques often rely on fixed ratios, failing to distinguish between information-dense regions like tables and sparse regions like footers.

Comparison between existing fixed-ratio methods and the proposed adaptive correlation-guided compression.

Correlation-guided Compression

The proposed method introduces a three-stage pipeline to adaptively compress visual tokens based on their informational value.

1. Information Density Calculation

The module first evaluates the "information density" of each sub-image by calculating patch-patch correlations. High similarity between patches indicates redundancy (e.g., a large block of white space), allowing the model to assign a lower compression ratio to that specific region. This ensures that complex charts receive more tokens than blank margins.

2. Informative Token Sampling

To select the most critical tokens, the model leverages the [CLS] token as a global summary guide.

  • Global-info Mining (Deep Layers): In deeper layers of the vision encoder, the model uses the Interquartile Range (IQR) to detect "outlier" tokens that represent unique global context.
  • Local-info Mining (Low Layers): In earlier layers, attention scores are treated as a probability distribution to sample tokens containing essential local details, such as individual characters or strokes.

3. Token Aggregation

Rather than simply discarding "unimportant" tokens, the module employs a k-nearest neighbor (k-NN) approach. This merges the information from discarded tokens into the preserved ones, mitigating potential information loss and ensuring the LLM receives a condensed but comprehensive representation.

The overall architecture of the proposed system, detailing the Global-info and Local-info mining processes.

Experimental Evaluation

The researchers benchmarked the method using mPLUG-DocOwl1.5 across 10 diverse datasets, including text-rich documents (DocVQA), tables (WTQ), and natural images with text (TextVQA).

Key Results

  • Efficiency: The method achieved an average compression ratio of 66%, with some documents seeing reductions up to 88.5%.
  • Performance: In its "plug-and-play" configuration, the model maintained performance levels comparable to uncompressed state-of-the-art models. Fine-tuning for just one epoch further narrowed the gap, often outperforming other OCR-free benchmarks.
  • Inference Speed: By significantly shortening the input sequence for the LLM, the module enhances both training efficiency and inference throughput.

Discussion and Insights

A primary takeaway is that adaptive compression is superior to fixed-ratio methods. By treating the [CLS] token's attention map as a guide, the compressor effectively captures both the "trees" (fine-grained text) and the "forest" (document layout). Furthermore, using redundancy as a metric allows the model to prioritize text-heavy regions without the need for an external OCR engine.

Conclusion and Future Work

This token-level correlation-guided compression offers a robust solution for efficient document understanding. While the current parameter-free module is highly effective, future work could explore making the compression process fully differentiable for end-to-end training. Additionally, optimizing the k-NN aggregation step could further improve real-time performance in production environments.

Summary updated

BibTeX
@misc{zhang2024token,
  author = {Renshan Zhang and Yibo Lyu and Rui Shao and Gongwei Chen and Weili Guan and Liqiang Nie},
  title = {{Token-level Correlation-guided Compression for Efficient Multimodal Document Understanding}},
  year = {2024},
  eprint = {2407.14439},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.14439},
}
Figure