HUBERT Untangles BERT to Improve Transfer across NLP Tasks

Mehrad Moradshahi, Hamid Palangi, Monica S. Lam, Paul Smolensky, Jianfeng GaoarXiv 2019 · arXiv

Abstract

HUBERT (HUBERT Untangles BERT) enhances the transferability of BERT by explicitly separating linguistic "content" from "form." By incorporating a Tensor-Product Representation (TPR) layer, the model decomposes word embeddings into semantic fillers and structural roles. This architectural modification allows HUBERT to transfer grammatical knowledge across diverse NLP tasks much more effectively than standard BERT, particularly in scenarios prone to shallow heuristic fallacies.

Introduction

While BERT and its successors have revolutionized natural language processing, their internal representations remain "entangled." Information regarding a word's semantic meaning and its structural syntactic function are compressed into the same vector space. This entanglement creates a significant bottleneck for transfer learning. When fine-tuning BERT on one task (e.g., natural language inference) to apply it to another (e.g., paraphrase detection), performance gains are often inconsistent or even negative. HUBERT addresses this by untangling general linguistic structure from task-specific vocabulary, creating a model that generalizes more robustly across the NLP landscape.

Methods: The TPR Layer

The core innovation of HUBERT is the addition of a specialized Tensor-Product Representation (TPR) layer to a pre-trained BERT base. The TPR represents complex linguistic structures as a collection of "bindings" between a filler (the semantic "what") and a role (the structural "where").

The Transformer-based TPR layer architecture decomposes embeddings into distinct filler and role vectors.

As shown in the architecture above, the process involves:

  1. Decomposition: A TPR layer (the authors found a Transformer-based architecture most efficient) processes final-layer BERT embeddings to produce weight vectors for fillers ($a_S$) and roles ($a_R$).
  2. Binding: These vectors select specific embeddings from global Symbol ($S$) and Role ($R$) matrices, which are then combined via a tensor product to reconstruct the token representation.
  3. Inductive Bias: To ensure true disentanglement, the model uses more symbols than roles and applies "double soft orthogonality" regularization to the Role matrix, forcing structural roles to remain distinct and general.

Experimental Setup

The researchers evaluated HUBERT using the GLUE Benchmark (including MNLI, QNLI, QQP, RTE, and SST), the SNLI dataset, and the HANS (Heuristic Analysis for NLI Systems) diagnostic dataset. HANS is particularly critical as it is designed to expose models that rely on shallow heuristics, such as lexical overlap, rather than true structural understanding.

Analysis of the learned representations revealed that HUBERT's "roles" capture universal linguistic features. Visualization showed specific roles mapping consistently to Parts of Speech (POS), such as dedicated roles for nouns or punctuation, suggesting the model successfully isolates syntax from semantics.

Key Results

HUBERT demonstrates significantly more stable and effective knowledge transfer compared to standard BERT. When transferring structural knowledge from MNLI to other GLUE tasks, HUBERT achieved accuracy gains ranging from 0.60% to 12.28%. In contrast, standard BERT often exhibited negative transfer (as low as -0.33%) on the same tasks.

Table showing the performance gains of HUBERT (Transformer) compared to baseline BERT across various target corpora.

Further breakthroughs were observed on the HANS dataset. In the "Lexical Overlap" sub-task—where models are typically fooled by shared vocabulary—HUBERT’s accuracy improved by 61.62% after fine-tuning on SNLI. Additionally, the Transformer-based TPR layer proved to be over 4x faster in training and inference than LSTM-based alternatives while maintaining high accuracy.

Conclusion

HUBERT demonstrates that disentangling semantics from syntax is a powerful catalyst for transfer learning. While the model's performance on initial source tasks is comparable to standard BERT, its superior ability to generalize structural rules makes it far more "teachable" for downstream applications. Future research will focus on further simplifying the architecture and applying these disentangled representations to low-resource NLP environments where structural knowledge is paramount.

Summary updated

Abstract

We introduce HUBERT which combines the structured-representational power of Tensor-Product Representations (TPRs) and BERT, a pre-trained bidirectional Transformer language model. We show that there is shared structure between different NLP datasets that HUBERT, but not BERT, is able to learn and leverage. We validate the effectiveness of our model on the GLUE benchmark and HANS dataset. Our experiment results show that untangling data-specific semantics from general language structure is key for better transfer among NLP tasks.
BibTeX
@misc{moradshahi2019hubert,
  author = {Mehrad Moradshahi and Hamid Palangi and Monica S. Lam and Paul Smolensky and Jianfeng Gao},
  title = {{HUBERT Untangles BERT to Improve Transfer across NLP Tasks}},
  year = {2019},
  eprint = {1910.12647},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1910.12647},
}
Figure