TL;DR
This paper demonstrates that while different neural models (NMT, word2vec, sentiment analysis) all encode similar linguistic information like Part-of-Speech (POS), the geometric structure of their embedding spaces is fundamentally shaped by their specific training tasks. By using Principal Component Analysis (PCA), the author reveals that NMT decoders prioritize grammatical organization in their primary dimensions, while sentiment models naturally organize words into a "valence-intensity" triangle.
What Problem Does This Paper Address?
In Natural Language Processing (NLP), word embeddings are the foundational building blocks. We know from "probing" studies that these dense vectors contain a wealth of information (morphology, syntax, semantics). However, simply knowing that a piece of information can be extracted by a classifier doesn't tell us how that information is organized within the space.
The author investigates whether the specific objective a model is trained for (e.g., translating a sentence vs. predicting a movie rating) changes the internal "geography" of the vector space. Specifically, the paper looks at Czech—a morphologically rich language—to see how different architectures represent POS tags and sentiment.
Methods
The author employs a two-step analytical approach:
- Probing Classifiers: A simple Multi-Layer Perceptron (MLP) is trained to predict POS tags from fixed embeddings. This confirms the information is present.
- PCA Correlation: To see the structure, the author applies Principal Component Analysis (PCA) to the embeddings. They then calculate the correlation between these principal components and binary vectors representing categorical data (like "is this word a noun?").
This method is insightful because PCA identifies the directions of maximum variance. If a POS category correlates highly with the first few PCA dimensions, it means the model has "decided" that this linguistic feature is one of the most important factors for organizing its knowledge.
Datasets
- CzEng: A large Czech-English parallel corpus used for training the NMT models and the word2vec (Skip-gram) model.
- CSFD CZ: A dataset of Czech film movie reviews used to train the sentiment analysis CNN.
- MorfFlex: A high-quality morphological dictionary for Czech, used to provide the ground-truth POS tags for evaluation.
Key Insights and Ideas
- The Task Shapes the Space: Even when models achieve similar accuracy in predicting POS tags, their internal structures differ wildly. In NMT decoders, POS information is "front and center" in the first few PCA dimensions because the decoder needs strict grammatical structure to generate valid sentences. In word2vec, this information is more "scattered" across higher dimensions.
- The Sentiment Triangle: The sentiment model's embedding space isn't just a line from "bad" to "good." PCA reveals a triangular distribution where the first dimension represents valence (positive vs. negative) and the second represents intensity (neutral vs. extreme). Words that are highly positive or negative are also high-intensity, while neutral words cluster at the "low intensity" tip of the triangle.
- Functional Clustering: PCA reveals that models naturally group words with similar functional roles. For example, word2vec clusters infinitive verbs separately from modal verbs, and NMT models tend to isolate named entities (proper nouns) into distinct sub-clusters within the noun space.
Key Results
- POS Probing: All models (RNN, Attention, Transformer, word2vec) allowed for high-accuracy POS prediction, ranging from 93.36% to 97.77%. The RNN NMT Decoder was the most "organized" regarding POS.
- NMT Encoder vs. Decoder: In the RNN NMT Encoder, the first PCA dimension strongly distinguishes verbs from nouns. In the Decoder, the first dimension distinguishes adjectives from nouns, and the second isolates verbs.
- Word2vec Nuance: Unlike the task-specific models, word2vec embeddings look more normally distributed in the first two dimensions. The categorical linguistic structure only becomes apparent in dimensions 3 through 5.
- Sentiment Alignment: The sentiment model showed almost zero correlation with POS tags in its primary dimensions, proving that it successfully "ignored" syntax to focus entirely on emotional properties.
Limitations and Future Work
- Linearity of PCA: PCA is a linear transformation. While it revealed significant structure, it might miss more complex, non-linear manifolds where information could be hidden.
- Language Specificity: The study focuses exclusively on Czech. While the findings likely generalize to other morphologically rich languages, the specific "shapes" of the spaces might differ for more analytic languages like English.
- Future Directions: The author suggests extending this method to examine how other types of information (like semantic roles or syntactic dependencies) are geometrically represented across different languages and tasks.
Summary updated