用AI把学生手绘的自动机图转成精准代码,提升教学自动化水平。
Text to Automata Diagrams: Comparing TikZ Code Generation with Direct Image Synthesis
- 通过视觉语言模型生成图像描述,再由大模型转为TikZ代码
- 人工修正后描述使代码准确率显著提升
- 适合教育科技、自动评分系统开发者参考
图示在计算机科学教学中广泛应用,尤其在自动机与形式语言、数据结构等课程中。学生在考试或作业中手绘的图示在结构、布局和正确性上差异较大。本研究考察当前视觉-语言模型与大语言模型能否处理此类图示并生成准确的文本与数字表示。实验采用扫描的学生手绘图作为输入,利用视觉-语言模型生成图像描述,经人工评审与修订以确保准确性。将原始与修订后的描述输入大语言模型生成TikZ代码,编译后与原始扫描图对比评估。结果表明,直接由视觉-语言模型生成的描述常不准确,而人工修正可显著提升描述质量。该研究为计算机科学教育中的自动评分与反馈机制提供了技术路径,有助于构建更易访问的教学材料。
原文摘要 · Abstract (English)
Diagrams are widely used in teaching computer science courses. They are useful in subjects such as automata and formal languages, data structures, etc. These diagrams, often drawn by students during exams or assignments, vary in structure, layout, and correctness. This study examines whether current vision-language and large language models can process such diagrams and produce accurate textual and digital representations. In this study, scanned student-drawn diagrams are used as input. Then, textual descriptions are generated from these images using a vision-language model. The descriptions are checked and revised by human reviewers to make them accurate. Both the generated and the revised descriptions are then fed to a large language model to generate TikZ code. The resulting diagrams are compiled and then evaluated against the original scanned diagrams. We found descriptions generated directly from images using vision-language models are often incorrect and human correction can substantially improve the quality of vision language model generated descriptions. This research can help computer science education by paving the way for automated grading and feedback and creating more accessible instructional materials.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。