Calibrated BERT Fine Tuning
1.0.0
此存儲庫包含我們的紙質代碼:
校準語言模型用於分佈數據和分發數據的微調,EMNLP2020。
[紙] [幻燈片]

用伯特基地的培訓:
CUDA_VISIBLE_DEVICES=0 python bert.py --dataset 20news-15 --seed 0
通過歧管平滑訓練
CUDA_VISIBLE_DEVICES=0,1 python manifold-smoothing.py --dataset 20news-15 --seed 0 --eps_in 0.0001 --eps_out 0.001 --eps_y 0.1
用伯特基礎評估
python test.py --model base --in_dataset 20news-15 --out_dataset 20news-5 --index 0
評估溫度縮放[1](基於訓練有素的BERT基本模型)
python test.py --model temperature --in_dataset 20news-15 --out_dataset 20news-5 --index 0
使用MC-Dropout [2]評估(基於訓練有素的BERT基本模型)
python test.py --model mc-dropout --in_dataset 20news-15 --out_dataset 20news-5 --eva_iter 10 --index 0
帶有歧管平滑的評估
python test.py --model manifold-smoothing --in_dataset 20news-15 --out_dataset 20news-5 --eps_in 0.0001 --eps_out 0.001 --eps_y 0.1
[1] Guo,Chuan,Geoff Pleiss,Yu Sun和Kilian Q. Weinberger。 “關於現代神經網絡的校準。”在機器學習國際會議上,第1321-1330頁。 2017。
[2] Gal,Yarin和Zoubin Ghahramani。 “作為貝葉斯近似值的輟學:代表深度學習中的模型不確定性。”在機器學習國際會議上,第1050-1059頁。 2016。