DAVE: A VLM Vision Encoder for Document Understanding and Web Agents

Brandon Huang, Hang Hua, Zhuoran Yu, Trevor Darrell, Rogerio Feris, Roei Herzig

TL;DR

Vision-Language Models (VLMs) often struggle with document and web UI tasks because their vision encoders are optimized for natural images. They lack the fine-grained spatial and structural awareness required to read layouts or navigate interfaces. To fix this, researchers introduce DAVE, a specialized vision encoder trained via a novel two-stage pipeline that merges weights across different LLM decoders. DAVE significantly boosts VLM performance on document understanding and web agent benchmarks, proving that specialized visual representations are the missing key to navigating the digital world.

The Problem: Bottlenecked by the "Eyes" of the VLM

Modern VLMs (like GPT-4V or LLaVA) are incredibly capable, but they have a fundamental bottleneck: their "eyes." The vision encoders they rely on (such as CLIP or SigLIP) are trained primarily on natural images like dogs, cars, and landscapes. When faced with a dense PDF, a complex chart, or a cluttered web page, these encoders fail to capture the low-level structural and spatial details needed to understand text layouts or locate clickable buttons.

Conversely, vision models trained exclusively on documents tend to lose their general visual semantics and transfer poorly to diverse VLM architectures. Furthermore, getting high-quality annotated data for documents and web pages is expensive and limited by the quality of existing Optical Character Recognition (OCR) tools. The authors set out to build a vision encoder purpose-built for documents and web agents that bypasses the annotation bottleneck and plays nicely with any LLM backbone.

Methods

The authors train DAVE using a two-stage pipeline designed to maximize unlabeled data and ensure broad compatibility across different VLM architectures.

DAVE's two-stage training pipeline, featuring self-supervised pretraining, ensemble training, and weight-space merging.
  1. Stage 1: Self-Supervised Learning (SSL) on Unlabeled Data The team uses Masked Autoencoders (MAE) to train the vision encoder on 20 million unlabeled document and web images. Crucial tweak: Standard MAE normalizes pixels per patch, which causes training to collapse on document images due to their massive amounts of uniform white space (low inter-patch variance). The authors modified the objective to reconstruct raw pixel values, stabilizing the training at scale.

  2. Stage 2: Supervised Multi-Task Pretraining The model is then fine-tuned autoregressively on a smaller, high-quality dataset for tasks like OCR, layout extraction, and web localization.

  3. Ensemble Training (The "Best of Both Worlds" approach) To ensure DAVE doesn't forget general visual semantics, the authors concatenate DAVE's specialized features with features from a frozen generalist encoder (SigLIP 2). This forces DAVE to focus purely on learning low-level structure while SigLIP handles the high-level semantics.

  4. Weight-Space Merging (Model Soups) Typically, a vision encoder trained alongside a specific text decoder (like LLaMA) overfits to that decoder. To make DAVE "decoder-agnostic," the authors train multiple instances of the encoder with different LLMs (Qwen, LLaMA, Granite) and merge their weights using a learned distillation coefficient.

Datasets

  • Self-Supervised Pretraining: 20 million unlabeled images (10M English PDFs from DocFM, 10M web screenshots from Common Screen).
  • Supervised Pretraining: ~2 million samples curated from FM4D, PlotQA, Fintabnet, ChartQA, Datikz, Pubtables, UGround, and a custom dataset of 500K arXiv PDFs processed with PaddleOCR.
  • Instruction Tuning: 2.5 million images mixing general data (LLaVA-1.5-mix) with specialized data (DocVQA, ChartQA, AI2D, Pixmo-Doc, MultiUI).
  • Evaluation: Evaluated across classic document tasks (DocBank, DocLayNet), VQA/Web benchmarks (OCRBench, DocVQA, MMMU, TextVQA, Screenspot-V2, etc.), and agentic benchmarks (Mind2Web).

Key Insights and Ideas

  • Pixel normalization is the enemy of document pretraining: The authors discovered that the standard practice of normalizing patches in MAE fails on documents. Because document backgrounds are mostly uniform white space, they have very low inter-patch variance compared to natural images. Reconstructing raw pixels is a simple but vital fix for domain-specific SSL.
Distribution of inter-patch standard deviation showing documents and web pages have significantly lower variance than natural images.
  • Structure > Semantics for Web Agents: In web navigation tasks, even basic self-supervised models (like standard MAE) performed competitively with advanced generalist models. This suggests that spatial and structural awareness (knowing where things are) is actually more important for web agents than broad semantic knowledge.
  • Encoders don't have to be monogamous: By training the vision encoder with multiple different LLMs and merging the weights, the resulting encoder becomes highly flexible. It can be plugged into entirely new VLM architectures without catastrophic misalignment.

Key Results

  • VLM Benchmarks: When paired with Llama-3.2-3B-Instruct, DAVE outperformed the strongest baseline (SigLIP 2) by an average of 10.5% across 8 document and web benchmarks.
  • Web Agents: On the Mind2Web benchmark, DAVE improved the step success rate by ~5% over the best baseline (Dolphin), proving its utility for autonomous web navigation.
  • Classic Document Tasks: DAVE achieved State-of-the-Art results on dense document tasks, hitting 56.9 mAP on DocBank (vs. SigLIP's 51.7) and 74.1 mAP on DocLayNet (vs. SigLIP's 70.8).
  • No General Knowledge Lost: Thanks to the ensemble approach, DAVE maintained highly competitive scores on general VQA benchmarks like MMMU and RealWorldQA.

Limitations and Future Work

The authors acknowledge a few constraints:

  • Fixed Resolution: DAVE operates at a fixed resolution, requiring image tiling or resizing, which isn't always optimal for highly variable web pages.
  • Dependency: It relies on an external pretrained generalist encoder (SigLIP 2) rather than being a standalone monolithic model.
  • Compute Heavy: The self-supervised pretraining stage requires substantial computational resources.
  • Stateless Agents: In agentic settings, the vision encoder currently processes frames in isolation and is not conditioned on prior actions.

Future work will focus on making the encoder more compute- and data-efficient, supporting dynamic resolutions, and incorporating action-history conditioning for smarter web agents. The authors also note this training paradigm could be highly effective for other data-scarce domains, like medical imaging.

Summary updated

BibTeX
@inproceedings{huang2026dave,
  author = {Brandon Huang and Hang Hua and Zhuoran Yu and Trevor Darrell and Rogerio Feris and Roei Herzig},
  title = {{DAVE: A VLM Vision Encoder for Document Understanding and Web Agents}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=kgk0NqjsoW},
}
Figure