Dynamic Graph Generation Network: Generating Relational Knowledge From Diagrams

Daesik Kim, Youngjoon Yoo, Jeesoo Kim, Sangkuk Lee, Nojun Kwak

Introduction

Diagram understanding represents a significant frontier in computer vision, moving beyond simple object recognition toward the extraction of structured, relational knowledge. Unlike natural scenes, diagrams—such as food webs, life cycles, and circuit diagrams—are inherently multi-modal, combining text, illustrations, and symbolic markers like arrows in non-standard layouts. To comprehend these images, a system must not only identify individual components but also interpret the complex relationships between them.

Overview of the diagram parsing process, converting raw images into structured relational graphs.

The Dynamic Graph Generation Network (DGGN) addresses this by treating diagram parsing as a graph generation problem rather than a linear sequence classification task. This approach allows for the extraction of high-level relational knowledge that captures the "how" and "why" of the depicted information.

The Unified Diagram Parsing Network (UDPnet)

The authors propose the Unified Diagram Parsing Network (UDPnet), a comprehensive framework consisting of two primary branches: a detection branch and a graph generation branch.

Detection Branch

The detection branch utilizes a Single Shot MultiBox Detector (SSD) to identify the fundamental constituents of a diagram. These are categorized into four main types:

  • Blobs: General objects or illustrations.
  • Text: Labels and descriptions.
  • Arrow Heads and Tails: Symbolic markers indicating directionality and connection.

Graph Generation Branch (DGGN)

The core innovation of this work is the Dynamic Graph Generation Network. Unlike traditional Recurrent Neural Networks (RNNs) that process data in a fixed linear order, DGGN is designed to handle the non-linear, interconnected nature of diagrams.

The UDPnet architecture, featuring the Detection Branch and the Graph Generation Branch (DGGN).

The DGGN utilizes a Dynamic Adjacency Tensor Memory (DATM) to store and update the state of every potential edge in the graph. The process involves two key steps:

  1. Retrieve Step: For any pair of objects, the model aggregates "messages" (hidden states) from all adjacent edges using a weighted mean pool. This provides the model with global context before determining a specific relationship.
  2. Update Step: Gated Recurrent Unit (GRU) cells update the memory, learning which historical graph structures are relevant for current predictions.

Experimental Evaluation

The model was rigorously evaluated on two major benchmarks: AI2D, a large-scale dataset of elementary science diagrams, and FOODWEBS, a specialized dataset for complex question-answering.

Key Results

  • Superior Edge Evaluation: On the AI2D test set, DGGN achieved a mean Average Precision (mAP) of 44.08 for edge evaluation, significantly outperforming vanilla GRU baselines (39.28 mAP).
  • Enhanced Question Answering: The model reached 39.73% accuracy on AI2D question-answering tasks, surpassing previous state-of-the-art specialized models like Dqa-Net.
  • Order Invariance: A critical advantage of the DGGN is its robustness to the order of input objects. While standard RNNs show high variance when input sequences are shuffled, DGGN maintains stable performance, proving it understands the underlying graph structure.

Conclusion

The Dynamic Graph Generation Network marks a significant step forward in diagrammatic reasoning. By shifting the paradigm from sequence-based to graph-based inference, the model effectively captures the complex relational structures inherent in scientific diagrams. Future work aims to create fully end-to-end "pixels-to-graph" models and integrate more sophisticated natural language processing to allow models to explain their relational inferences conversationally.

Summary updated

BibTeX
@inproceedings{kim2018dynamic,
  author = {Daesik Kim and Youngjoon Yoo and Jeesoo Kim and Sangkuk Lee and Nojun Kwak},
  title = {{Dynamic Graph Generation Network: Generating Relational Knowledge From Diagrams}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2018},
  doi = {10.1109/cvpr.2018.00438},
}
Figure