[KongchangAI]
· 2 min read· 1,482 words

Atomic-Level Reasoning Skill Composition: How AMR Makes Math LLMs Smarter

Atomic-Level Reasoning Skill Composition: How AMR Makes Math LLMs Smarter

AMR combines a LoRA expert library, gradient-free composition prototypes, and lightweight routing to achieve instance-level atomic skill composition for better math reasoning.

The article introduces Atomic MathReasoner (AMR), which decomposes LLM mathematical reasoning into atomic skills and dynamically composes them. AMR trains a set of lightweight LoRA experts for specific reasoning skills, uses gradient-free optimization on a validation set to find diverse low-loss composition prototypes scored by token-level NLL of reference solutions, and distills pseudo-labels into a lightweight router that selects the best prototype per problem without online optimization. On AtomicMath, Qwen2.5-Math-Instruct-7B improves Level 1 accuracy from 64.4% to 68.1%, Level 2 from 59.3% to 63.7%, and logical reasoning from 39.4% to 46.8%. The paradigm offers a modular, interpretable approach but still relies on predefined skill divisions.

Title

Atomic-Level Reasoning Skill Composition: How AMR Makes Math LLMs Smarter

Meta Description

Atomic MathReasoner (AMR) proposes an instance-level atomic reasoning skill composition framework. Through a LoRA expert library, gradient-free prototype discovery, and a lightweight router, it significantly improves math and logical reasoning accuracy on the AtomicMath benchmark.

Article Content

Traditionally, improving the mathematical reasoning capabilities of large language models (LLMs) is often treated as a monolithic task, as if all math problems require the same kind of "reasoning muscle." But in reality, the skills needed for geometric proofs, algebraic computation, and logical reasoning are vastly different. A recent paper proposes Atomic MathReasoner (AMR), which attempts to use an "atomic-level skill composition" approach to dynamically match each math problem with the most suitable reasoning module, achieving consistent improvements across multiple benchmarks.

Atomic MathReasoner paper source screenshot

Why Do We Need to Decompose Mathematical Reasoning Capabilities?

Most existing methods treat mathematical reasoning as a single capability, improving it holistically through large-scale training data or stronger base models. However, different math problems have very different requirements for reasoning skills: some require the precision of symbolic operations, some depend on the rigor of logical chains, and others test spatial imagination. The paper points out that although prior research has attempted to decompose mathematical reasoning into atomic skills and develop specialized modules, how to effectively utilize these atomic capabilities remains an underexplored problem.

The core insight of AMR is: rather than having a single general-purpose model shoulder all problems, it is better to first train a set of "experts" specialized in specific skills, and then dynamically compose them at inference time based on problem characteristics. This instance-level composition approach is more flexible than a single model or fixed combinations.

AMR's Three Steps: Expert Library, Prototype Discovery, and Routing

The AMR framework can be broken down into three key steps, each addressing the challenge of "how to compose atomic skills."

1. Training a Capability-Specific LoRA Expert Library

First, AMR trains a set of LoRA (Low-Rank Adaptation) experts, each optimized for a specific atomic reasoning skill. The advantage of LoRA lies in its lightweight, pluggable nature, which facilitates subsequent composition. These experts form a "skill library" that provides the building blocks for later composition.

LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning technique. Its core idea is to freeze most weights of the pretrained model and inject two low-rank matrices A and B alongside each linear transformation layer, using their product ΔW = BA to approximate the weight update from fine-tuning. Since the rank r is much smaller than the original dimensions, the number of trainable parameters is typically only 0.1%–1% of the original model, greatly reducing memory usage and training costs. After training, LoRA weights can be loaded, unloaded, or merged back into the base model like plugins, making them ideal for training multiple non-interfering "experts." In AMR, it is precisely this lightweight and composable nature of LoRA that makes it possible to maintain a set of skill experts simultaneously and mix them by weight at inference time.

2. Gradient-Free Optimization to Discover Low-Loss Composition Prototypes

With the expert library in place, AMR performs gradient-free optimization on a held-out validation subset to search for a diverse set of low-loss composition prototypes. Each prototype represents a way of combining experts, e.g., "Expert A weight 0.7 + Expert B weight 0.3." The key here is to avoid expensive online optimization while ensuring the diversity of compositions.

To evaluate each prototype's preference for specific problems, AMR uses the token-level negative log-likelihood (NLL) of the reference solution as the scoring criterion. Simply put, if a composition prototype gives a higher generation probability to the reference solution, it is more suitable for that problem. Additionally, AMR filters out ambiguous assignments through confidence margins to ensure the quality of pseudo-labels, ultimately distilling the filtered pseudo-labels into a lightweight router.

