CS224N作业A3:依存分析
本文最后更新于:几秒前
1、Machine Learning & Neural Networks (8 points)
(a)Adam Optimizer
(i)
$m$通过在每次更新时将历史方向和梯度方向进行比较,同向则矢量相加加快收敛速度,异向则减缓更新速度,这种含动量的更新方向可以减少梯度更新的动荡,这种低方差有助于保持梯度下降的效率。导致更快的收敛。
(ii)
具有更少更新历史的模型参数将获得更大的更新。这规范化了更新步骤,避免超调或单调递减的学习速率,适度调整了学习率的大小
(b)Dropout
(i)
$d\odot h$在$1-p_{drop}$的比例下降低了隐向量的规模,为了将其恢复到原规模,$\gamma = \frac{1}{1-p_{drop} }$
(ii)
训练时使用dropout可以提高训练模型的鲁棒性,防止过拟合现象发生,而评估时没有这个需要。
2. Neural Transition-Based Dependency Parsing (46 points)
(a)
Stack | Buffer | New dependency | Transition |
---|---|---|---|
[ROOT] | [I,attend,lectures,in,the,NLP,class] | Initial Configuration | |
[ROOT,I] | [attend,lectures,in,the,NLP,class] | SHIFT | |
[ROOT,I,attend] | [lectures,in,the,NLP,class] | SHIFT | |
[ROOT,attend] | [lectures,in,the,NLP,class] | attend->I | LEFT-ARC |
[ROOT,attend,lectures] | [in,the,NLP,class] | SHIFT | |
[ROOT,attend] | [in,the,NLP,class] | attend->lectures | RIGHT-ARC |
[ROOT,attend,in] | [the,NLP,class] | SHIFT | |
[ROOT,attend,in,the] | [NLP,class] | SHIFT | |
[ROOT,attend,in,the,NLP] | [class] | SHIFT | |
[ROOT,attend,in,the,NLP,class] | [] | SHIFT | |
[ROOT,attend,in,the,class] | [] | class->NLP | LEFT-ARC |
[ROOT,attend,in,class] | [] | class->the | LEFT-ARC |
[ROOT,attend,class] | [] | class->in | LEFT-ARC |
[ROOT,attend] | [] | attend->class | RIGHT-ARC |
[ROOT] | [] | ROOT->attend | RIGHT-ARC |
[ROOT] | [] | Decline |
(b)
$2n$,每个词都执行一个SHIFT,并作为关系尾执行一次LEFT-ARC或RIGHT-ARC
(c)
1 |
|
1 |
|
(d)
1 |
|
1 |
|
(e)
1 |
|
1 |
|
1 |
|
(f)
(i)
- Error type:Prepositional Phrase Attachment Error
- Incorrect dependency:concerns->risks
- Correct dependency:citing->risks
(ii)
- Error type:Modifier Attachment Error
- Incorrect dependency:left->early
- Correct dependency:afternoon->early
(iii)
- Error type:Verb Phrase Attachment Error
- Incorrect dependency:declined->decision
- Correct dependency:comment->decision
(iv)
- Error type:Coordination Attachment Error
- Incorrect dependency:affects->one
- Correct dependency:plants->one
(g)
提高模型对词性的辨析能力,对基本的短语搭配有一定的学习能力。
CS224N作业A3:依存分析
http://paopao0226.site/post/30fdab5f.html