GLoMo: Unsupervisedly Learned Relational Graphs as Transferable Representations

Zhilin Yang, Junbo Jake Zhao, Bhuwan Dhingra, Kaiming He, William W. Cohen, Ruslan Salakhutdinov, Yann LeCunarXiv 2018 · OpenReview

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.
The GLoMo architecture consists of a feature predictor and a graph predictor trained via unsupervised learning. The learned graph predictor is then transferred to downstream tasks.

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.

Visualization of learned relational graphs. The model learns to attend to specific linguistic patterns and long-term dependencies unsupervisedly.

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

Abstract

Modern deep transfer learning approaches have mainly focused on learning generic feature vectors from one task that are transferable to other tasks, such as word embeddings in language and pretrained convolutional features in vision. However, these approaches usually transfer unary features and largely ignore more structured graphical representations. This work explores the possibility of learning generic latent relational graphs that capture dependencies between pairs of data units (e.g., words or pixels) from large-scale unlabeled data and transferring the graphs to downstream tasks. Our proposed transfer learning framework improves performance on various tasks including question answering, natural language inference, sentiment analysis, and image classification. We also show that the learned graphs are generic enough to be transferred to different embeddings on which the graphs have not been trained (including GloVe embeddings, ELMo embeddings, and task-specific RNN hidden unit), or embedding-free units such as image pixels.
BibTeX
@misc{yang2018glomo,
  author = {Zhilin Yang and Junbo Jake Zhao and Bhuwan Dhingra and Kaiming He and William W. Cohen and Ruslan Salakhutdinov and Yann LeCun},
  title = {{GLoMo: Unsupervisedly Learned Relational Graphs as Transferable Representations}},
  year = {2018},
  eprint = {1806.05662},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.05662},
}
Figure