LEAF-QA: Locate, Encode & Attend for Figure Question Answering

Ritwick Chaudhry, Sumit Shekhar, Utkarsh Gupta, Pranav Maneriker, Prann Bansal, Ajay Joshi

Introduction

While Visual Question Answering (VQA) has advanced significantly for natural images, "Figure QA"—the task of answering questions about charts and graphs—has historically been limited by synthetic benchmarks. Previous datasets like FigureQA and DVQA relied on restricted vocabularies and fixed templates, often allowing models to "cheat" by associating colors with labels rather than understanding the underlying data structure.

Real-world charts are significantly more complex, featuring diverse fonts, overlapping labels, and "open vocabularies" where answers may include specific data values or proper nouns never encountered during training. LEAF-QA addresses this gap by introducing a massive dataset of 250,000 real-world charts and 2 million question-answer pairs derived from government reports and financial documents.

The LEAF-QA Dataset

The LEAF-QA dataset is designed to be robust and representative of real-world data visualization. It includes a wide variety of plot types, such as bar plots (stacked and grouped), line graphs, pie/donut charts, box plots, and scatter plots.

Examples of diverse chart types in the LEAF-QA dataset, including bar, line, pie, and box plots.

Key features of the dataset include:

  • Scale: 250,000 densely annotated figures.
  • Sources: Real-world open data from the World Bank, US Census, and stock markets.
  • Generalization: A unique "Novel Test Set" of 8,150 images from entirely different domains (e.g., solar eclipses) to evaluate model transferability.

LEAF-Net: Locate, Encode & Attend

To tackle the complexity of real-world charts, the authors propose LEAF-Net, a three-stage pipeline:

  1. Chart Parsing: A Mask R-CNN detects and classifies chart elements like titles, axis labels, legends, and plot items (e.g., bars or pie wedges).
  2. Question-Answer Encoding: Instead of raw text, LEAF-Net maps OCR-extracted text to specific chart elements. Questions are re-encoded to replace labels with tokens like (Element Type, Element Order), forcing the model to reason about the chart's structure.
  3. Attention Network: Using Stacked Attention Networks (SAN), the model combines encoded questions with visual features from a ResNet-152 to predict answers from a dynamic vocabulary tied to the detected elements.

Key Insights and Results

A core finding of the research is the importance of Semantic over Symbolic reasoning. By encoding questions in terms of chart elements, LEAF-Net bypasses the "open vocabulary" problem. For instance, the model can identify the "maximum value" for a specific legend item without having previously seen the specific country name associated with that item.

Structural and relational question types used to evaluate chart reasoning within the LEAF-QA framework.

LEAF-Net significantly outperforms previous state-of-the-art models:

  • LEAF-QA Benchmark: Achieved 67.42% accuracy (with Oracle text), compared to ~22% for standard VQA baselines.
  • DVQA Benchmark: Reached 72.72% accuracy, a substantial improvement over the previous best of 56.48%.
  • Generalization: Maintained 61.33% accuracy on the "Novel Test Set," proving the model learns logic rather than just memorizing templates.

Limitations and Future Directions

Despite its success, LEAF-Net remains dependent on OCR quality. Performance drops from 67.42% to 55.94% when switching from Oracle text to actual OCR due to misread characters. Additionally, the current architecture is limited to single-answer outputs, whereas many real-world queries might require multiple answers (e.g., "Which years saw growth above 5%?"). Future work will focus on modeling more natural, human-like queries to further bridge the gap between automated systems and human chart interpretation.

Summary updated

BibTeX
@inproceedings{chaudhry2020leaf,
  author = {Ritwick Chaudhry and Sumit Shekhar and Utkarsh Gupta and Pranav Maneriker and Prann Bansal and Ajay Joshi},
  title = {{LEAF-QA: Locate, Encode \& Attend for Figure Question Answering}},
  booktitle = {IEEE/CVF Winter Conference on Applications of Computer Vision},
  year = {2020},
  url = {https://openreview.net/forum?id=xTjb31Rb3g},
}
Figure