A Data-Centric Framework for Composable NLP Workflows

Zhengzhong Liu, Guanxiong Ding, Avinash Bukkittu, Mansi Gupta, Pengzhi Gao, Atif Ahmed, Shikun Zhang, Xin Gao, Swapnil Singhavi, Linwei Li, Wei Wei, Zecong Hu, Haoran Shi, Xiaodan Liang, Teruko Mitamura, Eric P. Xing, Zhiting Hu

Introduction

Building complex, end-to-end Natural Language Processing (NLP) systems often involves a cumbersome "glue code" phase. While specialized libraries like spaCy or AllenNLP offer powerful individual components, integrating them into a production-grade pipeline requires significant manual effort to manage data format conversions and interoperability. This paper introduces a unified, data-centric framework comprising two projects—Forte and Stave—designed to eliminate ad-hoc gluing by providing a standardized infrastructure for composable NLP workflows.

The Forte-Stave Framework

The framework's core innovation is its Data-Centric design, which shifts focus from individual functions to a Universal Data Representation (UDR). This approach ensures that every component in a pipeline interacts with a standardized "data pack," making processors truly interchangeable.

The Forte-Stave framework architecture, illustrating the relationship between infrastructure, modular processors, and the user interface.

Core Components

  1. Universal Data Representation (UDR): Standardizes data into three primary templates: Span (text offsets like tokens), Link (relationships like dependency arcs), and Group (collections like coreference clusters).
  2. Forte (The Engine): The back-end infrastructure that manages workflows, handles I/O, and provides modular "processors." It includes deep learning utilities like auto-batching to simplify the transition from symbolic data to neural networks.
  3. Stave (The Interface): A modular UI for visualization and annotation. Because it shares the UDR with Forte, it can automatically render pipeline outputs, facilitating seamless human-machine collaboration.

Practical Applications and Case Studies

The utility of the framework is demonstrated through two primary case studies that highlight its ability to bridge the gap between text analysis and interactive applications.

Workflow examples for clinical information extraction and report generation, showing the interaction between processors, data flow, and the user interface.

Clinical Information Workflow

Using clinical notes, the framework was used to perform diagnosis analysis and retrieval. The system allows practitioners to click an extracted entity and immediately retrieve similar past cases, demonstrating smooth transitions from text analysis to database retrieval.

Neural-Symbolic Chatbot

A hybrid chatbot was constructed using movie reviews, combining "old school" symbolic features (like dependency trees) with "new school" neural embeddings. The framework's built-in support for embedding storage and fast lookups (via Faiss) simplified this integration.

Key Insights

  • Decoupling and Interoperability: Standardizing the data format allows developers to swap models (e.g., replacing a BERT-based NER with an LSTM-based one) without altering the rest of the pipeline.
  • Low-Code Orchestration: Complex workflows can be assembled with minimal engineering overhead; the authors note that a sophisticated clinical system required only about 20 lines of infrastructure code.
  • Human-in-the-Loop: The shared UDR between Forte and Stave allows for real-time human intervention, where manual annotations can immediately inform and update machine-generated suggestions.

Conclusion and Future Work

Forte and Stave provide a robust foundation for building modular, extensible NLP systems. By prioritizing data representation over functional silos, the framework significantly reduces the engineering burden of pipeline construction. Future work will focus on enhancing support for multi-task learning, joint inference, and automated data augmentation within the pipeline.

Summary updated

BibTeX
@inproceedings{liu2020data,
  author = {Zhengzhong Liu and Guanxiong Ding and Avinash Bukkittu and Mansi Gupta and Pengzhi Gao and Atif Ahmed and Shikun Zhang and Xin Gao and Swapnil Singhavi and Linwei Li and Wei Wei and Zecong Hu and Haoran Shi and Xiaodan Liang and Teruko Mitamura and Eric P. Xing and Zhiting Hu},
  title = {{A Data-Centric Framework for Composable NLP Workflows}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-demos.26},
}
Figure