Abstract
Transfer learning in deep learning has primarily focused on unary features, such as word embeddings or CNN feature vectors, while relying on architectural priors (e.g., local connectivity in CNNs) to handle relationships between data units. We introduce GLoMo (Graphs from LOw-level unit MOdeling), a framework designed to learn generic, transferable relational structures from unlabeled data. By decoupling the prediction of relational graphs from feature extraction and employing a squared ReLU activation to enforce sparsity, GLoMo produces "plug-and-play" structural representations. Our experiments demonstrate that transferring these learned graphs consistently improves performance across diverse downstream tasks in natural language processing and computer vision, outperforming traditional feature-based transfer methods.
1. Introduction
Deep transfer learning has revolutionized fields like NLP and computer vision by allowing models to leverage knowledge from massive unlabeled datasets. However, the standard paradigm focuses on transferring "what" a data unit is—its unary features—rather than "how" units relate to one another. While human-curated structures like parse trees provide relational information, they are expensive to produce and difficult to scale. GLoMo addresses this by unsupervisedly learning latent relational graphs that can be transferred to new tasks, providing a structural prior that complements traditional feature embeddings.
2. Methodology
The GLoMo framework separates the learning of features from the learning of structures through a dual-network architecture trained on unlabeled data.
2.1 Unsupervised Learning Phase
The model consists of two primary components:
- Graph Predictor ($g$): A multi-layer CNN that generates an affinity matrix representing the dependencies between input units. To mimic the sparse nature of real-world relationships, a squared ReLU activation is used instead of Softmax, enforcing sparsity in the resulting graph.
- Feature Predictor ($f$): This network utilizes the graphs produced by $g$ along with the original input to perform a context-prediction task, such as predicting a sequence of upcoming units.
2.2 Transfer Phase
After pre-training, the feature predictor is discarded. The graph predictor is frozen and used to extract relational graphs for downstream tasks. These graphs are integrated with task-specific features (e.g., GloVe or RNN states) to produce structure-aware representations.
3. Experiments and Results
We evaluated GLoMo on a variety of benchmarks after pre-training on a Wikipedia dump (700M tokens) for NLP and ImageNet for vision.
3.1 Natural Language Processing
On the SQuAD question-answering task, adding GLoMo to GloVe embeddings improved the F1 score from 78.73 to 79.90. When combined with ELMo, performance reached 84.13. Similar gains were observed in Natural Language Inference (MNLI) and sentiment analysis (IMDB).
3.2 Computer Vision
To test the generality of the approach, we pre-trained GLoMo on ImageNet and transferred the graphs to a ResNet-18 model for CIFAR-10 classification. The addition of GLoMo improved accuracy from 90.93% to 91.55%, confirming that transferable relational graphs are beneficial beyond text.
4. Key Insights
A critical finding is that decoupling the graph and feature predictors forces the model to learn structural patterns independent of specific feature values. Furthermore, the use of squared ReLU is essential for generating interpretable, sparse graphs.
As shown in the visualizations, GLoMo automatically learns to attend to meaningful linguistic patterns, such as linking negations ("not") to the words they modify, without any explicit supervised training. This emergent structure allows the model to capture long-term dependencies that unary features often miss.
5. Conclusion
GLoMo shifts the transfer learning focus from unary features to relational graphs. By learning these structures unsupervisedly, it provides a flexible way to incorporate structural priors into deep learning models. Future work includes scaling to longer sequences and exploring applications in video modeling and reinforcement learning.
Summary updated