Structural locality is a ubiquitous feature of real-world datasets, wherein data points are organized into local hierarchies. Some examples include topical clusters in text or project hierarchies in source code repositories. In this paper, we explore utilizing this structural locality within non-parametric language models, which generate sequences that reference retrieved examples from an external source. We propose a simple yet effective approach for adding locality information into such models by adding learned parameters that improve the likelihood of retrieving examples from local neighborhoods. Experiments on two different domains, Java source code and Wikipedia text, demonstrate that locality features improve model efficacy over models without access to these features, with interesting differences. We also perform an analysis of how and where locality features contribute to improved performance and why the traditionally used contextual similarity metrics alone are not enough to grasp the locality structure.
翻译:结构位置是真实世界数据集的无处不在的特点,其中数据点按地方等级排列。一些例子包括源代码库文本或项目等级表中的时标群集。在本文件中,我们探索在非参数语言模型中利用这一结构位置,这些结构位置产生序列,参考外部来源的实例。我们提出一种简单而有效的方法,通过增加增进从当地社区检索实例的可能性的已知参数,将地点信息添加到这些模型中。在Java源代码和维基百科文本这两个不同域进行的实验表明,地点特征改善了模型相对于模型的功效,而没有获得这些特征,存在有趣的差异。我们还分析了地点特征如何和在哪些方面有助于改进性能,以及为什么传统使用的相近度指标本身不足以掌握地点结构。