Abstract
We introduce LEAF-QA, a comprehensive dataset of 250,000 densely annotated figures/charts, constructed from real-world open data sources, along with 2 million question-answer (QA) pairs querying the structure and semantics of these charts. LEAF-QA highlights the problem of multimodal QA, which is notably different from conventional visual QA (VQA), and has recently gained interest in the community. Furthermore, LEAF-QA is significantly more complex than previous attempts at chart QA, viz. FigureQA and DVQA, which present only limited variations in chart data. LEAF-QA being constructed from real-world sources, requires a novel architecture to enable question answering. To this end, LEAF-Net, a deep architecture involving chart element localization, question and answer encoding in terms of chart elements, and an attention network is proposed. Different experiments are conducted to demonstrate the challenges of QA on LEAF-QA. The proposed architecture, LEAF-Net also considerably advances the current state-of-the-art on FigureQA and DVQA.
Introduction
While Visual Question Answering (VQA) has seen massive growth, Figure Question Answering (FQA)—the task of interpreting charts and plots—remains a distinct challenge. Most existing FQA datasets, such as FigureQA or DVQA, rely on synthetic data with limited vocabularies, fixed templates, and simplified visual styles. For instance, legend labels in these datasets are often just color names like "red" or "blue."
Real-world charts are significantly more complex, featuring diverse fonts, overlapping elements, and "out-of-vocabulary" text like specific country names, years, or financial metrics. Current models often fail because they attempt to map questions to a fixed dictionary of answers. LEAF-QA addresses the need for a benchmark that reflects this real-world complexity and proposes an architecture capable of reasoning over chart elements dynamically.
The LEAF-QA Dataset
LEAF-QA is a comprehensive benchmark featuring 250,000 figures and 2 million QA pairs. Sourced from real-world entities like the World Bank, US Census, and financial databases, it includes a wide variety of chart types: bar charts (stacked and grouped), line graphs, pie/donut charts, box plots, and scatter plots.
Unlike synthetic datasets, LEAF-QA forces models to parse legends and labels to find answers, effectively breaking the "color bias" where models might otherwise learn that a specific color always corresponds to a specific answer.
LEAF-Net Architecture
To address the challenges of LEAF-QA, the authors propose LEAF-Net, a three-stage pipeline designed to bridge the gap between visual perception and semantic reasoning:
- Locate (Chart Parsing): Using a Mask R-CNN (with a ResNet-101 backbone), the model detects and classifies 20 different chart elements, such as axis labels, legend items, bars, and pie wedges.
- Encode (Question-Answer Encoding): Instead of using standard word embeddings for the entire question, LEAF-Net extracts text from the chart (via OCR or an "Oracle"). It replaces specific words in the question with "rare word" tokens that map to detected chart elements. This allows the model to handle unseen words by treating them as "Element X at Position Y."
- Attend (Attention Network): The model uses Stacked Attention Networks (SAN) to combine the LSTM-encoded question with visual features from a ResNet-152, focusing on the specific parts of the chart relevant to the query.
Structural vs. Relational Reasoning
The paper distinguishes between two types of queries. Structural questions (e.g., "What type of graph is this?") focus on the chart's format. Relational questions (e.g., "Which country had the minimum value in 1983?") are significantly harder as they require linking multiple chart elements together, such as connecting a legend label to a specific bar or line segment.
Key Results
LEAF-Net demonstrated a significant leap over previous baselines across multiple datasets:
- FigureQA: Achieved 81.15% accuracy, a major improvement over the previous state-of-the-art (72.54%).
- DVQA: On the "Test-Familiar" set, LEAF-Net (Oracle) reached 72.72%, compared to the SANDY baseline of 56.48%.
- Generalization: When tested on a "Novel Test Set" with entirely different sources, LEAF-Net maintained much higher accuracy than standard VQA models, proving its ability to generalize to new chart styles.
Conclusion and Future Work
LEAF-QA provides a rigorous testbed for real-world figure understanding. While LEAF-Net sets a new state-of-the-art, limitations remain. The current architecture is constrained to single-answer generation, whereas many real-world questions may have multiple correct answers. Furthermore, the performance gap between using an "Oracle" and automated OCR highlights the need for more robust, chart-specific text extraction. Future work may also involve incorporating external knowledge to answer questions requiring context beyond the visual data provided.
Summary updated