Term
Negative sampling
Meaning
A training objective that separates a target from a few noise samples using logistic regression.
Source Distributed Representations of Words and Phrases and their Compositionality
How papers use it 10 papers
Distributed Representations of Words and Phrases and their Compositionality
Use The simplified objective the authors use in place of the hierarchical softmax, with k noise samples per data sample.
node2vec: Scalable Feature Learning for Networks
Use Used to approximate the per-node partition function Zu in the node2vec objective, so that the objective can be optimized on large networks without summing over every node. The same approximation is applied in the word-embedding setting that the paper builds on.
Meaning A training approximation that replaces the full normalization over all nodes with a small number of sampled negative examples, which makes each gradient update cheap.
Modeling Relational Data with Graph Convolutional Networks
Use Used to train the DistMult decoder in the link prediction model with a cross-entropy loss over positive and corrupted triples. The number of negative samples per positive triple is ω, which is set to 1 in the experiments so that the baselines and the model are comparable.
Meaning A training scheme in which each observed triple is paired with corrupted triples produced by replacing either its subject or its object, and these corrupted triples serve as negative examples for the loss.
LINE: Large-scale Information Network Embedding
Use Used to optimize the second-order objective in LINE: each observed edge is paired with negative samples drawn from a noise distribution \(P_n(v)\propto d_v^{3/4}\), where \(d_v\) is the out-degree of vertex \(v\). For the first-order objective, the context vector in the negative term is replaced by the vertex vector to avoid the trivial solution.
Meaning An approximation for training a skip-gram-style objective that replaces the sum over all vertices with a few negative edges drawn for each observed edge from a noise distribution.
Enriching Word Vectors with Subword Information
Use The training objective used by the skipgram model and by the proposed model. Each positive context word is paired with five negatives drawn with probability proportional to the square root of the unigram frequency. The paper describes this as a replacement for a full softmax over the vocabulary.
Meaning A training procedure for word-embedding models in which each observed word-context pair is a positive example for a binary classifier, and a small number of words drawn at random from the vocabulary serve as negative examples. Each pair is scored with a logistic loss, so the model learns to separate real contexts from random ones.
Complex Embeddings for Simple Link Prediction
Use Applied to FB15K and WN18, which contain only positive triples. Following the protocol of Bordes et al., the paper corrupts either the subject or the object of each positive triple under the local closed world assumption, and it draws new negatives at runtime for each training batch. The number of negatives per positive triple is a setting that the paper varies, and it reports that more negatives improve FB15K results. The authors name a more intelligent sampling procedure as future work.
Meaning The generation of false triples by replacing the subject or the object of an observed true triple with another entity, under the assumption that unobserved triples are false. The sampled negatives serve as training examples of the false class.
Inductive Representation Learning on Large Graphs
Use In the paper's unsupervised loss, negative nodes vn are drawn from a negative sampling distribution Pn, and the hyperparameter Q sets how many negative samples are paired with each co-occurring node.
Meaning A training technique that contrasts observed node pairs with randomly drawn node pairs assumed to be dissimilar. Scoring a small number of sampled negatives instead of all nodes keeps the training objective cheap to compute.
Representation Learning with Contrastive Predictive Coding
Use Used in CPC through the InfoNCE loss, where one positive sample is compared against N-1 negatives drawn from a proposal distribution, which keeps the model tractable. In audio, the negatives are drawn from the other examples in the minibatch, and the ablation varies whether they come from different speakers, the same speaker or only the current sequence.
Meaning Negative sampling is a training strategy that avoids computing a normalization over all possible outcomes by comparing a true target against a small set of randomly drawn non-target values. The model learns to score the true target above these sampled alternatives.
UMAP: Uniform Manifold Approximation and Projection for Dimension Reduction
Use In UMAP, each attractive update on an edge is paired with repulsion from a sampled set of other vertices, which keeps the layout computation tractable. The paper notes that this sampling, together with approximate neighbour search, can produce suboptimal embeddings for very small datasets, such as those with fewer than about 500 samples.
Meaning An optimisation shortcut in which the repulsive terms of a pairwise objective are estimated from a small random sample of other points, instead of summing over all pairs.
A Comprehensive Survey of Graph Embedding: Problems, Techniques and Applications
Use The second approximation of the softmax in the SkipGram training used by DeepWalk. For each context node, the objective adds the log-sigmoid terms of K negative nodes drawn from a noise distribution Pn, for example a uniform distribution over nodes. The paper gives the time complexity of SkipGram with negative sampling as O(K|V|).
Meaning An approximation of the full softmax normalization in which a target node is separated from a few sampled noise nodes through a logistic regression objective, so that the costly sum over all nodes is avoided.