← Latest papers
🤖 AI

Enhancing Query Efficiency for d-DNNF Representations Through Preprocessing

This paper demonstrates that while non-equivalence-preserving preprocessors are unsuitable for model access tasks on CNF formulas, those preserving model counts can significantly enhance the efficiency of uniform sampling, direct model access, and model enumeration when compiled into d-DNNF representations, provided the necessary preprocessing information is retained.

Original authors: Jean Marie Lagniez, Emmanuel Lonca

Published 2026-07-14
📖 5 min read🧠 Deep dive

Original authors: Jean Marie Lagniez, Emmanuel Lonca

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a giant, tangled ball of yarn representing a complex logic puzzle. Your goal is to find specific patterns in the knots, count how many patterns exist, or pull out a random knot without looking. This is what computer scientists call "querying" a formula. The paper by Lagniez and Lonca is like a guidebook for untangling that yarn before you try to find your patterns, making the whole job much faster.

The Big Idea: Cleaning the House Before the Party

The authors discovered that how you tidy up your logic puzzle before you start working on it makes a huge difference. They tested a specific way of organizing these puzzles called d-DNNF (think of it as a super-organized, step-by-step instruction manual for the puzzle).

Their main finding is a bit of a "do this, not that" lesson:

  • The "Don't" List: They explicitly argue against using the most popular cleaning tools (preprocessors) that are great for just checking if a puzzle has any solution. Why? Because those tools often throw away pieces of the puzzle that change the total number of solutions. If you throw away a piece, you might think there are 5 solutions when there are actually 10. For tasks like counting solutions or picking a random one, this is a disaster. The paper shows that these "equivalence-breaking" tools are generally unsuitable for these specific jobs.
  • The "Do" List: Instead, they found that you can use powerful cleaning tools, but only if you keep a secret map of the pieces you removed. Specifically, if a tool removes a variable (a piece of the puzzle) because it's completely determined by other pieces, you must remember how it was determined. If you keep that map, you can clean the puzzle up, solve the easy version, and then use your map to reconstruct the answer for the original, messy version.

The Experiment: A Race Against Time

To prove this, the authors set up a massive race. They took 1,425 different logic puzzles from various real-world domains and ran them through a computer pipeline.

  1. The Setup: They used a compiler called d4 to turn the messy puzzles into the super-organized d-DNNF format.
  2. The Strategies: They tested four different ways to clean the puzzles first:
    • No cleaning: Just run the compiler on the raw mess.
    • Safe cleaning: Only remove things that definitely don't change the solution count (like removing duplicate instructions).
    • Aggressive cleaning: Remove defined variables but without a strict order.
    • Aggressive cleaning with a map: Remove defined variables but force the computer to follow a specific order so the "map" works perfectly.

The Results: Speeding Up by a Factor of Ten

The results were clear and measured in real time.

  • The "Safe cleaning" method barely helped. It only allowed the computer to solve 8 more puzzles than doing nothing at all.
  • The "Aggressive cleaning with a map" method was a game-changer. It allowed the computer to solve 47 more puzzles than the uncleaned version.
  • When it came to actually answering the questions (like finding a specific solution or picking a random one), the aggressive methods were often 10 times faster (an order of magnitude) than the safe methods.

For example, when they tried to pick 10,000 random solutions, the aggressive method hit memory limits (ran out of RAM) on only 1 puzzle, whereas the safe method ran out of memory on 15 puzzles. The aggressive method also reduced the number of times the computer gave up (timed out) from 391 down to 173.

The Catch: You Need the Right Order

There is a tiny catch for the "Direct Access" task (finding the k-th solution in a specific list). The paper explains that if you remove a piece of the puzzle, you can't just put it back in any order; you have to make sure the "map" (the logic that defines the removed piece) is built from pieces that come earlier in your list. If you don't follow this rule, the map breaks, and you can't find the right solution. The authors showed that if you plan your list order carefully (a "compatible order"), you can still use the aggressive cleaning and get the right answer.

The Bottom Line

The paper doesn't claim to have solved the unsolvable, but it provides a very strong, measured recommendation: Don't just clean your logic puzzles to make them smaller; clean them in a way that preserves the count of solutions, and keep a detailed map of what you threw away. If you do this, you can make your computer 10 times faster at finding, counting, and sampling solutions. It's like realizing that if you want to find a specific needle in a haystack, it's better to remove the hay and keep a list of where the needles were, rather than just burning the hay and hoping you remember where the needles were.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →