Bayesian Learning for Neural Dependency Parsing

Ehsan Shareghi, Yingzhen Li, Yi Zhu, Roi Reichart, Anna KorhonenNAACL 2019

Abstract

Ehsan Shareghi, Yingzhen Li, Yi Zhu, Roi Reichart, Anna Korhonen. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).

2019.

Introduction

Dependency parsing is a fundamental task in Natural Language Processing (NLP), focused on identifying the grammatical structure of sentences by mapping relationships between words. While modern neural parsers have achieved remarkable accuracy, they typically rely on massive amounts of labeled data. This paper introduces the first Bayesian Neural Network for dependency parsing (BNNP), specifically designed to overcome the limitations of standard models in "small data" scenarios. By integrating efficient sampling techniques and adversarial multi-task learning, the BNNP achieves significant performance gains in low-resource languages.

The Challenge of Small-Data Dependency Parsing

Standard deep learning models for dependency parsing face two primary hurdles when training data is scarce:

  1. Overfitting: With limited examples, models tend to memorize specific training instances rather than learning generalizable linguistic patterns.
  2. Overconfidence: Traditional training via Maximum Likelihood Estimation (MLE) yields a single point estimate for model parameters, ignoring the inherent uncertainty present when evidence is thin.

A Bayesian approach addresses these issues by treating model parameters as a distribution rather than fixed values. This allows the model to "hedge its bets" and account for uncertainty, which is crucial for robust performance in data-starved environments.

Bayesian Neural Network Parser (BNNP) Architecture

The BNNP is built upon a strong BiLSTM-based architecture, enhanced with several key innovations to enable practical Bayesian inference and effective multi-task learning.

The BNNP architecture featuring adversarial multi-task learning with a shared BiLSTM and task-specific layers.

Stochastic Gradient Langevin Dynamics (SGLD)

Bayesian inference is traditionally computationally expensive for deep networks. To make it viable, the authors employ Stochastic Gradient Langevin Dynamics (SGLD). SGLD functions similarly to standard Stochastic Gradient Descent (SGD) but injects controlled Gaussian noise into the gradients at each step. This noise prevents the model from collapsing into a single point estimate, allowing it to sample from the posterior distribution of parameters. The researchers further utilized Preconditioned SGLD, which adjusts the noise and learning rate based on the loss surface geometry, accelerating convergence.

Adversarial Multi-Task Learning

To leverage auxiliary information, the parser is jointly trained with a Part-of-Speech (POS) tagger. To mitigate "task interference"—where one task's gradients negatively impact the other—the authors implemented an adversarial discriminator. This component, coupled with a gradient reversal layer, ensures that the shared BiLSTM layers learn features that are useful for both tasks without becoming biased toward either.

Minimum Bayes Risk (MBR) Decoding

During inference, the BNNP generates multiple sampled parsers. Instead of relying on a single output, it uses Minimum Bayes Risk (MBR) decoding, a voting-like mechanism that identifies the most consistent tree structure across the ensemble of samples.

Experimental Setup

The model was evaluated using the Universal Dependencies (UD) treebanks. The primary focus was on six low-resource languages with fewer than 5,000 training sentences: Farsi (fa), Korean (ko), Russian (ru), Turkish (tr), Vietnamese (vi), and Irish (ga). Cross-lingual experiments were also conducted, testing the model's ability to generalize from high-resource languages (English, French) to extremely low-resource ones (Kurmanji, Buriat).

Results and Analysis

The BNNP consistently outperformed strong baselines, including the state-of-the-art BiAFFINE parser.

Labeled Attachment Score (LAS) results for low-resource languages, comparing the Bayesian approach (SGLD, PRECOND) against strong baselines.

Key findings include:

  • Monolingual Gains: The Bayesian approach alone improved the Labeled Attachment Score (LAS) by up to 3% for languages like Vietnamese and Irish.
  • Multi-Task Synergy: When combined with adversarial training and preconditioned SGLD, the model achieved gains of up to 9% LAS compared to the BiAFFINE baseline in multi-task settings.
  • Uncertainty as a Feature: Analysis showed that capturing parameter uncertainty via SGLD is more effective than standard regularization techniques like Dropout in low-resource regimes.
  • Sampling Strategy: The authors found that "thinning"—selecting samples at specific intervals—outperformed using only the final samples, as it preserved greater diversity in the parameter space.

Conclusion and Future Directions

The BNNP demonstrates that Bayesian learning is a powerful tool for NLP tasks where data is a bottleneck. By explicitly modeling uncertainty and using adversarial techniques to clean shared representations, the parser achieves state-of-the-art results for several low-resource languages. Future work may explore the use of sparse priors to further refine feature selection and investigate more complex architectural adaptations for linguistically unique languages like Korean.

Summary updated

BibTeX
@inproceedings{shareghi2019bayesian,
  author = {Ehsan Shareghi and Yingzhen Li and Yi Zhu and Roi Reichart and Anna Korhonen},
  title = {{Bayesian Learning for Neural Dependency Parsing}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  url = {https://openreview.net/forum?id=HJE8nM-uWH},
}
Figure