Unlocking the Heterogeneous Landscape of Big Data NLP with DUUI

Alexander Leonhardt, Giuseppe Abrami, Daniel Baumartz, Alexander MehlerEMNLP 2023 · DOI

Introduction

Modern Natural Language Processing (NLP) is characterized by a heterogeneous landscape where a single research pipeline may require tools implemented in diverse programming languages, such as Java for tokenization, Python for transformer-based models, and Rust for high-performance custom annotation. Orchestrating these components into a scalable, reproducible system presents significant engineering challenges. While the Unstructured Information Management Architecture (UIMA) was established decades ago to address interoperability, existing scaling solutions have often failed to keep pace with "Big Data" requirements or have succumbed to security vulnerabilities, such as the Log4j flaw. This paper introduces the Docker Unified UIMA Interface (DUUI), a lightweight framework designed to bridge this gap by providing a language-agnostic, horizontally and vertically scalable orchestration layer.

System Architecture

DUUI employs a modular Composer-Driver-Component architecture to manage document flow and tool execution. The Composer serves as the central orchestrator, managing document distribution and metric collection. Drivers provide the necessary abstraction to interface with various environments, including local Java runtimes, Docker daemons, and distributed Docker Swarm networks. Components encapsulate specific NLP tasks within Docker containers, ensuring environment isolation and reproducibility.

Figure 1: The DUUI architecture facilitates a heterogeneous pipeline by integrating Java, Docker, and remote components through a centralized Composer.

A core innovation of DUUI is the use of Lua as an embedded scripting language within the Java Virtual Machine (JVM). This allows for "partial serialization," where only the data required by a specific component is transmitted, rather than the entire document metadata. This approach achieves "Turing-complete" data flow, allowing the communication layer to actively transform or filter data on the fly. To ensure security, DUUI implements a Lua sandbox that restricts script execution to a predefined whitelist of safe classes.

Performance Evaluation

The framework was evaluated using several large-scale datasets, including the German Parliamentary Corpus (GerParCor) and Wikipedia. A key finding is the significant impact of the "serialization tax"—the overhead incurred when moving data between different language environments. Quantitative analysis demonstrates that for large documents, the time spent on data serialization in Python can exceed the actual processing time of the NLP task.

Figure 5: Comparison of annotator time across different languages highlights the efficiency of Rust and Java serialization over standard Python libraries.

As shown in Figure 5, DUUI's Java-based serialization is approximately ten times faster than the standard Python library for UIMA (dkpro-cassis). Rust-based components exhibit even higher efficiency, maintaining near-linear performance as document size increases. Furthermore, DUUI demonstrated near-linear speedups when scaling from one to eight Docker instances using spaCy, proving its effectiveness in distributed environments. The framework also successfully delegated resource-heavy tasks to appropriate nodes within a Swarm network, effectively handling vertical scaling.

Conclusion and Future Work

DUUI successfully addresses the interoperability and scalability challenges of modern NLP by leveraging containerization and efficient data serialization. It fulfills critical requirements for open science by tracking engine settings and models for every document. However, several areas for improvement remain. Current limitations include the lack of native complex load balancing within Docker Swarm and the need for more seamless GPU integration. Future development will focus on enhancing usability through a graphical interface and exploring message brokers like ActiveMQ to mitigate single-machine multi-threading bottlenecks.

Summary updated

BibTeX
@inproceedings{leonhardt2023unlocking,
  author = {Alexander Leonhardt and Giuseppe Abrami and Daniel Baumartz and Alexander Mehler},
  title = {{Unlocking the Heterogeneous Landscape of Big Data NLP with DUUI}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.findings-emnlp.29},
}
Figure