COMPOSE: Composing Future Theorems from Citations and Formal Structure

David Busbib, Michael WermanNeurIPS 2026

TL;DR

Predicting what mathematicians will discover next requires two distinct kinds of intuition: knowing what is interesting to the research community, and knowing what is logically allowed by formal rules. COMPOSE bridges these two worlds by fusing scientific citation networks with formal theorem-dependency graphs from the Lean proof assistant, steering an LLM to generate plausible, logically grounded future mathematical claims. Tested against a time-capsule benchmark of actual 2024–2025 papers, it anticipates real mathematical breakthroughs significantly better than models relying on text or citations alone.

What Problem Does This Paper Address?

Imagine trying to guess the next big theorem that will build upon a newly published math paper. If you only read arXiv abstracts and follow citation trails, you might get the right "vibe" and research trajectory, but hallucinate a mathematical claim that violates underlying logical rules. Conversely, if you live entirely inside a formal proof library like Lean’s Mathlib—where every definition, lemma, and theorem is strictly verified—you know exactly what can validly follow from what, but you have zero context on which of the millions of possible next steps humans actually care about.

Existing AI approaches split down the middle: literature-based LLMs generate ungrounded research ideas, while automated theorem provers operate in a formal vacuum devoid of human scientific motivation. Busbib and Werman introduce grounded future mathematical generation: given an "anchor" paper, predict a plausible theorem-like claim that a future citing paper will make, respecting both scientific momentum and formal mathematical dependencies.

Methods

To give a language model both street smarts (literature context) and book smarts (rigorous logic), COMPOSE builds and fuses two distinct graphs for any given anchor paper:

COMPOSE dual-graph data construction and model architecture
  1. The Scientific Graph ($G_s$): Built from the anchor paper and up to two hops of its most relevant cited papers, containing nodes for paper abstracts and extracted informal theorems.
  2. The Formal Graph ($G_f$): Translating messy, paper-level LaTeX directly into formal Lean code ("autoformalization") is notoriously brittle. Instead, the authors use a clever informal-to-informal alignment trick via FrenzyMath—a corpus of 140K Mathlib theorems paired with human-written English descriptions. They use dense text retrieval to match extracted paper theorems to FrenzyMath descriptions, grab the corresponding formal Lean theorems, and expand their local dependency neighborhoods using LeanDojo.

Each graph is processed by its own Graph Neural Network (GNN), projected into a shared latent space, and woven together using bidirectional cross-attention. These fused node representations are then injected via cross-attention layers into a LoRA-adapted LLM decoder (such as DeepSeek-Math 7B or Mistral 7B) to generate the future claim.

Two-Stage Training: Rather than training end-to-end from scratch, Stage 1 pretrains the GNNs and fusion module using link-prediction and contrastive losses (aligning the fused graph with the future target paper, and informal nodes with formal nodes). Stage 2 fine-tunes the LLM decoder using standard next-token prediction alongside a clever graph margin loss, which penalizes the decoder if it doesn't assign higher probability to the true graph pair than to a mismatched graph from the same subfield—forcing the LLM to actually read the graphs.

Datasets

To train and test temporal foresight without data leakage, the authors built two new resources from S2ORC (arXiv math) and Lean's Mathlib:

  • Paired Pre-2023 Dataset: ~108K paired scientific-formal subgraphs extracted from 500K math papers published between 2000 and 2023. The ground-truth target for each anchor is the main claim of a later paper that cites it.
  • Temporally Grounded Future Benchmark: A held-out pool of 47K math papers published in late 2024 and 2025, yielding 2,000 test examples where post-2023 papers cite pre-2023 test anchors.

Key Insights and Ideas

  • Bypassing Autoformalization Works: Using natural language descriptions (FrenzyMath) as a semantic bridge to link arXiv theorems to formal Lean dependencies avoids the vocabulary gap of translating research math into formal syntax, while still unlocking formal graph structure.
  • Text Alone Captures the Topic, Graphs Isolate the Result: Text-only and prompt-only LLMs generate claims with reasonably high similarity to true future papers, but they also score high similarity to random papers in other subfields. Graph conditioning acts like a focusing lens, dramatically widening the gap between the true future trajectory and background mathematical noise.
  • Structure Matters, Not Just Extra Tokens: Feeding the model random Mathlib subgraphs or shuffling the dependency edges tanks performance. Furthermore, retrieval gains scale directly with alignment quality—peaking when informal-formal matches are exact and vanishing when matches are weak or off-topic.

Key Results

Because checking whether a generated free-text claim matches a real future discovery is tricky, the authors evaluate primarily via retrieval (using a fine-tuned math embedding model to rank the true citing future paper inside the 47K future paper pool), alongside human graduate-student and LLM judges.

Retrieval Hits@k comparison across models
  • Retrieval Dominance: With a DeepSeek-Math 7B backbone, COMPOSE achieves 50.8% Hits@10 and 80.8% Hits@100 (ranking the actual 2024–2025 paper in the top 10 over half the time out of 47,000 candidates). This handily beats text-only LoRA (36.9% H@10), scientific-graph-only (39.0% H@10), and external baselines like GoAI (37.6%) and GIANTS (10.3%).
  • Ablations & Scaling: Removing the scientific graph drops H@10 to 13.5%; removing the formal graph drops it to 39.0%. The dual-graph boost holds across Mistral 7B, Llama-3.2-3B, and even Qwen2-0.5B.
  • Human & Formal Diagnostics: In a blinded study of 30 math grad students across 25 papers, COMPOSE achieved the highest overall score (4.07 / 5) and won 11/25 head-to-head comparisons. In a diagnostic translating 50 generated claims into Lean, 32/50 COMPOSE statements elaborated (type-checked) successfully, versus 24/50 for Prompt-only and 22/50 for GIANTS.

Limitations and Future Work

  • No Proof Verification in the Loop: COMPOSE outputs natural language mathematical claims, not formally verified Lean proofs. Retrieval, human ratings, and LLM judges measure plausibility and semantic alignment, not guaranteed mathematical truth.
  • Noisy Alignment: Dense retrieval over FrenzyMath is an approximation; when research math strays far from Mathlib's coverage, noisy matches can creep in.
  • Next Steps: Integrating a formal proof assistant directly into the generation loop—allowing the system to iteratively conjecture claims, formalize them, and attempt actual proofs.

Summary updated

Abstract

A generated plausible future mathematical claim must satisfy two constraints: it should follow the direction of prior work and respect the formal dependencies that constrain the validly of the claim. Existing approaches typically model only one of these sources, producing claims that are either weakly grounded or insufficiently motivated. We introduce grounded future mathematical generation, the task of generating a plausible future theorem-like claim for an anchor paper, using two complementary sources of context: its scientific citation graph ,and its aligned formal theorem dependency graph. To address this setting, we propose COMPOSE, a dual-graph framework that combines scientific citation context with formal mathematical structure to condition a language model. To support this setting, we construct a dataset of 108K paired scientific-formal graphs from arXiv and Mathlib, together with a benchmark of 47K future papers from 2024-2025. Experiments show that COMPOSE outperforms strong baselines on retrieval to real future papers and achieves the best overall performance under LLM-judge evaluation, producing more grounded and mathematically richer outputs. These results show that future mathematical generation benefits from combining scientific context with formal structure.
BibTeX
@inproceedings{busbib2026compose,
  author = {David Busbib and Michael Werman},
  title = {{COMPOSE: Composing Future Theorems from Citations and Formal Structure}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=bOwtAJACqh},
}
Figure