Local String Transduction as Sequence Labeling

Joana Ribeiro, Shashi Narayan, Shay B. Cohen, Xavier Carreras

Introduction

In Natural Language Processing, string transduction refers to the mapping of one character sequence to another. This task is foundational for applications such as spelling correction (e.g., mapping "saty" to "said") and morphological inflection (e.g., changing a verb tense). Historically, this process has been challenging because input and output strings often differ in length due to insertions and deletions, necessitating complex sequence-to-sequence (seq2seq) models or finite-state transducers.

While seq2seq models are powerful, they are often computationally expensive and can be "overkill" for tasks where changes are local and monotonic. This paper proposes a simpler, more efficient alternative: framing string transduction as a sequence labeling problem. By transforming the input to align with the output length, the authors demonstrate that standard tagging algorithms can outperform heavy-duty neural architectures on local transduction tasks.

The Transduction-as-Labeling Framework

The core innovation of this work is a two-step framework called Transduction as Insertion and Labeling. Sequence labeling traditionally requires a one-to-one mapping between input and output elements. To bridge the gap for strings of unequal length, the authors introduce a preprocessing step:

  1. Predicting Insertions: An "insertion context function" ($\sigma$) identifies potential positions where new characters might be needed. The model inserts placeholder symbols ($\epsilon$) at these locations. For instance, the word "say" might be expanded to "say$\epsilon$" to accommodate a future character.
  2. Sequence Labeling: With the strings aligned, standard labeling models—such as BiLSTMs, Conditional Random Fields (CRFs), and Refinement HMMs—are used to predict the final characters. If a placeholder is unnecessary, the labeler assigns a special "delete" ($D$) tag. Similarly, original characters that should be removed are also tagged for deletion.
Architectural overview of the sequence labeling models: BiLSTM (left), CRF (center), and the refinement HMM (right).

This approach leverages the efficiency of the Viterbi algorithm for decoding and capitalizes on the strong local context inherent in sequence labelers. By over-inserting placeholders and then pruning them, the model simplifies the learning objective: deletion becomes a simpler decision than generation.

Experimental Evaluation

The proposed method was evaluated across three distinct linguistic tasks:

  • Twitter Spelling Correction: A corpus of ~39,000 word pairs from social media.
  • Finnish OCR Correction: ~36,000 word pairs from historical newspapers, focusing on errors from Optical Character Recognition.
  • Morphological Inflection: German verb conjugations from the CELEX database.

Key Results and Discussion

The results indicate that reducing transduction to sequence labeling is not only viable but often superior to more complex models. On the Twitter spelling correction task, the BiLSTM-based labeling approach achieved an accuracy of 64.6%, significantly outperforming the standard seq2seq baseline of 46.3%.

Performance comparison across various transduction methods on the spelling correction task, highlighting the superiority of the BiLSTM labeling approach.

As shown in the table above, the inclusion of a training dictionary ("+train") further boosted performance across all labeling methods. The authors argue that seq2seq models are often too expressive for these tasks; by attempting to model global dependencies, they may fail to capture the local patterns that sequence labelers prioritize. In contrast, enforcing a monotonic (left-to-right) mapping makes the labeling models more robust and faster to train.

Conclusion and Future Work

This research demonstrates that for tasks characterized by local, monotonic changes, sequence labeling is a highly effective alternative to seq2seq architectures. While the current method is limited to character-level transformations and cannot handle re-ordering (as required in machine translation), it provides a powerful tool for many common NLP problems.

Future work may involve integrating the insertion function directly into the neural architecture to move away from heuristic-based placeholders, potentially expanding the framework to word-level transduction tasks like sentence simplification.

Summary updated

BibTeX
@inproceedings{ribeiro2018local,
  author = {Joana Ribeiro and Shashi Narayan and Shay B. Cohen and Xavier Carreras},
  title = {{Local String Transduction as Sequence Labeling}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2018},
}
Figure