seabay / annotated-transformer

http://nlp.seas.harvard.edu/2018/04/03/attention.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Code for The Annotated Transformer blog post:

http://nlp.seas.harvard.edu/2018/04/03/attention.html

Noisy Labels and Label Smoothing

When we apply the cross-entropy loss to a classification task, we're expecting true labels to have 1, while the others 0. In other words, we have no doubts that the true labels are true, and the others are not. Is that always true? Maybe not. Many manual annotations are the results of multiple participants. They might have different criteria. They might make some mistakes. They are human, after all. As a result, the ground truth labels we have had perfect beliefs on are possible wrong.

One possibile solution to this is to relax our confidence on the labels. For instance, we can slighly lower the loss target values from 1 to, say, 0.9. And naturally we increase the target value of 0 for the others slightly as such. This idea is called label smoothing.

About

http://nlp.seas.harvard.edu/2018/04/03/attention.html


Languages

Language:Jupyter Notebook 98.8%Language:TeX 1.1%Language:Smarty 0.1%Language:Python 0.1%