arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1707.08275cs.IR
收藏

在多级排序结构中集成神经网络重排序模型的方法探索

An Exploration of Approaches to Integrating Neural Reranking Models in Multi-Stage Ranking Architectures

Zhucheng Tu, Matt Crane, Royal Sequiera, Junchen Zhang, Jimmy Lin

摘要:

我们探索了不同的方法来集成一个简单的卷积神经网络(CNN)与Lucene搜索引擎在一个多阶段的排名架构。我们的模型使用PyTorch深度学习工具包进行训练,该工具包是用C/C++和Python前端实现的。一个明显的集成策略是将神经网络直接公开为服务。为此,我们使用Apache Thrift,这是一个用于构建可扩展的跨语言服务的软件框架。在探索替代架构时,我们观察到,一旦经过训练,神经网络的前馈评估非常简单。因此,我们可以从PyTorch中提取经过训练的CNN的参数,并将模型导入Java,利用Java Deeplearning 4J库进行前馈评估。这样做的好处是,整个端到端系统都可以用Java实现。作为第三种方法,我们可以从PyTorch中提取神经网络,并将其“编译”为公开Thrift服务的C++程序。我们评估这些替代品的性能(延迟和吞吐量)以及易于集成。实验表明,卷积神经网络的前馈评估在Java中明显较慢,而编译的C++网络的性能并不总是优于PyTorch实现。

英文摘要:

We explore different approaches to integrating a simple convolutional neural network (CNN) with the Lucene search engine in a multi-stage ranking architecture. Our models are trained using the PyTorch deep learning toolkit, which is implemented in C/C++ with a Python frontend. One obvious integration strategy is to expose the neural network directly as a service. For this, we use Apache Thrift, a software framework for building scalable cross-language services. In exploring alternative architectures, we observe that once trained, the feedforward evaluation of neural networks is quite straightforward. Therefore, we can extract the parameters of a trained CNN from PyTorch and import the model into Java, taking advantage of the Java Deeplearning4J library for feedforward evaluation. This has the advantage that the entire end-to-end system can be implemented in Java. As a third approach, we can extract the neural network from PyTorch and "compile" it into a C++ program that exposes a Thrift service. We evaluate these alternatives in terms of performance (latency and throughput) as well as ease of integration. Experiments show that feedforward evaluation of the convolutional neural network is significantly slower in Java, while the performance of the compiled C++ network does not consistently beat the PyTorch implementation.

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

↑