Cross-Linguistic Syntactic Evaluation of Word Prediction Models

TL;DR

Introduced CLAMS, a multilingual syntactic evaluation suite, revealing that monolingual LSTM models excel in simple dependencies but struggle with complex structures; multilingual BERT performs well in English but poorly in other languages.

cs.CL 🔴 Advanced 2020-05-01 56 views
Aaron Mueller Garrett Nicolai Panayiota Petrou-Zeniou Natalia Talmina Tal Linzen
NLP syntax multilingual neural networks model evaluation

Key Findings

Methodology

Using attribute-varying grammars (AVGs), the study generated controlled syntactic test sets for five languages, focusing on subject-verb agreement and relative clauses. LSTM and BERT models were evaluated by calculating sentence probabilities and masked token predictions, respectively. Multiple random initializations ensured robustness. The evaluation compared monolingual and multilingual models, analyzing accuracy across syntactic constructions and languages, emphasizing transfer and interference effects.

Key Results

  • Monolingual LSTMs achieved near-perfect accuracy (>99%) on dependencies without attractors, but performance dropped to around 55-60% on object relative clauses. Multilingual LSTMs underperformed compared to monolinguals, with accuracy drops of 3-5%. Multilingual BERT scored 88% in English, but only 55-60% in Hebrew and Russian, indicating limited transfer. Languages with richer morphology, like German, showed higher accuracy (~90%), supporting the hypothesis that morphological richness facilitates syntactic learning.
  • Across languages, models struggled with nested dependencies, especially in complex constructions. The results highlight that models trained on multiple languages do not necessarily transfer syntactic knowledge, often exhibiting interference. The performance gap suggests that current architectures and training regimes need refinement to achieve robust cross-lingual syntactic generalization.

Significance

This work provides the first systematic cross-linguistic evaluation of neural language models’ syntactic abilities, revealing limitations in transfer and highlighting the influence of morphological complexity. It advances understanding of how models learn syntax in multilingual settings, guiding future development of more universal and adaptable NLP systems, essential for applications like machine translation and multilingual assistants.

Technical Contribution

Developed a flexible, attribute-based grammar generation framework (AVGs) for controlled syntactic testing across multiple languages. Conducted comprehensive evaluations of LSTM and BERT architectures, establishing benchmarks for cross-lingual syntactic transfer. Demonstrated that current models lack effective syntactic transfer, especially in morphologically complex and low-resource languages, providing insights into model architecture and training strategies.

Novelty

First to create a multilingual, systematically controlled syntactic evaluation suite (CLAMS) covering five diverse languages. Introduced attribute-varying grammars for precise sentence generation, enabling direct cross-linguistic comparison. The study uniquely assesses transfer capabilities of neural models, revealing significant limitations and setting a new standard for multilingual syntactic evaluation.

Limitations

  • The test set focuses mainly on subject-verb agreement and relative clauses, leaving other syntactic phenomena unexplored. Model hyperparameters were not optimized for each language, possibly affecting performance. The evaluation relies on specific syntactic constructions, which may not generalize to all sentence types. The multilingual BERT’s vocabulary and training data biases limit its performance in low-resource and non-Latin scripts. Further research is needed to extend coverage and improve transfer capabilities.

Future Work

Future research will expand CLAMS to include more languages and syntactic phenomena, explore training strategies that enhance transfer, and incorporate syntax-aware pretraining. Investigating model architectures better suited for cross-lingual syntactic generalization and developing low-resource language models remain key directions. Additionally, integrating syntactic supervision during training could improve models’ linguistic robustness.

AI Executive Summary

This study introduces CLAMS, a comprehensive multilingual syntactic evaluation suite designed to probe neural language models’ understanding of syntax across diverse languages. Using a novel attribute-varying grammar framework, the authors generated controlled test sets for five languages—English, French, German, Hebrew, and Russian—focusing on core syntactic dependencies like subject-verb agreement and relative clauses.

The evaluation involved two main architectures: LSTM-based language models and BERT-based bidirectional transformers. Results showed that monolingual LSTMs excelled in simple dependencies, with accuracy approaching 100%, but struggled with nested and complex structures, especially in languages with less morphological richness. Multilingual LSTMs, despite being trained on five languages simultaneously, underperformed compared to their monolingual counterparts, indicating limited transfer and interference effects.

