Our new X account is live! Follow @wizwand_team for updates
WorkDL logo mark

Coneheads: Hierarchy Aware Attention

About

Attention networks such as transformers have achieved state-of-the-art performance in many domains. These networks rely heavily on the dot product attention operator, which computes the similarity between two points by taking their inner product. However, the inner product does not explicitly model the complex structural properties of real world datasets, such as hierarchies between data points. To remedy this, we introduce cone attention, a drop-in replacement for dot product attention based on hyperbolic entailment cones. Cone attention associates two points by the depth of their lowest common ancestor in a hierarchy defined by hyperbolic cones, which intuitively measures the divergence of two points and gives a hierarchy aware similarity score. We test cone attention on a wide variety of models and tasks and show that it improves task-level performance over dot product attention and other baselines, and is able to match dot-product attention with significantly fewer parameters. Our results suggest that cone attention is an effective way to capture hierarchical relationships when calculating attention.

Albert Tseng, Tao Yu, Toni J.B. Liu, Christopher De Sa• 2023

Related benchmarks

TaskDatasetResultRank
Node ClassificationCora
Accuracy83.6
885
Image GenerationImageNet (val)
FID67.6
198
Machine TranslationIWSLT
BLEU35.56
31
Node ClassificationPPI
Node Classification Accuracy (PPI)0.99
30
Image ClassificationImageNet 300 Epochs (val)
Top-1 Acc73.14
7
Image ClassificationImageNet 500 Epochs (val)
Top-1 Accuracy74.46
4
Language ModelingWikiText-103 Adaptive Inputs
PPL (0 Context)20.72
3
Language ModelingWikiText-103 Without Adaptive Inputs
PPL (0 Context)26.44
3
Showing 8 of 8 rows

Other info

Code

Follow for update