Generating Pedagogically Meaningful Visuals for Math Word Problems: A New Benchmark and Analysis of Text-to-Image Models (2025)

Abstract: Visuals are valuable tools for teaching math word problems (MWPs), helping young learners interpret textual descriptions into mathematical expressions before solving them.However, creating such visuals is labor-intensive and there is a lack of automated methods to support this process. In this paper, we present Math2Visual, an automatic framework for generating pedagogically meaningful visuals from MWP text descriptions. Math2Visual leverages a pre-defined visual language and a design space grounded in interviews with math teachers, to illustrate the core mathematical relationships in MWPs.Using Math2Visual, we construct an annotated dataset of 1,903 visuals and evaluate Text-to-Image (TTI) models for their ability to generate visuals that align with our design. We further fine-tune several TTI models with our dataset, demonstrating improvements in educational visual generation. Our work establishes a new benchmark for automated generation of pedagogically meaningful visuals and offers insights into key challenges in producing multimodal educational content, such as the misrepresentation of mathematical relationships and the omission of essential visual elements.

## introduction math word problems (mwps) describe mathematical scenarios through text, requiring learners to interpret both linguistic and numerical information to derive mathematical expressions for problemsolving @xcite . mwps are a key component of primary school math education and have been the subject of significant educational research @xcite . solving mwps is a complex cognitive task that progresses through several stages: problem understanding, solution planning and solution execution (opedal et al., 18 ). mwp: at home, marian made 10 gingerbread cookies, which she will distribute equally among tiny glass jars. if each jar is to contain 3 cookies, how many cookies will remain unplaced? 2023; polya, 2014). a major challenge lies in interpreting the text and constructing a mental model that captures the underlying mathematical relationships @xcite -a process especially difficult for young students (e.g., grades 1-3) who are still developing their reading and comprehension skills @xcite . moreover, recent findings suggest that children's arithmetic skills do not readily transfer between applied and academic contexts @xcite , highlighting the need to bridge everyday experiences with formal instruction. visual representations designed specifically for mwps offer a promising solution: by translating textual descriptions into intuitive forms @xcite , they help learners map language to mathematical structure, thereby supporting comprehension and problem solving @xcite . although primary school math teachers have long recognized the value of visuals when teaching mwps @xcite , manually creating these visuals is time-consuming and requires considerable effort @xcite . recent advances in text-to-image (tti) models offer potential for automating visual generation, but current models often fail to capture the underlying mathematical reasoning required for mwps @xcite . in response, prior work has explored automating instructional image generation and retrieval. for instance, @xcite introduced a text-image matching task aimed at retrieving and assigning web images to textbook content @xcite , and later explored using image semantics to generate visual multiplechoice questions for early learners @xcite . however, these methods are not designed to handle narrative-driven problems like mwps, which require grounding visual content in contextualized scenarios. visualmath made early attempts to visualize mwps using existing images, but covers only basic operations and provides no discussion of the pedagogical grounding or validation of its visual design through collaboration with educators @xcite . to date, there is no established framework for generating visuals that are both pedagogically meaningful and scalable for diverse narrative structures found in mwps. in response to these gaps, we co-design a pedagogically meaningful visual design for mwps with primary school math teachers. here, we define pedagogically meaningful visuals as those that semantically and logically represent the mathematical structure of a word problem, thereby helping learners in accurately and clearly comprehending its content. then, we introduce math2visual, a framework for generating such visuals from mwp text descriptions. using math2visual, we generate and annotate a dataset containing ∼2k pedagogical visuals for mwps in grades 1-3. finally, we evaluate the ability of state-of-the-art tti models to directly generate visuals aligned with our proposed pedagogical design. by fine-tuning these models on our annotated dataset, we demonstrate notable improvements in generation quality. in summary, our contributions are: 1 math2visual, a scalable framework that incorporates a tree-based visual language and a structured design space to generate pedagogically meaningful visuals from mwp text descriptions. 2 an annotated visual dataset that benchmarks models' ability to generate mathematically reasoned visuals and supports tti model training. visuals in primary school math education visuals have long been recognized as critical tools in primary school education, particularly in math teaching @xcite . research indicates that welldesigned pedagogical visuals help students grasp abstract concepts more readily @xcite @xcite while increasing their engagement @xcite , and improving study efficiency @xcite . many visual designs have been proposed for primary school math teaching. one common design is bar model @xcite . the bar model illustrates numerical relationships of math problems through bars representing quantities, enabling visualization of mathematical concepts and operations @xcite . the bar model has proven to be effective in improving children's problem solving skills @xcite and their ability to use correct cognitive strategies to solve the problem @xcite . another modern design is the noyon framework, which introduces a modular approach to visually expressing mathematical problems @xcite . noyon employs iconic elements to construct representations of mathematical concepts, offering a structured yet flexible way to depict mathematical relationships. ## from mwp to visual this section introduces math2visual framework. we first present the desiderata for a good visual (section 3.1), followed by an overview of math2visual ( section 3.2). then, we explain each component of math2visual (section 3.3 to 3.5). finally, we detail the process of developing visual designs with teachers and the evaluation criteria (sections 3.6 and 3.7). ## visual dataset generation in this section, we describe the process of generating a visual dataset from mwps. ## results and analysis in this section, we aim to address the following experimental questions regarding math2visual: 1 how does the choice of generation framework affect the quality of the generated visuals? 2 how does incorporating the solution expression of an mwp impact the generation results? 3 how does fine-tuning on synthesized visual dataset enhance model performance in generating pedagogical meaningful visuals? ## conclusion this work introduces math2visual, an automatic framework for generating scalable and pedagogically meaningful visuals from mwp text descriptions. math2visual leverages a tree-based visual language and a structured visual design space -developed in collaboration with math teachers -to effectively capture the essential mathematical relationships within mwps. using math2visual, we generated and annotated a dataset of 1,903 visuals and evaluated state-of-theart text-to-image (tti) models on their ability to produce visuals that align with our design. we further demonstrated that fine-tuning these models on our dataset improves the quality of visual generation. while our results represent a promising step toward the automated generation of pedagogically meaningful visuals, challenges remain in directly generating such visuals with current tti models. future work will explore more scalable and flexible generation frameworks and further refine our visual design to better support educational outcomes. limitations (i) scope of representation math2visual is currently limited to math word problems involving the seven operations defined in this paper (addition, subtraction, multiplication, division, surplus, comparison, unit transformation). although our framework can handle mwps that require multiple operations, the solution must be representable in a single expression. while math2visual does not currently support math word problems involving multiple interdependent equations, its modular design makes such extensions feasible. in principle, such problems could be decomposed into a sequence of intermediate vls, each of which can be visualized individually within the existing framework. extending math2visual to support such problemsparticularly those involving variable substitution, elimination, or symbolic manipulation-represents a promising direction for future research.