---
title: Learning Mathematical Abstractions (LEMMA)
url: https://www.emergentmind.com/topics/learning-mathematical-abstractions-lemma
type: topic
---

# Learning Mathematical Abstractions (LEMMA)

to=arxiv_search.query  天天中奖彩票  微信的天天中彩票={"search_query":"id:2211.08671 OR ti:\"Bootstrapping High-Level Mathematical Reasoning with Learned Symbolic Abstractions\"","max_results":5,"sort_by":"relevance","sort_order":"descending"}【อ่านข้อความเต็มanalysis to=arxiv_search.query code  天天中彩票不ools  手机上天天中彩票commentary to=arxiv_search.query าคาร่json
{"search_query":"id:2211.08671 OR ti:\"Bootstrapping High-Level Mathematical Reasoning with Learned Symbolic Abstractions\"","max_results":5,"sort_by":"relevance","sort_order":"descending"} is not a valid value for sort_order: must be one of ['ascending', 'descending']
to=arxiv_search.query  大发彩票快三  ихьӡ={"search_query":"2211.08671","max_results":5,"sort_by":"relevance","sort_order":"descending"}
to=arxiv_search.query  аанацҳауеит  天天爱彩票中奖={"search_query":"2211.08671 Learning Mathematical Abstractions","max_results":5,"sort_by":"relevance","sort_order":"descending"}
Searching arXiv for the LEMMA paper and closely related abstraction-learning work.
to=arxiv_search.query  彩神争霸快r={"search_query":"all:Learning Mathematical Abstractions 2211.08671","max_results":3}
to=arxiv_search.query  akunner  天天中彩票大神推荐={"search_query":"all:\"Learning Formal Mathematical Reasoning\" 2211.15864","max_results":3}
to=arxiv_search.query ្ងែក  大发快三豹子={"search_query":"all:\"Training LLMs to Discover Abstractions for Solving Reasoning Problems\" OR 2510.02263","max_results":3}
Learning Mathematical Abstractions (LEMMA) is an algorithm for reinforcement learning agents in mathematical domains that augments Expert Iteration with an abstraction step, where solutions found so far are revisited and rewritten in terms of new higher-level actions, which then become available to solve new problems. Its motivating premise is that humans tame the complexity of mathematical reasoning by developing hierarchies of abstractions; with proper abstractions, solutions to hard problems can be expressed concisely, thus making them more likely to be found. The method was evaluated on equation solving and fraction simplification in a step-by-step fashion, and was reported to improve the ability of an existing agent, both solving more problems and generalizing more effectively to harder problems than those seen during training [2211.08671].

## 1. Conceptual basis

LEMMA addresses a familiar pathology in symbolic mathematical reasoning: when an agent is restricted to primitive axioms, solution sequences become long, search depth grows, and the action space becomes difficult to explore effectively. In the formulation associated with LEMMA, this is not treated as a problem of merely better value estimation or more search compute. Instead, the central claim is that reusable, higher-level actions should themselves be learned from prior successful trajectories and then reincorporated into the agent’s action space [2211.08671].

This perspective situates LEMMA within a broader mathematical literature on abstraction. One theoretical account defines an abstraction to be a small set of “summaries” of a system which can be used to answer a set of queries about the system or its behaviour, and introduces “leakiness” as the divergence between ground-truth query answers and answers obtainable from the abstraction alone [2106.01826]. LEMMA does not adopt that query-based formalism directly. Instead, it operationalizes abstraction in a procedural setting: an abstraction is valuable when rewriting solution traces in terms of it makes those traces more concise and more reusable for future search. This suggests an action-space notion of abstraction, specialized to constructive reasoning episodes rather than to general query answering.

## 2. Algorithmic structure

LEMMA integrates abstraction discovery into an Expert Iteration-style training loop. The agent first solves batches of problems using its current action set, initially consisting of primitive axioms and later including learned abstractions. Successful sequences of operations are collected into a dataset of solution traces. The abstraction procedure then mines these traces for subsequences that, when treated as new atomic actions, make the traces more concise. The learned abstractions are added to the action space, and the agent continues training with reinforcement learning and imitation learning over the expanded vocabulary [2211.08671].

Two projection schemes define the abstraction vocabulary. **SeqAbs (Sequence Abstraction)** projects action sequences by ignoring arguments, so only the chain of axiom names matters. **RelAbs (Relative Abstraction)** keeps the axiom names together with the relative positions of their arguments in the expression or object being transformed. Because exact matches are rare in parameterized symbolic domains, these projections allow recurrent procedural structure to be recognized at a level more abstract than literal token identity [2211.08671].

The abstraction-selection criterion is given by a probabilistic coding objective. For a candidate abstraction library \(L\) extracted from a set of contiguous subsequences \(\mathcal{L}\), LEMMA minimizes

$$
\min_{ L \subseteq \mathcal{L} } J_\mathcal{D}(L) \equiv -\log P(\mathcal{D}|L) = \sum_{a \in \mathcal{A} \cup L} f_{\mathcal{D}/L}(a) \log |\mathcal{A} \cup L|
$$

