natural language processing

TreeThink: A Modular Tree Search Library for Mathematical Reasoning with LLMs

arXiv:2607.11258

summary

TreeThink is an open‑source Python library that provides modular, asynchronous tree‑search capabilities for neural theorem proving, integrating large language model inference with formal proof assistants such as Lean 4, Coq, and Isabelle/HOL.

Abstract

Tree search algorithms enable systematic exploration of the proof space in neural theorem proving. Existing LLM tree search libraries primarily target natural language reasoning and do not provide native integration with formal verifiers, while theorem proving systems often rely on task-specific search implementations. We introduce TreeThink, an open-source Python library for modular, fully asynchronous tree search in neural theorem proving. It integrates established tree search methods with vLLM-based inference pipelines and diverse node evaluation techniques, ranging from lightweight heuristics to neural evaluators. We support Lean~4, Rocq, and Isabelle/HOL alongside natural language. It connects directly to each language's Read-Eval-Print Loop (REPL) server for real-time verification and proof state extraction. We evaluate TreeThink on miniF2F and MATH500, demonstrating cross-language formal proof search, natural language reasoning support, and up to 6.3 wall-clock speedup from asynchronous execution. Source code is released under the MIT license at https://github.com/GGLAB-KU/treethink , and the library is accessible as a downloadable package at https://pypi.org/project/treethink/ .

Topics & keywords

TreeThink: A Modular Tree Search Library for Mathematical Reasoning with LLMs · wovepaper