Masked Reference Solutions Guide Language Models Through Math Reasoning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional language models exhibit limited and suboptimal mathematical reasoning abilities, often generating incorrect or 'shortcut' solutions that do not utilize mathematical principles to solve complex problems.

Innovation Solution

A mathematical reasoning dataset is synthesized, comprising problems paired with masked and unmasked solutions, where intermediate computations are represented by symbols, to enhance the training and performance of language models on mathematical tasks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional prompting approaches are used with pre-trained language models, then the models can generate solutions to mathematical problems, but the solutions are often incorrect or use shortcuts that do not utilize mathematical principles

Engineering Contradiction:
Improvecorrectness of mathematical solutionsVSAvoidability to solve mathematical problems
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-processing the ground-truth solution to extract and mask intermediate computational steps before presenting them to the language model. This preparation creates a structured training format that guides the model to learn proper mathematical reasoning sequences in advance, rather than expecting it to figure out the reasoning pattern during inference.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces an intermediary processing step that transforms the ground-truth solution into a masked format with symbolic representations of intermediate values. This intermediary representation serves as a bridge between the raw problem and the final answer, forcing the model to engage with the reasoning process rather than copying shortcuts.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Ease of manufacture

If language models are trained to generate code-based solutions from text-based solutions, then they can produce formatted output, but they tend to copy the final answer directly instead of computing it

Engineering Contradiction:
Improveease of generating formatted solutionsVSAvoidauthenticity of mathematical reasoning
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent extracts the intermediate computational steps from the ground-truth solution and masks them with symbolic variables. This extraction process separates the reasoning structure from the specific numerical values, creating a template that the model must fill in through proper computation rather than copying.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter representation by replacing concrete numerical values with symbolic variables in the intermediate steps. This parameter transformation forces the model to treat the solution as a computational process rather than a static text to be replicated, thereby improving the authenticity of mathematical reasoning.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS20250265306A1Masked reference solutions for mathematical reasoning using language models
Publication Date: 2025.08.21 NVIDIA CORP
  • US20250265306A1 patent drawing
  • US20250265306A1 patent drawing
  • US20250265306A1 patent drawing

AI summary

In various examples, a technique for performing a mathematical reasoning task includes inputting a first prompt that includes (i) a set of example mathematical problems, (ii) example masked solutions to the example mathematical problems, and (iii) a mathematical problem into a first machine learning model, wherein each masked solution includes a set of symbols as substitutes for a set of numbers in a ground-truth solution for a corresponding example mathematical problem. The technique also includes generating, via execution of the first machine learning model based on the first prompt, a set of candidate masked solutions to the mathematical problem. The technique further includes inputting a second prompt that includes (i) the mathematical problem and (ii) at least one masked solution into a second machine learning model and generating, via execution of the second machine learning model based on the second prompt, a solution to the mathematical problem.