Coneheads: Hierarchy Aware Attention

Albert Tseng, Tao Yu, Toni J.B. Liu, Chris De Sa
6/1/2023
9 citations

Official code: tsengalb99/coneheads (3 stars, Python, last commit 2023-06-02).

Abstract

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.

Show full abstract

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.

View on arXivView PDF

Code Implementations(1)

30PythonJun 1, 20233 years ago

Similar Papers

Cite this paper

@article{tseng2023coneheads,
  title  = {Coneheads: Hierarchy Aware Attention},
  author = {Albert Tseng and Tao Yu and Toni J.B. Liu and Chris De Sa},
  year   = {2023},
  eprint = {2306.00392},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/pdf/2306.00392},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2306.00392.svg)](https://codeofpaper.com/paper/2306.00392)

Discussion