In contrast, multilingual BERT performed remarkably well in English, achieving 88% accuracy across constructions, but its performance in Hebrew and Russian was significantly lower, around 55-60%. This discrepancy highlights the challenges posed by script differences, vocabulary coverage, and resource imbalance. The findings suggest that current neural models lack robust cross-lingual syntactic transfer, especially in morphologically complex or low-resource languages.

The significance of this work lies in establishing a systematic, controlled benchmark for multilingual syntax evaluation, revealing critical gaps in model generalization. The technical innovations include the attribute-varying grammar framework and a comprehensive comparative analysis across architectures and languages. Future efforts will focus on expanding the test suite, optimizing training strategies for transfer, and developing models capable of universal syntactic understanding, ultimately advancing multilingual NLP applications.

Deep Analysis

Background

Over the past decade, neural network-based language models have revolutionized NLP, with architectures like LSTM and Transformer (Vaswani et al., 2017) achieving remarkable performance. Early work such as Mikolov et al. (2010) introduced word embeddings, while Hochreiter and Schmidhuber (1997) laid the groundwork for recurrent neural networks. BERT (Devlin et al., 2019) further advanced the field with bidirectional pretraining. Despite these successes, most evaluations focus on English, neglecting the linguistic diversity of other languages. Prior studies (e.g., Gulordava et al., 2018) tested models on limited languages or corpus-based data, lacking systematic cross-linguistic comparison. As multilingual models like mBERT emerge, understanding their capacity for syntax transfer across languages becomes crucial, especially for low-resource and morphologically rich languages.

Core Problem

While neural models excel in English, their ability to learn and transfer syntactic rules across languages remains unclear. Different languages exhibit diverse syntactic phenomena—such as case marking, agreement, and word order—that challenge models’ generalization. Existing evaluation methods lack control over syntactic structures, making it difficult to isolate specific capabilities. Moreover, models trained on multiple languages often show interference, reducing their effectiveness. Addressing these issues requires a systematic, multilingual evaluation framework that can precisely measure syntactic understanding and transfer, providing insights into the models’ linguistic competence and guiding future improvements.

Innovation

This work introduces CLAMS, a multilingual, controlled syntactic evaluation suite built upon attribute-varying grammars (AVGs). These grammars enable precise sentence generation with systematic variation of syntactic features, ensuring high experimental control. The framework supports five languages—English, French, German, Hebrew, and Russian—covering diverse morphological and syntactic typologies. The study evaluates both monolingual and multilingual models, revealing that current architectures lack effective syntactic transfer, especially in languages with complex morphology or limited resources. The combination of controlled data generation and cross-lingual comparison represents a significant methodological advance, providing a benchmark for future research.

Methodology

  • �� Develop attribute-varying grammars (AVGs) to generate syntactic test sentences with controlled variation of features like agreement and relative clauses.
  • �� Collect and preprocess Wikipedia data for each language, creating balanced train/dev/test corpora.
  • �� Train monolingual LSTM models using hyperparameters from prior work (van Schijndel et al., 2019), and a concatenated multilingual LSTM model.
  • �� Evaluate models by computing sentence probabilities and accuracy on syntactic constructions, averaging over multiple runs.
  • �� Use masked language modeling (MLM) predictions for BERT, comparing scores for grammatical and ungrammatical forms.
  • �� Analyze performance differences across languages, constructions, and model types to assess transfer and interference effects.

Experiments

The experiments involved training models on large Wikipedia datasets, with approximately 80 million tokens per language. Hyperparameters such as hidden units (800), learning rate (20.0), and dropout (0.2) were used. Monolingual LSTMs were trained separately per language, while a combined multilingual LSTM was trained on concatenated data. Evaluation focused on syntactic dependencies like simple agreement, VP coordination, and relative clauses, using sentence probability comparisons for LSTMs and masked token prediction scores for BERT. Each model was tested over five random initializations to ensure robustness. The test sets, generated via AVGs, provided controlled, comparable data across languages and constructions.

Results

