NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning How to Cube

Ferhat Erata, Sam Kouteili, Thanos Typaldos, Timos Antonopoulos, Robert B. Jones, Byron Cook, Ruzica Piskac

TL;DR

This paper introduces the first neuro-symbolic post-training framework that enables transformer-based language models to learn effective cubing heuristics for Cube-and-Conquer SAT solving. By combining Monte Carlo Tree Search (MCTS) data curation with Supervised Fine-Tuning (SFT) and Direct Preference Optimization (DPO), a 4B-parameter model matches state-of-the-art symbolic heuristics and outperforms frontier LLMs. Crucially, the model achieves this by unlocking a high level of root-level decision diversity, offering a powerful complementary approach for portfolio-based solvers.

What Problem Does This Paper Address?

Boolean Satisfiability (SAT) is a foundational, NP-complete problem critical to formal verification, planning, and AI. One of the most powerful modern techniques for tackling hard SAT instances is Cube-and-Conquer (C&C). C&C splits the problem into two phases: a cubing phase that partitions the main formula into independent subproblems ("cubes"), followed by a conquer phase where parallel Conflict-Driven Clause Learning (CDCL) solvers tackle each cube individually.

The efficiency of C&C hinges entirely on the quality of the cubing heuristic—the strategy used to select which variables to split on. Historically, these heuristics have been hand-crafted symbolic algorithms. While machine learning has been applied to other parts of SAT solving, no prior work has successfully trained transformer-based models to act as effective cubing heuristics. This paper addresses this gap, exploring whether language models can be trained to make strategic partitioning decisions traditionally dominated by symbolic methods.

Methods

The authors formalize the cubing process as a Markov Decision Process (MDP) and introduce a neuro-symbolic post-training pipeline consisting of three main components:

  1. MCTS-Based Data Curation: To explore the massive decision space of SAT formulas, they use Monte Carlo Tree Search (MCTS) guided by a mix of symbolic heuristics and random sampling. Instead of raw solve time (which is highly volatile), they score states using a custom bounded, monotonic reward function based on solver statistics (unit propagations, eliminated clauses, conflicts, and decisions).
  2. Supervised Fine-Tuning (SFT): They first fine-tune a base 4B model (Qwen3-4B) on a dataset of high-quality cubing decisions generated by a larger teacher model (GPT-OSS-120B).
  3. Direct Preference Optimization (DPO): They refine the model using preference pairs extracted from the MCTS trees (pairing the highest- and lowest-scoring splits). Crucially, they augment these preference pairs with teacher-generated reasoning traces to provide a rich learning signal.
Figure 1: (a) Schematic depiction of Cube-and-Conquer using a neural heuristic, (b) Our imple- mentation of the evaluation algorithm with 30 minutes timeout. The cubing phase is represented by CHOOSE-SPLIT and the conquering phase by ROLLOUT, which is trying to solve the node’s formula using a CDCL solver with 5 seconds timeout.

Datasets

  • Training Data: Formulas were sourced from the SAT Competition benchmark pool via the Global Benchmark Database, restricted to instances with $\le 600$ variables and $\le 1000$ clauses due to context window limits. The SFT dataset contained 4,332 samples from 88 CNF formulas, and the DPO dataset contained 9,012 rows derived from 1,000 MCTS iterations over 60 training formulas.
  • Evaluation Data: A balanced, held-out test set of 100 hard competition benchmarks (50 SAT and 50 UNSAT), spanning ten distinct problem families (e.g., hard random 3-SAT, XOR/modular arithmetic, graph encodings, and combinatorial puzzles).

Key Insights and Ideas

  • SFT Drives Diversity, DPO Optimizes Reward: A key mechanistic finding is that SFT is what actually breaks the near-deterministic nature of the base LLM, lifting it into a regime of high root-level decision diversity (measured via Shannon entropy). DPO then slightly narrows this diversity to focus on high-reward splits without causing a collapse.
  • The Power of Variance: Unlike deterministic symbolic heuristics that make the exact same choice every run, the neural heuristic exhibits high run-to-run variance. This means different runs explore entirely different regions of the search space, making the model an excellent candidate for portfolio-based parallel solvers.
  • Small LLMs Win on Latency: The authors demonstrate a clear trade-off between model size and decision count. While frontier LLMs have strong reasoning capabilities, their high inference latency severely limits the number of cubing decisions they can make within a fixed timeout. A specialized 4B model strikes the perfect balance between speed and quality.
Analysis showing how SFT unlocks root-level decision diversity and how diversity predicts portfolio gain.

Key Results

  • The final model (Qwen3-4B-SFT-DPO) achieved a pass@5 score of 53 out of 100, matching the best hand-designed symbolic heuristic (unit) and outperforming frontier models like Claude-Sonnet-4 (which scored 50).
  • Ablation studies showed a clear step-by-step progression: the base Qwen3-4B model scored 46, SFT raised it to 51, and adding DPO brought it to 53.
  • SAT/UNSAT Balance: While top symbolic lookahead heuristics are heavily biased towards solving SAT instances (due to optimization for specific formula structures), the trained neural heuristic is remarkably well-balanced across both SAT and UNSAT problems.

Limitations and Future Work

  • Formula Size Constraints: Due to the context-window limits of the transformer architecture, the approach is currently restricted to formulas with up to 600 variables and 1,000 clauses. Mitigations like sliding-window attention or hierarchical variable selection remain unexplored.
  • Inference Cost: Per-decision inference is still significantly slower than CPU-bound symbolic heuristics, which could become a bottleneck under tighter computational budgets.
  • Depth of Analysis: The mechanistic analysis of diversity was only performed on the first-cube (root-level) decision; whether this diversity advantage persists deeper down the cubing tree remains an open question.

Summary updated

BibTeX
@inproceedings{erata2026learning,
  author = {Ferhat Erata and Sam Kouteili and Thanos Typaldos and Timos Antonopoulos and Robert B. Jones and Byron Cook and Ruzica Piskac},
  title = {{Learning How to Cube}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=xpTnC6GT2x},
}
Figure