Text Alignment Is An Efficient Unified Model for Massive NLP Tasks

Yuheng Zha, Yichi Yang, Ruichen Li, Zhiting Hu

TL;DR

This paper introduces ALIGN, a unified model that reframes a massive array of NLP tasks—from fact-checking to question answering—as a "text alignment" problem. By training a relatively small 355M-parameter RoBERTa model on 5.9 million examples, the authors achieve performance that matches or exceeds Large Language Models (LLMs) like FLAN-T5 (3B) and even GPT-4 on specific factual consistency benchmarks.

What Problem Does This Paper Address?

Current state-of-the-art NLP is dominated by Large Language Models (LLMs) trained on a next-word prediction objective. While incredibly general, this approach is often inefficient. To perform well on specific tasks like Natural Language Inference (NLI) or factual consistency, LLMs require hundreds of billions of parameters, yet they can still be outperformed by much smaller, task-specific models.

The challenge is the "generality-vs-efficiency" tradeoff. We want models that are unified (one model for many tasks) but don't require the massive computational overhead of a GPT-4. The authors argue that for a huge subset of NLP, the core problem isn't predicting the next word—it's determining if one piece of text "aligns" with or supports another.

Methods

The authors propose a Text Alignment framework. Given a pair of texts $(x_1, x_2)$, the model measures the degree to which the information in $x_2$ is supported by $x_1$.

Key technical components include:

  • Backbone: They use RoBERTa-large (355M parameters) as a lightweight, efficient starting point.
  • Unified Output Heads: Instead of task-specific heads, ALIGN uses three shared linear layers to produce a binary classification (Aligned vs. Not-Aligned), a 3-way classification (Entailment, Contradiction, Neutral), and a regression score (a continuous 0-1 value for similarity).
  • Split-then-Aggregate: To handle long inputs (like full documents) that exceed RoBERTa’s 512-token limit, they split the context into chunks and the target into sentences. They calculate alignment for each pair and aggregate the results using a "mean-max" strategy (finding the best-supporting chunk for each sentence, then averaging across sentences).
  • Training: They perform multi-task finetuning using a weighted sum of losses across 28 different datasets.

Datasets

The model was trained on 5.9 million examples aggregated from 28 datasets covering:

  • NLI: SNLI, MNLI, ANLI, DocNLI.
  • Fact Verification: FEVER, VitaminC.
  • Paraphrase & Similarity: QQP, PAWS, SICK, STSB.
  • Question Answering: SQuAD v2, RACE, BoolQ, etc.
  • Other: Information Retrieval (MS MARCO), Summarization (WikiHow), and Coreference Resolution (GAP).

They also evaluated the model on 9 zero-shot datasets (datasets the model never saw during training) to test its generalizability.

Key Insights and Ideas

  • Alignment as a Universal Primitive: The "aha moment" here is that tasks as diverse as coreference resolution, paraphrase detection, and factual consistency evaluation can all be mathematically reduced to the same alignment function.
ALIGN-large achieves comparable or superior performance to task-specific RoBERTa models across diverse datasets.
  • The "Verifier" Strategy: One of the most practical applications is using ALIGN as an "add-on" for LLMs. LLMs are notorious for "hallucinating" answers to unanswerable questions. ALIGN can act as a gatekeeper, checking if the LLM's generated answer is actually supported by the provided context.
  • Efficiency Beats Scale: The results suggest that a well-defined objective (alignment) on a medium-sized model can be more effective than a general objective (next-word prediction) on a massive model for NLU tasks.

Key Results

The ALIGN model demonstrates that massive parameter counts are not strictly necessary for top-tier performance on alignment-based tasks.

Performance comparison of ALIGN against LLMs across NLU, Factual Consistency, and QA tasks.
  • Superior Efficiency: The 355M ALIGN model outperformed FLAN-T5-large (780M) and matched FLAN-T5-xlarge (3B) across 20+ diverse NLU datasets.
  • Factual Consistency King: In evaluating the factual accuracy of generated text (across 23 datasets), ALIGN achieved higher correlation with human judgments than GPT-3.5 and, in some cases, GPT-4.
  • Boosting LLMs: When used as a verifier for GPT-3.5 on the SQuAD v2 dataset, ALIGN improved the Exact Match (EM) score by 17.94 points and the F1 score by 15.05 points simply by identifying which questions were unanswerable.
  • Zero-Shot Generalization: Even on datasets it wasn't trained on, ALIGN outperformed multi-task RoBERTa baselines, proving the alignment formulation is a robust way to learn semantics.

Limitations and Future Work

  • Sentence Independence Assumption: The "split-then-aggregate" method assumes that sentences in the target text ($x_2$) are self-contained. If the meaning of a sentence depends heavily on the previous one (discourse context), the model might lose information.
  • Inference Latency: For very long documents, the model must evaluate every combination of context-chunks and target-sentences, which can be computationally slow compared to a single-pass model.
  • Synthetic Data Quality: The authors used synthetic data to augment training. They noted that removing synthetic data actually improved performance slightly in some cases, suggesting that higher-quality synthetic generation is a path for future improvement.

Summary updated

BibTeX
@inproceedings{zha2023text,
  author = {Yuheng Zha and Yichi Yang and Ruichen Li and Zhiting Hu},
  title = {{Text Alignment Is An Efficient Unified Model for Massive NLP Tasks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=xkkBFePoFn},
}
Figure