SevenTnewS

Artificial Intelligence

Clean your AI's input, not its reasoning. The speed gains are absurd.

Researchers at CRIL demonstrate that preprocessing techniques preserving model counts dramatically speed up model sampling, enumeration, and direct access queries when formulas are compiled into d-DNNF circuits. The study tests 1,425 benchmarks and shows that removing defined variables with compatible orderings solves up to 47 more instances than no preprocessing.

Emmanuel Fabrice Omgbwa Yasse AI-assisted

2026-07-29 · Last updated: 2026-07-30 · 3 min read

Clean your AI's input, not its reasoning. The speed gains are absurd.
Sources : Enhancing Query…

Whether to preprocess a CNF formula before compiling it into a circuit has been an open question for years. A study from CRIL, a joint CNRS and Université d'Artois lab, now offers a clear answer: preprocessors that preserve model counts and keep the definitions of eliminated variables unlock significant performance gains, while those that only preserve satisfiability are useless for sampling and enumeration. This aligns with a recurring lesson in AI: the input pipeline often determines performance more than the reasoning engine itself, as seen in research on token-efficient reasoning.

The preprocessing landscape

The paper, led by Jean Marie Lagniez and Emmanuel Lonca, examines three families of preprocessing techniques: those that preserve logical equivalence (vivification, backbone detection, occurrence reduction), those that only preserve satisfiability (variable elimination, blocked clause elimination), and those that preserve the model count by removing defined variables. For tasks like uniform sampling, direct access (returning the k-th model under a lexicographic order), and model enumeration, the distinction matters deeply.

The authors prove that satisfiability-preserving techniques like variable elimination and blocked clause elimination are fundamentally incompatible with these queries. In a simple counterexample, the formula a ∨ b reduces to under both methods, losing all information about the original models. "From Φ' it is impossible to retrieve the models of Φ," they write, confirming a known limitation for model counting as well. This echoes a pattern in machine learning where hidden assumptions in preprocessing can silently break downstream tasks, a point explored in analysis of benchmark blind spots.

Even model-count-preserving techniques, which remove variables defined by others, cannot be applied directly without extra machinery, a finding that surprised the researchers. The preprocessed formula alone lacks the mapping needed to reconstruct the original models. However, when the eliminated variables' definitions are stored in a compatible evaluation function, the approach becomes viable for uniform sampling and complete model enumeration.

Direct access demands order

Direct access queries, where a user asks for the k-th model under a specific lexicographic variable order, add a further constraint. The authors define a "compatible order" that places all eliminated variables after their defining variables. This guarantees that the k-th model of the preprocessed formula, when extended with the evaluation function, corresponds exactly to the k-th model of the original. Two strategies emerge. The first fixes the tail of the variable order in preprocessing, eliminating more variables. The second restricts elimination to variables whose definers all appear earlier in the given order, giving the user full freedom. This design tension mirrors trade-offs seen in fraud detection systems that discard label-based features.

Partial model enumeration is where the approach hits a hard limit. The researchers show an example where eliminating a variable defined by an XOR leads to an exponential gap between the number of partial models in the original and simplified formulas, the parity function has no compact representation, so preprocessing effectively destroys the structure needed for partial enumeration.

Experimental evidence from 1,425 benchmarks

The team ran extensive experiments using the B+E preprocessor and the d4 knowledge compiler on benchmarks from previous uniform sampling studies. They tested four configurations: no preprocessing, equivalence-preserving only (equiv), equivalence plus elimination of explicitly defined variables (#equiv-explicit), and the latter with compatible ordering enforced (#equiv-explicit-ordered).

The cactus plot reveals a clear hierarchy. Equiv-only preprocessing offers marginal gains, solving only eight more instances than no preprocessing. #equiv-explicit-ordered handles 47 more instances than the baseline, a substantial improvement, while #equiv-explicit solves 55 more, though it cannot directly answer direct access queries without ordering constraints. For uniform sampling and enumeration, the authors report significant runtime reductions, with the preprocessed circuits consistently outperforming their raw counterparts. The difficulty of measuring gains accurately is a known problem in AI benchmarking, as discussed in the MMLU contamination debacle.

The takeaway for AI engineers is straightforward: if the downstream task involves model counting, sampling, or enumeration, invest in preprocessors that preserve model counts and carry the variable definitions forward. The overhead of tracking those definitions is tiny compared to the compilation time saved. For engineers building production AI systems, this lesson extends beyond logic: clean inputs make everything faster and more reliable.

Get the tech essentials in 3 minutes every morning

One email, every weekday, with what actually matters in AI and tech.