In reasoning about sequential events it is natural to pose probabilistic queries such as "when will event A occur next" or "what is the probability of A occurring before B", with applications in areas such as user modeling, medicine, and finance. However, with machine learning shifting towards neural autoregressive models such as RNNs and transformers, probabilistic querying has been largely restricted to simple cases such as next-event prediction. This is in part due to the fact that future querying involves marginalization over large path spaces, which is not straightforward to do efficiently in such models. In this paper we introduce a general typology for predictive queries in neural autoregressive sequence models and show that such queries can be systematically represented by sets of elementary building blocks. We leverage this typology to develop new query estimation methods based on beam search, importance sampling, and hybrids. Across four large-scale sequence datasets from different application domains, as well as for the GPT-2 language model, we demonstrate the ability to make query answering tractable for arbitrary queries in exponentially-large predictive path-spaces, and find clear differences in cost-accuracy tradeoffs between search and sampling methods.
翻译:在对相继事件进行推论时,自然会提出概率性的问题,如“A事件何时发生下一个”或“B之前发生A的概率”,在用户建模、医药和金融等领域的应用。然而,随着机器学习转向神经自动递减模型,如RNN和变压器,概率性查询基本上局限于诸如下个事件预测等简单案例。部分原因是未来查询涉及大路径空间的边缘化,而这种空间在这类模型中效率不直截了当。在本文中,我们引入了神经自动递减序列模型预测查询的一般类型,并表明这些查询可以系统地由几套基本建筑块来代表。我们利用这种类型来开发基于波束搜索、重要性取样和混合体的新的查询估计方法。在不同应用领域以及GPT-2语言模型的四套大序列数据集中,我们展示了在巨型预测路径空间的任意查询中进行解答的能力,并发现成本-准确性抽样搜索和抽样方法之间的明显差异。