[Paper Review] Learning Discrete Energy-based Models via Auxiliary-variable Local Exploration
This paper proposes ALOE, a method for training discrete energy-based models (EBMs) using a learned sampler that emulates local search, enabling efficient gradient estimation via a variational power iteration. The approach achieves state-of-the-art performance in structured prediction tasks, including a neural fuzzer matching libfuzzer’s effectiveness in software testing.
Discrete structures play an important role in applications like program language modeling and software engineering. Current approaches to predicting complex structures typically consider autoregressive models for their tractability, with some sacrifice in flexibility. Energy-based models (EBMs) on the other hand offer a more flexible and thus more powerful approach to modeling such distributions, but require partition function estimation. In this paper we propose ALOE, a new algorithm for learning conditional and unconditional EBMs for discrete structured data, where parameter gradients are estimated using a learned sampler that mimics local search. We show that the energy function and sampler can be trained efficiently via a new variational form of power iteration, achieving a better trade-off between flexibility and tractability. Experimentally, we show that learning local search leads to significant improvements in challenging application domains. Most notably, we present an energy model guided fuzzer for software testing that achieves comparable performance to well engineered fuzzing engines like libfuzzer.
Motivation & Objective
- To address the challenge of training energy-based models on discrete structured data, where partition function estimation is intractable.
- To improve flexibility over autoregressive models while maintaining computational tractability in modeling complex discrete distributions.
- To develop a differentiable, local search-inspired sampler that enables effective gradient estimation for EBMs.
- To enable end-to-end training of both the energy function and the sampler using a variational power iteration framework.
- To demonstrate the method’s effectiveness in real-world applications such as program language modeling and software fuzzing.
Proposed method
- Proposes a learned sampler that mimics local search by exploring neighboring states in the discrete space, enabling efficient sampling for gradient estimation.
- Introduces a variational form of power iteration to jointly optimize the energy function and the sampler, improving training stability and convergence.
- Uses a differentiable approximation of the partition function via importance sampling with the learned sampler to estimate gradients.
- Trains the energy function and sampler end-to-end using a variational lower bound that leverages the sampler’s exploration capability.
- Employs a contrastive learning objective that encourages low energy for valid structures and high energy for invalid ones.
- Applies the framework to both unconditional and conditional modeling, enabling applications like structure generation and fuzzer guidance.
Experimental results
Research questions
- RQ1Can a learned local search sampler effectively estimate gradients in discrete energy-based models without requiring explicit partition function computation?
- RQ2Does the proposed variational power iteration framework enable stable and efficient joint training of the energy function and sampler?
- RQ3How does ALOE compare to autoregressive models in modeling complex discrete structures such as programs?
- RQ4Can the trained EBM guide a fuzzer to discover vulnerabilities as effectively as hand-engineered tools like libfuzzer?
- RQ5To what extent does local exploration in the sampler improve sample quality and training efficiency in discrete EBM learning?
Key findings
- ALOE achieves competitive performance in program language modeling, outperforming autoregressive baselines in generating valid and diverse code sequences.
- The learned sampler effectively captures local structural dependencies, enabling high-quality sampling without explicit normalization.
- The variational power iteration method enables stable training of both the energy function and sampler, reducing training divergence.
- In software fuzzing, the EBM-guided fuzzer matches the performance of libfuzzer in discovering bugs, demonstrating practical utility.
- The method achieves significant improvements in sample quality and training efficiency compared to standard EBM training baselines on discrete data.
- The approach generalizes across different discrete structured domains, including code generation and vulnerability discovery.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.