GPU-Accelerated Synthesis of Mixed-Boolean Arithmetic: Beyond Caching

Gabriel Bathie, Nathanaël FijalkowNeurIPS 2026

TL;DR

Suppose you are handed a black-box piece of malware or a tangled mess of obfuscated code, and you want to deduce the clean math formula hiding inside just by observing its inputs and outputs. Doing this on a GPU normally crashes your memory because standard algorithms try to cache every intermediate sub-formula they test—a strategy that explodes when dealing with 32-bit numbers. This paper introduces SIMBA, a GPU synthesizer that throws away the cache entirely, mapping thread IDs directly to mathematical expressions on-the-fly to reverse-engineer larger, harder formulas faster than ever before.

What Problem Does This Paper Address?

Software obfuscators love Mixed-Boolean Arithmetic (MBA)—expressions that mix standard arithmetic ($+, -, \times$) with bitwise logic ($\land, \lor, \oplus, \sim$). For instance, a simple x + y can be disguised as (x ^ y) + 2 * (x & y). Untangling these back into human-readable math from input-output examples alone is a classic program synthesis problem, vital for reverse engineering, malware deobfuscation, and compiler optimization.

CPU-based tools struggle to scale here, so moving the search to massively parallel GPUs seems like a no-brainer. Recent GPU synthesizers achieved massive speedups in qualitative domains (like regular expressions), where a candidate program's behavior on an example is just a True/False bit. Those tools rely on a "language cache" to store sub-expressions and prune duplicates that behave identically.

In MBA synthesis, however, outputs are quantitative—say, 32-bit integers. Across just 10 input-output examples, there are $2^{320}$ possible output behaviors! Trying to cache and deduplicate these behaviors exhausts an 80 GB GPU's memory almost immediately, crashing the search before it reaches complex formulas.

Table 1: Cache size and efficiency of VFB for k = 5 variables. VFB runs out of GPU memory (OOM) once the number of stored formulas is too large, making it unable to search larger formula sizes.

Methods

The authors introduce SIMBA (Synthesis of Mixed-Boolean Arithmetic), which abandons language caches for a cache-free bottom-up enumeration by expression size. Instead of building larger formulas by stitching together cached smaller ones from global memory, SIMBA treats synthesis as a pure combinatorics problem:

  • Bijective Enumeration (Unranking): Using a tiny, precomputed counting table stored in fast read-only GPU memory, SIMBA establishes a strict one-to-one mapping (a bijection) between integers and valid MBA expressions in Reverse Polish Notation (RPN). Each GPU thread takes its unique thread ID, decodes it into an RPN formula in local registers, tests it against the examples, and immediately forgets it. Zero inter-thread communication; constant memory footprint.
  • Locally Consistent Encoding: GPUs execute threads in lockstep groups of 32 called warps. If threads in a warp take different if-else branches, hardware utilization tanks (branch divergence). SIMBA designs its integer-to-formula mapping so that high-order bits determine the top-level operator and left subtree, while low-order bits only tweak the rightmost leaves (usually just swapping input variables). Consequently, all 32 threads in a warp evaluate structurally identical trees in near-perfect synchrony.

Datasets

  • New MBA Benchmark Suite: Existing benchmarks from prior literature (Menguy et al., 2021) proved too easy—SIMBA solved 90% of them in under a second. The authors generated a harder suite of 2,340 random MBA problems varying across initial sizes ($s = 5 \dots 30$) and variable counts ($k = 2 \dots 10$), evaluated on $n = 16$ random 32-bit input-output examples.
  • SyGuS PBE-BV (2018): As an external sanity check, they evaluated on 452 bitvector programming-by-example benchmarks from the Syntax-Guided Synthesis competition whose grammars matched SIMBA's operator set.

Key Insights and Ideas

  • Recomputing beats remembering in quantitative spaces: In qualitative synthesis, caching prunes away massive redundancy. In quantitative 32-bit math, behavioral diversity grows faster than deduplication can tame it (at size 10, a cache-based baseline still had to store 32.5 million entries, eating 2.1 GB, before crashing at size 11). Trading memory bandwidth for raw arithmetic recomputation unlocks much deeper searches.
  • Combinatorial math can cure GPU branch divergence: How you number your search space matters. When the authors ran an ablation (SIMBA-RTID) that randomly shuffled thread IDs—evaluating the exact same formulas, just grouped differently across warps—SIMBA slowed down by 4x. Keeping neighboring integers structurally similar is the secret sauce that keeps GPU warps humming.
  • Beyond MBA: This unranking recipe isn't limited to bitvectors; it applies to any context-free grammar of trees where outputs defy caching, such as symbolic regression over real numbers.

Key Results

Tested on NVIDIA H100 (and A100) GPUs with a 60-second timeout per problem against CPU solvers (cvc5, EUSolver) and a cache-based GPU adaptation (VFB):

  • Breaking the Size Barrier: SIMBA solves nearly 100% of instances up to formula size 11 and is the only tool able to solve sizes 12 through 16. Overall, it solves 53.4% of the hard benchmark suite (1,249 instances), roughly doubling the reach of VFB (615), cvc5 (581), and EUSolver (514).
  • Speedups: On problems solved by both, SIMBA is faster than GPU-based VFB 90% of the time (1.6x median speedup), finishes under 1 second on 96% of cvc5-solved instances, and is at least 10x faster than EUSolver on over half of their shared solves.
  • SyGuS Track: SIMBA solved 96.4% of the 452 SyGuS bitvector benchmarks, edging out cvc5 (90.7%), VFB (90.2%), and EUSolver (88.3%).
Figure 1: Percentage of instances solved by each algorithm across varying formula sizes.

Limitations and Future Work

  • Combinatorial Wall: Removing the memory bottleneck doesn't erase exponential math. Because the number of candidate trees explodes super-exponentially, brute-force enumeration hits a time wall around expression size 16.
  • Hardware Lock-in & Clean Oracles: The method strictly requires a GPU and exact, noise-free input-output examples.
  • No Constants (Yet): SIMBA currently only synthesizes expressions made of variables and operators, not arbitrary numerical constants (like 2 or 0xFF). For future work, the authors note that because SIMBA evaluates formulas on-the-fly rather than relying on fixed cached behaviors, they could embed a lightweight linear-equation solver directly inside the GPU evaluation kernel to solve for constants dynamically.

Summary updated

Abstract

Synthesizing Mixed-Boolean Arithmetic (MBA) expressions from input-output examples is central to program deobfuscation and also useful for compiler optimization, reverse engineering, and cryptanalysis. Existing MBA synthesizers are typically CPU-based and scale poorly on large specifications or complex targets. Recent GPU-accelerated synthesis methods achieve large speedups in qualitative settings, but they depend on caching observationally equivalent candidates; this strategy breaks down for MBA because candidate outputs are quantitative bitvectors and the behavioral space is enormous. We present SIMBA (Synthesis of Mixed-Boolean Arithmetic), a GPU-accelerated MBA synthesizer built around cache-free bottom-up enumeration. SIMBA avoids language caches entirely and uses a GPU-oriented enumeration design that keeps work local and highly parallel. In experiments, SIMBA is substantially faster than prior MBA synthesis tools, handles larger specifications, and reaches expression sizes that existing methods fail to solve. These results show that cache-free GPU synthesis is a practical and scalable alternative to cache-based designs in quantitative domains.
BibTeX
@inproceedings{bathie2026gpu,
  author = {Gabriel Bathie and Nathanaël Fijalkow},
  title = {{GPU-Accelerated Synthesis of Mixed-Boolean Arithmetic: Beyond Caching}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=0AO2QypVgj},
}
Figure