Term
hierarchical softmax
Meaning
An output-layer approximation that evaluates a binary tree of decisions instead of a full softmax over the vocabulary.
Source Efficient Estimation of Word Representations in Vector Space
How papers use it 6 papers
Efficient Estimation of Word Representations in Vector Space
Use The output method that lets CBOW and Skip-gram evaluate about log2(V) units per word.
Bag of Tricks for Efficient Text Classification
Use Used in fastText to cut the cost of the output layer when there are many classes. The paper states that training cost falls from O(kh) to O(h log2(k)) for k classes and hidden size h. At test time, a depth-first search over the tree that discards low-probability branches gives the most likely class, and the paper extends this to retrieving the top T classes at cost O(log(T)) using a binary heap. In the tag prediction experiment, this is what allows fast inference over more than 300K classes.
Meaning An output layer for multi-class prediction that organizes the classes as the leaves of a binary tree, typically a Huffman coding tree. The probability of a class is the product of the branch probabilities along its root-to-leaf path, so computing a class probability touches only the nodes on that path instead of all classes.
DeepWalk: Online Learning of Social Representations
Use Used to compute Pr(u_k | Φ(v_j)) in the SkipGram update of DeepWalk, since computing the normalizing partition function over all |V| vertices would be too expensive. The tree is built over the graph vertices, and the authors additionally assign shorter paths to frequent vertices by using Huffman coding, which they say reduces access time for frequent elements. The paper also notes that the tree can be built for a bounded maximum vertex count when streaming, with unseen vertices assigned to remaining leaves.
Meaning An approximation of the output probability in a large-vocabulary model. The items are placed at the leaves of a binary tree, so the probability of an item is the product of binary decisions made along its path from the root, which lowers the cost of computing it from linear to logarithmic in the number of items.
Distributed Representations of Words and Phrases and their Compositionality
Use The baseline objective against which Negative sampling is compared, using a binary Huffman tree.
Meaning An approximation to the softmax that arranges outputs as a binary tree, so a prediction needs only a short path of inner nodes.
Distributed Representations of Sentences and Documents
Use Used for fast training of the word-vector model that underlies Paragraph Vector. The paper uses a binary Huffman tree, so frequent words receive short codes and are reached quickly, following the same choice as in an earlier Mikolov et al. word-vector work.
Meaning An approximation to the softmax output layer that arranges the output words as leaves of a binary tree. Predicting a word then means making a sequence of binary decisions along its path, which reduces the cost of training when the vocabulary is large.
A Comprehensive Survey of Graph Embedding: Problems, Techniques and Applications
Use Used to approximate the softmax in Eq. 10 when training SkipGram on DeepWalk paths. Only the root-to-leaf path of the target node is evaluated, and each step is a sigmoid binary classifier applied to the embedding of the parent tree node. The paper states that this reduces the time complexity of SkipGram from O(|V|²) to O(|V|log|V|).
Meaning An approximation of the full softmax normalization in which the output nodes are placed at the leaves of a binary tree, so that a node probability is computed as a product of binary decisions along the path from the root to its leaf.