Skip to main content
QUICK REVIEW

[Paper Review] Direct Network Transfer: Transfer Learning of Sentence Embeddings for Semantic Similarity

Li Zhang, Steven R. Wilson|arXiv (Cornell University)|Apr 20, 2018
Topic ModelingComputer Science47 references3 citations
TL;DR

This paper proposes direct network transfer, a novel transfer learning method for sentence embeddings that fine-tunes the sentence encoder itself by optimizing cosine similarity directly, rather than adding a separate classifier. It achieves state-of-the-art performance on multiple semantic similarity benchmarks, outperforming traditional transfer settings in most cases by effectively adapting the sentence encoder to similarity tasks through end-to-end training.

ABSTRACT

Sentence encoders, which produce sentence embeddings using neural networks, are typically evaluated by how well they transfer to downstream tasks. This includes semantic similarity, an important task in natural language understanding. Although there has been much work dedicated to building sentence encoders, the accompanying transfer learning techniques have received relatively little attention. In this paper, we propose a transfer learning setting specialized for semantic similarity, which we refer to as direct network transfer. Through experiments on several standard text similarity datasets, we show that applying direct network transfer to existing encoders can lead to state-of-the-art performance. Additionally, we compare several approaches to transfer sentence encoders to semantic similarity tasks, showing that the choice of transfer learning setting greatly affects the performance in many cases, and differs by encoder and dataset.

Motivation & Objective

  • To address the gap in transfer learning techniques for sentence embeddings, especially for semantic similarity tasks.
  • To propose a new transfer learning setting—direct network transfer—that optimizes the sentence encoder directly for similarity, rather than using a fixed encoder with a head classifier.
  • To systematically evaluate and compare various transfer learning settings across multiple sentence encoders and datasets.
  • To identify key hyperparameters and design choices that significantly impact performance in transfer learning for semantic similarity.

Proposed method

  • Direct network transfer replaces the standard classifier head with a cosine similarity layer, allowing end-to-end back-propagation to fine-tune both the word embedding matrix and the encoder.
  • The model is trained to minimize the difference between predicted cosine similarity and normalized ground-truth similarity scores from the target dataset.
  • Scores are normalized to [0,1] for most datasets, though [−1,1] is used when negative semantic relationships are meaningful, such as in the PAC task of the Human Activity Phrase dataset.
  • The method allows for both frozen and fine-tuned word embeddings, and evaluates both MSE and KL-divergence loss functions as training objectives.
  • Transfer learning settings are systematically compared across three pre-trained sentence encoders (InferSent, Universal Sentence Encoder, and USE-Siamese) and eight semantic similarity datasets.
  • Hyperparameters such as score normalization, loss function, and layer freezing are tuned and evaluated as part of the ablation study.

Experimental results

Research questions

  • RQ1Does direct network transfer, which fine-tunes the sentence encoder directly for similarity, outperform standard transfer learning with a fixed encoder and added classifier?
  • RQ2How do choices such as score normalization range ([0,1] vs [−1,1]), loss function (MSE vs KL), and freezing lower layers affect performance across different encoders and datasets?
  • RQ3Are there consistent patterns in performance based on domain similarity between source and target datasets?
  • RQ4Can direct network transfer generalize across diverse sentence encoders and semantic similarity tasks, including those with non-uniform score distributions?

Key findings

  • Direct network transfer achieves state-of-the-art performance on the STS Benchmark and the Human Activity Phrase dataset, outperforming all other transfer settings in the majority of evaluated combinations.
  • On the STS Benchmark, direct network transfer significantly improves performance over standard transfer learning, especially when using the Universal Sentence Encoder and USE-Siamese models.
  • Normalizing scores to [0,1] generally yields better results than [−1,1], except in the PAC task of the Human Activity Phrase dataset, where [−1,1] normalization is preferred due to meaningful negative semantic relationships.
  • The choice between MSE and KL-divergence loss shows no consistent superiority, with differences being most pronounced for InferSent, indicating that loss function should be tuned as a hyperparameter.
  • Freezing the word embedding matrix does not consistently improve performance, and the difference in training time is negligible, suggesting that fine-tuning embeddings is often viable and should be treated as a hyperparameter.
  • Performance patterns vary significantly across encoders and datasets, indicating that the optimal transfer strategy is highly dependent on the specific model and data distribution.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.