arXiv:2610.16709cs.LGOct 2026

Manuscript Offprint

arXiv:2610.16709

Attention-Graph Curvature for the Verification of Mathematical Reasoning

Kanghyeon Kim, Johannes F. Lutzeyer, Yanzhu Guo

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Language models have recently solved open Erdős problems and achieved gold-medal level performance on International Mathematical Olympiad problems. But their solutions, written in natural language, cannot yet be verified by proof assistants. An erroneous reasoning step can invalidate every step that comes after, so it is advantageous to detect errors early. Several methods have been proposed to detect erroneous reasoning quickly based on the features of the forward pass of the language model that performs reasoning. In this work, we study whether the directed Forman curvature of that model's attention graph, a local quantity computed at an edge from the attention weights around it, carries information about a step's correctness. To do so, we evaluate four per-step verifiers on ProcessBench with and without the curvature appended to their input. Appending curvature values improves the overall mean performance of all four verifiers. ReProbe, the verifier that takes every token of a step as input, shows the largest improvement. Adding the curvature increases the time of the language model's forward pass by 18% on average.

1 Introduction

Language models now solve mathematics problems of Olympiad and research difficulty. Gemini Deep Think scored 35 of 42 points at the 2025 International Mathematical Olympiad with solutions written in natural language [5], and an agent built on Gemini Deep Think solved or partially solved four problems listed as open in the Erdős problems database [2]. Language models, which we call generators, write such solutions in natural language that no proof assistant can check, so an erroneous step has to be detected quickly and automatically. Methods that detect erroneous mathematical reasoning from features of the generator's forward pass have been proposed [7, 8, 11], and they use one of two types of features: 1) the hidden states, on which Zhang et al. [11] train an MLP probe to classify a reasoning segment ending in an intermediate answer and Ni et al. [7] train a transformer encoder to classify a reasoning step, and 2) the attention matrix taken as a weighted graph, the attention graph, from which Noël [8] computes spectral statistics of the hidden states to classify a whole solution. We adapt all three methods to construct per-step verifiers that score each step of a solution (Section 2.2).

In this paper, we study whether the local geometry of the attention graph carries information about the correctness of a step, that is, whether a per-step verifier detects an erroneous step more accurately when given the local geometry. The directed Forman curvature [10], which generalizes the Forman

40th Conference on Neural Information Processing Systems (NeurIPS 2026). Workshop: The 6th Workshop on Mathematical Reasoning and AI.

Figure

Figure 1: Verifier framework and evaluation. A verifier maps features extracted from the generator's forward pass on a step's prefix to a score, and the rule in Section 3.1 determines whether a step is flagged. An erroneous solution is correctly classified when the first flagged step is the annotated first erroneous step, and a correct solution when no step is flagged.

curvature [4] to directed graphs, is one quantity that describes this geometry at each edge. The curvature of an edge is a closed-form function of the attention weights of the edges that meet its two endpoints, so it requires no training and can be computed at every layer for every step (Section 2.1). In particular, the curvature can reflect an attention connection that is weak relative to the connections entering its source and leaving its target, potentially acting as a bottleneck. Our intuition is that the distribution of these relative connection strengths across a step may help distinguish correct from erroneous reasoning. We therefore test whether appending curvature features to a verifier's input improves its ability to detect errors. Our results show that the directed Forman curvature provides information beyond what is already captured by the existing inputs of these per-step verifiers (Section 3.2).