Constrained Sequence-to-sequence Semitic Root Extraction for Enriching Word Embeddings

Ahmed El-Kishky, Xingyu Fu, Aseel Addawood, Nahil A. Sobh, Clare R. Voss, Jiawei Han

Introduction

Semitic languages, such as Arabic and Hebrew, present a unique challenge for Natural Language Processing (NLP) due to their non-concatenative morphology. Unlike languages that primarily use prefixes and suffixes, Semitic languages rely on a system of roots—typically three consonants—and patterns. To form a word, these root consonants are interleaved or "interdigitated" with other letters. For instance, the Arabic root K-T-B (associated with writing) can manifest as KaTaBa (he wrote), KiTaB (book), or maKTaBa (library).

This structure leads to significant data sparsity. Standard models often fail to recognize that dozens of distinct surface forms share a common semantic core. Traditional root extraction methods frequently rely on rigid, human-curated rules that struggle with the complex, non-contiguous nature of these languages. This paper proposes a constrained sequence-to-sequence (seq2seq) model to automate root extraction and leverage these roots to enrich word embeddings.

Methodology

Constrained Seq2Seq Root Extraction

The authors treat root extraction as a translation task from a surface word to its root. The architecture consists of two main components:

  1. Encoder: A bi-directional Gated Recurrent Unit (BiGRU) processes the input word character-by-character, creating a dense hidden representation that captures the sequential context of the letters.
  2. Decoder: A GRU-based decoder generates the root character-by-character.
The proposed Encoder-Decoder architecture for root extraction.

To prevent the model from "hallucinating" invalid character sequences, the authors implement Constrained Beam Search. All known valid roots from a dictionary are stored in a Trie (prefix tree). During the decoding phase, the model is restricted to choosing characters that form a valid prefix within the Trie. This effectively transforms the generation task into a highly informed classification task, ensuring the output is always a linguistically valid root.

Trie-based constrained decoding to ensure valid root generation.

TemplaticVec: Morpheme-Enriched Embeddings

Once roots are extracted, the authors introduce TemplaticVec. This approach decomposes a word into a "template" consisting of five components: the root, a prefix, a suffix, and two internal slots for interdigitated morphemes. By modifying the FastText architecture, they represent a word as the sum of embeddings for these specific linguistic slots rather than arbitrary character n-grams. This allows for better semantic sharing across different words derived from the same root.

Datasets and Evaluation

The model was trained and evaluated using:

  • Arabic: 140,000 word-root pairs from a classical dictionary.
  • Hebrew: 11,500 word-root pairs from Wiktionary.
  • Corpus: Arabic Wikipedia (62.5M tokens) for training word embeddings and evaluating language modeling.

Key Results

  • High Accuracy: The constrained seq2seq model (Constrain-S2S) achieved 83.24% accuracy on Arabic and 98.79% on Hebrew, outperforming standard multiclass classifiers and unsupervised stemmers.
  • Zero-Shot Capability: The model identified roots it had never encountered during training with 62.92% accuracy, indicating it learned the underlying morphological logic of the language.
  • Downstream Performance: TemplaticVec significantly improved performance in morphemic analogies (e.g., tense or gender shifts) and achieved lower perplexity in language modeling tasks compared to standard SkipGram and FastText models.

Discussion and Limitations

While the model is highly effective, it operates on individual words in isolation. In Semitic languages, some surface forms are ambiguous and require sentence-level context for correct root disambiguation. Additionally, the reliance on a pre-defined Trie means the model may struggle with neologisms or roots not present in its dictionary. Future work may involve integrating context-awareness and more complex linguistic templates to further refine the extraction process.

Summary updated

BibTeX
@inproceedings{elkishky2019constrained,
  author = {Ahmed El-Kishky and Xingyu Fu and Aseel Addawood and Nahil A. Sobh and Clare R. Voss and Jiawei Han},
  title = {{Constrained Sequence-to-sequence Semitic Root Extraction for Enriching Word Embeddings}},
  booktitle = {WANLP @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-4610},
}
Figure