Ridwan Alam

Writing

Do LLMs Really Understand Math? A Knowledge Space Theory Perspective

An LLM can solve the hard problem and fail the arithmetic underneath it, and accuracy still scores that as a win. An ETH Zurich paper uses Knowledge Space Theory to test whether a model's right answers respect their prerequisites, and finds knowledge that is fragmented rather than hierarchical.

Sep 19, 2026
  • AI Engineering
  • Gen AI
  • LLM Evaluation
Part I / The Question
01

A Student Who Skips the Foundations

Imagine a student who can solve quadratic equations but fails basic arithmetic. You would not call them a math prodigy. You would suspect they memorized a formula without understanding the foundations.

Now imagine an AI that does exactly that. It solves calculus problems but stumbles on addition. It answers advanced geometry questions while failing the prerequisite concepts those questions depend on. Would you say it understands math?

This is the uncomfortable question a new paper from ETH Zurich asks. "Do LLMs Exhibit Coherent Knowledge Structures in Mathematical Reasoning?" by Peng Cui, Heejin Do and Mrinmaya Sachan introduces a framework grounded in Knowledge Space Theory (KST) to test whether large language models organize mathematical knowledge in a structured, human-like way.

Their answer: no. Not even close.

The striking part

Standard accuracy metrics cannot see the problem, and neither can LLM-as-judge evaluations of the reasoning. High accuracy hides a fragmented mind.

02

The Problem with "How Many Did It Get Right?"

Modern LLM evaluation mostly measures accuracy: the percentage of questions answered correctly. More recently, researchers have moved to evaluating reasoning trajectories, checking whether the steps in a chain of thought are valid.

Both approaches share a blind spot: they treat each problem in isolation. Neither can tell you whether a model's pattern of successes and failures is globally consistent with the structure of the knowledge being tested.

Two ways to grade the same answers
A flat collection of results versus results read against their dependencies
Conventional Q1 ✓ Q2 ✓ Q3 ✗ Q4 ✓ Q5 ✗ accuracy = 3/5 = 0.6 which question depends on which is thrown away KST-grounded prerequisite advanced violation coherent coherent Accuracy counts the first row as a win. KST flags it: an advanced answer with nothing under it.

A model might answer a hard question correctly while failing its prerequisites. Accuracy counts that as a success. KST flags it as a structural violation, a sign that the correct answer came from memorization or pattern matching rather than genuine reasoning.

03

What Is Knowledge Space Theory?

Knowledge Space Theory, introduced by Doignon and Falmagne in the 1980s, is a mathematical framework for modelling how human knowledge is structured. Its core idea is that knowledge is not a random collection of isolated facts. It is a structured space, constrained by prerequisite relations.

Symbol Name Meaning
C = {c₁, …, cₘ} Concepts The set of knowledge concepts in the domain.
cᵢ ⪯ cⱼ Prerequisite relation cᵢ must be mastered before cⱼ.
K ⊆ C Knowledge state The set of concepts a learner has mastered.
closure Validity condition A valid state is closed under prerequisites: if cⱼ ∈ K and cᵢ ⪯ cⱼ, then cᵢ ∈ K.
A concept hierarchy
Fractions, from the foundation up: each concept needs the ones to its left
Understand a/b 3.NF.A.1 Equivalent fractions 4.NF.A.1 Add like fractions 4.NF.B.3 Add unlike fractions 5.NF.A.1 ✓ valid K = { a/b, equivalent }: every prerequisite of every member is present ✗ invalid K = { a/b, add unlike }: claims the top concept, missing two beneath it You cannot add unlike fractions without equivalent fractions and adding like ones first.
The normative standard

Closure is the key constraint: you cannot master an advanced concept without mastering its prerequisites. That gives an ideal against which any reasoning system can be judged, human or machine.

Part II / The Framework
04

Building the Question Graph

Concept mastery is latent and hard to measure directly, so the paper operationalizes KST at the question level. Three steps take it from a pile of math questions to something you can test a model against.

