Interpretability Framework for LLMs in Undergraduate Calculus
Sagnik Dakshit, Sushmita Sinha Roy
TL;DR
This work addresses the gap that accuracy alone fails to capture the quality and pedagogy of LLM-assisted mathematics problem solving. It introduces a domain-grounded interpretability framework that jointly analyzes structured reasoning flows and input sensitivity through prompt ablation, and applies it to real Calculus I–III exams, including retrieval-augmented strategies (RAG) and contextual retrieval. Key findings show that fluent solutions often mask conceptual gaps and that prompt phrasing strongly influences reasoning, with context-grounded retrieval offering gains in interpretability and robustness under certain conditions. The framework provides actionable insights for curriculum alignment, formative feedback, and safe deployment of AI in STEM education, with potential extensions to other disciplines. Overall, the work contributes a quantitative, pedagogically anchored approach to diagnosing and improving AI-assisted learning tools beyond simple correctness metrics.
Abstract
Large Language Models (LLMs) are increasingly being used in education, yet their correctness alone does not capture the quality, reliability, or pedagogical validity of their problem-solving behavior, especially in mathematics, where multistep logic, symbolic reasoning, and conceptual clarity are critical. Conventional evaluation methods largely focus on final answer accuracy and overlook the reasoning process. To address this gap, we introduce a novel interpretability framework for analyzing LLM-generated solutions using undergraduate calculus problems as a representative domain. Our approach combines reasoning flow extraction and decomposing solutions into semantically labeled operations and concepts with prompt ablation analysis to assess input salience and output stability. Using structured metrics such as reasoning complexity, phrase sensitivity, and robustness, we evaluated the model behavior on real Calculus I to III university exams. Our findings revealed that LLMs often produce syntactically fluent yet conceptually flawed solutions, with reasoning patterns sensitive to prompt phrasing and input variation. This framework enables fine-grained diagnosis of reasoning failures, supports curriculum alignment, and informs the design of interpretable AI-assisted feedback tools. This is the first study to offer a structured, quantitative, and pedagogically grounded framework for interpreting LLM reasoning in mathematics education, laying the foundation for the transparent and responsible deployment of AI in STEM learning environments.
