NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

BatchGFN: Generative Flow Networks for Batch Active Learning

Shreshth A Malik, Salem Lahlou, Andrew Jesson, Moksh Jain, Nikolay Malkin, Tristan Deleu, Yoshua Bengio, Yarin Gal

TL;DR

BatchGFN applies Generative Flow Networks (GFlowNets) to pool-based batch active learning by learning a policy that sequentially constructs query batches sampled proportionally to their overall batch utility. This approach bypasses expensive combinatorial greedy approximations (such as BatchBALD) at inference time, yielding diverse, high-utility query batches with just a single forward pass per queried data point.

What Problem Does This Paper Address?

In pool-based active learning (AL), a model queries the most informative unlabelled data points from a large pool to be labeled by an oracle. However, selecting points individually based on single-point uncertainty (e.g., standard BALD) leads to redundancy—the acquired points often contain overlapping information.

While batch-aware objectives like Joint Mutual Information (JMI) resolve this redundancy, finding the optimal batch requires searching an exponentially large combinatorial space. Existing methods resort to greedy approximations (like BatchBALD), which are computationally heavy because they repeatedly calculate joint entropies across the entire pool, especially when estimating expectations via Monte Carlo sampling.

Methods

The authors introduce BatchGFN, treating batch construction as an episode in a Directed Acyclic Graph (DAG):

  • Sequential Generation: Starting from an empty set state $s_0 = \emptyset$, a forward policy $P_F$ sequentially adds points from the candidate pool $\mathcal{D}_{\text{pool}}$ to the batch until reaching the query budget $B$.
  • Batch Reward: Terminal states (completed batches $\{x_1, \dots, x_B\}$) are scored using an unnormalized reward proportional to their JMI: $$R = \exp\left(\frac{I(y_{1:B}; f)}{T}\right)$$ where $T$ is a temperature parameter that concentrates sampling on top-reward modes. In their regression experiments with exact Gaussian Processes (GPs), JMI has an exact closed-form expression.

  • Objective & Architecture: The policy is trained via the Subtrajectory Balance (SubTB) objective using a forward-looking parameterization, leveraging the submodularity of JMI to supply intermediate rewards. The policy network employs permutation-invariant set encoders to represent the growing batch and the current labeled dataset $\mathcal{D}_{\text{train}}$.

  • Amortization via Lookahead ("Fantasization"): To avoid retraining the GFlowNet from scratch after every AL round, the authors borrow from GP "fantasization": they hallucinate potential labels for sampled candidate batches using the current GP posterior, update the GP, and pre-train the policy on these plausible future reward landscapes.

Datasets

The empirical validation is conducted entirely on a synthetic 1D Toy Regression Task:

  • Ground truth generated from an oscillatory 6th-order polynomial: $$f(x) = (-0.6667 - 0.6012x - 1.0172x^2 - 0.7687x^3 + 1.4680x^5 - 0.1678x^6)\sin(\pi x)e^{-0.5x^2} + \epsilon$$ with inputs $x \sim \mathcal{N}(0, 1)$ and noise $\epsilon \sim \mathcal{N}(0, 0.1)$.

  • Evaluated on a fixed test set of 1,000 points across varying pool sizes (e.g., $N = 20, 50, 2000$), seed sets, and query sizes ($B = 3, 10$).

  • No existing real-world benchmarks or datasets were evaluated.

Key Insights and Ideas

  • Sampling Beats Greedy Search: Standard batch methods greedily add points one by one. GFlowNets natively generate diverse composite structures proportional to reward, naturally capturing batch-level correlations without getting locked into greedy choices.
  • Inference Complexity Drops to $O(B)$: Once trained, generating a candidate batch requires only $B$ forward passes through the policy network, decoupling inference cost from expensive pool-wide joint entropy queries.
  • Temperature as an Exploitation Knob: Lowering the temperature $T$ focuses the GFlowNet sampler on high-JMI modes, matching the performance of greedy maximization without sacrificing batch diversity.
  • Lookahead Training Enables Transfer: Amortizing GFN training across acquisition steps is notoriously hard due to non-stationary rewards. Fantasizing labels restricts the space of future conditional distributions, making transfer significantly faster.

Key Results

  • Distribution Matching: On small pool sizes where the true distribution can be calculated exhaustively, BatchGFN’s empirical sampling distribution closely matches the true reward density (low Jensen-Shannon divergence).
  • High Joint Mutual Information: For a pool of 2,000 points and query size 10, BatchGFN achieved a JMI of ~28.5, matching BatchBALD (~28.9) while dramatically outperforming standard BALD (~11.4) and random acquisition (~21.1).
  • Active Learning Efficiency: When sampling 20 candidate batches from BatchGFN and taking the maximum-reward batch, the GP test loss curves mirrored BatchBALD across labeling rounds, drastically outperforming non-batch baselines.
  • Faster Transfer: Lookahead pre-training converged to the true post-acquisition distribution in fewer gradient steps compared to policy re-initialization.

Limitations and Future Work

  • Toy Domain Only: The evaluation is restricted to 1D synthetic regression using exact GPs, where exact JMI is tractable in closed form.
  • Scalability Challenges: Scaling to large real-world pools, deep neural network backbones, and image/text domains will require:
  • Attention-based or Perceiver-style architectures to handle high-dimensional, large-scale pool conditioning.
  • Alternative, inexpensive batch reward heuristics when exact JMI cannot be computed in closed form.
  • Optimization Stability: Very low reward temperatures caused training instabilities, suggesting the need for reward/temperature conditioning during GFN training.

Summary updated

BibTeX
@inproceedings{malik2023batchgfn,
  author = {Shreshth A Malik and Salem Lahlou and Andrew Jesson and Moksh Jain and Nikolay Malkin and Tristan Deleu and Yoshua Bengio and Yarin Gal},
  title = {{BatchGFN: Generative Flow Networks for Batch Active Learning}},
  booktitle = {SPIGM @ ICML},
  year = {2023},
  url = {https://openreview.net/forum?id=U0aM6wrpFR},
}
Figure