RexUniNLU: Recursive Method With Explicit Schema Instructor for Universal Natural Language Understanding

Chengyuan Liu, Shihang Wang, Yangyang Kang, Fubang Zhao, Kun Kuang, Weiming Lu, Changlong Sun, Fei Wu

TL;DR

RexUniNLU is a novel encoder-based framework that unifies Information Extraction (IE) and Text Classification (CLS) under a single recursive architecture. By utilizing an Explicit Schema Instructor (ESI) and a recursive token-linking mechanism, it successfully extracts complex higher-order schemas (like quadruples and quintuples) and handles classification without the hallucinations and inefficiencies typical of generative Large Language Models (LLMs).

What Problem Does This Paper Address?

Natural Language Understanding (NLU) has traditionally been split into two core pillars: Information Extraction (IE) and Text Classification (CLS). While generative LLMs can technically handle both via prompting, they are notoriously prone to hallucinations—inventing labels or extracting text spans that don't exist in the source document—and their decoder-based architectures are computationally inefficient.

On the other hand, smaller, encoder-based Universal Information Extraction (UIE) models exist, but they suffer from two major flaws:

  1. Implicit Schema Constraints: They don't explicitly enforce schema rules, leading to illegal or illogical connections (e.g., assigning a "located in" relation to a person entity instead of a location).
  2. Structural Limitations: They are typically limited to extracting pairs of spans (triples), completely failing on higher-order data structures like quadruples or quintuples.

RexUniNLU bridges this gap by treating both IE and CLS as a unified task of mapping input sequences to pre-defined schemas, using a non-generative, highly controllable encoder framework.

Similarity between IE and CLS tasks

Methods

RexUniNLU introduces several key innovations to achieve a truly universal NLU framework:

  • Recursive Querying Mechanism: Instead of extracting an entire complex structure in one go, the model breaks the schema down into sequential steps. As shown in the paper's examples, it might first extract a Person entity, then use that extracted entity as context to query for an associated University, and subsequently query for the Academic Degree earned there.
  • Explicit Schema Instructor (ESI): The model constructs structural queries by concatenating the input text with explicit schema instructions and context prefixes. This ensures the model strictly adheres to valid entity-relation-attribute pathways.
  • Unified Token Linking: Rather than generating text, RexUniNLU employs an elegant pointer-based approach. It utilizes three token-linking operations—Token Head-Tail (for span detection), Token Head-Type, and Type-Token Tail—computed via a matrix multiplication layer enhanced with Rotary Position Embeddings (RoPE).
  • Prompts Isolation: To prevent multiple schema options within the same query from interfering with one another, the authors reset the position IDs and apply custom attention masks, blocking confusing information flow between distinct prompt sections.
  • Unifying Classification: To handle CLS tasks within an extraction framework, the authors introduce a special [CLST] token (such as [CLASSIFY] or [MULTICLASSIFY]). This token acts as a proxy for the entire text sequence, linking directly to the correct class labels in the schema.
The overall framework of RexUniNLU

Datasets

The authors pre-trained RexUniNLU on a massive corpus containing over 27 million instances across Chinese and English:

  • Distant Supervision Data ($D_{distant}$): 9.6 million instances aligned via distant supervision using Chinese Wikipedia and Baidu Encyclopedia.
  • Supervised NLU Data ($D_{superv}$): 18 million high-quality supervised Chinese instances spanning NER, RE, Event Extraction (EE), Aspect-Based Sentiment Analysis (ABSA), CLS, NLI, and Machine Reading Comprehension (MRC).
  • English Data ($Den$): A curated mix of 3 million distant supervision instances and classic benchmarks like OntoNotes, NYT, CrossNER, Few-NERD, SQuAD, and HellaSwag.

For evaluation, they tested on standard NLU benchmarks alongside complex schema datasets like HyperRED (quadruples) and Camera-COQE (quintuples).

Key Insights and Ideas

  • IE and CLS are Two Sides of the Same Coin: The fundamental insight is that both tasks map inputs to schemas. IE maps labels to specific segments of text, while CLS maps labels to the entirety of the text. Recognizing this allows a single pointer-based architecture to handle both.
  • Explicit Constraints Prevent Structural Errors: By forcing the model to follow an explicit schema tree, RexUniNLU completely eliminates the illegal type combinations that plague implicit UIE models.
  • Recursive Extraction Scales to $N$-ary Relations: Breaking down complex extraction into a multi-turn recursive process allows an encoder model to scale to quadruples and quintuples naturally, without needing task-specific heads.

Key Results

  • Leaderboard Dominance: The RexUniNLU Large and Base models claimed the top two spots on the competitive PCLUE (Prompt-based CLUE) benchmark leaderboard.
  • Zero-Shot and Few-Shot Superiority: In low-resource settings, RexUniNLUBase outperformed the previous state-of-the-art unified model (SiameseUniNLU) by an average of 26.25% in zero-shot scenarios.
  • Mastery of Higher-Order Schemas: On the quintuple extraction dataset Camera-COQE, RexUIE-EN achieved an F1 score of 32.80%, outperforming the competitive T5-UIE baseline by roughly 8% absolute.

Limitations and Future Work

While RexUniNLU shows massive improvements in low-resource and complex schema settings, the authors note that under full-shot settings, the performance gap between it and traditional task-specific baselines narrows to around 1%. Additionally, because the framework relies on recursive querying, deeply nested or highly complex schemas require multiple sequential forward passes, which could introduce latency overhead compared to single-pass joint extraction models. Future work will likely explore optimizing this inference efficiency.

Summary updated

BibTeX
@article{liu2025rexuninlu,
  author = {Chengyuan Liu and Shihang Wang and Yangyang Kang and Fubang Zhao and Kun Kuang and Weiming Lu and Changlong Sun and Fei Wu},
  title = {{RexUniNLU: Recursive Method With Explicit Schema Instructor for Universal Natural Language Understanding}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2025},
  url = {https://openreview.net/forum?id=wSHW9iCRLK},
}
Figure