Abstract
Chart Question Answering (CQA) presents unique challenges compared to standard Visual Question Answering (VQA), requiring precise reasoning over structured data representations. We introduce STL-CQA, a model that explicitly captures the "graphical grammar" of charts. By decomposing charts into localized elements and using a transformer-based architecture to model their relationships, STL-CQA achieves state-of-the-art results, outperforming human baselines on the DVQA dataset and significantly improving performance on complex reasoning tasks.
Introduction
While standard VQA models excel at identifying objects in natural scenes, they often struggle with the structured nature of charts. In CQA, the meaning of a visual element (like a bar) is inextricably linked to its context—its height relative to an axis, its color's definition in a legend, and its associated text labels.
The authors identify three primary hurdles:
- Infinite Vocabulary: Chart labels are often unique to specific datasets (e.g., "GDP of Uzbekistan"), making them difficult for standard models to learn.
- Fine-grained Reasoning: Answers frequently depend on subtle visual differences, such as slight variations in bar height or hatch patterns.
- Structural Neglect: Generic image attention mechanisms often ignore the inherent structural relationships that define how data is represented in a chart.
Methodology: The STL-CQA Pipeline
The proposed STL-CQA framework follows a three-stage pipeline designed to move beyond grid-based image processing and toward object-centric reasoning.
1. Localization
Using a Mask R-CNN with a ResNet-101 backbone, the model detects and masks individual chart elements, including bars, pie slices, legend entries, and axis titles. This transforms the image into a set of discrete, manageable objects.
2. Encoding
To address the "infinite vocabulary" problem, STL-CQA employs a dynamic encoding scheme. Instead of learning specific text labels, it replaces them with standardized tokens based on their position (e.g., "USA" might become xlabel_3). A "text oracle" (OCR) ensures that the underlying text content is accurately captured and mapped.
3. Structure-based Transformers
The core of the model consists of three specialized components:
- Chart Relation Transformer: Learns the internal relationships between chart elements independently of the question.
- Question Transformer: Processes the natural language query.
- Reasoning Module: A cross-attention block where the question "queries" the chart elements to synthesize an answer.
Novel Pre-training
STL-CQA is the first model to utilize large-scale pre-training specifically for CQA. The model is pre-trained on three auxiliary tasks: identifying element types, predicting relative positions/colors, and performing masked language modeling on chart-specific vocabulary.
Datasets and Evaluation
The model was evaluated on several key benchmarks:
- DVQA: A standard benchmark for bar charts.
- LEAF-QA++: An extended, more challenging version of the LEAF-QA dataset created by the authors, featuring 75 question templates (up from 35) to test complex reasoning.
- FigureQA: Primarily used for training the localization module.
Key Results and Insights
STL-CQA demonstrates significant improvements over previous methods:
- Surpassing Human Performance: On the DVQA dataset, the model achieved 97.51% accuracy, notably higher than the human baseline of 88.18%.
- State-of-the-Art on LEAF-QA++: The model reached 84.54% accuracy, a substantial leap from the previous state-of-the-art (LEAF-Net) at 56.84%.
- Reasoning Gains: The most significant improvements were seen in "Reasoning" type questions, where STL-CQA outperformed prior methods by over 30%.
A key advantage of this approach is interpretability. Because the model operates on discrete chart elements, attention weights can be visualized to show exactly which bars or legend items the model prioritized to reach its conclusion.
Limitations and Future Work
Despite its success, STL-CQA has limitations. It currently relies on a "text oracle" for perfect OCR, which may not be available in real-world settings. Additionally, the model was trained on synthetic datasets; real-world charts often contain more stylistic variety and "chart junk." Future research will focus on handling noisy OCR and moving toward more open-ended, human-generated natural language queries.
Reference: Singh, H., & Shekhar, S. (2020). STL-CQA: Structure-based Transformers with Localization and Encoding for Chart Question Answering. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), 3275–3284.
Summary updated