HUMAN: Hierarchical Universal Modular ANnotator

Moritz Wolf, Dana Ruiter, Ashwin Geet D'Sa, Liane Reiners, Jan Alexandersson, Dietrich Klakow

Introduction

In the field of Natural Language Processing (NLP) and social science research, data annotation is often a complex, multi-stage process. While many existing tools excel at specific tasks like Named Entity Recognition (NER) or image bounding boxes, they frequently struggle with interdependent workflows. For instance, a researcher might need to identify if a comment is hateful before asking who the target is, or they might require an annotator to view a news article's full context before labeling a specific sentence. HUMAN (Hierarchical Universal Modular ANnotator) addresses these challenges by providing an open-source, web-based framework designed for logic-driven, hierarchical annotation.

System Architecture

The core of HUMAN is a modular architecture that separates administrative definitions from the user-facing interface. As shown in Figure 1, the system operates on a client-server model where a central Deterministic State Machine (DSM) manages the flow of information.

System architecture of HUMAN showing the interaction between administrators, server components, and the client GUI.

Administrators define an Annotation Protocol (AP) using a JSON-style syntax. This protocol dictates the sequence of states, the types of questions presented (e.g., select, checkmark, label), and the transitions between them. The server, powered by Flask and SQLite, handles data persistence and external API calls, while the TypeScript-based frontend renders the GUI.

Logic-Driven Workflows via DSM

The defining feature of HUMAN is its use of the XState library to implement a Deterministic State Machine. This allows for complex branching and looping logic that traditional tools lack. Instead of a linear list of questions, the annotation process is treated as a state-driven workflow.

A flowchart illustrating a sample annotation protocol with branching logic based on user input.

As illustrated in Figure 2, the system can guide an annotator through different paths based on their previous answers. For example, if a user labels a comment's sentiment as "neutral," the system might skip detailed recipient labeling and move directly to a factual-manner check. This "if-then" logic significantly improves efficiency and ensures that annotators only see relevant questions.

Real-World Application: The M-PHASIS Project

The utility of HUMAN was demonstrated through the M-PHASIS Project, an interdisciplinary study on online hate speech. Researchers required a tool that could handle up to 30 conditional questions per comment while displaying the "hierarchical context"—the original news article—alongside the specific user comment being annotated. HUMAN's ability to provide this context reduced ambiguity and improved the quality of the resulting dataset.

Beyond hate speech, the tool's modularity makes it "universal." It can be configured for diverse tasks such as multi-lingual NER, where a global state identifies the document language before local states handle sequence labeling.

Conclusion and Future Directions

HUMAN offers a flexible, open-source alternative to commercial annotation platforms. By treating annotation as a state-machine process, it enables the creation of sophisticated workflows that mirror the complexity of modern research questions.

While currently powerful, future development aims to lower the barrier to entry by replacing JSON-based configuration with a drag-and-drop GUI. Additionally, the authors plan to integrate automated analytics, such as inter-annotator agreement (IAA) scores, directly into the administrator dashboard to further streamline the research pipeline.

Summary updated

BibTeX
@inproceedings{wolf2020human,
  author = {Moritz Wolf and Dana Ruiter and Ashwin Geet D'Sa and Liane Reiners and Jan Alexandersson and Dietrich Klakow},
  title = {{HUMAN: Hierarchical Universal Modular ANnotator}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2020},
  doi = {10.18653/v1/2020.emnlp-demos.8},
}
Figure