Jack the Reader - A Machine Reading Framework

Dirk Weissenborn, Pasquale Minervini, Isabelle Augenstein, Johannes Welbl, Tim Rocktäschel, Matko Bosnjak, Jeff Mitchell, Thomas Demeester, Tim Dettmers, Pontus Stenetorp, Sebastian Riedel

Introduction

Developing Machine Reading (MR) models is often a repetitive and cumbersome process. Researchers frequently spend more time writing boilerplate code for data pre-processing, vocabulary building, and batching than on actual model innovation. While general NLP libraries and deep learning frameworks exist, there has been a lack of a dedicated middle-layer framework specifically for MR.

Jack the Reader (JACK) addresses this gap. It is a modular, high-level framework designed to streamline MR research by providing high-level primitives that handle the "plumbing" of MR pipelines, allowing for faster prototyping and more reliable model comparisons.

The JTReader Architecture

The core of JACK is the JTReader abstraction, which acts as a task-agnostic wrapper around three modular components:

  1. Input Modules: Handle pre-processing (tokenization, embedding lookup) and transform raw text into tensors.
  2. Model Modules: Implement the actual neural network logic.
  3. Output Modules: Convert raw model predictions back into human-readable answers.
The JTReader framework architecture unifies input, model, and output modules into a task-agnostic wrapper using a unified 'Everything is QA' data flow.

Key Technical Innovations

  • Tensor Ports: JACK uses "tensor ports"—named placeholders for tensors—to define functional interfaces between modules. This ensures compatibility between input and model modules before execution.
  • Declarative Model Definition: Many models can be defined entirely within YAML configuration files. By composing basic building blocks like LSTMs or attention mechanisms, researchers can build new architectures without writing new Python code.
  • Dual-Backend Support: JACK supports both TensorFlow and PyTorch, allowing researchers to use their preferred library while benefiting from shared infrastructure.

The "Everything is QA" Philosophy

A central insight of JACK is that most MR tasks can be cast as a Question Answering problem. For example, in Natural Language Inference (NLI), the "premise" is treated as the support document, the "hypothesis" as the question, and the labels (entailment, neutral, contradiction) as the answer candidates. This unified abstraction enables high modular reusability across diverse tasks like Question Answering, NLI, and Link Prediction.

Evaluation and Key Results

The framework was evaluated across a wide range of established benchmarks, including SQuAD, SNLI, and Knowledge Graph datasets like FB15k-237. The authors implemented several baseline models within JACK and compared them to original published results to ensure fidelity and efficiency.

Performance and speed comparison of QA models implemented in JACK versus original versions, highlighting significant speedups.
  • Question Answering: The JACK implementation of BiDAF achieved a 77.8 F1 score, slightly outperforming the original paper's 77.3. Their internal JackQA model reached 79.6 F1.
  • Efficiency: By decoupling the model from data-handling logic, the authors achieved significant speedups. The FastQA model in JACK was 2.2x faster than the original implementation while maintaining higher accuracy.
  • NLI and Link Prediction: Models like DAM and ESIM performed within 1-2% of their original implementations, while Link Prediction models (DistMult and ComplEx) matched state-of-the-art performance.

Limitations and Future Work

While JACK covers a broad range of tasks, the current focus is primarily on extractive and classification-based MR rather than generative models. Additionally, results sometimes varied from original papers due to the lack of exhaustive hyper-parameter searches for every implementation. Future directions include supporting more tasks and encouraging community adoption to create a robust "building-block" ecosystem for MR research.

Summary updated

BibTeX
@inproceedings{weissenborn2018jack,
  author = {Dirk Weissenborn and Pasquale Minervini and Isabelle Augenstein and Johannes Welbl and Tim Rocktäschel and Matko Bosnjak and Jeff Mitchell and Thomas Demeester and Tim Dettmers and Pontus Stenetorp and Sebastian Riedel},
  title = {{Jack the Reader - A Machine Reading Framework}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2018},
  doi = {10.18653/v1/p18-4005},
}
Figure