Learning energy-based models (EBMs) is known to be difficult especially on discrete data where gradient-based learning strategies cannot be applied directly. Although ratio matching is a sound method to learn discrete EBMs, it suffers from expensive computation and excessive memory requirements, thereby resulting in difficulties in learning EBMs on high-dimensional data. Motivated by these limitations, in this study, we propose ratio matching with gradient-guided importance sampling (RMwGGIS). Particularly, we use the gradient of the energy function w.r.t. the discrete data space to approximately construct the provably optimal proposal distribution, which is subsequently used by importance sampling to efficiently estimate the original ratio matching objective. We perform experiments on density modeling over synthetic discrete data, graph generation, and training Ising models to evaluate our proposed method. The experimental results demonstrate that our method can significantly alleviate the limitations of ratio matching, perform more effectively in practice, and scale to high-dimensional problems. Our implementation is available at https://github.com/divelab/RMwGGIS.
翻译:学习能量模型(EBMs)已知具有挑战性,尤其是在离散数据上,因为基于梯度的学习策略无法直接应用。尽管比率匹配是一种学习离散EBM的有效方法,但它存在计算成本高昂和内存需求过大的问题,从而难以在高维数据上学习EBM。针对这些局限,本研究提出了一种基于梯度引导重要性采样的比率匹配方法(RMwGGIS)。具体而言,我们利用能量函数关于离散数据空间的梯度来近似构造可证明最优的提议分布,随后通过重要性采样高效估计原始的比率匹配目标。我们在合成离散数据的密度建模、图生成以及伊辛模型训练等任务上进行了实验,以评估所提方法。实验结果表明,我们的方法能够显著缓解比率匹配的局限性,在实践中表现更有效,并能扩展到高维问题。我们的实现代码见 https://github.com/divelab/RMwGGIS。