arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1902.11208cs.CVcs.LGcs.NE
收藏

请不要填充:高效的神经手写识别

No Padding Please: Efficient Neural Handwriting Recognition

Dublin City University(都柏林城市大学);University of Groningen(格罗宁根大学)

Gideon Maillette de Buy Wenniger, Lambert Schomaker, Andy Way

摘要:

神经手写识别(NHR)是使用深度学习模型(如多维长短期记忆(MDLSTM)递归神经网络)识别手写文本。具有MDLSTM层的模型在手写文本识别任务上取得了最先进的结果。虽然多方向MDLSTM层具有在所有方向上捕获完整上下文的不败能力,但这种强度限制了并行化的可能性,因此计算成本很高。在这项工作中,我们开发的方法来创建有效的MDLSTM为基础的NHR模型,特别是一种方法,旨在消除计算浪费,结果填充。该方法称为示例包装,它用二维网格中的高效平铺取代了填充示例的浪费堆叠。对于基于单词的NHR,这产生了6.6倍的速度提高,超过了已经有效的每个批次的最小填充基线。对于基于线路的NHR,节省的费用更少,但仍然很重要。除了示例打包之外,我们还提出了:1)一种优化动态图定义框架(包括PyTorch)并行化的技术,使用卷积与分组,2)一种跨GPU并行化可变长度示例批次的方法。我们所有的技术都在我们自己的基于MDLSTM的NHR模型的PyTorch重新实现上进行了彻底的测试。对IAM数据集的全面评估表明,我们的模型与最先进模型的早期实现相似。我们的高效NHR模型和与之讨论的一些可重用技术为深度学习中无处不在的可变长度输入场景提供了实现相对高效模型的方法。

英文摘要:

Neural handwriting recognition (NHR) is the recognition of handwritten text with deep learning models, such as multi-dimensional long short-term memory (MDLSTM) recurrent neural networks. Models with MDLSTM layers have achieved state-of-the art results on handwritten text recognition tasks. While multi-directional MDLSTM-layers have an unbeaten ability to capture the complete context in all directions, this strength limits the possibilities for parallelization, and therefore comes at a high computational cost. In this work we develop methods to create efficient MDLSTM-based models for NHR, particularly a method aimed at eliminating computation waste that results from padding. This proposed method, called example-packing, replaces wasteful stacking of padded examples with efficient tiling in a 2-dimensional grid. For word-based NHR this yields a speed improvement of factor 6.6 over an already efficient baseline of minimal padding for each batch separately. For line-based NHR the savings are more modest, but still significant. In addition to example-packing, we propose: 1) a technique to optimize parallelization for dynamic graph definition frameworks including PyTorch, using convolutions with grouping, 2) a method for parallelization across GPUs for variable-length example batches. All our techniques are thoroughly tested on our own PyTorch re-implementation of MDLSTM-based NHR models. A thorough evaluation on the IAM dataset shows that our models are performing similar to earlier implementations of state-of-the-art models. Our efficient NHR model and some of the reusable techniques discussed with it offer ways to realize relatively efficient models for the omnipresent scenario of variable-length inputs in deep learning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