Diagram-Driven Course Questions Generation

Xinyu Zhang, Lingling Zhang, Yanrui Wu, Muye Huang, Wenjun Wu, Bo Li, Shaowei Wang, Basura Fernando, Jun Liu

TL;DR

This paper introduces Diagram-Driven Course Questions Generation (DDCQG), a novel task aimed at automatically generating pedagogically valuable questions from educational diagrams. To support this, the authors present DiagramQG, a large-scale dataset of over 25,000 questions across 371 courses, alongside a parameter-efficient Hierarchical Knowledge Integration (HKI-DDCQG) framework that outperforms state-of-the-art models by effectively blending visual patches with domain-specific knowledge.

What Problem Does This Paper Address?

While Visual Question Generation (VQG) has made significant strides, current research focuses almost exclusively on natural images (e.g., identifying a dog in a park). Educational materials, however, rely heavily on complex diagrams like food webs, circuit boards, and anatomical charts.

Generating exam-grade questions from diagrams introduces three unique bottlenecks:

  1. Domain-Specific Knowledge: Unlike natural images that rely on everyday common sense, diagrams require specialized academic knowledge across diverse fields.
  2. High Information Density: Diagrams pack a massive amount of abstract, structured data into a single image, averaging 10.5 objects per diagram in this study.
  3. Long-Tail Distribution: Educational topics are inherently unbalanced; some courses have abundant textbook resources, while others have very few.

Furthermore, traditional text constraints (like providing just an answer or a bounding box) often lead models to generate superficial or context-independent questions. The authors address this by introducing a dual constraint mechanism: a target text constraint to focus on specific diagram elements, and a course text constraint to ensure pedagogical relevance.

Comparison of different text constraints for an example in DiagramQG.

Methods

To tackle these challenges, the authors propose the Hierarchical Knowledge Integration (HKI-DDCQG) framework. Instead of fine-tuning massive Vision-Language Models (VLMs), which is computationally prohibitive, HKI-DDCQG uses a clever three-stage pipeline that keeps the core VLM frozen:

  1. HierKnowExtract: The input diagram is decomposed into an $n$-layered pyramid structure of multi-scale patches. A trainable CLIP model computes the semantic similarity between these patches and the text constraints to select the most relevant visual regions. These patches, alongside the constraints, are fed into a frozen VLM (such as Qwen2.5-VL) to extract background knowledge paragraphs.
  2. KnowSelect: Because VLMs can be wordy, a T5 encoder uses a scaled dot-product attention mechanism to filter out the noise, selecting the top-$m$ most contextually relevant knowledge sentences.
  3. KnowFusionQG: Finally, the selected visual patches, text constraints, and filtered knowledge sentences are fused via a cross-modal attention mechanism and a gated fusion network. A trainable T5 decoder then generates the final course question.
The three-stage HKI-DDCQG framework architecture.

Datasets

The authors introduced DiagramQG, a comprehensive dataset containing 15,720 unique diagrams and 25,798 questions. The dataset spans 6 primary disciplines (Basic Sciences, Engineering & Technology, Business & Economics, etc.), 37 subjects, and 371 distinct courses.

To evaluate the framework's generalizability, the authors also tested it on four widely used natural image VQG benchmarks: VQG-COCO, OK-VQA, A-OKVQA, and K-VQG.

Key Insights and Ideas

  • Parameter Efficiency Wins: By freezing the heavy VLM parameters and only training the lightweight CLIP projection and T5 components, the framework achieves top-tier performance at a fraction of the computational cost.
  • Pyramid Patching Handles Density: Standard global image embeddings often miss tiny text or small symbols in complex diagrams. Breaking the image into hierarchical patches allows the model to zoom in on critical details.
  • Course Context is Crucial: Simply asking a question about a diagram element isn't enough for an exam. Explicitly feeding the course name (e.g., Ecological interactions) forces the model to frame the question around specific curriculum goals rather than generic observations.

Key Results

The HKI-DDCQG framework demonstrated substantial improvements over both fine-tuned baselines and large-scale models using In-Context Learning (ICL):

  • On DiagramQG: HKI-DDCQG (utilizing Qwen2.5-VL 7B and T5-Large) achieved a BLEU-4 score of 44.85 and a CIDEr score of 4.04, significantly outperforming vanilla Qwen2.5-VL 7B ICL (BLEU-4: 10.52, CIDEr: 0.51) and even rivaling closed-source giants like GPT-4o on pedagogical relevance.
  • Text-Only Baselines Fail: When GPT-4o and Claude-3.5-Sonnet were given only the text constraints without the diagram, their performance dropped drastically, proving that the model genuinely learns to read and integrate visual diagrammatic data.
  • Cross-Domain Generalization: When evaluated on natural image datasets like K-VQG, HKI-DDCQG set a new benchmark, achieving a BLEU-4 of 32.12 compared to the previous best of 20.01 from ConVQG.
Qualitative comparison showing HKI-DDCQG producing more course-relevant questions than GPT-4o.

Limitations and Future Work

The authors note two primary limitations:

  1. Lack of Distractors: The framework currently only generates the question stem. For true automated assessment, future iterations need to generate plausible multiple-choice options (distractors).
  2. The Long-Tail Effect: Performance remains slightly lower on highly specialized, underrepresented courses due to the lack of abundant training examples in the dataset's long tail.

Summary updated

BibTeX
@inproceedings{zhang2025diagram,
  author = {Xinyu Zhang and Lingling Zhang and Yanrui Wu and Muye Huang and Wenjun Wu and Bo Li and Shaowei Wang and Basura Fernando and Jun Liu},
  title = {{Diagram-Driven Course Questions Generation}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2025},
  url = {https://openreview.net/forum?id=BUHbi60jE6},
}
Figure