1
Concept annotation. An LLM tags each question with concepts from the New York State Mathematics Learning Standards. The question 1/3 + 1/4 = ? comes back as 5.NF.A.1, 4.NF.A.1, 4.NF.B.3 and 3.NF.A.1, which slot into the standards' concept graph.
2
Dependency induction. Question-level prerequisites are derived from the concept-level ones, turning the concept graph into a question graph.
3
Behavioural analysis. The model's right and wrong answers are read against that graph through three normative behaviours that a reliable reasoning system should exhibit.
The dependency rule

qᵢ is a prerequisite of qⱼ ⟺ ∀ a ∈ C(qᵢ), ∃ b ∈ C(qⱼ) : a ⪯ b

Every concept that qᵢ requires must be a prerequisite of at least one concept in qⱼ. The definition is deliberately strict, which keeps spurious links out of the graph.

Test Normative behaviour Metric
NB1 Prerequisite satisfaction: the closure property Prerequisite Satisfaction Ratio (PSR)
NB2 Scaffolding effect: prerequisites in context should help Scaffolding Gain (SG)
NB3 Knowledge subsumption: hierarchical growth Knowledge Overlap Coefficient (KOC)
Part III / The Three Tests
05

NB1: Prerequisite Satisfaction

Mastery of a question should entail mastery of its prerequisite questions.

The metric is the Prerequisite Satisfaction Ratio. It is computed only on correctly answered questions: if a model gets q right, what proportion of q's prerequisites did it also get right?

The metric

PSR(q, Kₗ) = |Pre(q) ∩ Kₗ| / |Pre(q)|

Kₗ is the learner's knowledge state: the set of questions it answered correctly.

prerequisite_satisfaction.py
def compute_psr(question, knowledge_state, prereq_map):
    """
    Compute Prerequisite Satisfaction Ratio for a correctly answered question.

    Args:
        question: the question ID
        knowledge_state: set of question IDs the learner answered correctly
        prereq_map: dict mapping question ID -> set of prerequisite question IDs

    Returns:
        PSR value between 0 and 1
    """
    prereqs = prereq_map.get(question, set())

    if not prereqs:
        return None  # no prerequisites, PSR undefined

    satisfied = prereqs & knowledge_state
    return len(satisfied) / len(prereqs)


def aggregate_psr_micro(knowledge_state, prereq_map):
    """
    Micro-averaged PSR: weighted by number of prerequisites per question.
    """
    total_satisfied = 0
    total_prereqs = 0

    for q in knowledge_state:
        prereqs = prereq_map.get(q, set())
        total_satisfied += len(prereqs & knowledge_state)
        total_prereqs += len(prereqs)

    return total_satisfied / total_prereqs if total_prereqs > 0 else 0


def aggregate_psr_macro(knowledge_state, prereq_map):
    """
    Macro-averaged PSR: simple average across questions.
    """
    scores = []
    for q in knowledge_state:
        psr = compute_psr(q, knowledge_state, prereq_map)
        if psr is not None:
            scores.append(psr)

    return sum(scores) / len(scores) if scores else 0

A runnable version, with a worked fractions example, is in this post's codes/python/ directory.

What they found

Human learners reach a PSR of 0.936–0.942 at 79.6% accuracy. The best LLM, Qwen3-80B, reaches a 0.939 micro-PSR at 92.5% accuracy, which looks like parity. It is not: only 48.16% of its correct answers achieve a perfect PSR of 1.0, against 72.7% for humans.

Perfect prerequisite satisfaction
Share of correct answers whose every prerequisite was also answered correctly
Mistral-7B Llama-8B Llama-70B Qwen2.5-7B Qwen2.5-32B Qwen3-80B Claude GPT-4.1-mini Humans 8.23 12.66 20.81 27.32 25.44 48.16 31.07 27.97 72.7 0 25 50 75 100% Even the best model's right answers rest on a complete foundation less than half the time.
Why the averages mislead

A near-human micro-PSR and a far-from-human perfect-PSR rate are both true at once. The average is propped up by many partially satisfied questions; what it hides is how many correct answers sit on a foundation with at least one hole in it.

06

NB2: The Scaffolding Effect

Knowing a concept's prerequisites should improve performance on the questions that depend on them.

