TRivia: Self-supervised Fine-tuning of Vision-Language Models for Table Recognition

Junyuan Zhang, Bin Wang, Qintong Zhang, Fan Wu, Zichen Wen, Jialin Lu, Junjie Shan, Ziqi Zhao, Shuya Yang, Ziling Wang, Ziyang Miao, Huaping Zhong, Yuhang Zang, Xiaoyi Dong, Ka-Ho Chow, Conghui He

TL;DR

TRivia is a novel self-supervised fine-tuning framework that allows vision-language models (VLMs) to master table recognition directly from unlabeled images. By leveraging reinforcement learning (via Group Relative Policy Optimization) and a smart table question-answering reward mechanism, its compact 3-billion-parameter model (TRivia-3B) outperforms proprietary giants like Gemini 2.5 Pro and state-of-the-art expert models across major benchmarks.

What Problem Does This Paper Address?

Table Recognition (TR) is a notoriously tricky document parsing task. It requires a model to not only extract text accurately (standard OCR) but also reconstruct complex structural layouts (rows, columns, merged cells) into formats like HTML or Markdown.

Currently, the field faces a massive data bottleneck:

  1. Human annotation is slow and prohibitively expensive.
  2. Synthetic data lacks the visual diversity and messiness of real-world documents.
  3. Knowledge distillation (training open-source models on outputs from proprietary models like GPT-4o) inherently caps performance at the teacher's level and often violates service agreements.

As a result, compact open-source models have lagged far behind commercial APIs. The authors ask a pivotal question: Can we harness the vast amounts of unlabeled table images on the web to break through this performance ceiling?

Methods

TRivia introduces a three-stage training pipeline that transitions a general-purpose VLM into a world-class table parser without relying on golden human labels in its final, most critical stage.

Overview of the TRivia pipeline, showing data curation and the self-supervised RL training loop.
  • Stage 1: OTSL Tag Warm-up: The base model (Qwen2.5-VL-3B) is trained on open-source datasets to learn OTSL (Optimized Table Tokenization), a compact syntax that describes table structures more efficiently than verbose HTML.
  • Stage 2: Supervised Fine-Tuning (SFT): The model is tuned on a curated set of ~50K real-world tables to bridge the gap between synthetic data and real document layouts.
  • Stage 3: TRivia (The Core Innovation): The authors apply Group Relative Policy Optimization (GRPO), a reinforcement learning technique, using table question-answering (QA) as a proxy reward.

To make Stage 3 work without human labels, they built an Adaptive Data Engine:

  1. Response-Consistency Sampling: The model generates multiple structural outputs for an unlabeled image. If the outputs vary wildly (low consistency), it signals model uncertainty. TRivia prioritizes these "hard" samples for training.
  2. Attention-Guided Diverse QA Generation: A large teacher VLM generates questions about the table. TRivia inspects the teacher's internal attention maps to ensure the questions target diverse visual regions of the table, filtering out redundant or overlapping questions.
  3. Validity Cross-Checking: An external VLM verifies that the questions are answerable with the image, but unanswerable without it, ensuring strict visual dependency.
  4. The Closed-Loop Reward: During RL training, the TR model parses a table image into text. A separate LLM tries to answer the verified questions using only the TR model's text output. The F1-score of these answers serves as the reward signal to optimize the TR model.

Datasets

  • Pre-training / Warm-up: PubTabNet, SynthTabNet, and MMTab.
  • Unlabeled Pool for TRivia: ~100K table images cropped from web-sourced PDFs using DocLayout-YOLO, filtered down to 50K via consistency sampling.
  • Evaluation Benchmarks: OmniDocBench (v1.5), CC-OCR (scanned/photographed complex tables), and OCRBench v2 (table parsing subset).