where \(\mathcal{A}\) denotes primitive axiom actions, \(L\) the current library of learned abstractions, and \(f_{\mathcal{D}/L}(a)\) the frequency of action \(a\) after rewriting the dataset with abstractions. The library is constructed greedily: at each step, the candidate yielding the largest decrease in the objective is added, the dataset is rewritten by replacing its matches, and the procedure repeats until no further improvement is possible [2211.08671].

Once new abstractions have been added, LEMMA performs brief imitation learning on the abstracted traces so that the policy can rapidly adapt to the changed action space. It then resumes reinforcement learning. The resulting loop alternates between solving, compressing successful traces, expanding the action vocabulary, and retraining on the revised representation [2211.08671].

## 3. Learned abstraction representations

The abstractions learned by LEMMA are symbolic high-level actions derived from recurring proof or transformation fragments. Under SeqAbs, the abstraction is a projected sequence of axiom names. Under RelAbs, the abstraction additionally records the relative tree locations of the arguments manipulated by those axioms. This second representation is intended to distinguish superficially similar sequences that operate on structurally different subexpressions, thereby making the learned action closer to a compositional tactic than to a simple macro [2211.08671].

An equation-solving example illustrates the mechanism. Starting from \((3 + x) = -4\), one primitive solution sequence applies `sub`, `eval`, `comm`, `assoc`, `eval`, and `add0` to derive \(x = -7\). LEMMA may identify this recurrent subsequence and create an abstraction corresponding to “subtract a term from both sides and simplify.” In the RelAbs notation reported in the paper, one such abstraction is written as

$$
A_1 = \{\texttt{sub, eval, comm} : (, R), (R, LL)\}, \{\texttt{assoc, eval, add0} : (, R), (R, )\} : (L, )
$$

so that the entire multi-step transformation can subsequently be invoked as a single action [2211.08671].

A parallel phenomenon appears in the fraction domain. For an expression such as \(21 - [21]/[7]\), primitive reasoning may include factorizing the numerator, canceling the denominator, converting an integer to \([21]/[1]\), and then combining and evaluating. LEMMA abstracts over such recurring patterns, inducing higher-level actions corresponding to operations such as integer division when the numerator is a multiple of the denominator and integer subtraction. The paper emphasizes that the learned abstractions are interpretable and correspond directly to meaningful mathematical operations such as “add or subtract a term from both sides,” “divide both sides,” and “evaluate a sub-expression” [2211.08671].

## 4. Experimental domains and empirical results

The empirical study uses two step-by-step symbolic domains: **equation solving** and **fraction simplification**. In both cases, harder variants were created by increasing solution length or arithmetic complexity. The baseline agent was **ConPoLe**, described as a strong RL agent for symbolic mathematics. LEMMA augments ConPoLe with either SeqAbs or RelAbs abstractions [2211.08671].

Training was organized into **4 abstraction-learning rounds (every 2.5 million steps), 10 million steps total**. Evaluation was performed **every \(10^5\) steps** on a **held-out set of 200 problems**. This setup permits two kinds of comparison: sample-efficiency during training on the original task distribution, and zero-shot generalization when agents trained on easier tasks are tested on harder variants [2211.08671].

Across these experiments, the paper reports that **LEMMA-augmented agents always outperform vanilla ConPoLe**. On **Equation Solving / Equation-hard**, **RelAbs-LEMMA achieves nearly perfect performance**, while the vanilla agent lags. On **Fraction Simplification / Harder Fractions**, both abstraction types outperform the non-abstract agent, and **RelAbs generally best except for equation-hard (SeqAbs better there)**. The learning curves reportedly show that abstractions appear after the first round and the agent’s performance jumps [2211.08671].

The most explicit generalization comparison is given for equations. When agents trained on “easy” equations are evaluated on “hard” equations, the vanilla agent’s success rate drops **from 92% to 45.5%**, whereas the **LEMMA-augmented RelAbs agent** drops **from 99.5% to 60%**. The paper interprets this as evidence that learned abstractions shorten solution paths, shrink the effective branching factor, and permit bootstrapping to harder problems outside the training distribution [2211.08671].

## 5. Relation to adjacent abstraction-learning research

LEMMA belongs to a broader family of systems that treat mathematical reasoning as dependent on reusable intermediate structure, but the object being learned varies considerably across that literature.

| Approach | Learned object | Setting |
|---|---|---|
| LEMMA [2211.08671] | Higher-level actions from solution subsequences | RL for equation solving and fraction simplification |
| Peano [2211.15864] | Reusable abstractions (“tactics”) | Formal beginning algebra in a theorem-proving environment |
| Relational abstractions [2210.02615] | Abstract relations in solution sequences | Transformer-based mathematical reasoning |
| RLAD [2510.02263] | Concise natural language reasoning abstractions | Two-player RL with abstraction and solution generators |
| AbstRaL [2506.07751] | Symbolic, context-invariant representation \(A\) | RL for robustness on GSM perturbation benchmarks |
| Hierarchical proof decomposition [2411.01829] | Proposed and proved lemmas in proof trees | RL for formal theorem proving |

