为每个边际提供一个提议:用于二值矩阵的零样本摊销序贯重要性采样

·

研究论文 · 2026/09/30

在生态学、心理测量学以及社会与金融网络分析中,二元矩阵常在其行和与列和固定的条件下被分析,这限制了问题到一个具有相同边际的有限矩阵样本空间。两个基本问题是计数该空间并从中均匀采样。序列重要性采样(SIS)通过独立加权样本和无偏计数估计器解决这两个问题,但其效率关键取决于提议分布。现有提议是分析设计的,其准确性可能随边际变化而显著不同。我们证明,理想的SIS提议(每个权重等于计数且方差消失)正是生成流网络(GFlowNet)的策略,该网络对每个具有给定边际的矩阵赋予单位奖励。因此,我们提出MarginFlow,一个将提议设计转化为学习问题并通过利用边际的自相似性将其摊销到不同边际的框架。每个部分矩阵本身就是一个具有缩减边际的实例,因此一个读取剩余边际的集合变换器可服务于所有边际。我们在1904个边际的池上训练MarginFlow,并在1190个保留边际上零样本评估,这些边际来自合成和真实数据,尺寸从3×3到870×6。在1190个边际中的1187个上,它匹配或优于31个分析设计配置中的最佳者(这些配置是为每个边际事后选择的),其中位有效样本比例为99.8%。在56个边际上,当最佳分析配置损失超过1 nat的有效样本量时,MarginFlow全部胜出,并将中位有效样本比例从10.3%提高到94.1%。

该工作将序列重要性采样中的提议分布设计转化为学习问题,利用GFlowNet理论实现零样本泛化,在广泛边际上显著提升采样效率,对依赖二元矩阵采样的多个领域具有重要实用价值。

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 3times3 to 870times6. 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%.

阅读原文

参与讨论