Table of Contents
Fetching ...

DBox: Scaffolding Algorithmic Programming Learning through Learner-LLM Co-Decomposition

Shuai Ma, Junling Wang, Yuanhao Zhang, Xiaojuan Ma, April Yi Wang

TL;DR

DBox introduces a learner-led, LLM-supported approach to algorithmic programming learning by employing a structured step-tree that bridges thought processes and code. Through a two-stage workflow—solution formation and implementation—DBox provides adaptive, multi-level hints while preserving learner autonomy, addressing gaps identified in formative studies. Technical and user studies show that DBox improves learning outcomes, cognitive engagement, and perceived mastery, albeit with occasional LLM misjudgments that users navigate with hints and verification. The work offers design implications for personalized AI-powered programming education and argues for careful role allocation between learners and AI to maintain independence and critical thinking. Overall, DBox demonstrates the viability of learner-LLM co-decomposition as a scalable, student-centered tool for complex problem-solving in CS education.

Abstract

Decomposition is a fundamental skill in algorithmic programming, requiring learners to break down complex problems into smaller, manageable parts. However, current self-study methods, such as browsing reference solutions or using LLM assistants, often provide excessive or generic assistance that misaligns with learners' decomposition strategies, hindering independent problem-solving and critical thinking. To address this, we introduce Decomposition Box (DBox), an interactive LLM-based system that scaffolds and adapts to learners' personalized construction of a step tree through a "learner-LLM co-decomposition" approach, providing tailored support at an appropriate level. A within-subjects study (N=24) found that compared to the baseline, DBox significantly improved learning gains, cognitive engagement, and critical thinking. Learners also reported a stronger sense of achievement and found the assistance appropriate and helpful for learning. Additionally, we examined DBox's impact on cognitive load, identified usage patterns, and analyzed learners' strategies for managing system errors. We conclude with design implications for future AI-powered tools to better support algorithmic programming education.

DBox: Scaffolding Algorithmic Programming Learning through Learner-LLM Co-Decomposition

TL;DR

DBox introduces a learner-led, LLM-supported approach to algorithmic programming learning by employing a structured step-tree that bridges thought processes and code. Through a two-stage workflow—solution formation and implementation—DBox provides adaptive, multi-level hints while preserving learner autonomy, addressing gaps identified in formative studies. Technical and user studies show that DBox improves learning outcomes, cognitive engagement, and perceived mastery, albeit with occasional LLM misjudgments that users navigate with hints and verification. The work offers design implications for personalized AI-powered programming education and argues for careful role allocation between learners and AI to maintain independence and critical thinking. Overall, DBox demonstrates the viability of learner-LLM co-decomposition as a scalable, student-centered tool for complex problem-solving in CS education.

Abstract

Decomposition is a fundamental skill in algorithmic programming, requiring learners to break down complex problems into smaller, manageable parts. However, current self-study methods, such as browsing reference solutions or using LLM assistants, often provide excessive or generic assistance that misaligns with learners' decomposition strategies, hindering independent problem-solving and critical thinking. To address this, we introduce Decomposition Box (DBox), an interactive LLM-based system that scaffolds and adapts to learners' personalized construction of a step tree through a "learner-LLM co-decomposition" approach, providing tailored support at an appropriate level. A within-subjects study (N=24) found that compared to the baseline, DBox significantly improved learning gains, cognitive engagement, and critical thinking. Learners also reported a stronger sense of achievement and found the assistance appropriate and helpful for learning. Additionally, we examined DBox's impact on cognitive load, identified usage patterns, and analyzed learners' strategies for managing system errors. We conclude with design implications for future AI-powered tools to better support algorithmic programming education.

Paper Structure

This paper contains 61 sections, 9 figures, 2 tables.

Figures (9)

  • Figure 1: The interface of Decomposition Box. The top row displays the full interface in the solution formation stage (the solution implementation stage is similar, but with different status indicators). The middle row demonstrates a learner's solution formation stage showing basic DBox features. The bottom row illustrates a learner's solution implementation stage. An overview of the DBox interface and workflow is provided in Sec. \ref{['overview']}, and an illustrative example is described in Sec. \ref{['illustrative']}. To save space, the second row omits the problem description and editor area, and the third row excludes the problem description area.
  • Figure 2: The DBox workflow supports learners through solution formation and implementation stages. During solution formation, (A) students can input ideas by either coding or using natural language to build a step tree. (B) By clicking "From Editor to Step Tree" or "Check Step Tree", (C) DBox renders the step tree and identifies node statuses (e.g., correct, incorrect, missing). Students can iteratively refine their code or step tree, receiving progressive hints, (D) until the step tree is fully correct. In the solution implementation stage, (E) students can convert the step tree into code comments or (F) check the alignment between their code and the step tree. Each node displays one of three statuses, and students can refine their work with ongoing hints until (G) all nodes are marked as "implemented". Finally, students can test if their code passes all test cases.
  • Figure 3: An illustration of DBox's data processing workflow highlights its core function—creating a step tree with node statuses from student inputs. The LLM processes learners' incomplete code or a step tree they’ve constructed. It outputs a structured JSON object containing steps, sub-steps (and sub-sub-steps, etc.), each with several attributes. Then the JSON object is rendered to the interface, preserving the original structure and only adding nodes for any missing steps. Each node keeps the student's original input, without directly revealing the correct solution. DBox encodes the status of each step with colors and provides progressive hints.
  • Figure 4: The procedure of our user study. To avoid learning effects, we used a counterbalanced design with four combinations: (1) DBox-Type1 → Baseline-Type2, (2) Baseline-Type1 → DBox-Type2, (3) DBox-Type2 → Baseline-Type1, and (4) Baseline-Type2 → DBox-Type1. For each combination, six participants were randomly assigned.
  • Figure 5: Effects on participants' learning outcomes: (a) Participants' correctness scores during the testing session, where they solved the problem independently. (b) Participants' self-reported metrics on their learning outcomes.
  • ...and 4 more figures