Hyperbolic Representation Learning for NLP

Hyperbolic geometry

[AAAI 2020] Hyperbolic Interaction Model for Hierarchical Multi-Label Classification

Introduction

  • 作者提出 Hyperbolic Interaction Model (HyperIM),将 word 和 label hierarchies 共同嵌入到双曲空间,从而学得 label-aware document representations 并解决 HMLC 问题

Hyperbolic Interaction Model

在这里插入图片描述

  • Hyperbolic Label Embedding.
    在这里插入图片描述其中, Θ L = { θ i l } i = 1 C \Theta^L=\{\theta_i^l\}_{i=1}^C ΘL={θil}i=1C 为 label embedding set, θ i l ∈ B k \theta_i^l\in\mathcal B^k θilBk 位于 Poincaré ball 上, N ( l p ) = { l q ′ ∣ ( l p , l q ′ ) ∉ T } ∪ { l p } \mathcal N(l_p)=\{l_{q'}|(l_p,l_{q'})\notin\mathcal T\}\cup\{l_p\} N(lp)={lq(lp,lq)/T}{lp} T \mathcal T T 为 label hierarchy 的边集
  • Hyperbolic Word Embedding. 给定语料库中的 word co-occurrences 信息,作者采用 Poincaré GloVe 来获取 hyperbolic word embed Θ E \Theta^E ΘE
    在这里插入图片描述
  • Hyperbolic Word Encoder. 单词具有一词多义性,直接将 word embed 和 label embed 做交互会导致模型难以区分多义词的不同含义 (单词的不同含义都对应同一个 embed),为此,作者使用 hyperbolic GRU 来引入上下文信息,输入为预训练的 hyperbolic word embed,输出为结合了上下文信息的 hyperbolic word embed Θ w \Theta^w Θw,它将用于和 label embed 交互
    在这里插入图片描述
  • Interaction in the Hyperbolic Space.
    (1) Label-Aware Document Representations.
    在这里插入图片描述其中 θ t w ∈ Θ w \theta^w_t\in\Theta^w θtwΘw 为文本中的 t t t-th word embed, θ i l ∈ Θ L \theta_i^l\in\Theta^L θilΘL 为文本的 i i i-th label. i i i-th label-aware document representation 为
    在这里插入图片描述集合 S = { s i } i = 1 \mathcal S=\{s_i\}_{i=1} S={si}i=1label-aware document representations
    (2) Prediction.
    在这里插入图片描述其中 W f ∈ R ( T / 2 ) × T W^f\in\R^{(T/2)\times T} WfR(T/2)×T W e ∈ R 1 × ( T / 2 ) W^e\in\R^{1\times (T/2)} WeR1×(T/2)
    (3) Partial Interaction.
    在这里插入图片描述

Experiments

  • Datasets
    在这里插入图片描述
  • Evaluation Metrics. Precision@ k k k (P@ k k k for short) and nDCG@ k k k for k k k =1, 3, 5
    在这里插入图片描述其中 r = { 1 , . . . , C } k r=\{1,...,C\}^k r={1,...,C}k k k k 个最可能的 label,按降序排列, r [ 1 ] r_{[1]} r[1] 即为最可能的 label. P@ k k k 为最可能的 top- k k k labels 中预测正确的 label 占比, ∥ y ∥ 0 \|y\|_0 y0 为 true labels 的数量。最终的指标是测试集上所有样本指标的均值. Notice that nDCG@1 is omitted in the results since it gives the same value as P@1.
  • Results
    在这里插入图片描述
  • Ablation Test - Euclidean Interaction Model
    在这里插入图片描述
  • Interaction Visualization
    在这里插入图片描述

[EACL 2021] Joint Learning of Hyperbolic Label Embeddings for Hierarchical Multi-label Classification

Introduction

  • 对于大规模复杂数据集而言,我们可能很难获取到标签层次结构,因此作者提出了一种能够在不知道标签层次结构的情况下隐式地对标签层次结构建模,从而进行 HMC 的方法

Approach

Our Model: HIDDEN (HyperbolIc label embeDDings for hiErarchical multi-label classi-ficatioN)

  • Document Model F w \mathcal F_w Fw. 作者使用 TextCNN,输入文本 D D D,输出文本 embed F w ( D ) ∈ R n \mathcal F_w(D)\in\R^n Fw(D)Rn
  • Label Embedding Model G Θ \mathcal G_{\Theta} GΘ. 作者使用 Embedding 层,输入 label l l l,输出 label embed Θ l {\Theta}_l Θl,然后使用映射 Π ( x ) = x 1 + 1 + ∥ x ∥ 2 2 \Pi(x)=\frac{x}{1+\sqrt{1+\|x\|_2^2}} Π(x)=1+1+x22 x 将其投影到 Poincaré manifold 上得到 Π ( Θ l ) \Pi({\Theta}_l) Π(Θl)
  • Alignment Model.
    在这里插入图片描述

Joint Objective

  • First Term. 用于促进文本 embed 和 label embed 对齐的 BCE loss
    在这里插入图片描述其中 L L L 为 GT label 数
  • Second Term. 让具有高共现度的 label embed 在双曲空间上距离相互靠近,从而隐式地学习 label hierarchy
    在这里插入图片描述其中 N ( l , l ′ ) \mathcal N(l,l') N(l,l) 为 the set of all labels that less frequently co-occur with l l l than l ′ l' l
  • Overall objective function.
    在这里插入图片描述其中 λ = 0.1 \lambda=0.1 λ=0.1

Experiments

Baselines

  • HIDDEN cas \text{HIDDEN}_{\text{cas}} HIDDENcas (HIDDEN cascade). 先用 L 2 \mathcal L_2 L2 优化 label embed,再固定 label embed,用 L 1 \mathcal L_1 L1 优化文本 embed
  • HIDDEN flt \text{HIDDEN}_{\text{flt}} HIDDENflt (HIDDEN flat). 固定 Θ flat \Theta_{\text{flat}} Θflat 为单位矩阵,即 label embed 使用 one-hot 向量,然后用 L 1 \mathcal L_1 L1 优化文本 embed
  • HIDDEN euc \text{HIDDEN}_{\text{euc}} HIDDENeuc (HIDDEN euclidean). 在 L 2 \mathcal L_2 L2 中使用欧式距离
    在这里插入图片描述

Comparison of models that do not use the true hierarchy

在这里插入图片描述

Comparison of Hyperbolic space and Euclidean space

在这里插入图片描述

Comparison with model that explicitly uses the true hierarchy

在这里插入图片描述

Evaluating performance of embeddings

在这里插入图片描述
在这里插入图片描述

NDCG 和 Spearman’s rank correlation coefficient 指标见论文 5.1 节

References

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值