Key Insights and Ideas

  • QA as a Robust Proxy for Structure: Directly distilling HTML strings from a teacher model fails because if the teacher makes a single structural mistake (e.g., misaligning a column), the error propagates harshly during standard supervised training. In contrast, a QA-based reward evaluates whether the information and regional structure are preserved, making it far more error-tolerant.
  • The Power of Relative Rewards in GRPO: Even if some automatically generated QA pairs are flawed or incorrect, GRPO optimizes based on the relative advantage of responses within a group. Because a bad question penalizes all model outputs equally, it acts as a uniform offset and doesn't disrupt the training direction.
  • Teacher Over-Performance: TRivia-3B actually surpasses the very model used to generate its training questions (Qwen2.5-VL-72B). By filtering for diverse attention regions and optimizing via RL, the student refines the supervision signal beyond direct distillation.
Figure 4. The teacher model MQA used for QA generation could not directly generate correct annotations, but is sufficient to create QAs with TRivia to fine-tune the base model and lead to TRivia-3B that can handle complex structures.

Key Results

TRivia-3B achieves state-of-the-art performance across the board, proving that self-supervised RL can push small models past proprietary giants.

Performance comparison (TEDS Quality vs. Model Size) showing TRivia-3B outperforming larger and proprietary models.
  • Overall Performance: TRivia-3B achieved an overall 89.88 TEDS score, outperforming Gemini 2.5 Pro (88.93), MinerU2.5 (86.82), and GPT-5 (78.30).
  • Robustness to Complex Layouts: On the challenging CC-OCR dataset (which includes scanned, photographed, and handwritten tables), TRivia-3B scored 84.90 TEDS, beating specialized document models like dots.ocr (75.42) and DeepSeek-OCR (68.95).
  • Extreme Scenarios: In ablation studies on complex table types, TRivia-3B showed a massive +21.76 TEDS improvement over its baseline on rotated tables.
  • Data Annotation Utility: When TRivia-3B was used to pseudo-label a completely unseen dataset, a baseline model fine-tuned on its outputs matched TRivia's performance, proving it can function as a high-fidelity, automated data annotator.

Limitations and Future Work

While highly effective, the TRivia framework currently relies on a complex offline data preparation pipeline involving multiple auxiliary models (a teacher VLM for QA generation, a cross-checker VLM, and an LLM for answer verification). Streamlining this process or making it fully online during RL training remains an open engineering challenge. Additionally, while the authors showed promising preliminary results extending this to Key Information Extraction (KIE), fully generalizing TRivia to other document parsing tasks (like formula or layout analysis) is left for future research.

Summary updated

Abstract

Table recognition (TR) aims to transform table images into semi-structured representations such as HTML or Markdown. As a core component of document parsing, TR has long relied on supervised learning, with recent efforts dominated by fine-tuning vision-language models (VLMs) using labeled data. While VLMs have brought TR to the next level, pushing performance further demands large-scale labeled data that is costly to obtain. Consequently, although proprietary models have continuously pushed the performance boundary, open-source models, often trained with limited resources and, in practice, the only viable option for many due to privacy regulations, still lag far behind. To bridge this gap, we introduce TRivia, a self-supervised fine-tuning method that enables pretrained VLMs to learn TR directly from unlabeled table images in the wild. Built upon Group Relative Policy Optimization, TRivia automatically identifies unlabeled samples that most effectively facilitate learning and eliminates the need for human annotations through a question-answering-based reward mechanism. An attention-guided module generates diverse questions for each table image, and the ability to interpret the recognition results and answer them correctly provides feedback to optimize the TR model. This closed-loop process allows the TR model to autonomously learn to recognize, structure, and reason over tables without labeled data. Leveraging this pipeline, we present TRivia-3B, an open-sourced, compact, and state-of-the-art TR model that surpasses existing systems (e.g., Gemini 2.5 Pro, MinerU2.5) on three popular benchmarks. Model and code are released at: https://github.com/HKU-TASR/TRivia
BibTeX
@inproceedings{zhang2026trivia,
  author = {Junyuan Zhang and Bin Wang and Qintong Zhang and Fan Wu and Zichen Wen and Jialin Lu and Junjie Shan and Ziqi Zhao and Shuya Yang and Ziling Wang and Ziyang Miao and Huaping Zhong and Yuhang Zang and Xiaoyi Dong and Ka-Ho Chow and Conghui He},
  title = {{TRivia: Self-supervised Fine-tuning of Vision-Language Models for Table Recognition}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=hWQOVRu3lt},
}
Figure