Gradient-free optimization refers to black-box search methods that do not rely on backpropagation to compute gradients; common algorithms include evolutionary strategies, CMA-ES, Bayesian optimization, and random search. In the AMR setting, the target to search over is the weight configuration of each expert in a composition. The search space for such variables is discontinuous, and the objective function (loss on the validation set) is difficult to differentiate directly, so it is more natural to use gradient-free methods to repeatedly sample candidate compositions on the held-out validation set, evaluate losses, and iterate. Compared to gradient-based online optimization, gradient-free search can be completed offline in one pass, and once several low-loss and mutually diverse composition prototypes are found, they are fixed, completely eliminating optimization overhead at inference time.

Negative log-likelihood (NLL) is the most commonly used loss metric in language model training and evaluation. Given a reference solution y and an input problem x, the model provides a conditional probability for each token in y, and NLL is the negative sum or average of the log probabilities of these tokens. The lower the NLL, the more "natural" the model considers the reference solution and the higher the probability of generating it. AMR scores each composition prototype using the token-level NLL of the reference solution, essentially measuring "whether this group of experts working together can smoothly reproduce the correct solution process," thereby quantifying the degree of match between a prototype and a specific problem as the basis for subsequent pseudo-label assignment.

3. Lightweight Router for Instance-Level Selection

At inference time, the router selects the most suitable composition prototype based on the input problem, thereby activating the corresponding atomic skills. The entire process requires no online optimization and has minimal computational overhead. This design allows AMR to leverage the specialized capabilities of the expert library while maintaining inference efficiency, avoiding the cost of searching for a composition separately for each problem.

Routing is a key mechanism in Mixture-of-Experts (MoE) architectures: a gating network decides which experts to activate and their respective weights based on the input. Traditional MoE typically performs token-level routing within each Transformer layer, and the routing network is trained end-to-end jointly with the experts. AMR's router, however, operates at the instance level—taking the entire math problem as a unit, selecting one from pre-searched composition prototypes, and then mixing the outputs of LoRA experts accordingly. Since the prototypes are determined offline, the router only needs to perform a single lightweight classification, which avoids the instability of per-token dynamic routing and moves the cost of composition search from inference time to preprocessing.

Experimental Results: Dual Improvements in Math and Logical Reasoning

The paper conducted experiments on the AtomicMath benchmark, covering both general LLMs and math-specialized LLMs. Taking Qwen2.5-Math-Instruct-7B as an example, AMR brought the following improvements:

  • Level 1 average domain accuracy: from 64.4% to 68.1%
  • Level 2 average domain accuracy: from 59.3% to 63.7%
  • Average logical reasoning performance: from 39.4% to 46.8%

These results demonstrate that effectively composing specialized atomic skills can genuinely enhance LLM mathematical reasoning performance. Particularly interesting is the larger improvement in logical reasoning performance, suggesting that atomic skill composition may be more helpful for problems requiring multi-step reasoning.

Implications and Limitations

AMR offers a modular, composable approach to enhancing mathematical reasoning. It does not rely on brute-force scaling of a single giant model, but instead uses a "divide and conquer" followed by "dynamic routing" approach, enabling the model to invoke the most relevant skills at the instance level. This has reference value for building more efficient and more interpretable mathematical reasoning systems.

However, AMR currently still depends on predefined atomic skill divisions and LoRA expert training; the coverage of the skill library and the quality of composition prototypes will affect the final performance. How to automatically discover skills and extend to broader mathematical domains in the future is a direction worth watching.

For researchers and developers focused on AI mathematical reasoning, AMR's instance-level composition paradigm may inspire more exploration into "skill modularization."

One-line Summary

AMR uses a LoRA expert library plus gradient-free composition prototypes and lightweight routing to achieve instance-level atomic skill composition for improved mathematical reasoning.

Paragraph Summary

The article introduces Atomic MathReasoner (AMR), a method that decomposes LLM mathematical reasoning into atomic skills and dynamically composes them. AMR has three steps: first, train a set of lightweight LoRA experts targeting specific reasoning skills to form a skill library; then, use gradient-free optimization on a validation set to search for diverse low-loss expert composition prototypes, scoring with token-level NLL of reference solutions and filtering ambiguous assignments via confidence margins, distilling pseudo-labels into a lightweight router; at inference, the router selects the most suitable composition prototype for each problem without online optimization. On the AtomicMath benchmark, Qwen2.5-Math-Instruct-7B's Level 1 accuracy rises from 64.4% to 68.1%, Level 2 from 59.3% to 63.7%, and logical reasoning from 39.4% to 46.8%. The article suggests this paradigm offers new ideas for modular, interpretable mathematical reasoning enhancement, but still relies on predefined skill divisions.

#Atomic MathReasoner#AMR#mathematical reasoning#LoRA experts#gradient-free optimization#mixture of experts#LLM#AtomicMath
Share:

Related articles