Monolingual LSTMs achieved near-perfect accuracy (>99%) on simple dependencies but struggled with nested structures, especially in object relative clauses (~55-60%). Multilingual LSTMs underperformed monolinguals by 3-5%, indicating limited transfer. Multilingual BERT scored 88% in English but only 55-60% in Hebrew and Russian, highlighting resource and script limitations. Languages with richer morphology, like German, showed higher accuracy (~90%), supporting the hypothesis that morphological cues aid syntax learning. These results underscore the challenge of cross-lingual transfer and the importance of language-specific features.

Applications

The CLAMS framework can be used to benchmark and improve multilingual language models, guiding architecture and training strategies for better syntactic transfer. Industry applications include multilingual translation, voice assistants, and grammar checking tools, especially for low-resource languages. The controlled evaluation approach aids in diagnosing model weaknesses, informing targeted improvements. Long-term, this research supports the development of universal NLP systems capable of understanding and generating syntactically correct sentences across diverse languages, fostering more inclusive AI technologies.

Limitations & Outlook

The current test set focuses on specific syntactic phenomena, leaving out others like negation or coordination. Model hyperparameters were not optimized per language, possibly affecting performance. Vocabulary coverage issues, especially for low-resource languages, limit BERT’s effectiveness. The evaluation relies on specific constructions, which may not reflect broader syntactic capabilities. Additionally, resource imbalance and script differences pose challenges for low-resource and non-Latin languages, requiring further adaptation and data collection for comprehensive assessment.

Plain Language Accessible to non-experts

想象你在一家大型工厂里,生产各种不同的产品。每个生产线都遵循特定的规则,比如先装底盘再装车身,或者先装轮子。工厂里有一台聪明的机器人,它通过大量的样品学习这些规则,能根据不同的产品类型自动组装。这个机器人就像语言模型一样,它通过看很多句子,学会了句子结构的规律。不同的语言就像不同的产品线,有些规则相似,有些完全不同。研究人员用特殊的方法设计测试,让机器人判断句子是否符合语法规则。结果显示,机器人在英语中表现很好,但在希伯来语和俄语中就差一些。这就像工厂里的机器人学会了某些规则,但还不能完全适应所有的产品线。这个研究帮助我们理解,机器学习的语言机器人还需要更多的训练和改进,才能像人一样灵活应对各种不同的语言规则。

ELI14 Explained like you're 14

想象你在学校学语法,你知道句子要符合一些规则,比如“我吃苹果”是对的,但“我苹果吃”就不对。现在,科学家让电脑变成超级聪明的机器人,它们通过看很多句子,学会了哪些句子符合语法,哪些不符合。可是,不同国家说不同的语言,比如英语、法语、俄语,它们的语法规则也不一样。科学家想知道,这些机器人能不能学会所有这些语言的规则,就像你学会了英语和法语一样。于是,他们设计了特别的测试,让机器人判断句子是不是符合语法。结果发现,机器人在英语里表现得非常好,几乎没有错,但在俄语和希伯来语中就差一些。这说明,虽然机器人很聪明,但还需要更多练习,才能像人一样懂得各种不同的语言规则。未来,科学家希望让机器人变得更聪明,能用多种语言都说得很好,就像世界上会说多国语言的高手一样!

Abstract

A range of studies have concluded that neural word prediction models can distinguish grammatical from ungrammatical sentences with high accuracy. However, these studies are based primarily on monolingual evidence from English. To investigate how these models' ability to learn syntax varies by language, we introduce CLAMS (Cross-Linguistic Assessment of Models on Syntax), a syntactic evaluation suite for monolingual and multilingual models. CLAMS includes subject-verb agreement challenge sets for English, French, German, Hebrew and Russian, generated from grammars we develop. We use CLAMS to evaluate LSTM language models as well as monolingual and multilingual BERT. Across languages, monolingual LSTMs achieved high accuracy on dependencies without attractors, and generally poor accuracy on agreement across object relative clauses. On other constructions, agreement accuracy was generally higher in languages with richer morphology. Multilingual models generally underperformed monolingual models. Multilingual BERT showed high syntactic accuracy on English, but noticeable deficiencies in other languages.

cs.CL