YATO: Yet Another deep learning based Text analysis Open toolkit

Zeqiang Wang, Yile Wang, Jiageng Wu, Zhiyang Teng, Jie Yang

Introduction

In the rapidly evolving landscape of Natural Language Processing (NLP), Large Language Models (LLMs) like GPT-4 have set new benchmarks for performance. However, these models often function as "black boxes" and require significant computational resources that are inaccessible to many researchers. For specific tasks such as Named Entity Recognition (NER) or sentiment analysis, smaller models like BERT or traditional Recurrent Neural Networks (RNNs) remain highly relevant and efficient.

Existing NLP toolkits often present a binary choice: they are either highly engineered with steep learning curves (e.g., HuggingFace Transformers) or they lack the flexibility to incorporate domain-specific "handcrafted features"—such as specialized medical lexicons—which are vital for niche applications. YATO addresses this gap by providing a lightweight, open-source, and "low-code" framework designed to simplify state-of-the-art text analysis for researchers across various disciplines.

Comparison of YATO with other popular NLP toolkits across various features.

Hierarchical Architecture and Methods

YATO’s core innovation lies in its hierarchical architecture, which allows users to mix and match pre-trained language models (PLMs), traditional neural networks (TNNs), and handcrafted features through simple configuration files. This flexibility is organized into four distinct modeling patterns:

  1. Pure PLM: Standard fine-tuning of models like BERT or RoBERTa.
  2. Hierarchical PLM: Encoding character and word-level features before passing them into a PLM.
  3. TNN ⊕ PLM: A feature-based approach that combines TNNs (CNNs/RNNs) with PLM features just before the final prediction layer.
  4. Pure TNN: Utilizing lightweight models like BiLSTMs, which offer high efficiency when training data is limited.
The hierarchical architecture of YATO, illustrating the four modeling patterns and the integration of handcrafted features.

Built on PyTorch, YATO emphasizes a Config-Driven Workflow. Instead of writing complex training loops, users define data paths, model architectures (e.g., enabling a Conditional Random Field layer with use_crf=True), and hyperparameters in a single text file. This approach ensures high reproducibility and ease of use for non-AI experts.

Evaluation and Key Results

The toolkit was evaluated across eight diverse English and Chinese datasets, covering sequence labeling (NER, CCG supertagging) and sequence classification (SST2, SST5, ChnSentiCorp). Notably, the authors tested YATO on domain-specific medical datasets like NCBI-disease and Yidu-s4k.

Performance Benchmarks

  • SOTA Results: YATO achieved better-than-reported results on several benchmarks, including MSRA and OntoNotes 4.0.
  • Competitive with Industry Standards: On the GLUE benchmark, YATO achieved an average score of 80.85, slightly outperforming HuggingFace Transformers (80.55) under default settings.
  • The Value of Handcrafted Features: In specialized medical NER tasks, adding simple lexicons as features significantly boosted F1 scores, demonstrating the utility of YATO's flexible embedding modules.

Efficiency vs. Performance

YATO highlights the practical trade-offs in model selection. While Transformer-based models provide high accuracy, the Pure TNN pattern proved to be nearly 3.5x faster in terms of decoding speed (approximately 1400 vs. 400 sentences/sec), making it a superior choice for resource-constrained environments.

Key Insights

  • Hybrid Models: The research demonstrates that "bigger isn't always better." Combining traditional TNNs with PLMs (Pattern 3) can outperform pure, massive models for specific tasks.
  • Democratizing NLP: By shifting complexity from source code to configuration files, YATO enables cross-disciplinary researchers—such as economists or medical professionals—to build SOTA models without deep software engineering expertise.

Limitations and Future Work

Currently, YATO is optimized for discriminative tasks (labeling and classification) and does not yet support generative tasks like text summarization. Future updates aim to integrate advanced LLMs as backends, support multimodal features (text and images), and expand into time-series modeling to further broaden the toolkit's utility.

Summary updated

BibTeX
@inproceedings{wang2023yato,
  author = {Zeqiang Wang and Yile Wang and Jiageng Wu and Zhiyang Teng and Jie Yang},
  title = {{YATO: Yet Another deep learning based Text analysis Open toolkit}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2023},
  doi = {10.18653/v1/2023.emnlp-demo.11},
}
Figure