Abstract
Dataset embeddings—vector representations signaling a model's data source—are a popular technique for training on heterogeneous data. However, their effectiveness is highly conditional. This paper investigates their impact across mono-lingual, multi-lingual, and zero-shot conditions for morphosyntactic tasks. We find that while they provide significant boosts for small datasets and seen distributions, their benefits largely vanish in zero-shot settings or when data source labels must be predicted automatically.
Introduction
In modern NLP, models are frequently trained on a "mishmash" of data: different languages, domains (e.g., news vs. social media), or annotation styles. To help models navigate this heterogeneity, researchers use dataset embeddings. These are learned vectors concatenated to input representations that specify the data source (e.g., "this sentence is from the English EWT treebank").
While previous work showed these embeddings help, several "blind spots" remained: the assumption of known "gold" labels at test time, the assumption of seen distributions, and variability across different tasks and language groupings. This study addresses these gaps through a large-scale evaluation.
Methodology
The authors evaluate dataset embeddings across three morphosyntactic tasks: morphological tagging, lemmatization, and dependency parsing. The core architecture involves a BiLSTM encoder. As shown in Figure 1, for every word $w_i$, a learned dataset embedding $e(d)$ is concatenated with the word representation $e(w_i)$ before being fed into the contextual encoder.
The researchers tested three main scenarios:
- BASE: Training on a single dataset.
- CONCAT: Training on a concatenation of multiple datasets without embeddings.
- GOLD/PRED: Using dataset embeddings with either ground-truth labels or labels predicted by a linear SVM classifier.
Experimental Setup
The study utilizes 104 datasets covering 66 languages from the Universal Dependencies (UD) collection. They employed two grouping strategies: typological/manual groups based on language relatedness and word overlap pairings based on shared vocabulary.
Results and Discussion
Impact of Dataset Size
The most dramatic performance gains occur in low-resource scenarios. If a dataset has fewer than 50,000 words, dataset embeddings act as a powerful regularizer, allowing the model to "borrow" knowledge from larger related datasets without getting confused by their differences.
Mono-lingual vs. Multi-lingual Effectiveness
Embeddings are most effective when used to distinguish between different domains within the same language. In multi-lingual setups, the differences between languages are often so stark that the model struggles to transfer relevant information effectively, even with embeddings.
The Zero-shot and Prediction Bottlenecks
When the model encounters a dataset it hasn't seen during training (zero-shot), the benefit of dataset embeddings almost entirely disappears. Furthermore, if gold labels are unavailable at test time and must be predicted (the PRED setting), the performance boost is significantly diluted, especially in mono-lingual groups where datasets are harder for a classifier to tell apart.
Conclusion
Dataset embeddings are not a "silver bullet" for domain adaptation. Their main limitation is their reliance on seen distributions; they fail to generalize to truly unseen data. Future work might explore more sophisticated ways to generate embeddings for unseen data, perhaps by using continuous metadata like geographic coordinates or temporal markers rather than discrete dataset IDs.
Summary updated