One Proposal for Every Margin: Zero-Shot Amortized Sequential Importance Sampling for Binary Matrices
cs.LG, stat.CO
Submitted: 2026-09-28
Updated: 2026-09-28
License: http://creativecommons.org/licenses/by/4.0/
The gist: In ecology, psychometrics, and the analysis of social and financial networks, binary matrices are often analyzed conditional on their observed row and column sums, which restricts the problem to a
Abstract
In ecology, psychometrics, and the analysis of social and financial networks, binary matrices are often analyzed conditional on their observed row and column sums, which restricts the problem to a finite sample space of matrices with the same margins. Two fundamental problems are to count this space and to sample uniformly from it. Sequential importance sampling (SIS) addresses both with independent weighted samples and an unbiased count estimator, but its efficiency depends critically on the proposal distribution. Existing proposals are analytically designed, and their accuracy can vary substantially with the margins. We show that the ideal SIS proposal, under which every weight equals the count and the variance vanishes, is exactly the policy of a generative flow network (GFlowNet) with unit reward on every matrix that has the given margins. We therefore propose MarginFlow, a framework that turns the design of the proposal into a learning problem and amortizes it across margins by exploiting their self-similarity. Every partial matrix is itself an instance with reduced margins, so one set transformer that reads the remaining margins serves every margin. We train MarginFlow on a pool of 1904 margins and evaluate it zero-shot on 1190 held-out margins, synthetic and real, from 3 times3 to 870 times6. On 1187 of the 1190 margins it matches or beats the best of 31 analytically designed configurations, chosen post hoc for each margin, and its median effective sample fraction is 99.8%. On the 56 margins where that best loses more than one nat of effective sample size, MarginFlow wins every one and raises the median effective sample fraction from 10.3% to 94.1%.
Sources
- Importance Sampling: Intrinsic Dimension and Computational Cost
- Flow Network based Generative Models for Non-Iterative Diverse Candidate Generation
- GFlowNet Foundations
- Action abstractions for amortized sampling
- PowerFlow: Unlocking the Dual Nature of LLMs via Principled Distribution Matching
- Reinforced sequential Monte Carlo for amortised sampling
- Discrete Probabilistic Inference as Control in Multi-path Environments
- $f$-Trajectory Balance: A Loss Family for Tuning GFlowNets, Generative Models, and LLMs with Off- and On-Policy Data
- The Web of Life
- Spectral Gap for the Binary Fixed-Margin Swap Chain
- Importance sampling for weighted binary random matrices with specified margins
- Ant Colony Sampling with GFlowNets for Combinatorial Optimization
- VarGrad: A Low-Variance Gradient Estimator for Variational Inference
- Generative Flow Networks as Entropy-Regularized RL
- Trajectory balance: Improved credit assignment in GFlowNets
- GFlowNets and variational inference
- Robust Scheduling with GFlowNets
- Probabilistic Inference in Language Models via Twisted Sequential Monte Carlo
Related papers
- Polynomial-Augmented Neural Networks (PANNs) with Weak Orthogonality Constraints for Enhanced Function and PDE Approximation
- AIRL-S: Unifying Reinforcement Learning and Search-Based Test-Time Scaling via Adversarial Inverse Reinforcement Learning
- Transformers as Bayesian In-Context Experimenters: Smoothness-Adaptive Efficient ATE Estimation
- Convergence issues in Relational Concept Analysis based on AOC-posets
- Beliefs Beyond Posteriors: The Predictive Cost of ELBO Binding
- Understanding Diffusion Models via Ratio-Based Function Approximation with SignReLU Networks