Skip to main content
QUICK REVIEW

[Paper Review] Efficient Training on Very Large Corpora via Gramian Estimation

Walid Krichene, Nicolas Mayoraz|arXiv (Cornell University)|Jul 18, 2018
Topic ModelingComputer Science27 references7 citations
TL;DR

This paper proposes SOGram and SAGram, efficient methods for training non-linear embedding models on very large corpora by estimating the global repulsive penalty term via stochastic gradient updates to Gramian matrices, avoiding costly sampling of unobserved pairs. The approach achieves significantly faster training and better generalization—up to 33.2% higher validation MAP—compared to standard sampling-based methods, especially on large-scale datasets.

ABSTRACT

We study the problem of learning similarity functions over very large corpora using neural network embedding models. These models are typically trained using SGD with sampling of random observed and unobserved pairs, with a number of samples that grows quadratically with the corpus size, making it expensive to scale to very large corpora. We propose new efficient methods to train these models without having to sample unobserved pairs. Inspired by matrix factorization, our approach relies on adding a global quadratic penalty to all pairs of examples and expressing this term as the matrix-inner-product of two generalized Gramians. We show that the gradient of this term can be efficiently computed by maintaining estimates of the Gramians, and develop variance reduction schemes to improve the quality of the estimates. We conduct large-scale experiments that show a significant improvement in training time and generalization quality compared to traditional sampling methods.

Motivation & Objective

  • Address the computational intractability of training non-linear embedding models on very large corpora due to the quadratic growth of unobserved pairs in the repulsive penalty term.
  • Overcome the limitation of traditional sampling methods, which degrade in quality as corpus size increases and require large sample sizes to maintain accuracy.
  • Leverage the matrix factorization-inspired Gramian formulation in non-linear models, where both left and right embeddings are non-linear, by maintaining stochastic estimates of the Gram matrices.
  • Develop variance reduction techniques for Gramian estimation to improve gradient accuracy without increasing sample size.
  • Demonstrate that better estimation of the global penalty term leads to improved generalization performance and faster convergence in large-scale settings.

Proposed method

  • Formulate the global repulsive penalty as a matrix-inner product of two generalized Gramians, enabling efficient gradient computation via matrix operations.
  • Maintain stochastic estimates of the left and right Gramians using mini-batch updates, updating them with a separate learning rate α to reduce variance.
  • Propose SOGram (Stochastic Optimal Gramian) and SAGram (Stochastic Averaged Gramian) as variance-reduced estimators for the Gramians, with SAGram using a running average of past estimates.
  • Derive closed-form gradients of the penalty term using the estimated Gramians, allowing end-to-end backpropagation without explicit sampling of unobserved pairs.
  • Integrate the estimated gradient into standard SGD training, replacing the sampled unobserved pairs with the estimated penalty term.
  • Use decaying learning rates for the Gramian updates to balance bias and variance, improving convergence and final model performance.

Experimental results

Research questions

  • RQ1Can the global repulsive penalty term in non-linear embedding models be efficiently estimated without sampling large numbers of unobserved pairs?
  • RQ2How does the quality of Gramian estimation affect training speed and generalization performance in large-scale embedding learning?
  • RQ3Can variance reduction techniques like SAGram improve the stability and accuracy of gradient estimation in non-linear models?
  • RQ4What is the trade-off between bias and variance in Gramian estimation, and how does it impact model convergence and final performance?
  • RQ5Does the proposed method scale better than sampling-based approaches in terms of training time and generalization on very large corpora?

Key findings

  • SOGram achieves up to 33.2% higher final validation Mean Average Precision (MAP) on the English dataset compared to baseline sampling, with a 2-hour training budget outperforming sampling after 50 hours.
  • On the French dataset, SOGram improves validation MAP by 30.7% compared to sampling, demonstrating significant gains on large-scale corpora.
  • SOGram with a batch size of 128 achieves Gramian estimation quality comparable to sampling with a batch size of 1024, reducing computational cost.
  • The bias-variance trade-off is empirically validated: lower learning rates (α = 0.001) yield better final performance but slower early convergence, while higher α values reduce bias but increase variance.
  • SOGram consistently improves generalization without degrading training set performance, indicating that better estimation of the global penalty term acts as a regularizer.
  • SAGram provides the most accurate Gramian estimates in ablation studies, outperforming both sampling and SOGram in estimation error, though at higher memory cost.

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.