In **Peano**, an agent induces reusable abstractions called **tactics** from its own solutions by spanning subsequences and performing **anti-unification**; with tactic induction, agents make steady progress and solve all problems, and the induced dependency structure recovers an order with significant agreement with the expert-designed Khan Academy curriculum [2211.15864]. That work is close to LEMMA in spirit: both systems learn procedural abstractions from successful traces and then use the induced abstractions to alter future search. The main difference is that Peano operates in a theorem-proving environment where the set of valid actions at any point is finite, whereas LEMMA is presented as an augmentation to an existing RL math solver [2211.15864].

In LLM-based mathematical reasoning, the abstraction is often represented linguistically rather than as a symbolic action. “Learning to Reason With Relational Abstractions” introduces sequences that explicitly identify the key abstract relationships governing intermediate solution steps, and reports that models supplied with such sequences as prompts or trained to produce them solve problems better than models trained on previously used human-generated sequences [2210.02615]. **RLAD** instead defines **reasoning abstractions** as concise natural language descriptions of procedural and factual knowledge, and jointly trains an abstraction generator and a solution generator in a two-player RL setup; on AIME 2025, RLAD yields a **44% improvement** over chain-of-thought RL baselines [2510.02263]. **AbstRaL** teaches models to generate abstract, symbolic reasoning chains and uses RL with an answer-correctness reward and a symbolic-distance reward to mitigate performance degradation on perturbed GSM benchmarks [2506.07751].

Related work in formal mathematics pushes the learned unit from “action” toward “lemma.” An RL-based theorem-proving system that rewards hierarchical proof decomposition gives positive reward for correct and novel lemmas proposed during proof search, and improves the pass rate on AFP test from **40.8% to 45.5%** [2411.01829]. **MathlibLemma** scales this logic to a multi-agent pipeline for discovering and formalizing folklore lemmas, producing a benchmark of **4,028 type-checked Lean statements** and a verified library in which **1,812 lemmas have been automatically proved** [2602.02561]. These systems do not implement LEMMA’s trace-rewriting mechanism, but they reinforce the same general thesis: higher-level reusable structure is often the critical object to learn in mathematical problem solving.

The same thesis appears in program induction and equational theorem proving. **BABBLE** uses **e-graphs** and **anti-unification** to learn reusable library functions modulo an equational theory, achieving better compression orders of magnitude faster than the state of the art [2212.04596]. **Stevie** discovers higher-order abstractions such as **map**, **filter**, and **fold**, improving predictive accuracies by **27%** and reducing learning times by **47%** in inductive logic programming [2308.08334]. **Twitch** mines recurrent term patterns from proofs to guide equational theorem proving and can prove **12 rating-1 problems** on a UEQ benchmark [2603.06849]. These systems emphasize compression, reuse, and transfer in ways that are structurally consonant with LEMMA’s abstraction-mining loop.

## 6. Interpretation, significance, and common misconceptions

A recurrent misconception is to treat LEMMA as a manually engineered tactic library. The paper states the opposite: **all discovered abstractions emerge autonomously from data; no human solutions or high-level tactic templates are required** [2211.08671]. Its novelty is therefore not the introduction of higher-level actions per se, but a procedure for mining them from successful trajectories and reinserting them into the search process.

A second misconception is to interpret the gains as a generic consequence of scaling RL. The mechanism claimed by LEMMA is more specific. The learned abstractions **shorten solution paths**, **shrink the effective branching factor**, and enable the agent to use more powerful actions in future search episodes [2211.08671]. In that sense, the method is not primarily a better critic or a better planner operating over the same primitives; it is an algorithm for changing the symbolic granularity of the action space itself.

A third misconception is to conflate LEMMA with all subsequent “lemma” or “abstraction” work in mathematical AI. Later systems may learn **tactics**, **natural language abstractions**, **symbolic schemas**, or **formal lemmas**, and may optimize through anti-unification, section-aware RL, proof-tree rewards, or multi-agent pipelines rather than through the probabilistic coding objective used in LEMMA [2211.15864]. The shared theme is reusable intermediate structure, but the representational commitments and optimization targets differ substantially.

The main limitation stated by the original study is scope: evaluation was conducted on **two mathematical reasoning tasks—equation solving and fraction simplification—in a step-by-step fashion** [2211.08671]. The paper nonetheless presents the method as opening the door to more scalable and “human-like” automated mathematical reasoning and as setting a clear foundation for further work in richer theorem-proving settings. A plausible implication is that LEMMA’s central idea—revisiting successful traces, compressing them into higher-level symbolic actions, and retraining over the expanded action space—defines a reusable pattern for abstraction learning well beyond the particular domains in which it was first demonstrated.

Source: https://www.emergentmind.com/topics/learning-mathematical-abstractions-lemma