Abstract
Modern sentence embeddings primarily focus on semantic meaning, often overlooking grammatical structure. This paper introduces a novel approach to generating sentence representations that explicitly capture syntax by training a sequence-to-sequence model to translate sentences into Universal Part-of-Speech (UPOS) tags across multiple languages. The resulting embeddings demonstrate superior syntactic clustering capabilities, outperforming state-of-the-art models like BERT and LASER, even in cross-lingual and low-resource scenarios.
Introduction
While large-scale language models like BERT and RoBERTa excel at semantic tasks, they frequently struggle to distinguish between sentences with identical meanings but different structures, or vice versa. Explicit syntactic information is vital for specialized NLP tasks such as authorship identification and writing-style analysis. Furthermore, many low-resource languages lack the extensive treebanks required for traditional syntactic parsing. This work explores an efficient method to learn structural representations using significantly less data and fewer parameters than standard large language models.
Methodology: Syntax Distillation via UPOS Prediction
The proposed architecture adapts the Language-Agnostic Sentence Representations (LASER) framework into a sequence-to-sequence model designed for syntactic extraction.
The model consists of two primary components:
- Encoder: A two-layer Bi-directional LSTM that processes input sentences (tokenized via Byte-Pair Encoding) into a fixed-size sentence embedding. The encoder remains language-agnostic.
- Decoder: Unlike traditional translation models, the decoder predicts the sequence of Universal Part-of-Speech (UPOS) tags for the target sentence.
By using UPOS tags as the target, the model is forced to ignore lexical semantics and focus on the underlying grammatical "blueprint." This "syntax distillation" process creates a bottleneck that filters out word-level meaning in favor of structural patterns.
Experimental Setup and Datasets
The model was trained on 1.36 million translation pairs from Tatoeba and 1.9 million aligned pairs from OpenSubtitles. The primary training set included English, Spanish, German, Dutch, Korean, and Chinese. To evaluate generalization, the researchers tested the model on "unseen" languages including French, Portuguese, and Indonesian.
Key Results
The model's performance was evaluated using a Nearest-Neighbor (NN) test to determine how well it clusters sentences with identical UPOS sequences.
Key findings include:
- Superior Syntactic Clustering: The proposed model achieved a 1-NN accuracy of 97.27% for English, significantly higher than BERT_max (90.19%) and the original LASER (86.33%).
- Cross-Lingual Transfer: The model successfully represented the syntax of languages not seen during training. For instance, fine-tuning on just 10,000 French sentence pairs improved 1-NN accuracy from a zero-shot 35% to over 58%.
- Efficiency: Despite having fewer parameters than BERT, the model demonstrated a stronger correlation between embedding distance and grammatical edit distance across all tested languages.
Discussion and Future Work
While the model shows robust performance, its effectiveness is somewhat sensitive to language family relationships; transfer learning is most successful between structurally similar languages. Additionally, the embedding quality is inherently limited by the accuracy of the automated taggers used to generate training targets. Future research will focus on "disentangling" syntax and semantics within a single embedding space and expanding the methodology to a broader range of language families, such as Afro-Asiatic or Indic languages.
Reference: Liu, C., de Andrade, A., & Osama, M. (2019). Exploring Multilingual Syntactic Sentence Representations. Proceedings of the 2019 EMNLP Workshop W-NUT.
Summary updated