In human learning, prerequisite knowledge scaffolds the acquisition of advanced concepts. If LLMs internalize knowledge the same way, then putting prerequisite examples in context should help more than unrelated ones.

The metric

SG(Kₗ) = (1 / |Q|) · (|Kₗ⁺ᵖʳᵉ| − |Kₗ|)

The change in the number of questions answered correctly when prerequisite examples are added to the prompt, normalized by the size of the question set.

The paper compares five in-context strategies:

Strategy What goes in the prompt
No context Nothing: the baseline
Random Three random questions of the same type
Same-skill Questions sharing a concept with the target
Similarity The top three BGE-M3 embedding matches
Prerequisite Three questions from the target's prerequisite set

What they found

Model No context Random Same-skill Similarity Prerequisite
Qwen2.5-7B 80.8 82.1 82.2 82.1 80.2
Qwen2.5-32B 88.6 89.3 89.7 89.8 89.3
Qwen3-80B 94.1 94.7 95.9 96.1 94.6

Accuracy in percent. Best strategy per model in green; the prerequisite column never wins.

scaffolding_gain.py
def scaffolding_gain(accuracy_with_context, accuracy_without_context):
    """
    Scaffolding Gain: change in accuracy when relevant context is provided.
    """
    return accuracy_with_context - accuracy_without_context


# Example results from the paper
results = {
    "Qwen2.5-7B": {
        "no_context": 80.8,
        "random": 82.1,
        "same_skill": 82.2,
        "similarity": 82.1,
        "prerequisite": 80.2,
    },
    "Qwen2.5-32B": {
        "no_context": 88.6,
        "random": 89.3,
        "same_skill": 89.7,
        "similarity": 89.8,
        "prerequisite": 89.3,
    },
    "Qwen3-80B": {
        "no_context": 94.1,
        "random": 94.7,
        "same_skill": 95.9,
        "similarity": 96.1,
        "prerequisite": 94.6,
    },
}

for model, scores in results.items():
    sg = scaffolding_gain(scores["prerequisite"], scores["no_context"])
    print(f"{model}: Prerequisite SG = {sg:+.2f}")

Prerequisite context does not consistently beat the other strategies. Same-skill and semantically similar examples are the strongest. For Qwen2.5-7B, prerequisite examples actually hurt: the paper reports an SG of −0.56 (the rounded table figures above give −0.60).

What that points to

LLMs benefit from surface-level pattern matching, from examples that look like the target, not from activating a structured prerequisite hierarchy.

07

NB3: Knowledge Subsumption

A stronger learner's knowledge state should largely contain a weaker one's.

If LLMs have a coherent knowledge structure, even one different from humans', then stronger models should know most of what weaker models know, plus more. That is what the cumulative, hierarchical nature of mathematics predicts.

The metric

KOC(K₁, K₂) = |K₁ ∩ K₂| / min(|K₁|, |K₂|)

Raw overlap is inflated by chance: two strong learners share a lot simply because they both get most things right. So it is normalized against pₘₐₓ, the accuracy of the stronger learner:

KOCₙₒᵣₘ = (KOC − pₘₐₓ) / (1 − pₘₐₓ)

knowledge_overlap.py
def knowledge_overlap_coefficient(state_a, state_b):
    """
    KOC: overlap between two knowledge states, normalized by the smaller state.
    """
    intersection = len(state_a & state_b)
    smaller = min(len(state_a), len(state_b))
    return intersection / smaller if smaller > 0 else 0


def normalized_koc(state_a, state_b, total_questions):
    """
    Normalized KOC: corrects for chance overlap.
    """
    koc = knowledge_overlap_coefficient(state_a, state_b)
    p_max = max(len(state_a), len(state_b)) / total_questions

    if p_max == 1:
        return 1.0

    return (koc - p_max) / (1 - p_max)

What they found

  • Humans nest. Low, medium and high ability groups show near-perfect subsumption: stronger learners know what weaker learners know, plus more.
  • LLMs scatter. Overlap between models is substantially lower and more fragmented.
  • Stronger drifts further. Paradoxically, stronger LLMs diverge further from human knowledge patterns, not less.
  • Even peers disagree. The two closed-source models, GPT-4.1-mini and Claude, overlap with each other at only 0.38.
