Cognitively-Aligned AI for Computing Education: Measuring, Modeling, and Supporting How Students Understand Code
Abstract
Computing education increasingly relies on complex programming tasks that require learners to read, interpret, and reason about source code. At the same time, recent advances in large language models (LLMs) have created new opportunities to support learners through automated explanations, assessment, and tutoring. However, many existing AI-driven educational tools focus primarily on task completion or output correctness without considering how learners actually think, attend to information, and develop problem-solving strategies. This dissertation argues that AI systems for computing education should be cognitively aligned: grounded in empirical evidence about how learners comprehend code, process feedback, and engage in problem solving. To investigate this claim, this dissertation presents three complementary lines of research spanning code comprehension, educational assessment, and behavioral analysis. First, this work introduces COMCAT, an expertise-guided framework for automated code explanation generation that uses human-informed comment classification and context-aware prompting to produce pedagogically meaningful source code comments. Human-subject evaluations demonstrate that explanations generated using this approach improve comprehension and are preferred over baseline LLM-generated documentation. Second, this dissertation presents GreAIter, an AI-assisted grading methodology that combines rubric-driven prompting with human oversight to improve the scalability, consistency, and quality of programming assessment. Empirical evaluation shows that the approach reduces grading effort while maintaining high agreement with human evaluators and enabling richer qualitative feedback than traditional automated grading systems. Third, this dissertation investigates learner cognition during cybersecurity problem solving using a large-scale remote eye tracking study embedded within a capture the flag platform. Using webcam-based eye tracking, interaction logging, and optional AI assistance, this work analyzes how novices and experts allocate attention, develop strategies, respond to deceptive cues, and incorporate AI support during programming and security tasks. These contributions demonstrate how empirically grounded models of learner cognition can inform the design of more effective AI-assisted educational systems. Integrating large language models with human-centered evaluation and behavioral measurement allows this dissertation to advance a unified framework for cognitively aligned AI in computing education.