CSSL: Contrastive Self-Supervised Learning for Dependency Parsing on Relatively Free Word Ordered and Morphologically Rich Low Resource Languages

Pretam Ray, Jivnesh Sandhan, Amrith Krishna, Pawan Goyal

Introduction

In languages like English, word order is a primary signal for grammatical relationships. However, many Morphologically-Rich Languages (MRLs)—such as Sanskrit, Turkish, or Telugu—encode these relationships through word endings (morphology) rather than position. This allows for "relatively free word order," where words can be shuffled without changing the core meaning or the underlying dependency structure.

Modern NLP models, particularly Transformers, rely heavily on position encodings. While effective for fixed-order languages, these encodings can be a liability for MRLs because they force the model to over-rely on word position rather than morphological markers. Simply removing these encodings often degrades performance because pretrained models (like mBERT) are tuned to expect them. This paper introduces Contrastive Self-Supervised Learning (CSSL), a framework designed to make dependency parsers robust to word order variation without losing the benefits of pretraining.

Dependency structures remain invariant under word order permutations in Sanskrit.

The CSSL Framework

The authors propose a modular CSSL module that can be integrated into existing graph-based parsing architectures. The core idea is to train the model to recognize that a sentence and its random permutations share the same structural meaning.

Methodology

  1. Positive Pairs: For every sentence (the "anchor"), the system generates a random permutation of its words. Since the morphology remains the same, the dependency tree remains valid. This permuted sentence serves as a "positive" example.
  2. Negative Pairs: Other sentences within the same training batch are treated as "negative" examples.
  3. Contrastive Loss: The model is trained using a contrastive loss function ($L_{CSSL}$) that minimizes the distance in vector space between the anchor and its permutation, while maximizing the distance from unrelated sentences.
  4. Joint Training: This contrastive objective is trained alongside the standard cross-entropy loss ($L_{CE}$) for dependency parsing.

By forcing the model’s latent space to be invariant to permutations, the model learns to focus more on morphological markers and less on absolute positioning.

Experimental Setup

The study evaluates the method across a diverse set of languages to test its generalizability:

  • Primary Benchmark: The Sanskrit Treebank Corpus (STBC).
  • Low-Resource MRLs (LRL): Six languages from the Universal Dependencies (UD-2.13) collection: Turkish, Telugu, Gothic, Hungarian, Ancient Hebrew, and Lithuanian.
  • Controls: High-resource Turkish (Turkish-PENN) and English (a fixed-word-order, non-MRL control).

Key Results and Discussion

The CSSL framework demonstrated consistent improvements over strong baselines, such as the RNGTr model. Across seven MRLs, the method provided an average gain of 3.03 points in UAS (Unlabeled Attachment Score) and 2.95 points in LAS (Labeled Attachment Score).

Performance comparison of CSSL across various low-resource and high-resource languages.

Key Insights

  • The Position Encoding Dilemma: The authors found that removing position encodings entirely caused a massive drop in performance (approx. 9 points). CSSL provides a necessary middle ground—keeping the encodings but training the model to be less sensitive to the specific order they represent.
  • Complementary to Data Augmentation: CSSL outperforms standard data augmentation (DA) techniques like "Rotation." When CSSL and DA are used together, they provide an even greater boost, suggesting they capture different types of linguistic robustness.
  • Language Specifics: The highest gains were seen in Turkish-IMST (+5.35 UAS) and Telugu (+3.77 UAS). Conversely, the method did not significantly help English, confirming that the benefits are specific to the linguistic properties of MRLs.

Conclusion

CSSL offers a robust solution for dependency parsing in low-resource, morphologically rich languages. By leveraging permutation invariance through contrastive learning, the model achieves significant performance gains without requiring changes to the underlying pretraining phase. Future work may explore the explicit integration of morphological features and scaling the method to a broader range of languages within the Universal Dependencies collection.

Summary updated

BibTeX
@inproceedings{ray2024cssl,
  author = {Pretam Ray and Jivnesh Sandhan and Amrith Krishna and Pawan Goyal},
  title = {{CSSL: Contrastive Self-Supervised Learning for Dependency Parsing on Relatively Free Word Ordered and Morphologically Rich Low Resource Languages}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.482},
}
Figure