arXiv:2610.12168cs.AIOct 2026

Manuscript Offprint

arXiv:2610.12168

Learning to Plan by Looking Back: Hindsight Hierarchies for Training Reasoning Models

Lars Simon, Holger Eble, Manuel Radons

ABSTRACT

We introduce a self-improvement loop for reasoning models based on the following observation: Even when the difficulty of a problem exceeds the model's current solving abilities, an additionally supplied solution might enable the model to extract useful solution ideas in hindsight. We operationalize this by jointly training the same model to exhibit the following three capabilities: predicting solution ideas from problems alone, reverse-engineering ideas from problems and known solutions, and solving problems using provided ideas. The loop alternates between reverse engineering such ideas from problems with supplied solutions and using these ideas as additional supervision for joint training of all three capabilities. We give a formal specification of our method and a concrete instantiation for interactive theorem proving in the Lean theorem prover; empirical evaluation remains future work.

1 Introduction

Our method is inspired by the following asymmetry in problem solving: It is, in general, harder to solve a problem from scratch than to reverse engineer the idea underlying a known solution. For a reasoning model, this presents a learning opportunity: even when a problem exceeds its current solving abilities, a supplied solution may enable it to extract a useful idea for solving that problem in hindsight. Such a reconstructed idea can then provide additional supervision for learning to develop a solution idea from the problem alone, before attempting to solve it. The opportunity is therefore to learn from ideas that the model can already reverse engineer, but may not yet be able to discover unaided.

We operationalize this observation by jointly training a model on three tasks. A hindsight component reverse engineers solution ideas from problems and known solutions. A foresight component predicts such ideas from problems alone. A solver component uses problems and provided ideas to construct solution candidates. All three components share a backbone network; for example, when their inputs and outputs can be represented as text, we may use a shared language model with role-specific prompt templates.

The centerpiece of our method is an alternating training loop. In each iteration, the current hindsight component reconstructs ideas for a batch of problems with supplied solutions. We then jointly train all three components using the resulting data together with previously collected examples. Concretely, given a problem x with solution y and reverse-engineered idea z, the foresight component is trained to predict z given x, the hindsight component is trained to predict z given x and y, and the solver component is trained to predict y given x and z. The next iteration uses the updated hindsight component to generate ideas. Thus, the capability responsible for producing additional supervision is itself an explicit training target. Figure 1 illustrates the central idea.

We express solution ideas at several levels of detail, forming a hierarchy from overarching strategies to detailed plans. Hindsight starts from a known solution, reconstructs a detailed plan, and compresses it into coarser ideas. Foresight proceeds in the opposite direction, predicting a coarse idea from the problem and progressively refining it. During inference, the solver uses the hierarchy predicted by the foresight component to construct a solution candidate. Figure 2 illustrates these directions and the use of hierarchies during inference. The ideas reverse-engineered by the hindsight component are intended to provide guidance that could plausibly be followed from the problem alone, rather than

A PREPRINT

Figure

Figure 1: Simplified schematic of the training loop. Each iteration generates hindsight ideas for a new batch and jointly trains the same model to predict, reconstruct, and use ideas.

merely describe the supplied solution or reflect hindsight bias. In our Lean instantiation, we seek to avoid the latter through explicit instructions in the language model's prompt templates.

One possible weakness of our method lies in the fact that the hindsight component is trained on its own outputs. While this might be partially mitigated by the fact that the three components share a backbone network, it would be desirable to select among reverse-engineered hierarchies in order to introduce an additional training signal for the hindsight component in the spirit of expert iteration [1]. We provide an optional refinement of our method which accomplishes this in the case of verifiable problem domains, i.e., when proposed solution candidates can be procedurally verified: For each problem and reference solution, we generate several candidate hierarchies in hindsight. The solver then repeatedly attempts the problem using each hierarchy, while the reference solution is withheld. We then compute a score for each hierarchy, based on its success ratio under the repeated solver attempts and, optionally, domain-specific quantities. We retain the highest-scoring hierarchy and an associated valid solution for training, provided the score meets an acceptance threshold.

We provide a formal specification of our method for a general problem setting, together with the optional refinement for verifiable problem domains. We also give a concrete instantiation for interactive theorem proving in the Lean theorem prover [2], where natural language proof ideas guide tactic generation during proof search. The method is implemented in an accompanying software project; empirical evaluation remains future work.

The paper is organized as follows. Section 2 discusses related work. Section 3 introduces the problem setting, and Section 4 specifies the general method. Section 5 presents the Lean instantiation, with implementation details in Appendix A. Section 6 discusses limitations and directions for empirical evaluation.

References (30)