Subsumption, schematically
Human knowledge states nest; LLM knowledge states overlap in patches
high medium low Humans: nested Mistral-7B Qwen2.5-32B Qwen3-80B LLMs: fragmented A stronger model is not a bigger version of a weaker one. It knows a different set of things.
Circle sizes and positions illustrate the pattern the paper reports; they are not drawn to the measured overlap values.
Part IV / What It Means
08

The Big Picture

Across all three normative behaviours, the results tell one story.

Test What it checks Humans LLMs
NB1: PSR Correct answers respect prerequisites 72.7% perfect 48.16% at best
NB2: Scaffolding Prerequisite context helps most Expected No advantage
NB3: Subsumption Stronger learners contain weaker ones Near-perfect Fragmented
Accuracy against coherence
Humans sit high on coherence at moderate accuracy; LLMs trade the other way
coherent but weak ideal weak and fragmented accurate but fragmented Humans Qwen3-80B Qwen2.5-32B Llama-70B Mistral-7B accuracy → coherence →
Positions are schematic, placed from the paper's findings rather than plotted from a single measured metric. The shape is the point: accuracy and coherence are different axes, and LLMs have climbed only one of them.
09

Why This Matters

Accuracy is not understanding

An LLM can solve a calculus problem while failing arithmetic. It can answer a geometry question while missing its prerequisites. Those are the marks of pattern matching, not reasoning.

Current evaluation misses it

The paper shows that neither accuracy nor LLM-as-judge reasoning scores (relevance, coherence, correctness of steps) surface this incoherence. Each metric is looking at a different thing.

Metric What it captures Sees structural incoherence?
Accuracy Final-answer correctness No
Reasoning scores Local quality of each step No
PSR Global consistency with prerequisites Yes
Complementary, not a replacement

The authors position PSR alongside reasoning scores, not instead of them. Reasoning scores judge the quality of an individual trace; PSR judges whether the model's pattern of answers respects the structure of the subject.

LLM knowledge is flat, not hierarchical

Human knowledge grows in a nested, cumulative way: foundations first, then what builds on them. LLM knowledge looks more like a flat collection of memorized patterns. Stronger models do not simply know more of the same foundations. They often know a different, less human-aligned set of things.

10

Limitations and Future Work

The authors are careful about the scope of their claims.

  • It needs an expert-defined concept graph. Mathematics has one; domains with less explicit dependencies may not.
  • Only mathematics was tested. Whether the same holds for science, programming or general knowledge is open.
  • Questions stand in for concepts. True KST models latent concept mastery. Question correctness is a practical proxy, but an imperfect one.
Where it could go next

Extending the framework to other domains, estimating mastery at the concept level, and testing whether fine-tuning on prerequisite-structured data makes a model's knowledge more coherent.

11

Conclusion

The paper makes a simple but profound point: getting the right answer is not the same as knowing why.

Current LLMs achieve impressive accuracy on math benchmarks, but their knowledge is structurally incoherent. They fail prerequisites, gain nothing from prerequisite scaffolding, and show no hierarchical knowledge growth. Their knowledge is fragmented, not structured.

That does not make LLMs useless. It makes our evaluation methods incomplete. We need structure-aware assessment alongside accuracy and reasoning scores to understand what these models actually know, and what they only appear to know.

"High accuracy masks pervasive structural inconsistency. Current LLM knowledge is fragmented rather than hierarchical."

The next time an LLM solves a hard math problem, ask whether it really understood the foundations, or just got lucky with a pattern.

12

References

  1. Cui, P., Do, H., & Sachan, M. (2026). Do LLMs Exhibit Coherent Knowledge Structures in Mathematical Reasoning? A Perspective from Knowledge Space Theory. arXiv:2609.05245.
  2. Doignon, J.-P., & Falmagne, J.-C. (2012). Knowledge Spaces. Springer.
  3. Liu, Z., et al. (2023). XES3G5M: A Knowledge Tracing Benchmark Dataset. NeurIPS.
  4. Lightman, H., et al. (2023). Let's Verify Step by Step. arXiv:2305.20050.
  5. Wei, J., et al. (2022). Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. NeurIPS.