Poincaré Glove: Hyperbolic Word Embeddings

 

Hyperbolic Geometry

平行公設

給定一條直線,通過此直線外的任何一點,

有且只有一條直線不與之相交(平行線)。

Euclidean

Hyperbolic

給定一條直線,通過此直線外的任何一點,

超過一條直線不與之相交。

平行公設

Hyperbolic Geometry

三角形內角和 != 180 度

Hyperbolic Space

Model

Poincaré Ball

\mathbb{D}^n = \{x \in \mathbb{R}^n , \|x\|_2 < 1\}

Poincaré Half-plane

\mathbb{H}^2 = \mathbb{R} \times \mathbb{R}^*_+

Hyperbolic Space

Distance

Poincaré Ball

Poincaré Half-plane

Note: 這兩個模型的 distance 都是 well-defined 的

Hyperbolic Space

前人研究

比較可以表示 hierarchical 的關係

PS1. 這篇裡面當成已知內容,沒有認真討論

PS2. 也有其它篇 CS paper 拿這個性質做研究

本篇 paper

拿來做 word embedding,在 hypernymy 表現好

Glove on hyperbolic space

w_i^T\tilde{w}_k + b_i + \tilde{b}_k = \log(X_{ik})

Original Glove

X_{ij} := \text{\# of $w_i$ and $w_j$ co-occor}
X_i = \sum_kX_{ik}
P_{ij} = X_{ij} / X_i

Loss

目標

P is asymmetric

Glove on hyperbolic space

w_i^T\tilde{w}_k + b_i + \tilde{b}_k = \log(X_{ik})

Hyperbolic Glove

目標

Euclidean 內積

Hyperbolic counterpart

?

Glove on hyperbolic space

w_i^T\tilde{w}_k + b_i + \tilde{b}_k = \log(X_{ik})

Hyperbolic Glove

目標

\to
-\frac{1}{2} \|w_i - w_k\|^2 + b_i + \tilde{b}_k = \log(X_{ik})

Normalization 項被 bias 吸收

Distance Function

Glove on hyperbolic space

Hyperbolic Glove

Distance function

Distance

Poincaré Ball

Poincaré Half-plane

Glove on hyperbolic space

Hyperbolic Glove

h(x) = -\frac{1}{2}x^2
h(x) = \cosh^2 x

Word2GAUSS (2015)

Idea

拿 Gaussian 來當 embedding (mean vector and variance matrix)。Variance 越大表示這個字越 general。(不失一般性假設 variance matrix is diagonal)

在 relation entailment 的 task 上表現好。

Connection

\text{1D Gaussian } \mathcal{N}(\mu, \sigma^2) \iff (\mu, \sigma) \in \mathbb{R} \times \mathbb{R}^+ = \mathbb{H}^2

Word2GAUSS (2015)

Fisher Distance

Fisher Distance (n-dimentional)

Word2GAUSS (2015)

We can map Gaussian embedding to product space 

(\mathbb{H}^2)^n

接下來兩章(§6, §7)

  • §6:解釋怎麼在 hyperbolic space 做 analogy
    • analogy: queen is to woman what king is to man
    • Poincaré ball 上面有定義平行,直接拿來用
  • §7:解釋怎麼在 hyperbolic space 做 hypernymy
    • hypernymy: is-a(dog, animal)
    • hyperbolic embedding map 到 Gaussian embedding via an isometry (等距映射),然後拿前人的 work 來用(paper 有解釋他 isometry 的做法)

 

Experiment

Experiment

Experiment

Poincare Glove: Hyperbolic Word Embeddings

By qitar888

Poincare Glove: Hyperbolic Word Embeddings

  • 570