论文笔记:Neural Architectures for Named Entity Recognition

本文详细探讨了使用双向LSTM生成的分数矩阵在CRF(条件随机场)模型中的作用,介绍了如何计算词级别的得分和序列预测概率,以及如何通过最大似然估计来优化正确标签序列。重点讲解了从状态转移概率矩阵中进行的序列预测和概率计算过程。
摘要由CSDN通过智能技术生成

Neural Architectures for Named Entity Recognition

2.3 CRF Tagging Models

  • Input sentence: X = ( X 1 , X 2 , . . . , X N ) \mathbf{X}=\mathbf{(X_1,X_2,...,X_N)} X=(X1,X2,...,XN)

  • Matrix of scores (output by BiLSTM) : P ∈ R n × k \mathbf{P}\in \mathbb{R}^{n\times k} PRn×k

    -Score of the j t h j^{th} jth of i t h i^{th} ithword in a sentence : P i , j P_{i,j} Pi,j

  • The numbers of distinct tags: k k k

  • Sequence of predictions: y = ( y 1 , y 2 , . . . , y n ) \mathbf{y}=(y_1,y_2,...,y_n) y=(y1,y2,...,yn)

y \mathbf{y} y's score: s ( X , y ) = ∑ i = 0 n A y i , y i + 1 + ∑ i = 0 n P i , y i s(\mathbf{X}, \mathbf{y})=\sum\limits_{i=0}^nA_{y_i,y_{i+1}}+\sum\limits_{i=0}^nP_{i,y_i} s(X,y)=i=0nAyi,yi+1+i=0nPi,yi

  • Matrix of transition scores: A ∈ R ( k + 2 ) × ( k + 2 ) A \in \mathbb{R}^{(k+2) \times(k+2)} AR(k+2)×(k+2)

    • score of a transition from the tag i i i to tag j j j: A i , j A_{i,j} Ai,j
    • start and end tag: y 0 , y n y_0, y_n y0,yn

Probability for the sequence y \mathbf{y} y:

p ( y ∣ X ) = e s ( X , y ) ∑ y ~ ∈ Y x e s ( X , y ~ ) p(\mathbf{y}|\mathbf{X})=\frac{e^{s(\mathbf{X}, \mathbf{y})}}{\sum_{\tilde{y}}\in\mathbf{Y_x}e^{s(\mathbf{X}, \mathbf{\tilde{y}})}} p(yX)=y~Yxes(X,y~)es(X,y)

Maximize the log_probability of the correct tag sequence:

l o g ( p ( y ∣ X ) ) = s ( X , y ) − l o g ( ∑ y ~ ∈ Y x e s ( X , y ~ ) = s ( X , y ) − l o g a d d y ~ ∈ Y x s ( X , y ~ ) log(p(\mathbf{y}|\mathbf{X}))={s(\mathbf{X}, \mathbf{y})}-log(\sum\limits_{{\tilde{y}}\in\mathbf{Y_x}}e^{s(\mathbf{X}, \mathbf{\tilde{y}}})=s(\mathbf{X}, \mathbf{y})-{logadd}_{\tilde{y}\in\mathbf{Y_x}} s(\mathbf{X}, \mathbf{\tilde{y}}) log(p(yX))=s(X,y)log(y~Yxes(X,y~)=s(X,y)logaddy~Yxs(X,y~)

  • All possible tag sequences for a sentence X \mathbf{X} X: Y X \mathbf{Y_X} YX

Predict the output sequence by:

y ∗ = a r g m a x y ~ ∈ Y X s ( X , y ~ ) \mathbf{y}^*=argmax_{\tilde{y}\in \mathbf{Y_X}} s(\mathbf{X}, \mathbf{\tilde{y}}) y=argmaxy~YXs(X,y~)

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值