Suwei Yang,Victor C. Liang,Kuldeep S. Meel
Abstract:The fundamental problem of weighted sampling involves sampling of satisfying assignments of Boolean formulas, which specify sampling sets, and according to distributions defined by pre-specified weight functions to weight functions. The tight integration of sampling routines in various applications has highlighted the need for samplers to be incremental, i.e., samplers are expected to handle updates to weight functions.
The primary contribution of this work is an efficient knowledge compilation-based weighted sampler, INC, designed for incremental sampling. INC builds on top of the recently proposed knowledge compilation language, OBDD[AND], and is accompanied by rigorous theoretical guarantees. Our extensive experiments demonstrate that INC is faster than state-of-the-art approach for majority of the evaluation. In particular, we observed a median of 1.69X runtime improvement over the prior state-of-the-art approach.
What problem does this paper attempt to address?
The paper attempts to address the problem of incremental updates in weighted sampling of Boolean formulas. Specifically, the paper focuses on handling incremental updates to the weight function across multiple sampling rounds, which is becoming increasingly important in various applications. Existing methods typically focus only on single-round weighted sampling and neglect performance optimization in incremental settings, resulting in poor performance when dealing with incremental weight updates.
### Background and Problem Description
**Weighted sampling** refers to sampling from the set of satisfying assignments of a Boolean formula according to a user-defined weight function. This problem has wide applications in fields such as computer science, mathematics, and physics, especially in modern hardware and software verification. However, as sampling techniques become more tightly integrated into various applications, there is a growing demand for samplers to handle incremental weight updates efficiently.
### Limitations of Existing Methods
Existing weighted sampling methods usually can only handle single-round sampling and lack support for incremental weight updates across multiple rounds. These methods often use off-the-shelf weighted samplers, which may lead to performance degradation during incremental sampling processes.
### Main Contributions of the Paper
The paper proposes an efficient incremental weighted sampler named **INC**, whose main features include:
1. **Knowledge Compilation (KC)-based**: INC uses a knowledge compilation language called **PROB** (Probabilistic OBDD[∧]), which is more compact than the KC graphs used by existing methods.
2. **Efficient Annotation Computation**: INC computes joint probabilities in logarithmic space, avoiding the performance loss associated with arbitrary precision mathematical computations.
3. **Incremental Sampling Optimization**: After compiling the Boolean formula and weight function in the initial round, INC does not require recompilation for subsequent incremental sampling rounds, thus amortizing the compilation cost. Additionally, INC performs annotation and sampling simultaneously in each sampling round, further enhancing speed.
### Experimental Results
The paper validates the performance advantages of INC through extensive experiments. The results show that INC is 1.69 times faster than the state-of-the-art method **WAPS** in most cases. Particularly in incremental sampling rounds, INC significantly outperforms WAPS, with the runtime of incremental rounds being only 5.9% of the initial round, whereas WAPS requires 67% of the time.
### Conclusion
The proposed INC sampler excels in handling incremental weighted sampling tasks, demonstrating competitive performance in the initial round and even better performance in subsequent incremental rounds, significantly reducing overall runtime. This makes INC an ideal choice for applications requiring frequent weight updates.