Introduction
Flowcharts are essential tools in engineering, business, and software development, yet they present a significant challenge for modern Vision-Language Models (VLMs). While state-of-the-art models like GPT-4o and Claude 3.5 Sonnet can process images directly in an end-to-end fashion, this approach often suffers from limited controllability and a lack of explainability. When a model fails to interpret a flowchart correctly, it is difficult to determine if the error was visual (misidentifying a node or edge) or logical (failing to follow the graph's flow).
The TEXTFLOW Framework
To address these limitations, researchers have introduced TEXTFLOW, a modular dual-stage framework that treats flowcharts as structured data rather than raw pixels. Instead of direct visual question answering (VQA), TEXTFLOW decomposes the task into two distinct phases:
- Vision Textualizer: A VLM acts as the "eyes" of the system, translating the flowchart image into a structured textual representation. The framework supports multiple formats, including Graphviz (DOT), Mermaid, and PlantUML.
- Textual Reasoner: An LLM serves as the "brain," processing the generated text and the user's query to provide an answer.
Tool-Assisted Reasoning
A key innovation in TEXTFLOW is the integration of external tools. Recognizing that LLMs often struggle with precise topological tasks—such as finding the shortest path or calculating node degrees—the framework allows the reasoner to convert the textual representation into an executable graph object. This object can then call Python-based functions to obtain mathematically accurate answers for complex structural questions.
Experimental Setup
The framework was evaluated using two primary benchmarks:
- FlowVQA: A diverse dataset featuring flowcharts from real-world sources, including technical documentation (Code), instructional guides (Instruct), and Wikipedia (Wiki).
- FlowLearn: A benchmark consisting of simulated flowcharts designed to test OCR capabilities and topological analysis.
Key Insights
The researchers' analysis yielded several critical findings:
- Modularization Superiority: The dual-stage approach consistently outperformed end-to-end VQA. By separating vision from reasoning, the system can leverage specialized models for each task.
- Graphviz as the Optimal Format: Among the tested representations, Graphviz (DOT) proved most effective. Its clear syntax for defining nodes and edges separately likely aids model comprehension.
- Vision as the Primary Bottleneck: Error analysis showed that 74% of failures originated in the Textualizer stage. If the graph was extracted correctly, the Reasoner was highly robust in its logic.
- Topological Precision: With tool integration, the system achieved near-perfect accuracy on topological tasks, provided the initial text extraction was accurate.
Results and Performance
TEXTFLOW established new state-of-the-art performance on both benchmarks. On FlowVQA, Claude 3.5 Sonnet's accuracy rose from 76.61% (end-to-end) to 82.74% using TEXTFLOW. GPT-4o saw an even more dramatic improvement, jumping from 65.69% to 80.10%.
Furthermore, the framework demonstrated remarkable robustness. While standard VQA models often struggle when images are rotated or increased in complexity, TEXTFLOW maintained high performance levels, particularly when using Graphviz as the intermediate representation.
Conclusion and Future Directions
TEXTFLOW demonstrates that intermediate structured text representations are a powerful bridge between visual perception and logical reasoning for flowchart understanding. While the framework significantly advances the state of the art, challenges remain in handling extremely noisy images and deeply nested structures. Future research will focus on improving the fidelity of the Vision Textualizer and exploring ways to make models more self-sufficient in graph reasoning without relying on external code execution.
Summary updated