Introduction
Understanding the internal representations of large language models (LLMs) like BERT is a central challenge in modern NLP. While previous research has utilized "probes"—lightweight models trained on frozen embeddings—to detect syntactic information, these efforts were largely restricted to undirected or unlabeled structures. This paper introduces DEPPROBE, the first lightweight linear probe capable of extracting fully directed and labeled dependency trees. DEPPROBE demonstrates that frozen embeddings contain a comprehensive structural blueprint of language, enabling accurate cross-lingual transfer predictions with a fraction of the parameters required by full parsers.
Methodology
DEPPROBE reconstructs dependency trees by projecting embeddings into two distinct subspaces using simple linear transformations:
- Structural Subspace ($B$): A matrix that maps embeddings into a space where Euclidean distances reflect the distance between words in a syntax tree.
- Relational Subspace ($L$): A matrix used to classify the specific grammatical relationship (e.g., "subject," "object") for each word.
Unlike traditional parsers that rely on $O(n^3)$ dynamic programming, DEPPROBE employs a greedy $O(n^2)$ algorithm. It identifies the sentence root via the $L$ matrix and constructs the tree based on minimum distances in the $B$ matrix. This approach uses approximately 127k parameters—three orders of magnitude fewer than a standard 183M-parameter biaffine attention parser (BAP).
Experimental Setup
The model was evaluated using Universal Dependencies (UD) v2.8, covering 13 typologically diverse languages across multiple families, including Indo-European (English, Russian), Afro-Asiatic (Arabic, Hebrew), and others such as Japanese, Basque, and Finnish. Hyperparameter tuning was conducted on the English EWT treebank.
Results and Discussion
Experimental results confirm that mBERT organizes its internal geometry to mirror formal linguistic structures. A key finding is the layer-wise specialization of syntactic information: structural information (tree shape) peaks at Layer 6, while relational labels peak at Layer 7.
DEPPROBE serves as a highly effective proxy for full parser performance. It identifies the optimal source language for cross-lingual transfer 94% of the time, with a correlation of $\rho = 0.97$ to full-scale models. While the probe achieves a mean Labeled Attachment Score (LAS) of 60—lower than a full parser—the performance gap narrows significantly in zero-shot cross-lingual scenarios. The probe excels at identifying functional relations (e.g., determiners) but faces challenges with complex clausal relations that typically require non-linear reasoning.
Conclusion
DEPPROBE provides a computationally efficient framework for diagnosing the syntactic knowledge of language models. Future work may extend this probing technique to evaluate newer multilingual models like XLM-R or to optimize training data selection by identifying the most beneficial syntactic signals across languages.
Summary updated