Torch-Struct: Deep Structured Prediction Library

Torch-Struct: Deep Structured Prediction Library
复制标题

DOI:
10.18653/v1/2020.acl-demos.38
复制
发表时间:
2020-02
期刊:
ArXiv
影响因子:
--
通讯作者:
Alexander M. Rush
Alexander M. Rush
中科院分区:
其他
文献类型:
--
作者:
Alexander M. Rush

文献摘要

被引文献

相似文献

关于NLP的结构化预测的文献描述了关于序列、分割、比对和树的丰富的分布和算法集合;然而,这些算法很难在深度学习框架中使用。我们介绍了Torch-Struct,这是一个用于结构化预测的库,旨在利用和集成矢量化的、基于自动区分的框架。Torch-Struct包括广泛的概率结构集合,可通过简单灵活的基于分布的API访问,该API可连接到任何深度学习模型。该库利用批处理、矢量化操作并利用自动区分来生成可读、快速和可测试的代码。在内部,我们还包括一些通用优化,以提供跨算法效率。实验表明,与FAST基准相比,性能有了显著提高,案例研究证明了库的好处。火炬结构可在https://github.com/harvardnlp/pytorch-struct.上购买
The literature on structured prediction for NLP describes a rich collection of distributions and algorithms over sequences, segmentations, alignments, and trees; however, these algorithms are difficult to utilize in deep learning frameworks. We introduce Torch-Struct, a library for structured prediction designed to take advantage of and integrate with vectorized, auto-differentiation based frameworks. Torch-Struct includes a broad collection of probabilistic structures accessed through a simple and flexible distribution-based API that connects to any deep learning model. The library utilizes batched, vectorized operations and exploits auto-differentiation to produce readable, fast, and testable code. Internally, we also include a number of general-purpose optimizations to provide cross-algorithm efficiency. Experiments show significant performance gains over fast baselines and case-studies demonstrate the benefits of the library. Torch-Struct is available at https://github.com/harvardnlp/pytorch-struct.