Datasets:
Tasks:
Question Answering
Modalities:
Image
Formats:
imagefolder
Languages:
English
Size:
100K - 1M
ArXiv:
License:
Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
Files changed (50)
- .gitattributes+256
- parse/train/0migj5lyUZl/0migj5lyUZl.mdAdded+360
- parse/train/0migj5lyUZl/0migj5lyUZl_content_list.jsonAdded+1769
- parse/train/0migj5lyUZl/0migj5lyUZl_middle.jsonAdded
- parse/train/0migj5lyUZl/0migj5lyUZl_model.jsonAdded
- parse/train/AY8zfZm0tDd/AY8zfZm0tDd.mdAdded+578
- parse/train/AY8zfZm0tDd/AY8zfZm0tDd_content_list.jsonAdded
- parse/train/AY8zfZm0tDd/AY8zfZm0tDd_middle.jsonAdded
- parse/train/AY8zfZm0tDd/AY8zfZm0tDd_model.jsonAdded
- parse/train/BJlgNh0qKQ/BJlgNh0qKQ.mdAdded+532
- parse/train/BJlgNh0qKQ/BJlgNh0qKQ_content_list.jsonAdded
- parse/train/BJlgNh0qKQ/BJlgNh0qKQ_middle.jsonAdded
- parse/train/BJlgNh0qKQ/BJlgNh0qKQ_model.jsonAdded
- parse/train/Bkl086VYvH/Bkl086VYvH.mdAdded+193
- parse/train/Bkl086VYvH/Bkl086VYvH_content_list.jsonAdded+1057
- parse/train/Bkl086VYvH/Bkl086VYvH_middle.jsonAdded
- parse/train/Bkl086VYvH/Bkl086VYvH_model.jsonAdded
- parse/train/Goz-qsH1F14/Goz-qsH1F14.mdAdded+288
- parse/train/Goz-qsH1F14/Goz-qsH1F14_content_list.jsonAdded+1543
- parse/train/Goz-qsH1F14/Goz-qsH1F14_middle.jsonAdded
- parse/train/Goz-qsH1F14/Goz-qsH1F14_model.jsonAdded
- parse/train/H1lVvgHKDr/H1lVvgHKDr.mdAdded+243
- parse/train/H1lVvgHKDr/H1lVvgHKDr_content_list.jsonAdded+1293
- parse/train/H1lVvgHKDr/H1lVvgHKDr_middle.jsonAdded
- parse/train/H1lVvgHKDr/H1lVvgHKDr_model.jsonAdded
- parse/train/HJxiMAVtPH/HJxiMAVtPH.mdAdded+444
- parse/train/HJxiMAVtPH/HJxiMAVtPH_content_list.jsonAdded
- parse/train/HJxiMAVtPH/HJxiMAVtPH_middle.jsonAdded
- parse/train/HJxiMAVtPH/HJxiMAVtPH_model.jsonAdded
- parse/train/Hk0olMdZOIU/Hk0olMdZOIU.mdAdded+275
- parse/train/Hk0olMdZOIU/Hk0olMdZOIU_content_list.jsonAdded+1305
- parse/train/Hk0olMdZOIU/Hk0olMdZOIU_middle.jsonAdded
- parse/train/Hk0olMdZOIU/Hk0olMdZOIU_model.jsonAdded
- parse/train/QtTKTdVrFBB/QtTKTdVrFBB.mdAdded+537
- parse/train/QtTKTdVrFBB/QtTKTdVrFBB_content_list.jsonAdded
- parse/train/QtTKTdVrFBB/QtTKTdVrFBB_middle.jsonAdded
- parse/train/QtTKTdVrFBB/QtTKTdVrFBB_model.jsonAdded
- parse/train/RovX-uQ1Hua/RovX-uQ1Hua.mdAdded
- parse/train/RovX-uQ1Hua/RovX-uQ1Hua_content_list.jsonAdded
- parse/train/RovX-uQ1Hua/RovX-uQ1Hua_middle.jsonAdded
- parse/train/RovX-uQ1Hua/RovX-uQ1Hua_model.jsonAdded
- parse/train/SUyxNGzUsH/SUyxNGzUsH_model.jsonAdded
- parse/train/SkeXehR9t7/SkeXehR9t7_content_list.jsonAdded
- parse/train/SkeXehR9t7/SkeXehR9t7_middle.jsonAdded
- parse/train/cu7IUiOhujH/cu7IUiOhujH.mdAdded
- parse/train/cu7IUiOhujH/cu7IUiOhujH_content_list.jsonAdded
- parse/train/cu7IUiOhujH/cu7IUiOhujH_middle.jsonAdded
- parse/train/cu7IUiOhujH/cu7IUiOhujH_model.jsonAdded
- parse/train/ryH20GbRW/ryH20GbRW.mdAdded
- parse/train/ryH20GbRW/ryH20GbRW_content_list.jsonAdded
13455 unmodified lines13456134571345813455 unmodified linespdf/test/YfZ4ZPt8zd.pdf filter=lfs diff=lfs merge=lfs -textpdf/test/8dkp41et6U.pdf filter=lfs diff=lfs merge=lfs -textpdf/test/1tZbq88f27.pdf filter=lfs diff=lfs merge=lfs -text13455 unmodified lines1345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413455 unmodified linespdf/test/YfZ4ZPt8zd.pdf filter=lfs diff=lfs merge=lfs -textpdf/test/8dkp41et6U.pdf filter=lfs diff=lfs merge=lfs -textpdf/test/1tZbq88f27.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1g6osRcFQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ks5nebunVn_.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SkB-_mcel.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Bk6qQGWRb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HkeSdCEtDS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Byx1VnR9K7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HktK4BeCZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJTQLdqlg.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/fpJX0O5bWKJ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/dvSExzhjG9D.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/_WnGcwXLYOE.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Eql5b1_hTE4.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1g0Z3A9Fm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rk4Qso0cKm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HwGNkx1WcIs.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1gE6TEYDB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HXjt-kRBzvu.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/0z1HScLBEpb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/EbIDjBynYJ8.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1loF2NFwr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/lgNx56yZh8a.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkEfPeZRb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Ua6zuk0WRH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ByxRM0Ntvr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1gL-2A9Ym.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/3SV-ZePhnZM.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/fylclEqgvgd.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/PxTIG12RRHS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/KCzRX9N8BIH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/9BpjtPMyDQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/IkYEJ5Cps5H.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJgzzJHtDB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Syx9ET4YPB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BkrsAzWAb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HyGhN2A5tm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1gfu3EtDr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HklXn1BKDH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/r1My6sR9tX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/pULTvw9X313.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1gNc3NtvB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1lGHsA9KX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJjvxl-Cb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/4Nt1F3qf9Gn.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJ5C67-C-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/kzPtpIpF8o.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SyfIfnC5Ym.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/r1esnoAqt7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ueGDv64HmO.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/-NEXDKk8gZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJk7Gf-CZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJfvAoC9YQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hkl1iRNFwS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/cKnKJcTPRcV.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/uKhGRvM8QNH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/7_eLEvFjCi3.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Skeq30NFPr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJe1E2R5KX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Ov_sMNau-PF.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJgIPJBFvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Bklzkh0qFm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ucEXZQncukK.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1gsz30cKX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/78GFU9e56Dq.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1WRibb0Z.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJfZKiC5FX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HyebplHYwB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJvYgH9xe.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Sye_OgHFwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Ggx8fbKZ1-D.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/aJh-lFL2dFJ21.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SkeGURNtDH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/1ibNKMp8SKc.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/OmtmcPkkhT.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJgsskrFwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/c8P9NQVtmnO.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/vllRjSTWcLs.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/AHOs7Sm5H7R.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ioyq7NsR1KJ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/V5V1vGrI2z.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/5kTlVBkzSRx.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJehVyrKwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B1ZvaaeAZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/EnmG3G5SYR.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJxQxeBYwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HkezXnA9YX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1gTA5VggE.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ryxf9CEKDr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/vlcVTDaufN.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H38f_9b90BO.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/WWRBHhH158K.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HyxCxhRcY7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ryE98iR5tm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ByJHuTgA-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJMGPrcle.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJnQJXbC-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJeU_1SFvr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJlLdhNFPr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1gyl6Vtvr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/x5hh6N9bUUb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/r1lZgyBYwS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HysBZSqlx.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJl7DsR5YQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1HlA-ZAZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1fHmlbCW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJMvBjC5YQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJg76kStwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1xFWgrFPS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hkem-lrtvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJzLciCqKm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/qcjOWDHAc4J.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/q1eCa1kMfDd.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/K6y77KRUowQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/yvQKLaqNE6M.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/I6NRcao1w-X.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/-iu9-C_lan.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1m6h21Cb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/blfSjHeFM_e.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/o2tx_m7hK3t.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ARFshOO1Iu.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/tHgJoMfy6nI.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/r1WUqIceg.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJ_aoCyRZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1gza2NtwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/-msETI57gCH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJY3vK9eg.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Uq_tGs7N54M.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1sRrN-CW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/MD3D5UbTcb1.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rygqqsA9KX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S11KBYclx.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/2UyqK45_djA.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Byx9p2EtDH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BkUHlMZ0b.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B1zlp1bRW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJ9fZNqle.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rcQdycl0zyk.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/9Y7_c5ZAd5i.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/PhtFY9plHk.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJxDDpEKvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/yT7-k6Q6gda.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B1eY_pVYvB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/8xoN9ZdSW8.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/fATZNtA1-V0.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/8yKEo06dKNo.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B1eksh4KvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HkgxasA5Ym.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1egcgHtvB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ryewE3R5YX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ryrGawqex.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/IXexLXymbZ9.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/KJ5h-yfUHa.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Bkg3g2R9FX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SyxKrySYPr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/9DlCh34E1bN.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ZPa2SyGcbwh.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/jlgCDIrAv0_.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJgNkpVFPr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJg_ECEKDr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/FZ1oTwcXchK.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/WH0taVJii5_.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ZqB2GD-Ixn.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Byg9bxrtwS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/qpsl2dR9twy.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJxeWnCcF7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SkxgnnNFvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rG2ponW2Si.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/8vXYx6d8Wc.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1zriGeCZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/r1lohoCqY7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BkVsEMYel.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1eqviAqYX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJ4km2R5t7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hyx4knR9Ym.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/jWkw45-9AbL.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BkMWx309FX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Wi9tWlxh4Jwu6.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkl3m1BFDB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1lmyRNFvr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJgw51HFDr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1xNEhR9KX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/lM2971LAwV.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1ebTsActm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BkM3ibZRW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/KCd-3Pz8VjM.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B7v4QMR6Z9w.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Byg3y3C9Km.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1vyujVye.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1x2PCNKDB.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ETBc_MIMgoX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HylVB3AqYm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BJbD_Pqlg.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJgbSn09Ym.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Xh5eMZVONGF.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1ltQ3R9KQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/l2UWXn5iBQI.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJaDJZ-0W.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkGG6s0qKQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/LU687itn08w.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/y_OmkmCH9w.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1lS8oA5YQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ZzwDy_wiWv.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/XQQA6-So14.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/pvjfA4wogD6.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/5k8F6UU39V.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/dNy_RKzJacY.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJgpugrKPS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HyUmbjsiz.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ebS5NUfoMKL.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/e68IYJNOYau.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hk1iOLcle.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/wTutcPE7zOC.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rqfq0CYIekd.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/XxP75wV6JGH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkMW1hRqKX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/P9TYG0j-wtG.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HyMS8iRcK7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Ig53hpHxS4.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/x2TMPhseWAW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/E3Ys6a1NTGT.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Syx5eT4KDS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/MmCRswl1UYl.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hyx6Bi0qYm.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/BylIciRcYQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HkmaTz-0W.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/8E1-f3VhX1o.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/gV3wdEOGy_V.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/qDrpme0FAi.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/e_yvNqkJKAW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SUyxNGzUsH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SkxpxJBKwS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1FQEfZA-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/VRgITLy0l2.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/D51irFX8UOG.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/B1uvH_gC-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/yWd42CWN3c.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/gjBz22V93a.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1vuO-bCW.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkTBjG-AZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/GvqjmSwUxkY.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/H1-nGgWC-.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ryenvpEKDr.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/NiM9Q7Z95z.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJxbJeHFPS.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SyfdsjA9FX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkeYUsRqKQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ypJS_nyu-I.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Skh4jRcKQ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hk4dFjR5K7.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HkwoSDPgg.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/Hkg9HgBYwH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rJNpifWAb.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/HJIoJWZCZ.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/SJlPOCEKvH.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/rkKCdAdgx.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/S1xBioR5KX.pdf filter=lfs diff=lfs merge=lfs -textpdf/train/ogciCC6fmBl.pdf filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360# A STRONG ON-POLICY COMPETITOR TO PPO
Anonymous authors Paper under double-blind review
# ABSTRACT
As a recognized variant and improvement for Trust Region Policy Optimization (TRPO), proximal policy optimization (PPO) has been widely used with several advantages: efficient data utilization, easy implementation, and good parallelism. In this paper, a first-order gradient reinforcement learning algorithm called Policy Optimization with Penalized Point Probability Distance (POP3D), which is a lower bound to the square of total variance divergence, is proposed as another powerful variant. The penalty item has dual effects, prohibiting policy updates from overshooting and encouraging more explorations. By carefully controlled experiments on both discrete and continuous benchmarks, our approach is proved highly competitive to PPO.
# 1 INTRODUCTION
With the development of deep reinforcement learning, lots of impressive results have been produced in a wide range of fields such as playing Atari game (Mnih et al., 2015; Hessel et al., 2018), controlling robotics (Lillicrap et al., 2015), Go (Silver et al., 2017), neural architecture search (Tan et al., 2019; Pham et al., 2018).
The basis of a reinforcement learning algorithm is generalized policy iteration (Sutton & Barto, 2018), which states two essential iterative steps: policy evaluation and improvement. Among various algorithms, policy gradient is an active branch of reinforcement learning whose foundations are Policy Gradient Theorem and the most classical algorithm REINFORCEMENT (Sutton & Barto, 2018). Since then, handfuls of policy gradient variants have been proposed, such as Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015), Asynchronous Advantage Actor-Critic (A3C) (Mnih et al., 2016), Actor-Critic using Kronecker-factored Trust Region (ACKTR) (Wu et al., 2017), and Proximal Policy Optimization (PPO) (Schulman et al., 2017).
Improving the strategy monotonically had been nontrivial until Schulman et al. (2015) proposed Trust Region Policy Optimization (TRPO), in which Fisher vector product is utilized to cut down the computing burden. Specifically, Kullback–Leibler divergence (KLD) acts as a hard constraint in place of objective, because its corresponding coefficient is difficult to set for different problems. However, TRPO still has several drawbacks: too complicated, inefficient data usage. Quite a lot of efforts have been devoted to improving TRPO since then and the most commonly used one is PPO.
PPO can be regarded as a first-order variant of TRPO and have obvious improvements in several facets. In particular, a pessimistic clipped surrogate objective is proposed where TRPO’s hard constraint is replaced by the clipped action probability ratio. In such a way, it constructs an unconstrained optimization problem so that any first-order stochastic gradient optimizer can be directly applied. Besides, it’s easier to be implemented and more robust against various problems, achieving an impressive result on Atari games (Brockman et al., 2016). However, the cost of data sampling is not always cheap. Haarnoja et al. (2018) design an off-policy algorithm called Soft Actor-Critic and achieves the state of the art result by encouraging better exploration using maximum entropy.
In this paper, we focus on the on-policy improvement to improve PPO and answer the question: how to successfully leverage penalized optimization to solve the constrained one which is formulated by Schulman et al. (2015).
1. It proposes a simple variant of TRPO called POP3D along with a new surrogate objective containing a point probability penalty item, which is symmetric lower bound to the square of the total variance divergence of policy distributions. Specifically, it helps to stabilize the learning process and encourage exploration. Furthermore, it escapes from penalty item setting headache along with penalized version TRPO, where is arduous to select one fixed value for various environments.
2. It achieves state-of-the-art results among on-policy algorithms with a clear margin on 49 Atari games within 40 million frame steps based on two shared metrics. Moreover, it also achieves competitive results compared with PPO in the continuous domain. It dives into the mechanism of PPO’s improvement over TRPO from the perspective of solution manifold, which also plays an important role in our method.
3. It enjoys almost all PPO’s advantages such as easy implementation, fast learning ability.
We provide the code and training logs to make our work reproducible.
# 2 PRELIMINARY KNOWLEDGE AND RELATED WORK
# 2.1 POLICY GRADIENT
Agents interact with the environment and receive rewards which are used to adjust their policy in turn. At state $s _ { t }$ , one agent takes strategy $\pi$ and transfers to a new state $s _ { t + 1 }$ , rewarded $r _ { t }$ by the environment. Maximizing discounted return (accumulated rewards) $R _ { t }$ is its objective. In particular, given a policy $\pi$ , $R _ { t }$ is defined as
$$R _ { t } = \sum _ { n = 0 } ^ { \infty } ( r _ { t } + \gamma r _ { t + 1 } + \gamma ^ { 2 } r _ { t + 2 } + \ldots + \gamma ^ { n } r _ { t + n } ) .$$
$\gamma$ is the discounted coefficient to control future rewards, which lies in the range $( 0 , 1 )$ . Regarding a neural network with parameter $\theta$ , the policy $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ can be learned by maximizing Equation 1 using the back-propagation algorithm. Particularly, given $Q ( s , a )$ which represents the agent’s return in state $s$ after taking action $a$ , the objective function can be written as
$$\operatorname* { m a x } _ { \theta } \quad \mathbb { E } _ { s , a } \log \pi _ { \theta } ( a | s ) Q ( s , a ) .$$
Equation 2 lays the foundation for handfuls of policy gradient based algorithms. Another variant can be deduced by using
$$A ( s , a ) = Q ( s , a ) - V ( s )$$
to replace $Q ( s , a )$ in Equation 2 equivalently, $V ( s )$ can be any function so long as $V$ depends on $s$ but not $a$ . In most cases, state value function is used for $V$ , which not only helps to reduce variations but has clear physical meaning. Formally, it can be written as
$$\operatorname* { m a x } _ { \theta } \quad \mathbb { E } _ { s , a } \log \pi _ { \theta } ( a | s ) A ( s , a ) .$$
# 2.2 ADVANTAGE ESTIMATE
A commonly used method for advantage calculation is one-step estimation, which follows
$$A ( s _ { t } , a _ { t } ) = Q ( s _ { t } , a _ { t } ) - V ( s _ { t } ) = r _ { t } + \gamma V ( s _ { t + 1 } ) - V ( s _ { t } ) .$$
However, a more accurate method called generalized advantage estimation is proposed in Schulman et al. (2016), where all time steps of estimation are combined and summarized using $\lambda$ -based weights,. The generalized advantage estimator $\hat { A } _ { t } ^ { G A E ( \gamma , \lambda ) }$ is defined by Schulman et al. (2016) as
$$\begin{array} { c } { { \hat { A } _ { t } ^ { G A E ( \gamma , \lambda ) } : = ( 1 - \lambda ) * ( \hat { A } _ { t } ^ { ( 1 ) } + \lambda \hat { A } _ { t } ^ { ( 2 ) } + \lambda ^ { 2 } \hat { A } _ { t } ^ { ( 3 ) } + . . . ) = \displaystyle \sum _ { l = 0 } ^ { \infty } ( \gamma \lambda ) ^ { l } \delta _ { t + l } ^ { V } } } \\ { { \displaystyle \delta _ { t + l } ^ { V } = r _ { t + l } + \gamma V ( s _ { t + l + 1 } ) - V ( s _ { t + l } ) . } } \\ { { \displaystyle \hat { A } _ { t } ^ { ( k ) } : = \sum _ { l = 0 } ^ { k - 1 } \gamma ^ { l } \delta _ { t + l } ^ { V } = - V ( s _ { t } ) + r _ { t } + \gamma r _ { t + 1 } + \cdot \cdot \cdot + \gamma ^ { k - 1 } r _ { t + k - 1 } + \gamma ^ { k } V ( s _ { t + k } ) } } \end{array}$$
The parameter $\lambda$ meets $0 \leq \lambda \leq 1$ , which controls the trade-off between bias and variance. All methods in this paper utilize $\hat { A } _ { t } ^ { G A E ( \gamma , \lambda ) }$ to estimate the advantage.
# 2.3 TRUST REGION POLICY OPTIMIZATION
Schulman et al. (2015) propose TRPO to update the policy monotonically. In particular, its mathematical form is
$$\begin{array} { r l } { \underset { \theta } { \operatorname* { m a x } } } & { \mathbb { E } _ { t } [ \frac { \pi _ { \theta } \left( a _ { t } \vert s _ { t } \right) } { \pi _ { \theta _ { o l d } } \left( a _ { t } \vert s _ { t } \right) } \hat { A } _ { t } ] - C \mathbb { E } _ { t } [ K L [ \pi _ { \theta _ { o l d } } ( \cdot \vert s _ { t } ) , \pi _ { \theta } ( \cdot \vert s _ { t } ) ] ] } \\ & { \epsilon = \underset { s } { \operatorname* { m a x } } E _ { a \sim \pi _ { \theta } \left( a \vert s \right) } [ A _ { \pi _ { \theta _ { o l d } } } ( s , a ) ] ) } \end{array}$$
where $C$ is the penalty coefficient, $\begin{array} { r } { C = \frac { 2 \epsilon \gamma } { ( 1 - \gamma ) ^ { 2 } } } \end{array}$ .
In practice, the policy update steps would be too small if $C$ is valued as Equation 7. In fact, it’s intractable to calculate $C$ beforehand since it requires traversing all states to reach the maximum. Moreover, inevitable bias and variance will be introduced by estimating the advantages of old policy while training. Instead, a surrogate objective is maximized based on the KLD constraint between the old and new policy, which can be written as below,
$$\begin{array} { r l } { \underset { \theta } { \operatorname* { m a x } } } & { \mathbb { E } _ { t } [ \frac { \pi _ { \theta } \left( a _ { t } \vert s _ { t } \right) } { \pi _ { \theta _ { o l d } } \left( a _ { t } \vert s _ { t } \right) } \hat { A } _ { t } ] } \\ { s . t . } & { \mathbb { E } _ { t } [ K L [ \pi _ { \theta _ { o l d } } ( \cdot \vert s _ { t } ) , \pi _ { \theta } ( \cdot \vert s _ { t } ) ] ] \leq \delta } \end{array}$$
where $\delta$ is the KLD upper limitation. In addition, the conjugate gradient algorithm is applied to solve Equation 8 more efficiently. Two major problems have yet to be addressed: one is its complexity even using the conjugate gradient approach, another is compatibility with architectures that involve noise or parameter sharing tricks (Schulman et al., 2017).
# 2.4 PROXIMAL POLICY OPTIMIZATION
To overcome the shortcomings of TRPO, PPO replaces the original constrained problem with a pessimistic clipped surrogate objective where KL constraint is implicitly imposed. The loss function can be written as
$$\begin{array} { r l r } & { } & { L ^ { { \cal C } L I P } ( \theta ) = \mathbb { E } _ { t } [ \operatorname* { m i n } ( r _ { t } ( \theta ) \hat { A } _ { t } , c l i p ( r _ { t } ( \theta ) , 1 - \epsilon , 1 + \epsilon ) \hat { A } _ { t } ) ] } \\ & { } & { r _ { t } ( \theta ) = \frac { \pi _ { \theta } \left( a _ { t } | s _ { t } \right) } { \pi _ { \theta _ { o l d } } \left( a _ { t } | s _ { t } \right) } } \end{array}$$
where $\epsilon$ is a hyper-parameter to control the clipping ratio. Except for the clipped PPO version, KL penalty versions including fixed and adaptive KLD. Besides, their simulation results convince that clipped PPO performs best with an obvious margin across various domains.
# 3 POLICY OPTIMIZATION WITH PENALIZED POINT PROBABILITY DISTANCE
Before diving into the details of POP3D, we review some drawbacks of several methods, which partly motivate us.
# 3.1 DISADVANTAGES OF KULLBACK-LEIBLER DIVERGENCE
TRPO (Schulman et al., 2015) induced the following inequality1,
$$\begin{array} { c } { { \eta ( \pi _ { \theta } ) \leq L _ { \pi _ { \theta _ { o l d } } } ( \pi _ { \theta } ) + \displaystyle \frac { 2 \epsilon \gamma } { ( 1 - \gamma ) ^ { 2 } } \alpha ^ { 2 } } } \\ { { \alpha = D _ { T V } ^ { \operatorname* { m a x } } ( \pi _ { \theta _ { o l d } } , \pi _ { \theta } ) } } \\ { { D _ { T V } ^ { \operatorname* { m a x } } ( \pi _ { \theta _ { o l d } } , \pi _ { \theta } ) = \displaystyle \operatorname* { m a x } _ { s } D _ { T V } \bigl ( \pi _ { \theta _ { o l d } } | | \pi _ { \theta } \bigr ) } } \end{array}$$
TRPO replaces the square of total variation divergence $D _ { T V } ^ { m a x } ( \pi _ { \theta _ { o l d } } , \pi _ { \theta } )$ by $D _ { K L } ^ { \operatorname * { m a x } } ( \pi _ { \theta _ { o l d } } , \pi _ { \theta } ) =$ $\operatorname* { m a x } _ { s } D _ { K L } ( \pi _ { \theta _ { o l d } } | | \pi _ { \theta } )$ .
Given a discrete distribution $p$ and $q$ , their total variation divergence $D _ { T V } ( p | | q )$ is defined as
$$D _ { T V } ( p | | q ) : = \frac { 1 } { 2 } \sum _ { i } \left| p _ { i } - q _ { i } \right|$$
in TRPO (Schulman et al., 2015). Obviously, $D _ { T V }$ is symmetric by definition, while KLD is asymmetric. Formally, given state $s$ , KLD of $\pi _ { \theta _ { o l d } } ( \cdot | s )$ for $\pi _ { \boldsymbol { \theta } } ( \cdot | s )$ can be written as
$$D _ { K L } ( \pi _ { \theta _ { o l d } } ( \cdot | s ) | | \pi _ { \theta } ( \cdot | s ) ) : = \sum _ { a } \pi _ { \theta _ { o l d } } ( a | s ) \ln \frac { \pi _ { \theta _ { o l d } } ( a | s ) } { \pi _ { \theta } ( a | s ) } .$$
Similarly, KLD in the continuous domain can be defined simply by replacing summation with integration. The consequence of KLD’s asymmetry leads to a non-negligible difference of whether choose $D _ { K L } ( \pi _ { \theta _ { o l d } } | | \pi _ { \theta } )$ or $D _ { K L } ( \pi _ { \theta } | | \pi _ { \theta _ { o l d } } \rangle$ . Sometimes, those two choices result in quite different solutions. Robert compared the forward and reverse KL on a distribution, one solution matches only one of the modes, and another covers both modes (Murphy, 2012). Therefore, KLD is not an ideal bound or approximation for the expected discounted cost.
# 3.2 DISCUSSION ABOUT PESSIMISTIC PROXIMAL POLICY
In fact, PPO is called pessimistic proximal policy optimization2 in the meaning of its objective construction style. Without loss of generality, supposing $A _ { t } > 0$ for given state $s _ { t }$ and action $a _ { t }$ , and the optimal choice is $a _ { t } ^ { \star }$ . When $a _ { t } = a _ { t } ^ { \star }$ , a good update policy is to increase the probability of action to a relatively high value $a _ { t } ^ { \star }$ by adjusting $\theta$ . However, the clipped item $c l i p ( r _ { t } ( \theta ) , 1 - \epsilon , 1 + \epsilon ) \hat { A } _ { t }$ will fully contribute to the loss function by the minimum operation, which ignores further reward by zero gradients even though it’s the optimal action. Other situation with $A _ { t } < 0$ can be analyzed in the same manner.
However, if the pessimistic limitation is removed, PPO’s performance decreases dramatically (Schulman et al., 2017), which is again confirmed by our preliminary experiments. In a word, the pessimistic mechanism plays a very critical role for PPO in that it has a relatively weak preference for a good action decision at a given state, which in turn affects its learning efficiency.
# 3.3 RESTRICTED SOLUTION MANIFOLD FOR EXACT DISTRIBUTION MATCHING
To be simple, we don’t take the model identifiability issues along with deep neural network into account here because they don’t affect the following discussion much (LeCun et al., 2015). Suppose $\pi _ { \theta \star }$ is the optimal solution for a given environment, in most cases, more than one parameter set for $\theta$ can generate the ideal policy, especially when $\pi _ { \theta \star }$ is learned by a deep neural network. In other words, the relationship between $\theta$ and $\pi _ { \theta \star }$ is many to one. On the other hand, when agents interact with the environment using policy represented by neural networks, they prefer to takes the action with the highest probability. Although some strategies of enhancing exploration are applied, they don’t affect the policy much in the meaning of expectation.
RL methods can help agents learn useful policies after fully interacting with the environment. Take Atari-Pong game for example, when an agent sees a Pong ball coming close to the right (state $s _ { 1 }$ ), its optimal policy is moving the racket to the right position (for example, the "RIGHT" action) with a distribution $p _ { \theta _ { 1 } } ^ { \bar { s _ { 1 } } } = [ 0 . 0 5 , \mathbf { \bar { 0 } } . 0 5 , 0 . 1 , 0 . 7 , 0 . 0 5 , 0 . 0 5 ] ^ { 3 }$ . The probability of selecting "RIGHT" is a relatively high value such as 0.7. It’s almost impossible to push it to be 1.0 exactly since it’s produced by a softmax operation on several discrete actions. In fact, we hardly obtain the optimal solution accurately. Instead, our goal is to find a good enough policy. In this case, the policy of pushing $p ( { \mathrm { R I G H T } } | s _ { 1 } )$ above a threshold is sufficient to be a good one. In other words, paying attention to the most critical actions is sufficient, and we don’t care much the probability value of the other non-critical actions. For example, a good policy at $s _ { 1 }$ is $[ ? , ? , \geq 0 . 7$ , ?,?,?]. Note that $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ is represented by a neural network parameterized using $\theta$ and a good policy for the whole game means that the network can perform well across the whole state space. Focusing on those critical actions at each state4 and ignoring non-critical ones can help the network learn better and more easily.
Using a penalty such as KLD cannot utilize this good property, because it involves all of the actions’ probabilities. Moreover, it doesn’t stop penalizing unless two distributions become exactly indifferent or the advantage item is large enough to compensate for the KLD cost. Therefore, even if $\theta$ outputs hat two $\theta _ { o l d }$ the same meters for obaband ty for th, where s. Su and $\theta _ { 1 } \colon \theta _ { 2 }$ $\theta _ { 3 }$ $\mathcal { P } _ { \theta _ { 2 } } ^ { s _ { 1 } - } = [ 0 . 0 1 , 0 . 1 5 , 0 . 0 5 , 0 . 7 , 0 . 0 1 , 0 . 0 8 ]$ $p _ { \theta _ { 3 } } ^ { s _ { 1 } } =$ [0.01, 0.01, 0.01, 0.7, 0.26, 0.01]. When the agent already chooses RIGHT at $S _ { 1 }$ , the loss item from a good penalized distance should be small. However, $D _ { K L } ( \pi _ { \theta _ { 1 } } ( \cdot | s _ { 1 } ) | | \pi _ { \theta _ { 2 } } ( \cdot | s _ { 1 } ) ) { = } 0 . 1 5$ and $D _ { K L } \big ( \pi _ { \theta _ { 1 } } ( \cdot | s _ { 1 } ) \vert \vert \pi _ { \theta _ { 3 } } ( \cdot | s _ { 1 } ) \big ) { = } 0 . 3 9$ . However, it’s not necessary to require the distribution of other actions $( \mathbf { \hat { \Pi } } \mathbf { \tilde { N O O P } } ^ { \prime }$ , ‘FIRE’, ‘LEFT’, ‘RIGHTFIRE’, ‘LEFTFIRE’) of $p _ { \theta _ { 2 } } ^ { s _ { 1 } }$ near to $p _ { \theta _ { 1 } } ^ { s _ { 1 } }$ . Instead, it’s better to relax this requirement to enlarge the freedom degree of the network and focus on learning important actions. Doing this brings another advantage, the agent can explore more for non critical actions. From the perspective of the manifold, optimal parameters constitute a solution manifold. The KLD penalty will act until $\theta$ exactly locates in the solution if possible, akin to mapping a point onto a curve. Instead, if the agent concentrates only on critical actions like a human does, it’s much easier to approach the manifold in a higher dimension. This is comparable to expanding the solution manifold by at least one dimension, e.g. from curves to surfaces or from surfaces to spheres.
# 3.4 EXPLORATION
One shared highlight in reinforcement learning is the balance between exploitation and exploration. For a policy-gradient algorithm, entropy is added in the total loss to encourage exploration in most cases. When included in the loss function, KLD penalizes the old and new policy probability mismatch for all possible actions as Equation 12 given a state $s$ . This strict punishment for every action’s probability mismatch, which discourages exploration.
# 3.5 POINT PROBABILITY DISTANCE
To overcome the above-mentioned shortcomings, we propose a surrogate objective with the point probability distance penalty, which is symmetric and more optimistic than PPO. In the discrete domain, when the agent takes action $a$ , the point probability distance between $\pi _ { \theta _ { o l d } } ( \cdot | s )$ and $\pi _ { \boldsymbol { \theta } } ( \cdot | \boldsymbol { s } )$ is defined by
$$D _ { p p } ^ { a } ( \pi _ { \theta _ { o l d } } ( \cdot | s ) , \pi _ { \theta } ( \cdot | s ) ) = ( \pi _ { \theta _ { o l d } } ( a | s ) - \pi _ { \theta } ( a | s ) ) ^ { 2 } .$$
Attention should be paid to the penalty definition item, the distance is measured by the point probability, which emphasizes its mismatch for the sampled actions for a state. Unless it would lead to confusion, we omit $a$ for simplicity in the following sections. Undoubtedly, $D _ { p p }$ is symmetric by definition. Furthermore, it can be proved that $D _ { p p }$ is indeed a lower bound for the total variance divergence $D _ { T V }$ . As a special case, it can be easily proved that for binary distribution, $D _ { T V } ^ { 2 } ( p | | q ) =$ $D _ { p p } ( p | | q )$ .
Theorem 3.1. For two discrete probability distributions $p$ and $q$ with $K$ values, then $D _ { T V } ^ { 2 } ( p | | q ) \geq$ $D _ { p p } ^ { a } ( p | | q )$ holds for any action a and $\mathbb { E } _ { a } D _ { p p } ^ { a } ( p | | q )$ is a lower bound for $D _ { T V } ^ { 2 } ( p | | q )$ .
Proof. Let $p _ { l } = \alpha , q _ { l } = \beta$ for the $l$ -th action $a$ , and suppose $a \geq b$ without loss of generalization. So,
$$\begin{array} { l c l } { \displaystyle D _ { T V } ^ { 2 } ( p | | q ) } & { = } & { \displaystyle ( \frac { 1 } { 2 } \sum _ { i = 1 } ^ { K } | p _ { i } - q _ { i } | ) ^ { 2 } = ( \frac { 1 } { 2 } \sum _ { i = 1 , i \neq l } ^ { K } | p _ { i } - q _ { i } | + \frac { 1 } { 2 } | p _ { l } - q _ { l } | ) ^ { 2 } } \\ & { \ge } & { \displaystyle ( \frac { 1 } { 2 } | \sum _ { i = 1 , i \neq l } ^ { K } p _ { i } - q _ { i } | + \frac { 1 } { 2 } ( \alpha - \beta ) ) ^ { 2 } = ( \frac { 1 } { 2 } | 1 - \alpha - ( 1 - \beta ) | + \frac { 1 } { 2 } ( \alpha - \beta ) ) ^ { 2 } } \\ & { = } & { \displaystyle ( \frac { 1 } { 2 } ( \alpha - \beta ) + \frac { 1 } { 2 } ( \alpha - \beta ) ) ^ { 2 } = D _ { p p } ^ { \alpha } ( p | | q ) } \\ { \mathbb { E } _ { a } D _ { p p } ^ { a } ( p | | q ) } & { = } & { \displaystyle \sum _ { a } p ( a ) D _ { p p } ^ { a } ( p | | q ) \le \sum _ { a } p ( a ) D _ { T V } ^ { 2 } ( p | | q ) = D _ { T V } ^ { 2 } ( p | | q ) } \end{array}$$
Since $0 \leq \pi _ { \theta } ( a | s ) \leq 1$ holds for discrete action space, $D _ { p p }$ has a lower and upper boundary: $0 \leq D _ { p p } \leq 1$ . Moreover, $D _ { p p }$ is less sensitive to action space dimension than KLD, which has a similar effect as PPO’s clipped ratio to increase robustness and enhance stability. Equation 13 stays unchanged for the continuous domain, and the only difference is $\pi _ { \boldsymbol { \theta } } ( a | \boldsymbol { s } )$ represents point probability density instead of probability.
# 3.6 POP3D
After we have defined the point probability distance, we use a new surrogate objective $f _ { \theta }$ for POP3D, which can be written as
$$\operatorname* { m a x } _ { \theta } \quad \mathbb { E } _ { t } [ \frac { \pi _ { \theta } ( a _ { t } | s _ { t } ) } { \pi _ { \theta _ { o l d } } ( a _ { t } | s _ { t } ) } \hat { A } _ { t } - \beta D _ { p p } ^ { a _ { t } } ( \pi _ { \theta _ { o l d } } ( \cdot | s _ { t } ) , \pi _ { \theta } ( \cdot | s _ { t } ) ) ] ,$$
where $\beta$ is the penalized coefficient. These combined advantages lead to considerable performance improvement, which escapes from the dilemma of choosing preferable penalty coefficient. Besides, we use generalized advantage estimates to calculate $\hat { A } _ { t }$ . Algorithm 1 shows the complete iteration process of POP3D. Moreover, it possesses the same computing cost and data efficiency as PPO.
# Algorithm 1 POP3D
1: Input: max iterations $L$ , actors $N$ , epochs $K$ 2: for iteration $= 1$ to $L$ do 3: for actor $= 1$ to $N$ do 4: Run policy $\pi _ { \theta _ { o l d } }$ for $T$ time steps 5: Compute advantage estimations $\hat { A } _ { 1 } , . . . , \hat { A } _ { T }$ 6: end for 7: for epoch $, = 1$ to $K$ do 8: Optimized loss objective $f ( \theta )$ w.r.t $\theta$ with mini-batch size $M \leq N T$ , then update $\theta _ { o l d } \theta$ . 9: end for 10: end for
# 3.7 WORKING MECHANISM OF POP3D
As for the toy example in Section 3.3, Therefore, it can help the agent to f $D _ { p p } ^ { R I G H T } ( \pi _ { \theta _ { 1 } } ( \cdot | s ) | | \pi _ { \theta _ { 2 } } ( \cdot | s ) = D _ { p p } ^ { R I G H T } ( \pi _ { \theta _ { 1 } } ( \cdot | s ) | | \pi _ { \theta _ { 3 } } ( \cdot | s ) = 0 .$ $\theta$ $\theta _ { o l d }$ Equation 14, the gradient $f ( \theta )$ w.r.t. $\theta$ can be written as
$$\begin{array} { l l } { \nabla _ { \theta } f ( \theta ) = \frac { \nabla _ { \theta } \pi _ { \theta } \left( a _ { t } | s _ { t } \right) } { \pi _ { \theta _ { o l d } } \left( a _ { t } | s _ { t } \right) } \hat { A } _ { t } - 2 \beta [ \pi _ { \theta } ( a _ { t } | s _ { t } ) - \pi _ { \theta _ { o l d } } ( a _ { t } | s _ { t } ) ] \nabla _ { \theta } \pi _ { \theta } ( a _ { t } | s _ { t } ) } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \hat { A } _ { t } } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \pi _ { \theta } \pi _ { \theta } ( a _ { t } | s _ { t } ) [ \frac { \hat { A } _ { t } } { \pi _ { \theta _ { o l d } } \left( a _ { t } | s _ { t } \right) } - 2 \beta ( \pi _ { \theta } ( a _ { t } | s _ { t } ) - \pi _ { \theta _ { o l d } } ( a _ { t } | s _ { t } ) ) ] } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \hat { A } _ { t } } \\ { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array}$$
where $\delta ( \boldsymbol { a } _ { t } | \boldsymbol { s } _ { t } ) : = \pi _ { \boldsymbol { \theta } } ( \boldsymbol { a } _ { t } | \boldsymbol { s } _ { t } ) - \pi _ { \boldsymbol { \theta } _ { o l d } } ( \boldsymbol { a } _ { t } | \boldsymbol { s } _ { t } )$ . Suppose the agent selects $a _ { t }$ at $s _ { t }$ using $\pi _ { \theta _ { o l d } }$ and obtains a positive advantage $\hat { A } _ { t }$ , if $\pi _ { \boldsymbol { \theta } } \big ( a _ { t } | \boldsymbol { s } _ { t } \big )$ is larger than $\pi _ { \boldsymbol { \theta } } ( a _ { t } | \boldsymbol { s } _ { t } )$ , then $2 \beta \delta ( a _ { t } | s _ { t } )$ will play a damping role to avoid too greedy preference for $a _ { t }$ (i.e. too large probability), which in turn leaves more space for other actions to be explored. Other cases such as negative $\hat { A } _ { t }$ can be analyzed similarly. The hyper-parameter $\beta$ controls the damping force.
In the early stage of learning, $\pi _ { \theta _ { o l d } } ( a _ { t } | s _ { t } )$ is near $1 / K$ (taking $K$ discrete spaces for example) and the magnitude of $\hat { A } _ { t }$ is large, while the damping force is a bit weak. Therefore, the agent learns fast. Then $\beta$ shows a relative stronger force to avoid overshooting for action selection and encourage more exploration. As for the final stage, the policy changes slowly because the learning rate is low, where $\delta ( \boldsymbol { a } _ { t } | \boldsymbol { s } _ { t } )$ is small and therefore it converges.
# 3.8 RELATIONSHIP WITH PPO
To conclude this section, we take some time to see why PPO works by taking the above viewpoints into account. When we pour more attention to Equation 9, the ratio $r _ { t } ( \boldsymbol { \dot { \theta } } )$ only involves the probability for given action $a$ , which is chosen by policy $\pi$ . In other words, all other actions’ probabilities except $a$ are not activated, which no longer contribute to back-propagation and allow probability mismatch, which encourage exploration. This procedure behaves similarly to POP3D, which helps the network to learn more easily. Above all, POP3D is designed to conform with the regulations for overcoming above mentioned problems, and in the next section experiments from commonly used benchmarks will evaluate its performance.
# 4 EXPERIMENTS
# 4.1 CONTROLLED EXPERIMENTS SETUP
OpenAI Gym is a well-known simulation environment to test and evaluate various reinforcement algorithms, which is composed of both discrete (Atari) and continuous (Mujoco) domains (Brockman et al., 2016). Most recent deep reinforcement learning methods such as DQN variants (Van Hasselt et al., 2016; Wang et al., 2016; Schaul et al., 2015; Bellemare et al., 2017; Hessel et al., 2018), A3C, ACKTR, PPO are evaluated using only one set of hyper-parameters5. Therefore, we evaluate POP3D’s performance on 49 Atari games(v4, discrete action space ) and 7 Mujoco (v2, continuous).
Since PPO is a distinguished RL algorithm which defeats various methods such as A3C, A2C ACKTR, we focus on a detailed quantitative comparison with fine-tuned PPO. And we don’t consider large scale distributed algorithms Apex-DQN (Horgan et al., 2018) and IMPALA (Espeholt et al., 2018), because we concentrate on comparable and fair evaluation, while the latter is designed to apply with large scale parallelism. Nevertheless, some orthogonal improvements from those methods have the potentials to improve our method further. Furthermore, we include TRPO to acts as a baseline method. Engstrom et al. (2020) carefully study the underlying factor that helps PPO outperform TPRO. To avoid unfair comparisons, we carefully control the settings. In addition, quantitative comparisons between KLD and point probability penalty helps to convince the critical role of the latter, where the former strategy is named fixed KLD in Schulman et al. (2017) and can act as another good baseline in this context, named by BASELINE below.
In particular, we retrained one agent for each game with fine-tuned hyper-parameters6. To avoid the problems of reproduction about reinforcement algorithms mentioned in Henderson et al. (2018), we take the following measures:
• Use the same training steps and make use of the same amount of game frames(40M for Atari game and 10M for Mujoco). • Use the same neural network structures, which is the CNN model with one action head and one value head for the Atari game, and a fully-connected model with one value head and one action head which produces the mean and standard deviation of diagonal Gaussian distribution as PPO. • Initialize parameters using the same strategy as PPO. • Keep Gym wrappers from Deepmind such as reward clipping and frame stacking unchanged for Atari domain, and enable 30 no-ops at the beginning of each episode. • Use Adam optimizer (Kingma & Ba, 2014) and decrease $\alpha$ linearly from 1 to 0 for Atari domain as PPO.
To facilitate further comparisons with other approaches, we release the seeds and detailed results7(across the entire training process for different trials). In addition, we randomly select three seeds from $\{ 0 , 1 0 , 1 0 0 , 1 0 0 0 , 1 0 0 0 0 \}$ for two domains, {10,100,1000} for Atari and {0,10,100} for Mujoco in order to decrease unfavorable subjective bias stated in Henderson et al. (2018).
# 4.2 EVALUATION METRICS
PPO utilizes two score metrics for evaluating agents’ performance using various RL algorithms. One is the mean score of the last 100 episodes $S c o r e _ { 1 0 0 }$ , which measures how high a strategy can hit eventually. Another is the average score across all episodes $S c o r e _ { a l l }$ , which evaluates how fast an agent learns. In this paper, we conform to this routine and calculate individual metric by averaging three seeds in the same way.
# 4.3 DISCRETE DOMAIN COMPARISONS
Hyper-parameters We search hyper-parameter four times for the penalty coefficient $\beta$ based on four Atari games while keeping other hyper-parameters unchanged as PPO and fix $\beta = 5 . 0$ to train all Atari games. For BASELINE, we also search hyper-parameter four times on penalty coefficient $\beta$ and choose $\beta = 1 0 . 0$ . To save space, detailed hyper-parameter setting can be found in Table 6 and 7.
This process is not beneficial for POP3D owing to missing optimization for all hyper-parameters. There are two reasons to make this choice. On the one hand, it’s the simplest way to make a relatively fair comparison group such as keeping the same iterations and epochs within one loop to our knowledge. On the other hand, this process imposes low search requirements for time and resources. That’s to say, we can draw a conclusion that our method is at least competitive to PPO if it performs better on benchmarks.
Comparisons The final score of each game is averaged by three different seeds and the highest is in bold. As Table 1 shows, POP3D outperforms 32 across 49 Atari games given the final score, followed by PPO with 11, BASELINE with 5, and TRPO with 1. Interestingly, for games that POP3D score highest, BASELINE score worse than PPO more often than the other way round, which means that POP3D is not just an approximate version of BASELINE.
For another metric, POP3D wins 20 out of 49 Atari games which matches PPO with 18, followed by BASELINE with 6, and last ranked by TRPO with 5. If we measure the stability of an algorithm by the score variance of different trials, POP3D scores high with good stability across various seeds. And PPO behaves worse in Game Kangaroo and UpNDown. Interestingly, BASELINE shows a large variance for different seeds for several games such as BattleZone, Freeway, Pitfall, and Seaquest. POP3D reveals its better capacity to score high and similar fast learning ability in this domain. The detailed metric for each game is listed in Table 3 and 4.
# 4.4 CONTINUOUS DOMAIN COMPARISONS
Hyper-parameters For PPO, we use the same hyperparameter configuration as Schulman et al. (2017). Regarding POP3D, we search on two games three times and select 5.0 as the penalty coefficient. More details about hyper-parameters for PPO and POP3D are listed in Table 8. Unlike the Atari domain, we utilize the constant learning rate strategy as Schulman et al. (2017) in the continuous domain instead of the linear decrease strategy.
Comparison Results The scores are also averaged on three trials and summarized in Table 1. POP3D occupies 6 out of 7 games on $S c o r e _ { 1 0 0 }$ . Evaluation metrics of both across different games are illustrated in Table 2
Table 1: Top: The number of games "won" by each algorithm for Atari games. Bottom: The number of games won by each algorithm for Mujoco games. Each experiment is averaged across three seeds.
<table><tr><td>Metric</td><td colspan="4">PPO POP3D BASELINE TRPO</td></tr><tr><td>Score100 Scoreall</td><td>11 18</td><td>32 20</td><td>5 6</td><td>1 5</td></tr><tr><td></td><td>Metric</td><td>PPO POP3D</td><td></td><td></td></tr><tr><td></td><td>Score100</td><td>1</td><td>6</td><td></td></tr><tr><td></td><td>Scoreall</td><td>4</td><td>3</td><td></td></tr></table>
and 5. In summary, both metrics indicate that POP3D is competitive to PPO in the continuous domain.
# 5 CONCLUSION
In this paper, we introduce a new reinforcement learning algorithm called POP3D (Policy Optimization with Penalized Point Probability Distance), which acts as a TRPO variant like PPO. Compared with KLD that is an upper bound for the square of total variance divergence between two distributions, the penalized point probability distance is a symmetric lower bound. Besides, it equivalently expands the optimal solution manifold effectively while encouraging exploration, which is a similar mechanism implicitly possessed by PPO. The proposed method not only possesses several critical improvements from PPO but outperforms with a clear margin on 49 Atari games from the respective of final scores and meets PPO’s match as for fast learning ability.
Table 2: Mean final scores (last 100 episodes) of PPO, POP3D on Mujoco games after 10M frames. The results are averaged by three trials.
<table><tr><td>Game</td><td>PPO</td><td>POP3D</td></tr><tr><td>HalfCheetah</td><td>2726.03</td><td>3184.54</td></tr><tr><td>Hopper</td><td>2027.21</td><td>1452.09</td></tr><tr><td>InvertedDblPendulum 4455.03</td><td></td><td>4907.64</td></tr><tr><td>InvertedPendulum</td><td>544.02</td><td>741.94</td></tr><tr><td>Reacher</td><td>-5.00</td><td>-4.29</td></tr><tr><td>Swimmer</td><td>111.88</td><td>112.08</td></tr><tr><td>Walker2d</td><td>1112.25</td><td>3966.01</td></tr></table>
More interestingly, it not only suffers less from the penalty item setting headache along with TRPO, where is arduous to select one fixed value for various environments but outperforms fixed KLD baseline from PPO. In summary, POP3D is highly competitive and an alternative to PPO.
# REFERENCES
Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. arXiv preprint arXiv:1707.06887, 2017.
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, and Aleksander Madry. Implementation matters in deep rl: A case study on ppo and trpo. In International Conference on Learning Representations, 2020. URL https://openreview. net/forum?id ${ . } = { }$ r1etN1rtPB.
Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymir Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. arXiv preprint arXiv:1802.01561, 2018.
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning, pp. 1861–1870, 2018.
Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
Dan Horgan, John Quan, David Budden, Gabriel Barth-Maron, Matteo Hessel, Hado van Hasselt, and David Silver. Distributed prioritized experience replay. In International Conference on Learning Representations, 2018.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015.
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540):529–533, 2015.
Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pp. 1928–1937, 2016.
Kevin P Murphy. Machine learning: a probabilistic perspective. MIT press, 2012.
Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean. Efficient neural architecture search via parameters sharing. In International Conference on Machine Learning, pp. 4095–4104, 2018.
Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015.
John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International conference on machine learning, pp. 1889–1897, 2015.
John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. In ICLR, 2016.
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. nature, 550(7676):354–359, 2017.
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2820–2828, 2019.
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In Thirtieth AAAI conference on artificial intelligence, 2016.
Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando Freitas. Dueling network architectures for deep reinforcement learning. In International conference on machine learning, pp. 1995–2003, 2016.
Yuhuai Wu, Elman Mansimov, Roger B Grosse, Shun Liao, and Jimmy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. In Advances in neural information processing systems, pp. 5279–5288, 2017.
# A SCORE TABLES AND CURVES
Mean scores of various methods for Atari domain are listed in Table 3 and 4.
Table 3: Mean final scores (last 100 episodes) of PPO, POP3D, BASELINE and TRPO on Atari games after 40M frames. The results are averaged on three trials.
<table><tr><td>game</td><td>POP3D</td><td>PPO</td><td>BASELINE</td><td>TPRO</td></tr><tr><td>Alien</td><td>1510.80</td><td>1431.17</td><td>1311.23</td><td>1110.40</td></tr><tr><td>Amidar</td><td>729.15</td><td>790.75</td><td>655.10</td><td>200.56</td></tr><tr><td>Assault</td><td>5400.13</td><td>4438.82</td><td>1846.75</td><td>1363.46</td></tr><tr><td>Asterix</td><td>4310.67</td><td>3483.17</td><td>3657.67</td><td>2651.33</td></tr><tr><td>Asteroids</td><td>2488.10</td><td>1605.33</td><td>1615.37</td><td>2205.70</td></tr><tr><td>Atlantis</td><td>2193605.67</td><td>2140536.33</td><td>1515993.33</td><td>1419104.67</td></tr><tr><td>BankHeist</td><td>1212.23</td><td>1206.67</td><td>1124.43</td><td>1125.17</td></tr><tr><td>BattleZone</td><td>15466.67</td><td>14766.67</td><td>14690.00</td><td>15123.33</td></tr><tr><td>BeamRider</td><td>4549.00</td><td>2624.19</td><td>6898.09</td><td>5073.75</td></tr><tr><td>Bowling</td><td>38.99</td><td>47.27</td><td>30.48</td><td>31.24</td></tr><tr><td>Boxing</td><td>97.23</td><td>93.70</td><td>65.33</td><td>50.07</td></tr><tr><td>Breakout</td><td>458.41</td><td>281.93</td><td>67.70</td><td>40.65</td></tr><tr><td>Centipede</td><td>3315.44</td><td>3565.18</td><td>3393.93</td><td>3353.14</td></tr><tr><td>Chopper-Command</td><td>6308.33</td><td>4872.67</td><td>2676.00</td><td>2286.67</td></tr><tr><td>CrazyClimber</td><td>120247.33</td><td>105940.00</td><td>98219.67</td><td>87522.33</td></tr><tr><td>DemonAttack</td><td>61147.33</td><td>26740.57</td><td>57476.65</td><td>21525.08</td></tr><tr><td>DoubleDunk</td><td>-7.89</td><td>-11.22</td><td>-8.61</td><td>-10.04</td></tr><tr><td>Enduro</td><td>459.85</td><td>698.46</td><td>518.41</td><td>365.95</td></tr><tr><td>FishingDerby</td><td>28.99</td><td>17.72</td><td>-64.27</td><td>-69.64</td></tr><tr><td>Freeway</td><td>21.21</td><td>21.11</td><td>18.37</td><td>20.89</td></tr><tr><td>Frostbite</td><td>316.87</td><td>280.30</td><td>280.30</td><td>291.77</td></tr><tr><td>Gopher</td><td>6207.00</td><td>1791.00</td><td>940.87</td><td>938.27</td></tr><tr><td>Gravitar</td><td>557.17</td><td>753.50</td><td>449.00</td><td>495.17</td></tr><tr><td>IceHockey</td><td>-4.12</td><td>-4.83</td><td>-3.61</td><td>-4.61</td></tr><tr><td>Jamesbond</td><td>527.17</td><td>488.17</td><td>685.17</td><td>901.67</td></tr><tr><td>Kangaroo</td><td>3891.67</td><td>6845.00</td><td>1850.00</td><td>1214.67</td></tr><tr><td>Krull</td><td>7715.68</td><td>8329.08</td><td>7204.95</td><td>4881.65</td></tr><tr><td>KungFuMaster</td><td>33728.00</td><td>29958.67</td><td>29843.67</td><td>26808.00</td></tr><tr><td>Montezuma-Revenge</td><td>0.00</td><td>10.67</td><td>0.67</td><td>0.00</td></tr><tr><td>MsPacman</td><td>1683.87</td><td>1981.50</td><td>1170.70</td><td>1133.57</td></tr><tr><td>NameThisGame</td><td>6065.63</td><td>5397.47</td><td>5672.60</td><td>5604.10</td></tr><tr><td>Pitfall</td><td>0.00</td><td>-2.32</td><td>-17.26</td><td>-43.60</td></tr><tr><td>Pong</td><td>20.50</td><td>20.80</td><td>20.79</td><td>19.63</td></tr><tr><td>PrivateEye</td><td>79.67</td><td>36.50</td><td>99.67</td><td>99.33</td></tr><tr><td>Qbert</td><td>15396.67</td><td>14556.83</td><td>4114.00</td><td>3781.58</td></tr><tr><td>Riverraid</td><td>8052.23</td><td>7360.40</td><td>7722.00</td><td>6773.67</td></tr><tr><td>RoadRunner</td><td>44679.67</td><td>36289.33</td><td>43626.33</td><td>24061.33</td></tr><tr><td>Robotank</td><td>4.60</td><td>14.15</td><td>24.60</td><td>24.18</td></tr><tr><td>Seaquest</td><td>1807.47</td><td>1470.60</td><td>1501.47</td><td>926.40</td></tr><tr><td>SpaceInvaders</td><td>1216.15</td><td>944.63</td><td>814.53</td><td>634.07</td></tr><tr><td>StarGunner</td><td>48984.00</td><td>33862.00</td><td>47738.00</td><td>33442.67</td></tr><tr><td>Tennis</td><td>-8.32</td><td>-13.74</td><td>-19.13</td><td>-18.40</td></tr><tr><td>TimePilot</td><td>3770.33</td><td>5321.33</td><td>6278.33</td><td>5701.00</td></tr><tr><td>Tutankham</td><td>241.21</td><td>177.58</td><td>135.80</td><td>136.21</td></tr><tr><td>UpNDown</td><td>242701.51</td><td>153160.66</td><td>11815.87</td><td>10949.53</td></tr><tr><td>Venture</td><td>36.33</td><td>0.00</td><td>4.00</td><td>0.00</td></tr><tr><td>VideoPinball</td><td>37780.70</td><td>31577.24</td><td>21438.64</td><td>25095.20</td></tr><tr><td>WizardOfWor</td><td>4704.00</td><td>4886.67</td><td>3533.67</td><td>3103.00</td></tr><tr><td>Zaxxon</td><td>9472.00</td><td>5728.67</td><td>1179.67</td><td>4796.67</td></tr></table>
Table 4: All episodes mean scores of PPO, POP3D, BASELINE and TRPO on Atari games after 40M frames. The results are averaged by three trials.
<table><tr><td>game</td><td>POP3D</td><td>PPO</td><td>BASELINE</td><td>TRPO</td></tr><tr><td>Alien</td><td>1147.29</td><td>1115.94</td><td>851.13</td><td>841.08</td></tr><tr><td>Amidar</td><td>299.55</td><td>413.46</td><td>295.91</td><td>169.12</td></tr><tr><td>Assault</td><td>2139.15</td><td>2168.93</td><td>1159.50</td><td>971.78</td></tr><tr><td>Asterix</td><td>2004.43</td><td>2102.10</td><td>1884.68</td><td>1342.83</td></tr><tr><td>Asteroids</td><td>1652.48</td><td>1470.46</td><td>1477.71</td><td>1760.73</td></tr><tr><td>Atlantis</td><td>488134.03</td><td>596807.27</td><td>192798.74</td><td>174394.94</td></tr><tr><td>BankHeist</td><td>662.26</td><td>643.94</td><td>859.25</td><td>831.95</td></tr><tr><td>BattleZone</td><td>11131.44</td><td>9387.77</td><td>11674.30</td><td>12918.39</td></tr><tr><td>BeamRider</td><td>1965.27</td><td>1460.59</td><td>3321.25</td><td>2431.63</td></tr><tr><td>Bowling</td><td>37.97</td><td>39.41</td><td>33.90</td><td>30.99</td></tr><tr><td>Boxing</td><td>83.12</td><td>78.61</td><td>27.92</td><td>23.07</td></tr><tr><td>Breakout</td><td>143.60</td><td>124.98</td><td>29.99</td><td>26.56</td></tr><tr><td>Centipede</td><td>3056.81</td><td>3344.63</td><td>3042.48</td><td>3142.22</td></tr><tr><td>Chopper-</td><td></td><td></td><td></td><td></td></tr><tr><td>Command</td><td>3269.47</td><td>3106.14</td><td>1780.38</td><td>1595.82</td></tr><tr><td>CrazyClimber</td><td>97257.52</td><td>90169.60</td><td>69258.31</td><td>63189.78</td></tr><tr><td>DemonAttack</td><td>7611.27</td><td>7180.43</td><td>9814.42</td><td>6204.68</td></tr><tr><td>DoubleDunk</td><td>-13.70</td><td>-15.45</td><td>-15.93</td><td>-14.57</td></tr><tr><td>Enduro</td><td>107.84</td><td>321.20</td><td>92.59</td><td>140.67</td></tr><tr><td>FishingDerby</td><td>-21.00</td><td>-27.51</td><td>-81.90</td><td>-81.97</td></tr><tr><td>Freeway</td><td>17.76</td><td>15.87</td><td>15.93</td><td>17.33</td></tr><tr><td>Frostbite</td><td>276.47</td><td>267.73</td><td>270.42</td><td>270.57</td></tr><tr><td>Gopher</td><td>1556.29</td><td>1196.20</td><td>900.74</td><td>875.93</td></tr><tr><td>Gravitar</td><td>413.20</td><td>509.81</td><td>342.74</td><td>317.86</td></tr><tr><td>IceHockey</td><td>-4.67</td><td>-5.50</td><td>-4.61</td><td>-5.21</td></tr><tr><td>Jamesbond</td><td>358.54</td><td>394.45</td><td>380.91</td><td>519.01</td></tr><tr><td>Kangaroo</td><td>1614.63</td><td>2199.74</td><td>937.98</td><td>566.85</td></tr><tr><td>Krull</td><td>6538.16</td><td>7195.24</td><td>4760.66</td><td>3861.87</td></tr><tr><td>KungFuMaster</td><td>23253.96</td><td>23283.31</td><td>19637.58</td><td>18293.12</td></tr><tr><td>Montezuma- Revenge</td><td>0.14</td><td>0.74</td><td>0.22</td><td>0.12</td></tr><tr><td>MsPacman</td><td>1214.09</td><td>1482.77</td><td>860.63</td><td>864.84</td></tr><tr><td>NameThisGame</td><td>5353.14</td><td>5199.37</td><td>4562.32</td><td>4504.67</td></tr><tr><td>Pitfall</td><td>-2.41</td><td>-5.81</td><td>-31.27</td><td>-33.93</td></tr><tr><td>Pong</td><td>13.24</td><td>12.83</td><td>7.20</td><td>-2.91</td></tr><tr><td>PrivateEye</td><td>87.37</td><td>52.76</td><td>56.70</td><td>98.79</td></tr><tr><td>Qbert</td><td>5852.10</td><td>6744.13</td><td>1760.92</td><td>1679.03</td></tr><tr><td>Riverraid</td><td>5260.89</td><td>5487.17</td><td>5220.64</td><td>4549.22</td></tr><tr><td>RoadRunner</td><td>25456.31</td><td>24688.07</td><td>20385.91</td><td>16269.40</td></tr><tr><td>Robotank</td><td>3.08</td><td>8.65</td><td>13.89</td><td>14.57</td></tr><tr><td></td><td>1487.84</td><td></td><td></td><td>848.47</td></tr><tr><td>Seaquest</td><td></td><td>1120.15</td><td>1112.51</td><td>483.48</td></tr><tr><td>SpaceInvaders StarGunner</td><td>693.26</td><td>632.17</td><td>552.50</td><td>13341.23</td></tr><tr><td></td><td>14734.11</td><td>13643.80</td><td>16288.35</td><td>-21.04</td></tr><tr><td>Tennis</td><td>-19.86</td><td>-21.80</td><td>-21.84</td><td></td></tr><tr><td>TimePilot Tutankham</td><td>3396.61</td><td>4410.87</td><td>4718.46</td><td>4544.68 109.18</td></tr><tr><td></td><td>179.96</td><td>152.72</td><td>103.95</td><td>7085.02</td></tr><tr><td>UpNDown</td><td>38728.48</td><td>43208.99</td><td>5430.22</td><td></td></tr><tr><td>Venture</td><td>15.89</td><td>14.66</td><td>0.57</td><td>0.03</td></tr><tr><td>VideoPinball WizardOfWor</td><td>27346.44 2340.60</td><td>27549.55 2743.40</td><td>23998.09 2409.94</td><td>23705.39</td></tr><tr><td></td><td></td><td></td><td></td><td>2045.17</td></tr><tr><td>Zaxxon</td><td>3739.56</td><td>1813.90</td><td>256.78</td><td>1521.28</td></tr></table>
Table 5: All episodes mean scores of PPO, POP3D on Mujoco games after 10M frames. The results are averaged by three trials.
<table><tr><td>game</td><td>PPO</td><td>POP3D</td></tr><tr><td>HalfCheetah</td><td>3250.22</td><td>2373.30</td></tr><tr><td>Hopper</td><td>1767.14</td><td>1257.72</td></tr><tr><td>InvertedDoublePendulum</td><td>3684.92</td><td>2561.77</td></tr><tr><td>InvertedPendulum</td><td>531.77</td><td>552.98</td></tr><tr><td>Reacher</td><td>-5.94</td><td>-8.05</td></tr><tr><td>Swimmer</td><td>94.01</td><td>108.27</td></tr><tr><td>Walker2d</td><td>1770.37</td><td>2439.54</td></tr></table>
# B EXPERIMENTS
# B.1 HYPER-PARAMETERS
B.1.1 ATARI
PPO’s and POP3D’s hyper-parameters for Mujoco games are respectively listed in Table 6.
<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>128 2.5 ×10-4 × α</td></tr><tr><td>Num epochs Mini-batch size</td><td>3 32×8</td></tr><tr><td>Discount (γ) GAE parameter (入)</td><td>0.99 0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td></td><td>0.1×α</td></tr><tr><td>Clipping parameter VF coeff. Entropy coeff.</td><td>1 0.01</td></tr></table>
Table 6: Left: PPO’s hyper-parameters for Atari games. Right:POP3D’s hyper-parameters for Atari games.
<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size Num epochs</td><td>128 2.5 ×10-4 × α 3</td></tr><tr><td>Mini-batch size Discount (γ)</td><td>32×8</td></tr><tr><td>GAE parameter (入)</td><td>0.99 0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td></td><td>1</td></tr><tr><td>VF coeff. Entropy coeff. KL penalty coeff.</td><td>0.01</td></tr></table>
Table 7: BASELINE’s hyper-parameters for Atari games.
<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T)</td><td>128 2.5 ×10-4 × α</td></tr><tr><td>Adam step-size Num epochs</td><td>3</td></tr><tr><td>Mini-batch size</td><td>32×8</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入)</td><td>0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td>VF coeff.</td><td>1</td></tr><tr><td>Entropy coeff.</td><td>0.01</td></tr><tr><td>KL penalty coeff.</td><td>10.0</td></tr></table>
# B.1.2 MUJOCO
PPO’s and POP3D’s hyper-parameters for Mujoco games are respectively listed in Table 8.
Table 8: Left: PPO’s hyper-parameters for Mujoco games. Right:POP3D’s hyper-parameters for Mujoco games.
<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>2048 3×10-4</td></tr><tr><td>Num epochs Mini-batch size</td><td>10 64</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入) KL penalty coeff.</td><td>0.95 5.0</td></tr></table>
<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>2048 3×10-4</td></tr><tr><td>Num epochs</td><td>10</td></tr><tr><td>Mini-batch size</td><td>64</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入) Clipping parameter</td><td>0.95</td></tr></table>
 Figure 1: Score curves of three methods on Atari games within 40 million frame steps.
 Figure 2: Score curves on 7 Mujoco games within 10 million frame steps.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769[ { "type": "text", "text": "A STRONG ON-POLICY COMPETITOR TO PPO", "text_level": 1, "bbox": [ 176, 98, 723, 121 ], "page_idx": 0 }, { "type": "text", "text": "Anonymous authors Paper under double-blind review ", "bbox": [ 183, 145, 400, 172 ], "page_idx": 0 }, { "type": "text", "text": "ABSTRACT ", "text_level": 1, "bbox": [ 454, 210, 544, 224 ], "page_idx": 0 }, { "type": "text", "text": "As a recognized variant and improvement for Trust Region Policy Optimization (TRPO), proximal policy optimization (PPO) has been widely used with several advantages: efficient data utilization, easy implementation, and good parallelism. In this paper, a first-order gradient reinforcement learning algorithm called Policy Optimization with Penalized Point Probability Distance (POP3D), which is a lower bound to the square of total variance divergence, is proposed as another powerful variant. The penalty item has dual effects, prohibiting policy updates from overshooting and encouraging more explorations. By carefully controlled experiments on both discrete and continuous benchmarks, our approach is proved highly competitive to PPO. ", "bbox": [ 233, 241, 766, 380 ], "page_idx": 0 }, { "type": "text", "text": "1 INTRODUCTION ", "text_level": 1, "bbox": [ 176, 406, 336, 422 ], "page_idx": 0 }, { "type": "text", "text": "With the development of deep reinforcement learning, lots of impressive results have been produced in a wide range of fields such as playing Atari game (Mnih et al., 2015; Hessel et al., 2018), controlling robotics (Lillicrap et al., 2015), Go (Silver et al., 2017), neural architecture search (Tan et al., 2019; Pham et al., 2018). ", "bbox": [ 174, 438, 825, 493 ], "page_idx": 0 }, { "type": "text", "text": "The basis of a reinforcement learning algorithm is generalized policy iteration (Sutton & Barto, 2018), which states two essential iterative steps: policy evaluation and improvement. Among various algorithms, policy gradient is an active branch of reinforcement learning whose foundations are Policy Gradient Theorem and the most classical algorithm REINFORCEMENT (Sutton & Barto, 2018). Since then, handfuls of policy gradient variants have been proposed, such as Deep Deterministic Policy Gradient (DDPG) (Lillicrap et al., 2015), Asynchronous Advantage Actor-Critic (A3C) (Mnih et al., 2016), Actor-Critic using Kronecker-factored Trust Region (ACKTR) (Wu et al., 2017), and Proximal Policy Optimization (PPO) (Schulman et al., 2017). ", "bbox": [ 174, 500, 825, 612 ], "page_idx": 0 }, { "type": "text", "text": "Improving the strategy monotonically had been nontrivial until Schulman et al. (2015) proposed Trust Region Policy Optimization (TRPO), in which Fisher vector product is utilized to cut down the computing burden. Specifically, Kullback–Leibler divergence (KLD) acts as a hard constraint in place of objective, because its corresponding coefficient is difficult to set for different problems. However, TRPO still has several drawbacks: too complicated, inefficient data usage. Quite a lot of efforts have been devoted to improving TRPO since then and the most commonly used one is PPO. ", "bbox": [ 174, 619, 825, 703 ], "page_idx": 0 }, { "type": "text", "text": "PPO can be regarded as a first-order variant of TRPO and have obvious improvements in several facets. In particular, a pessimistic clipped surrogate objective is proposed where TRPO’s hard constraint is replaced by the clipped action probability ratio. In such a way, it constructs an unconstrained optimization problem so that any first-order stochastic gradient optimizer can be directly applied. Besides, it’s easier to be implemented and more robust against various problems, achieving an impressive result on Atari games (Brockman et al., 2016). However, the cost of data sampling is not always cheap. Haarnoja et al. (2018) design an off-policy algorithm called Soft Actor-Critic and achieves the state of the art result by encouraging better exploration using maximum entropy. ", "bbox": [ 174, 709, 825, 821 ], "page_idx": 0 }, { "type": "text", "text": "In this paper, we focus on the on-policy improvement to improve PPO and answer the question: how to successfully leverage penalized optimization to solve the constrained one which is formulated by Schulman et al. (2015). ", "bbox": [ 178, 828, 821, 869 ], "page_idx": 0 }, { "type": "text", "text": "1. It proposes a simple variant of TRPO called POP3D along with a new surrogate objective containing a point probability penalty item, which is symmetric lower bound to the square of the total variance divergence of policy distributions. Specifically, it helps to stabilize the learning process and encourage exploration. Furthermore, it escapes from penalty item setting headache along with penalized version TRPO, where is arduous to select one fixed value for various environments. ", "bbox": [ 214, 882, 823, 924 ], "page_idx": 0 }, { "type": "text", "text": "", "bbox": [ 230, 103, 823, 146 ], "page_idx": 1 }, { "type": "text", "text": "2. It achieves state-of-the-art results among on-policy algorithms with a clear margin on 49 Atari games within 40 million frame steps based on two shared metrics. Moreover, it also achieves competitive results compared with PPO in the continuous domain. It dives into the mechanism of PPO’s improvement over TRPO from the perspective of solution manifold, which also plays an important role in our method. ", "bbox": [ 212, 148, 825, 219 ], "page_idx": 1 }, { "type": "text", "text": "3. It enjoys almost all PPO’s advantages such as easy implementation, fast learning ability. ", "bbox": [ 204, 222, 808, 237 ], "page_idx": 1 }, { "type": "text", "text": "We provide the code and training logs to make our work reproducible. ", "bbox": [ 173, 246, 632, 262 ], "page_idx": 1 }, { "type": "text", "text": "2 PRELIMINARY KNOWLEDGE AND RELATED WORK ", "text_level": 1, "bbox": [ 174, 281, 625, 297 ], "page_idx": 1 }, { "type": "text", "text": "2.1 POLICY GRADIENT ", "text_level": 1, "bbox": [ 176, 310, 349, 325 ], "page_idx": 1 }, { "type": "text", "text": "Agents interact with the environment and receive rewards which are used to adjust their policy in turn. At state $s _ { t }$ , one agent takes strategy $\\pi$ and transfers to a new state $s _ { t + 1 }$ , rewarded $r _ { t }$ by the environment. Maximizing discounted return (accumulated rewards) $R _ { t }$ is its objective. In particular, given a policy $\\pi$ , $R _ { t }$ is defined as ", "bbox": [ 174, 337, 825, 393 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/f5396e081d7dcec37967c6ad4fa994836bf9ccccdb18ac4c7bc22de9b3bddbd6.jpg", "text": "$$\nR _ { t } = \\sum _ { n = 0 } ^ { \\infty } ( r _ { t } + \\gamma r _ { t + 1 } + \\gamma ^ { 2 } r _ { t + 2 } + \\ldots + \\gamma ^ { n } r _ { t + n } ) .\n$$", "text_format": "latex", "bbox": [ 334, 395, 663, 436 ], "page_idx": 1 }, { "type": "text", "text": "$\\gamma$ is the discounted coefficient to control future rewards, which lies in the range $( 0 , 1 )$ . Regarding a neural network with parameter $\\theta$ , the policy $\\pi _ { \\boldsymbol { \\theta } } ( a | \\boldsymbol { s } )$ can be learned by maximizing Equation 1 using the back-propagation algorithm. Particularly, given $Q ( s , a )$ which represents the agent’s return in state $s$ after taking action $a$ , the objective function can be written as ", "bbox": [ 173, 444, 825, 501 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/61ec2fbef39429d670d7838a4c9ec364f5dbaea4d711a697dc02b38fd4f635b7.jpg", "text": "$$\n\\operatorname* { m a x } _ { \\theta } \\quad \\mathbb { E } _ { s , a } \\log \\pi _ { \\theta } ( a | s ) Q ( s , a ) .\n$$", "text_format": "latex", "bbox": [ 392, 502, 607, 525 ], "page_idx": 1 }, { "type": "text", "text": "Equation 2 lays the foundation for handfuls of policy gradient based algorithms. Another variant can be deduced by using ", "bbox": [ 171, 535, 823, 563 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/d1157a141e25c5686e888a58dad548b2df896d0fac6656efd8a106b324536c9e.jpg", "text": "$$\nA ( s , a ) = Q ( s , a ) - V ( s )\n$$", "text_format": "latex", "bbox": [ 410, 561, 588, 578 ], "page_idx": 1 }, { "type": "text", "text": "to replace $Q ( s , a )$ in Equation 2 equivalently, $V ( s )$ can be any function so long as $V$ depends on $s$ but not $a$ . In most cases, state value function is used for $V$ , which not only helps to reduce variations but has clear physical meaning. Formally, it can be written as ", "bbox": [ 173, 579, 823, 621 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/259ebbf451aa81bd06ecb0d5ca5e59c41fa6a427cd0c23e0254350331018ec0f.jpg", "text": "$$\n\\operatorname* { m a x } _ { \\theta } \\quad \\mathbb { E } _ { s , a } \\log \\pi _ { \\theta } ( a | s ) A ( s , a ) .\n$$", "text_format": "latex", "bbox": [ 393, 622, 606, 645 ], "page_idx": 1 }, { "type": "text", "text": "2.2 ADVANTAGE ESTIMATE ", "text_level": 1, "bbox": [ 174, 660, 379, 674 ], "page_idx": 1 }, { "type": "text", "text": "A commonly used method for advantage calculation is one-step estimation, which follows ", "bbox": [ 169, 685, 764, 700 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/d466e063092178d47c74fa7f10265250369d99236f9bd279832b6bb3fc9f0fb3.jpg", "text": "$$\nA ( s _ { t } , a _ { t } ) = Q ( s _ { t } , a _ { t } ) - V ( s _ { t } ) = r _ { t } + \\gamma V ( s _ { t + 1 } ) - V ( s _ { t } ) .\n$$", "text_format": "latex", "bbox": [ 303, 703, 692, 720 ], "page_idx": 1 }, { "type": "text", "text": "However, a more accurate method called generalized advantage estimation is proposed in Schulman et al. (2016), where all time steps of estimation are combined and summarized using $\\lambda$ -based weights,. The generalized advantage estimator $\\hat { A } _ { t } ^ { G A E ( \\gamma , \\lambda ) }$ is defined by Schulman et al. (2016) as ", "bbox": [ 174, 728, 825, 775 ], "page_idx": 1 }, { "type": "equation", "img_path": "images/2b8d38b68f319404e7e9e7b6ed6e557505e55a000ac7c57e65af6dec0c324e13.jpg", "text": "$$\n\\begin{array} { c } { { \\hat { A } _ { t } ^ { G A E ( \\gamma , \\lambda ) } : = ( 1 - \\lambda ) * ( \\hat { A } _ { t } ^ { ( 1 ) } + \\lambda \\hat { A } _ { t } ^ { ( 2 ) } + \\lambda ^ { 2 } \\hat { A } _ { t } ^ { ( 3 ) } + . . . ) = \\displaystyle \\sum _ { l = 0 } ^ { \\infty } ( \\gamma \\lambda ) ^ { l } \\delta _ { t + l } ^ { V } } } \\\\ { { \\displaystyle \\delta _ { t + l } ^ { V } = r _ { t + l } + \\gamma V ( s _ { t + l + 1 } ) - V ( s _ { t + l } ) . } } \\\\ { { \\displaystyle \\hat { A } _ { t } ^ { ( k ) } : = \\sum _ { l = 0 } ^ { k - 1 } \\gamma ^ { l } \\delta _ { t + l } ^ { V } = - V ( s _ { t } ) + r _ { t } + \\gamma r _ { t + 1 } + \\cdot \\cdot \\cdot + \\gamma ^ { k - 1 } r _ { t + k - 1 } + \\gamma ^ { k } V ( s _ { t + k } ) } } \\end{array}\n$$", "text_format": "latex", "bbox": [ 230, 777, 766, 885 ], "page_idx": 1 }, { "type": "text", "text": "The parameter $\\lambda$ meets $0 \\leq \\lambda \\leq 1$ , which controls the trade-off between bias and variance. All methods in this paper utilize $\\hat { A } _ { t } ^ { G A E ( \\gamma , \\lambda ) }$ to estimate the advantage. ", "bbox": [ 173, 891, 825, 925 ], "page_idx": 1 }, { "type": "text", "text": "2.3 TRUST REGION POLICY OPTIMIZATION", "text_level": 1, "bbox": [ 174, 103, 488, 118 ], "page_idx": 2 }, { "type": "text", "text": "Schulman et al. (2015) propose TRPO to update the policy monotonically. In particular, its mathematical form is ", "bbox": [ 171, 128, 825, 159 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/09e3cd716af2916e66c12fc1da2483ab675281c61410183fc11968f048f1f5a6.jpg", "text": "$$\n\\begin{array} { r l } { \\underset { \\theta } { \\operatorname* { m a x } } } & { \\mathbb { E } _ { t } [ \\frac { \\pi _ { \\theta } \\left( a _ { t } \\vert s _ { t } \\right) } { \\pi _ { \\theta _ { o l d } } \\left( a _ { t } \\vert s _ { t } \\right) } \\hat { A } _ { t } ] - C \\mathbb { E } _ { t } [ K L [ \\pi _ { \\theta _ { o l d } } ( \\cdot \\vert s _ { t } ) , \\pi _ { \\theta } ( \\cdot \\vert s _ { t } ) ] ] } \\\\ & { \\epsilon = \\underset { s } { \\operatorname* { m a x } } E _ { a \\sim \\pi _ { \\theta } \\left( a \\vert s \\right) } [ A _ { \\pi _ { \\theta _ { o l d } } } ( s , a ) ] ) } \\end{array}\n$$", "text_format": "latex", "bbox": [ 297, 166, 697, 224 ], "page_idx": 2 }, { "type": "text", "text": "where $C$ is the penalty coefficient, $\\begin{array} { r } { C = \\frac { 2 \\epsilon \\gamma } { ( 1 - \\gamma ) ^ { 2 } } } \\end{array}$ . ", "bbox": [ 173, 227, 486, 244 ], "page_idx": 2 }, { "type": "text", "text": "In practice, the policy update steps would be too small if $C$ is valued as Equation 7. In fact, it’s intractable to calculate $C$ beforehand since it requires traversing all states to reach the maximum. Moreover, inevitable bias and variance will be introduced by estimating the advantages of old policy while training. Instead, a surrogate objective is maximized based on the KLD constraint between the old and new policy, which can be written as below, ", "bbox": [ 173, 251, 826, 321 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/bb58997c9c0ad351185482de781a70f5e94d7d96228e467b2878057d66bc1ff6.jpg", "text": "$$\n\\begin{array} { r l } { \\underset { \\theta } { \\operatorname* { m a x } } } & { \\mathbb { E } _ { t } [ \\frac { \\pi _ { \\theta } \\left( a _ { t } \\vert s _ { t } \\right) } { \\pi _ { \\theta _ { o l d } } \\left( a _ { t } \\vert s _ { t } \\right) } \\hat { A } _ { t } ] } \\\\ { s . t . } & { \\mathbb { E } _ { t } [ K L [ \\pi _ { \\theta _ { o l d } } ( \\cdot \\vert s _ { t } ) , \\pi _ { \\theta } ( \\cdot \\vert s _ { t } ) ] ] \\leq \\delta } \\end{array}\n$$", "text_format": "latex", "bbox": [ 364, 344, 633, 398 ], "page_idx": 2 }, { "type": "text", "text": "where $\\delta$ is the KLD upper limitation. In addition, the conjugate gradient algorithm is applied to solve Equation 8 more efficiently. Two major problems have yet to be addressed: one is its complexity even using the conjugate gradient approach, another is compatibility with architectures that involve noise or parameter sharing tricks (Schulman et al., 2017). ", "bbox": [ 173, 401, 825, 457 ], "page_idx": 2 }, { "type": "text", "text": "2.4 PROXIMAL POLICY OPTIMIZATION ", "text_level": 1, "bbox": [ 176, 473, 455, 488 ], "page_idx": 2 }, { "type": "text", "text": "To overcome the shortcomings of TRPO, PPO replaces the original constrained problem with a pessimistic clipped surrogate objective where KL constraint is implicitly imposed. The loss function can be written as ", "bbox": [ 174, 498, 825, 541 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/72508160e6fab5c78c854e00c89bf2bceae15862c92aac78ca603470f3e936a2.jpg", "text": "$$\n\\begin{array} { r l r } & { } & { L ^ { { \\cal C } L I P } ( \\theta ) = \\mathbb { E } _ { t } [ \\operatorname* { m i n } ( r _ { t } ( \\theta ) \\hat { A } _ { t } , c l i p ( r _ { t } ( \\theta ) , 1 - \\epsilon , 1 + \\epsilon ) \\hat { A } _ { t } ) ] } \\\\ & { } & { r _ { t } ( \\theta ) = \\frac { \\pi _ { \\theta } \\left( a _ { t } | s _ { t } \\right) } { \\pi _ { \\theta _ { o l d } } \\left( a _ { t } | s _ { t } \\right) } } \\end{array}\n$$", "text_format": "latex", "bbox": [ 300, 541, 696, 602 ], "page_idx": 2 }, { "type": "text", "text": "where $\\epsilon$ is a hyper-parameter to control the clipping ratio. Except for the clipped PPO version, KL penalty versions including fixed and adaptive KLD. Besides, their simulation results convince that clipped PPO performs best with an obvious margin across various domains. ", "bbox": [ 173, 604, 825, 647 ], "page_idx": 2 }, { "type": "text", "text": "3 POLICY OPTIMIZATION WITH PENALIZED POINT PROBABILITY DISTANCE ", "text_level": 1, "bbox": [ 174, 665, 820, 683 ], "page_idx": 2 }, { "type": "text", "text": "Before diving into the details of POP3D, we review some drawbacks of several methods, which partly motivate us. ", "bbox": [ 174, 695, 821, 726 ], "page_idx": 2 }, { "type": "text", "text": "3.1 DISADVANTAGES OF KULLBACK-LEIBLER DIVERGENCE ", "text_level": 1, "bbox": [ 171, 741, 606, 757 ], "page_idx": 2 }, { "type": "text", "text": "TRPO (Schulman et al., 2015) induced the following inequality1, ", "bbox": [ 174, 767, 602, 782 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/d4609f5cb10ee7294464f9123d9a968bb24774eb1cc8027011749c2daa316aab.jpg", "text": "$$\n\\begin{array} { c } { { \\eta ( \\pi _ { \\theta } ) \\leq L _ { \\pi _ { \\theta _ { o l d } } } ( \\pi _ { \\theta } ) + \\displaystyle \\frac { 2 \\epsilon \\gamma } { ( 1 - \\gamma ) ^ { 2 } } \\alpha ^ { 2 } } } \\\\ { { \\alpha = D _ { T V } ^ { \\operatorname* { m a x } } ( \\pi _ { \\theta _ { o l d } } , \\pi _ { \\theta } ) } } \\\\ { { D _ { T V } ^ { \\operatorname* { m a x } } ( \\pi _ { \\theta _ { o l d } } , \\pi _ { \\theta } ) = \\displaystyle \\operatorname* { m a x } _ { s } D _ { T V } \\bigl ( \\pi _ { \\theta _ { o l d } } | | \\pi _ { \\theta } \\bigr ) } } \\end{array}\n$$", "text_format": "latex", "bbox": [ 346, 786, 651, 861 ], "page_idx": 2 }, { "type": "text", "text": "TRPO replaces the square of total variation divergence $D _ { T V } ^ { m a x } ( \\pi _ { \\theta _ { o l d } } , \\pi _ { \\theta } )$ by $D _ { K L } ^ { \\operatorname * { m a x } } ( \\pi _ { \\theta _ { o l d } } , \\pi _ { \\theta } ) =$ $\\operatorname* { m a x } _ { s } D _ { K L } ( \\pi _ { \\theta _ { o l d } } | | \\pi _ { \\theta } )$ . ", "bbox": [ 176, 871, 825, 902 ], "page_idx": 2 }, { "type": "text", "text": "Given a discrete distribution $p$ and $q$ , their total variation divergence $D _ { T V } ( p | | q )$ is defined as ", "bbox": [ 171, 102, 781, 119 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/deae3aa73b84ae1d9de017d727833a61d95f1831a8e9bb1a3899dfc084511e90.jpg", "text": "$$\nD _ { T V } ( p | | q ) : = \\frac { 1 } { 2 } \\sum _ { i } \\left| p _ { i } - q _ { i } \\right|\n$$", "text_format": "latex", "bbox": [ 398, 137, 598, 174 ], "page_idx": 3 }, { "type": "text", "text": "in TRPO (Schulman et al., 2015). Obviously, $D _ { T V }$ is symmetric by definition, while KLD is asymmetric. Formally, given state $s$ , KLD of $\\pi _ { \\theta _ { o l d } } ( \\cdot | s )$ for $\\pi _ { \\boldsymbol { \\theta } } ( \\cdot | s )$ can be written as ", "bbox": [ 171, 180, 825, 209 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/401194ebed781ef5be02e66e0c059933d992a95fd49942aef99fc3dabf3aa614.jpg", "text": "$$\nD _ { K L } ( \\pi _ { \\theta _ { o l d } } ( \\cdot | s ) | | \\pi _ { \\theta } ( \\cdot | s ) ) : = \\sum _ { a } \\pi _ { \\theta _ { o l d } } ( a | s ) \\ln \\frac { \\pi _ { \\theta _ { o l d } } ( a | s ) } { \\pi _ { \\theta } ( a | s ) } .\n$$", "text_format": "latex", "bbox": [ 308, 218, 691, 256 ], "page_idx": 3 }, { "type": "text", "text": "Similarly, KLD in the continuous domain can be defined simply by replacing summation with integration. The consequence of KLD’s asymmetry leads to a non-negligible difference of whether choose $D _ { K L } ( \\pi _ { \\theta _ { o l d } } | | \\pi _ { \\theta } )$ or $D _ { K L } ( \\pi _ { \\theta } | | \\pi _ { \\theta _ { o l d } } \\rangle$ . Sometimes, those two choices result in quite different solutions. Robert compared the forward and reverse KL on a distribution, one solution matches only one of the modes, and another covers both modes (Murphy, 2012). Therefore, KLD is not an ideal bound or approximation for the expected discounted cost. ", "bbox": [ 173, 270, 825, 354 ], "page_idx": 3 }, { "type": "text", "text": "3.2 DISCUSSION ABOUT PESSIMISTIC PROXIMAL POLICY ", "text_level": 1, "bbox": [ 174, 375, 584, 388 ], "page_idx": 3 }, { "type": "text", "text": "In fact, PPO is called pessimistic proximal policy optimization2 in the meaning of its objective construction style. Without loss of generality, supposing $A _ { t } > 0$ for given state $s _ { t }$ and action $a _ { t }$ , and the optimal choice is $a _ { t } ^ { \\star }$ . When $a _ { t } = a _ { t } ^ { \\star }$ , a good update policy is to increase the probability of action to a relatively high value $a _ { t } ^ { \\star }$ by adjusting $\\theta$ . However, the clipped item $c l i p ( r _ { t } ( \\theta ) , 1 - \\epsilon , 1 + \\epsilon ) \\hat { A } _ { t }$ will fully contribute to the loss function by the minimum operation, which ignores further reward by zero gradients even though it’s the optimal action. Other situation with $A _ { t } < 0$ can be analyzed in the same manner. ", "bbox": [ 173, 400, 825, 501 ], "page_idx": 3 }, { "type": "text", "text": "However, if the pessimistic limitation is removed, PPO’s performance decreases dramatically (Schulman et al., 2017), which is again confirmed by our preliminary experiments. In a word, the pessimistic mechanism plays a very critical role for PPO in that it has a relatively weak preference for a good action decision at a given state, which in turn affects its learning efficiency. ", "bbox": [ 174, 507, 825, 564 ], "page_idx": 3 }, { "type": "text", "text": "3.3 RESTRICTED SOLUTION MANIFOLD FOR EXACT DISTRIBUTION MATCHING ", "text_level": 1, "bbox": [ 176, 583, 738, 598 ], "page_idx": 3 }, { "type": "text", "text": "To be simple, we don’t take the model identifiability issues along with deep neural network into account here because they don’t affect the following discussion much (LeCun et al., 2015). Suppose $\\pi _ { \\theta \\star }$ is the optimal solution for a given environment, in most cases, more than one parameter set for $\\theta$ can generate the ideal policy, especially when $\\pi _ { \\theta \\star }$ is learned by a deep neural network. In other words, the relationship between $\\theta$ and $\\pi _ { \\theta \\star }$ is many to one. On the other hand, when agents interact with the environment using policy represented by neural networks, they prefer to takes the action with the highest probability. Although some strategies of enhancing exploration are applied, they don’t affect the policy much in the meaning of expectation. ", "bbox": [ 173, 611, 825, 723 ], "page_idx": 3 }, { "type": "text", "text": "RL methods can help agents learn useful policies after fully interacting with the environment. Take Atari-Pong game for example, when an agent sees a Pong ball coming close to the right (state $s _ { 1 }$ ), its optimal policy is moving the racket to the right position (for example, the \"RIGHT\" action) with a distribution $p _ { \\theta _ { 1 } } ^ { \\bar { s _ { 1 } } } = [ 0 . 0 5 , \\mathbf { \\bar { 0 } } . 0 5 , 0 . 1 , 0 . 7 , 0 . 0 5 , 0 . 0 5 ] ^ { 3 }$ . The probability of selecting \"RIGHT\" is a relatively high value such as 0.7. It’s almost impossible to push it to be 1.0 exactly since it’s produced by a softmax operation on several discrete actions. In fact, we hardly obtain the optimal solution accurately. Instead, our goal is to find a good enough policy. In this case, the policy of pushing $p ( { \\mathrm { R I G H T } } | s _ { 1 } )$ above a threshold is sufficient to be a good one. In other words, paying attention to the most critical actions is sufficient, and we don’t care much the probability value of the other non-critical actions. For example, a good policy at $s _ { 1 }$ is $[ ? , ? , \\geq 0 . 7$ , ?,?,?]. Note that $\\pi _ { \\boldsymbol { \\theta } } ( a | \\boldsymbol { s } )$ is represented by a neural network parameterized using $\\theta$ and a good policy for the whole game means that the network can perform well across the whole state space. Focusing on those critical actions at each state4 and ignoring non-critical ones can help the network learn better and more easily. ", "bbox": [ 174, 729, 825, 882 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 173, 103, 823, 132 ], "page_idx": 4 }, { "type": "text", "text": "Using a penalty such as KLD cannot utilize this good property, because it involves all of the actions’ probabilities. Moreover, it doesn’t stop penalizing unless two distributions become exactly indifferent or the advantage item is large enough to compensate for the KLD cost. Therefore, even if $\\theta$ outputs hat two $\\theta _ { o l d }$ the same meters for obaband ty for th, where s. Su and $\\theta _ { 1 } \\colon \\theta _ { 2 }$ $\\theta _ { 3 }$ $\\mathcal { P } _ { \\theta _ { 2 } } ^ { s _ { 1 } - } = [ 0 . 0 1 , 0 . 1 5 , 0 . 0 5 , 0 . 7 , 0 . 0 1 , 0 . 0 8 ]$ $p _ { \\theta _ { 3 } } ^ { s _ { 1 } } =$ [0.01, 0.01, 0.01, 0.7, 0.26, 0.01]. When the agent already chooses RIGHT at $S _ { 1 }$ , the loss item from a good penalized distance should be small. However, $D _ { K L } ( \\pi _ { \\theta _ { 1 } } ( \\cdot | s _ { 1 } ) | | \\pi _ { \\theta _ { 2 } } ( \\cdot | s _ { 1 } ) ) { = } 0 . 1 5$ and $D _ { K L } \\big ( \\pi _ { \\theta _ { 1 } } ( \\cdot | s _ { 1 } ) \\vert \\vert \\pi _ { \\theta _ { 3 } } ( \\cdot | s _ { 1 } ) \\big ) { = } 0 . 3 9$ . However, it’s not necessary to require the distribution of other actions $( \\mathbf { \\hat { \\Pi } } \\mathbf { \\tilde { N O O P } } ^ { \\prime }$ , ‘FIRE’, ‘LEFT’, ‘RIGHTFIRE’, ‘LEFTFIRE’) of $p _ { \\theta _ { 2 } } ^ { s _ { 1 } }$ near to $p _ { \\theta _ { 1 } } ^ { s _ { 1 } }$ . Instead, it’s better to relax this requirement to enlarge the freedom degree of the network and focus on learning important actions. Doing this brings another advantage, the agent can explore more for non critical actions. From the perspective of the manifold, optimal parameters constitute a solution manifold. The KLD penalty will act until $\\theta$ exactly locates in the solution if possible, akin to mapping a point onto a curve. Instead, if the agent concentrates only on critical actions like a human does, it’s much easier to approach the manifold in a higher dimension. This is comparable to expanding the solution manifold by at least one dimension, e.g. from curves to surfaces or from surfaces to spheres. ", "bbox": [ 174, 138, 825, 361 ], "page_idx": 4 }, { "type": "text", "text": "3.4 EXPLORATION ", "text_level": 1, "bbox": [ 176, 397, 315, 411 ], "page_idx": 4 }, { "type": "text", "text": "One shared highlight in reinforcement learning is the balance between exploitation and exploration. For a policy-gradient algorithm, entropy is added in the total loss to encourage exploration in most cases. When included in the loss function, KLD penalizes the old and new policy probability mismatch for all possible actions as Equation 12 given a state $s$ . This strict punishment for every action’s probability mismatch, which discourages exploration. ", "bbox": [ 174, 431, 825, 501 ], "page_idx": 4 }, { "type": "text", "text": "3.5 POINT PROBABILITY DISTANCE ", "text_level": 1, "bbox": [ 176, 537, 434, 553 ], "page_idx": 4 }, { "type": "text", "text": "To overcome the above-mentioned shortcomings, we propose a surrogate objective with the point probability distance penalty, which is symmetric and more optimistic than PPO. In the discrete domain, when the agent takes action $a$ , the point probability distance between $\\pi _ { \\theta _ { o l d } } ( \\cdot | s )$ and $\\pi _ { \\boldsymbol { \\theta } } ( \\cdot | \\boldsymbol { s } )$ is defined by ", "bbox": [ 174, 571, 825, 628 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/e08d5b22ac053b10609368ec276eb1ad9491e7579872d63b85679d166fb7f431.jpg", "text": "$$\nD _ { p p } ^ { a } ( \\pi _ { \\theta _ { o l d } } ( \\cdot | s ) , \\pi _ { \\theta } ( \\cdot | s ) ) = ( \\pi _ { \\theta _ { o l d } } ( a | s ) - \\pi _ { \\theta } ( a | s ) ) ^ { 2 } .\n$$", "text_format": "latex", "bbox": [ 326, 672, 669, 693 ], "page_idx": 4 }, { "type": "text", "text": "Attention should be paid to the penalty definition item, the distance is measured by the point probability, which emphasizes its mismatch for the sampled actions for a state. Unless it would lead to confusion, we omit $a$ for simplicity in the following sections. Undoubtedly, $D _ { p p }$ is symmetric by definition. Furthermore, it can be proved that $D _ { p p }$ is indeed a lower bound for the total variance divergence $D _ { T V }$ . As a special case, it can be easily proved that for binary distribution, $D _ { T V } ^ { 2 } ( p | | q ) =$ $D _ { p p } ( p | | q )$ . ", "bbox": [ 174, 727, 825, 814 ], "page_idx": 4 }, { "type": "text", "text": "Theorem 3.1. For two discrete probability distributions $p$ and $q$ with $K$ values, then $D _ { T V } ^ { 2 } ( p | | q ) \\geq$ $D _ { p p } ^ { a } ( p | | q )$ holds for any action a and $\\mathbb { E } _ { a } D _ { p p } ^ { a } ( p | | q )$ is a lower bound for $D _ { T V } ^ { 2 } ( p | | q )$ . ", "bbox": [ 171, 827, 823, 857 ], "page_idx": 4 }, { "type": "text", "text": "Proof. Let $p _ { l } = \\alpha , q _ { l } = \\beta$ for the $l$ -th action $a$ , and suppose $a \\geq b$ without loss of generalization. So, ", "bbox": [ 171, 102, 826, 119 ], "page_idx": 5 }, { "type": "equation", "img_path": "images/a95b9c6081c5d3da78cc71bea8c75622d08122a83f9dfdaeba9e8f8c615963e4.jpg", "text": "$$\n\\begin{array} { l c l } { \\displaystyle D _ { T V } ^ { 2 } ( p | | q ) } & { = } & { \\displaystyle ( \\frac { 1 } { 2 } \\sum _ { i = 1 } ^ { K } | p _ { i } - q _ { i } | ) ^ { 2 } = ( \\frac { 1 } { 2 } \\sum _ { i = 1 , i \\neq l } ^ { K } | p _ { i } - q _ { i } | + \\frac { 1 } { 2 } | p _ { l } - q _ { l } | ) ^ { 2 } } \\\\ & { \\ge } & { \\displaystyle ( \\frac { 1 } { 2 } | \\sum _ { i = 1 , i \\neq l } ^ { K } p _ { i } - q _ { i } | + \\frac { 1 } { 2 } ( \\alpha - \\beta ) ) ^ { 2 } = ( \\frac { 1 } { 2 } | 1 - \\alpha - ( 1 - \\beta ) | + \\frac { 1 } { 2 } ( \\alpha - \\beta ) ) ^ { 2 } } \\\\ & { = } & { \\displaystyle ( \\frac { 1 } { 2 } ( \\alpha - \\beta ) + \\frac { 1 } { 2 } ( \\alpha - \\beta ) ) ^ { 2 } = D _ { p p } ^ { \\alpha } ( p | | q ) } \\\\ { \\mathbb { E } _ { a } D _ { p p } ^ { a } ( p | | q ) } & { = } & { \\displaystyle \\sum _ { a } p ( a ) D _ { p p } ^ { a } ( p | | q ) \\le \\sum _ { a } p ( a ) D _ { T V } ^ { 2 } ( p | | q ) = D _ { T V } ^ { 2 } ( p | | q ) } \\end{array}\n$$", "text_format": "latex", "bbox": [ 192, 132, 805, 289 ], "page_idx": 5 }, { "type": "text", "text": "Since $0 \\leq \\pi _ { \\theta } ( a | s ) \\leq 1$ holds for discrete action space, $D _ { p p }$ has a lower and upper boundary: $0 \\leq D _ { p p } \\leq 1$ . Moreover, $D _ { p p }$ is less sensitive to action space dimension than KLD, which has a similar effect as PPO’s clipped ratio to increase robustness and enhance stability. Equation 13 stays unchanged for the continuous domain, and the only difference is $\\pi _ { \\boldsymbol { \\theta } } ( a | \\boldsymbol { s } )$ represents point probability density instead of probability. ", "bbox": [ 173, 359, 825, 431 ], "page_idx": 5 }, { "type": "text", "text": "3.6 POP3D ", "text_level": 1, "bbox": [ 174, 454, 269, 469 ], "page_idx": 5 }, { "type": "text", "text": "After we have defined the point probability distance, we use a new surrogate objective $f _ { \\theta }$ for POP3D, which can be written as ", "bbox": [ 174, 484, 825, 513 ], "page_idx": 5 }, { "type": "equation", "img_path": "images/4b5d4584bef3d54359d613a0619fafda3b9c69c02e44429271e906efcaac94df.jpg", "text": "$$\n\\operatorname* { m a x } _ { \\theta } \\quad \\mathbb { E } _ { t } [ \\frac { \\pi _ { \\theta } ( a _ { t } | s _ { t } ) } { \\pi _ { \\theta _ { o l d } } ( a _ { t } | s _ { t } ) } \\hat { A } _ { t } - \\beta D _ { p p } ^ { a _ { t } } ( \\pi _ { \\theta _ { o l d } } ( \\cdot | s _ { t } ) , \\pi _ { \\theta } ( \\cdot | s _ { t } ) ) ] ,\n$$", "text_format": "latex", "bbox": [ 308, 523, 689, 559 ], "page_idx": 5 }, { "type": "text", "text": "where $\\beta$ is the penalized coefficient. These combined advantages lead to considerable performance improvement, which escapes from the dilemma of choosing preferable penalty coefficient. Besides, we use generalized advantage estimates to calculate $\\hat { A } _ { t }$ . Algorithm 1 shows the complete iteration process of POP3D. Moreover, it possesses the same computing cost and data efficiency as PPO. ", "bbox": [ 173, 570, 826, 631 ], "page_idx": 5 }, { "type": "text", "text": "Algorithm 1 POP3D ", "text_level": 1, "bbox": [ 173, 651, 313, 666 ], "page_idx": 5 }, { "type": "text", "text": "1: Input: max iterations $L$ , actors $N$ , epochs $K$ \n2: for iteration $= 1$ to $L$ do \n3: for actor $= 1$ to $N$ do \n4: Run policy $\\pi _ { \\theta _ { o l d } }$ for $T$ time steps \n5: Compute advantage estimations $\\hat { A } _ { 1 } , . . . , \\hat { A } _ { T }$ \n6: end for \n7: for epoch $, = 1$ to $K$ do \n8: Optimized loss objective $f ( \\theta )$ w.r.t $\\theta$ with mini-batch size $M \\leq N T$ , then update $\\theta _ { o l d } \\theta$ . \n9: end for \n10: end for ", "bbox": [ 178, 667, 826, 813 ], "page_idx": 5 }, { "type": "text", "text": "3.7 WORKING MECHANISM OF POP3D ", "text_level": 1, "bbox": [ 176, 852, 460, 867 ], "page_idx": 5 }, { "type": "text", "text": "As for the toy example in Section 3.3, Therefore, it can help the agent to f $D _ { p p } ^ { R I G H T } ( \\pi _ { \\theta _ { 1 } } ( \\cdot | s ) | | \\pi _ { \\theta _ { 2 } } ( \\cdot | s ) = D _ { p p } ^ { R I G H T } ( \\pi _ { \\theta _ { 1 } } ( \\cdot | s ) | | \\pi _ { \\theta _ { 3 } } ( \\cdot | s ) = 0 .$ $\\theta$ $\\theta _ { o l d }$ Equation 14, the gradient $f ( \\theta )$ w.r.t. $\\theta$ can be written as ", "bbox": [ 174, 878, 826, 924 ], "page_idx": 5 }, { "type": "equation", "img_path": "images/5e17806dcde5f15ce92e950ce11741b8c13c43b18e4306768bb237fc88e5deb1.jpg", "text": "$$\n\\begin{array} { l l } { \\nabla _ { \\theta } f ( \\theta ) = \\frac { \\nabla _ { \\theta } \\pi _ { \\theta } \\left( a _ { t } | s _ { t } \\right) } { \\pi _ { \\theta _ { o l d } } \\left( a _ { t } | s _ { t } \\right) } \\hat { A } _ { t } - 2 \\beta [ \\pi _ { \\theta } ( a _ { t } | s _ { t } ) - \\pi _ { \\theta _ { o l d } } ( a _ { t } | s _ { t } ) ] \\nabla _ { \\theta } \\pi _ { \\theta } ( a _ { t } | s _ { t } ) } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\hat { A } _ { t } } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\pi _ { \\theta } \\pi _ { \\theta } ( a _ { t } | s _ { t } ) [ \\frac { \\hat { A } _ { t } } { \\pi _ { \\theta _ { o l d } } \\left( a _ { t } | s _ { t } \\right) } - 2 \\beta ( \\pi _ { \\theta } ( a _ { t } | s _ { t } ) - \\pi _ { \\theta _ { o l d } } ( a _ { t } | s _ { t } ) ) ] } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\hat { A } _ { t } } \\\\ { \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad \\quad } \\end{array}\n$$", "text_format": "latex", "bbox": [ 261, 125, 732, 236 ], "page_idx": 6 }, { "type": "text", "text": "where $\\delta ( \\boldsymbol { a } _ { t } | \\boldsymbol { s } _ { t } ) : = \\pi _ { \\boldsymbol { \\theta } } ( \\boldsymbol { a } _ { t } | \\boldsymbol { s } _ { t } ) - \\pi _ { \\boldsymbol { \\theta } _ { o l d } } ( \\boldsymbol { a } _ { t } | \\boldsymbol { s } _ { t } )$ . Suppose the agent selects $a _ { t }$ at $s _ { t }$ using $\\pi _ { \\theta _ { o l d } }$ and obtains a positive advantage $\\hat { A } _ { t }$ , if $\\pi _ { \\boldsymbol { \\theta } } \\big ( a _ { t } | \\boldsymbol { s } _ { t } \\big )$ is larger than $\\pi _ { \\boldsymbol { \\theta } } ( a _ { t } | \\boldsymbol { s } _ { t } )$ , then $2 \\beta \\delta ( a _ { t } | s _ { t } )$ will play a damping role to avoid too greedy preference for $a _ { t }$ (i.e. too large probability), which in turn leaves more space for other actions to be explored. Other cases such as negative $\\hat { A } _ { t }$ can be analyzed similarly. The hyper-parameter $\\beta$ controls the damping force. ", "bbox": [ 174, 242, 825, 318 ], "page_idx": 6 }, { "type": "text", "text": "In the early stage of learning, $\\pi _ { \\theta _ { o l d } } ( a _ { t } | s _ { t } )$ is near $1 / K$ (taking $K$ discrete spaces for example) and the magnitude of $\\hat { A } _ { t }$ is large, while the damping force is a bit weak. Therefore, the agent learns fast. Then $\\beta$ shows a relative stronger force to avoid overshooting for action selection and encourage more exploration. As for the final stage, the policy changes slowly because the learning rate is low, where $\\delta ( \\boldsymbol { a } _ { t } | \\boldsymbol { s } _ { t } )$ is small and therefore it converges. ", "bbox": [ 173, 323, 825, 397 ], "page_idx": 6 }, { "type": "text", "text": "3.8 RELATIONSHIP WITH PPO ", "text_level": 1, "bbox": [ 176, 415, 400, 430 ], "page_idx": 6 }, { "type": "text", "text": "To conclude this section, we take some time to see why PPO works by taking the above viewpoints into account. When we pour more attention to Equation 9, the ratio $r _ { t } ( \\boldsymbol { \\dot { \\theta } } )$ only involves the probability for given action $a$ , which is chosen by policy $\\pi$ . In other words, all other actions’ probabilities except $a$ are not activated, which no longer contribute to back-propagation and allow probability mismatch, which encourage exploration. This procedure behaves similarly to POP3D, which helps the network to learn more easily. Above all, POP3D is designed to conform with the regulations for overcoming above mentioned problems, and in the next section experiments from commonly used benchmarks will evaluate its performance. ", "bbox": [ 173, 443, 825, 555 ], "page_idx": 6 }, { "type": "text", "text": "4 EXPERIMENTS ", "text_level": 1, "bbox": [ 176, 578, 326, 594 ], "page_idx": 6 }, { "type": "text", "text": "4.1 CONTROLLED EXPERIMENTS SETUP ", "text_level": 1, "bbox": [ 176, 611, 465, 626 ], "page_idx": 6 }, { "type": "text", "text": "OpenAI Gym is a well-known simulation environment to test and evaluate various reinforcement algorithms, which is composed of both discrete (Atari) and continuous (Mujoco) domains (Brockman et al., 2016). Most recent deep reinforcement learning methods such as DQN variants (Van Hasselt et al., 2016; Wang et al., 2016; Schaul et al., 2015; Bellemare et al., 2017; Hessel et al., 2018), A3C, ACKTR, PPO are evaluated using only one set of hyper-parameters5. Therefore, we evaluate POP3D’s performance on 49 Atari games(v4, discrete action space ) and 7 Mujoco (v2, continuous). ", "bbox": [ 174, 638, 825, 722 ], "page_idx": 6 }, { "type": "text", "text": "Since PPO is a distinguished RL algorithm which defeats various methods such as A3C, A2C ACKTR, we focus on a detailed quantitative comparison with fine-tuned PPO. And we don’t consider large scale distributed algorithms Apex-DQN (Horgan et al., 2018) and IMPALA (Espeholt et al., 2018), because we concentrate on comparable and fair evaluation, while the latter is designed to apply with large scale parallelism. Nevertheless, some orthogonal improvements from those methods have the potentials to improve our method further. Furthermore, we include TRPO to acts as a baseline method. Engstrom et al. (2020) carefully study the underlying factor that helps PPO outperform TPRO. To avoid unfair comparisons, we carefully control the settings. In addition, quantitative comparisons between KLD and point probability penalty helps to convince the critical role of the latter, where the former strategy is named fixed KLD in Schulman et al. (2017) and can act as another good baseline in this context, named by BASELINE below. ", "bbox": [ 174, 728, 826, 882 ], "page_idx": 6 }, { "type": "text", "text": "In particular, we retrained one agent for each game with fine-tuned hyper-parameters6. To avoid the problems of reproduction about reinforcement algorithms mentioned in Henderson et al. (2018), we take the following measures: ", "bbox": [ 174, 103, 825, 145 ], "page_idx": 7 }, { "type": "text", "text": "• Use the same training steps and make use of the same amount of game frames(40M for Atari game and 10M for Mujoco). \n• Use the same neural network structures, which is the CNN model with one action head and one value head for the Atari game, and a fully-connected model with one value head and one action head which produces the mean and standard deviation of diagonal Gaussian distribution as PPO. \n• Initialize parameters using the same strategy as PPO. \n• Keep Gym wrappers from Deepmind such as reward clipping and frame stacking unchanged for Atari domain, and enable 30 no-ops at the beginning of each episode. \n• Use Adam optimizer (Kingma & Ba, 2014) and decrease $\\alpha$ linearly from 1 to 0 for Atari domain as PPO. ", "bbox": [ 217, 159, 825, 332 ], "page_idx": 7 }, { "type": "text", "text": "To facilitate further comparisons with other approaches, we release the seeds and detailed results7(across the entire training process for different trials). In addition, we randomly select three seeds from $\\{ 0 , 1 0 , 1 0 0 , 1 0 0 0 , 1 0 0 0 0 \\}$ for two domains, {10,100,1000} for Atari and {0,10,100} for Mujoco in order to decrease unfavorable subjective bias stated in Henderson et al. (2018). ", "bbox": [ 174, 345, 825, 402 ], "page_idx": 7 }, { "type": "text", "text": "4.2 EVALUATION METRICS ", "text_level": 1, "bbox": [ 174, 419, 375, 433 ], "page_idx": 7 }, { "type": "text", "text": "PPO utilizes two score metrics for evaluating agents’ performance using various RL algorithms. One is the mean score of the last 100 episodes $S c o r e _ { 1 0 0 }$ , which measures how high a strategy can hit eventually. Another is the average score across all episodes $S c o r e _ { a l l }$ , which evaluates how fast an agent learns. In this paper, we conform to this routine and calculate individual metric by averaging three seeds in the same way. ", "bbox": [ 174, 445, 825, 515 ], "page_idx": 7 }, { "type": "text", "text": "4.3 DISCRETE DOMAIN COMPARISONS ", "text_level": 1, "bbox": [ 176, 531, 457, 546 ], "page_idx": 7 }, { "type": "text", "text": "Hyper-parameters We search hyper-parameter four times for the penalty coefficient $\\beta$ based on four Atari games while keeping other hyper-parameters unchanged as PPO and fix $\\beta = 5 . 0$ to train all Atari games. For BASELINE, we also search hyper-parameter four times on penalty coefficient $\\beta$ and choose $\\beta = 1 0 . 0$ . To save space, detailed hyper-parameter setting can be found in Table 6 and 7. ", "bbox": [ 174, 558, 825, 614 ], "page_idx": 7 }, { "type": "text", "text": "This process is not beneficial for POP3D owing to missing optimization for all hyper-parameters. There are two reasons to make this choice. On the one hand, it’s the simplest way to make a relatively fair comparison group such as keeping the same iterations and epochs within one loop to our knowledge. On the other hand, this process imposes low search requirements for time and resources. That’s to say, we can draw a conclusion that our method is at least competitive to PPO if it performs better on benchmarks. ", "bbox": [ 174, 621, 825, 704 ], "page_idx": 7 }, { "type": "text", "text": "Comparisons The final score of each game is averaged by three different seeds and the highest is in bold. As Table 1 shows, POP3D outperforms 32 across 49 Atari games given the final score, followed by PPO with 11, BASELINE with 5, and TRPO with 1. Interestingly, for games that POP3D score highest, BASELINE score worse than PPO more often than the other way round, which means that POP3D is not just an approximate version of BASELINE. ", "bbox": [ 174, 712, 825, 781 ], "page_idx": 7 }, { "type": "text", "text": "For another metric, POP3D wins 20 out of 49 Atari games which matches PPO with 18, followed by BASELINE with 6, and last ranked by TRPO with 5. If we measure the stability of an algorithm by the score variance of different trials, POP3D scores high with good stability across various seeds. And PPO behaves worse in Game Kangaroo and UpNDown. Interestingly, BASELINE shows a large variance for different seeds for several games such as BattleZone, Freeway, Pitfall, and Seaquest. POP3D reveals its better capacity to score high and similar fast learning ability in this domain. The detailed metric for each game is listed in Table 3 and 4. ", "bbox": [ 174, 787, 825, 886 ], "page_idx": 7 }, { "type": "text", "text": "4.4 CONTINUOUS DOMAIN COMPARISONS ", "text_level": 1, "bbox": [ 176, 103, 480, 117 ], "page_idx": 8 }, { "type": "text", "text": "Hyper-parameters For PPO, we use the same hyperparameter configuration as Schulman et al. (2017). Regarding POP3D, we search on two games three times and select 5.0 as the penalty coefficient. More details about hyper-parameters for PPO and POP3D are listed in Table 8. Unlike the Atari domain, we utilize the constant learning rate strategy as Schulman et al. (2017) in the continuous domain instead of the linear decrease strategy. ", "bbox": [ 174, 130, 531, 256 ], "page_idx": 8 }, { "type": "text", "text": "Comparison Results The scores are also averaged on three trials and summarized in Table 1. POP3D occupies 6 out of 7 games on $S c o r e _ { 1 0 0 }$ . Evaluation metrics of both across different games are illustrated in Table 2 ", "bbox": [ 173, 262, 531, 318 ], "page_idx": 8 }, { "type": "table", "img_path": "images/c293fb60b774bcd29e3715d965787fc6d86e1237874544d5e6d78bed9da8d9aa.jpg", "table_caption": [ "Table 1: Top: The number of games \"won\" by each algorithm for Atari games. Bottom: The number of games won by each algorithm for Mujoco games. Each experiment is averaged across three seeds. " ], "table_footnote": [ "and 5. In summary, both metrics indicate that POP3D is competitive to PPO in the continuous domain. " ], "table_body": "<table><tr><td>Metric</td><td colspan=\"4\">PPO POP3D BASELINE TRPO</td></tr><tr><td>Score100 Scoreall</td><td>11 18</td><td>32 20</td><td>5 6</td><td>1 5</td></tr><tr><td></td><td>Metric</td><td>PPO POP3D</td><td></td><td></td></tr><tr><td></td><td>Score100</td><td>1</td><td>6</td><td></td></tr><tr><td></td><td>Scoreall</td><td>4</td><td>3</td><td></td></tr></table>", "bbox": [ 553, 203, 813, 314 ], "page_idx": 8 }, { "type": "text", "text": "5 CONCLUSION ", "text_level": 1, "bbox": [ 176, 352, 318, 367 ], "page_idx": 8 }, { "type": "text", "text": "In this paper, we introduce a new reinforcement learning algorithm called POP3D (Policy Optimization with Penalized Point Probability Distance), which acts as a TRPO variant like PPO. Compared with KLD that is an upper bound for the square of total variance divergence between two distributions, the penalized point probability distance is a symmetric lower bound. Besides, it equivalently expands the optimal solution manifold effectively while encouraging exploration, which is a similar mechanism implicitly possessed by PPO. The proposed method not only possesses several critical improvements from PPO but outperforms with a clear margin on 49 Atari games from the respective of final scores and meets PPO’s match as for fast learning ability. ", "bbox": [ 174, 383, 531, 592 ], "page_idx": 8 }, { "type": "table", "img_path": "images/1efbbfe3526c554ef70fba199a014a6bd603362a27a3f2eedd7d1a3d4be8801e.jpg", "table_caption": [ "Table 2: Mean final scores (last 100 episodes) of PPO, POP3D on Mujoco games after 10M frames. The results are averaged by three trials. " ], "table_footnote": [], "table_body": "<table><tr><td>Game</td><td>PPO</td><td>POP3D</td></tr><tr><td>HalfCheetah</td><td>2726.03</td><td>3184.54</td></tr><tr><td>Hopper</td><td>2027.21</td><td>1452.09</td></tr><tr><td>InvertedDblPendulum 4455.03</td><td></td><td>4907.64</td></tr><tr><td>InvertedPendulum</td><td>544.02</td><td>741.94</td></tr><tr><td>Reacher</td><td>-5.00</td><td>-4.29</td></tr><tr><td>Swimmer</td><td>111.88</td><td>112.08</td></tr><tr><td>Walker2d</td><td>1112.25</td><td>3966.01</td></tr></table>", "bbox": [ 540, 446, 834, 575 ], "page_idx": 8 }, { "type": "text", "text": "More interestingly, it not only suffers less from the penalty item setting headache along with TRPO, where is arduous to select one fixed value for various environments but outperforms fixed KLD baseline from PPO. In summary, POP3D is highly competitive and an alternative to PPO. ", "bbox": [ 174, 598, 828, 641 ], "page_idx": 8 }, { "type": "text", "text": "REFERENCES ", "text_level": 1, "bbox": [ 176, 102, 287, 118 ], "page_idx": 9 }, { "type": "text", "text": "Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. arXiv preprint arXiv:1707.06887, 2017. ", "bbox": [ 176, 126, 823, 155 ], "page_idx": 9 }, { "type": "text", "text": "Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016. ", "bbox": [ 171, 164, 823, 193 ], "page_idx": 9 }, { "type": "text", "text": "Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, and Aleksander Madry. Implementation matters in deep rl: A case study on ppo and trpo. In International Conference on Learning Representations, 2020. URL https://openreview. net/forum?id ${ . } = { }$ r1etN1rtPB. ", "bbox": [ 173, 200, 826, 257 ], "page_idx": 9 }, { "type": "text", "text": "Lasse Espeholt, Hubert Soyer, Remi Munos, Karen Simonyan, Volodymir Mnih, Tom Ward, Yotam Doron, Vlad Firoiu, Tim Harley, Iain Dunning, et al. Impala: Scalable distributed deep-rl with importance weighted actor-learner architectures. arXiv preprint arXiv:1802.01561, 2018. ", "bbox": [ 176, 267, 823, 310 ], "page_idx": 9 }, { "type": "text", "text": "Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning, pp. 1861–1870, 2018. ", "bbox": [ 174, 318, 826, 362 ], "page_idx": 9 }, { "type": "text", "text": "Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. ", "bbox": [ 174, 369, 826, 412 ], "page_idx": 9 }, { "type": "text", "text": "Matteo Hessel, Joseph Modayil, Hado Van Hasselt, Tom Schaul, Georg Ostrovski, Will Dabney, Dan Horgan, Bilal Piot, Mohammad Azar, and David Silver. Rainbow: Combining improvements in deep reinforcement learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018. ", "bbox": [ 174, 421, 825, 465 ], "page_idx": 9 }, { "type": "text", "text": "Dan Horgan, John Quan, David Budden, Gabriel Barth-Maron, Matteo Hessel, Hado van Hasselt, and David Silver. Distributed prioritized experience replay. In International Conference on Learning Representations, 2018. ", "bbox": [ 173, 473, 825, 517 ], "page_idx": 9 }, { "type": "text", "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ", "bbox": [ 173, 526, 825, 554 ], "page_idx": 9 }, { "type": "text", "text": "Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. nature, 521(7553):436–444, 2015. ", "bbox": [ 169, 563, 826, 593 ], "page_idx": 9 }, { "type": "text", "text": "Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. ", "bbox": [ 176, 602, 823, 645 ], "page_idx": 9 }, { "type": "text", "text": "Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540):529–533, 2015. ", "bbox": [ 176, 654, 825, 696 ], "page_idx": 9 }, { "type": "text", "text": "Volodymyr Mnih, Adria Puigdomenech Badia, Mehdi Mirza, Alex Graves, Timothy Lillicrap, Tim Harley, David Silver, and Koray Kavukcuoglu. Asynchronous methods for deep reinforcement learning. In International conference on machine learning, pp. 1928–1937, 2016. ", "bbox": [ 174, 705, 825, 748 ], "page_idx": 9 }, { "type": "text", "text": "Kevin P Murphy. Machine learning: a probabilistic perspective. MIT press, 2012. ", "bbox": [ 174, 757, 715, 773 ], "page_idx": 9 }, { "type": "text", "text": "Hieu Pham, Melody Guan, Barret Zoph, Quoc Le, and Jeff Dean. Efficient neural architecture search via parameters sharing. In International Conference on Machine Learning, pp. 4095–4104, 2018. ", "bbox": [ 173, 781, 818, 810 ], "page_idx": 9 }, { "type": "text", "text": "Tom Schaul, John Quan, Ioannis Antonoglou, and David Silver. Prioritized experience replay. arXiv preprint arXiv:1511.05952, 2015. ", "bbox": [ 174, 819, 823, 848 ], "page_idx": 9 }, { "type": "text", "text": "John Schulman, Sergey Levine, Pieter Abbeel, Michael Jordan, and Philipp Moritz. Trust region policy optimization. In International conference on machine learning, pp. 1889–1897, 2015. ", "bbox": [ 173, 857, 821, 887 ], "page_idx": 9 }, { "type": "text", "text": "John Schulman, Philipp Moritz, Sergey Levine, Michael Jordan, and Pieter Abbeel. High-dimensional continuous control using generalized advantage estimation. In ICLR, 2016. ", "bbox": [ 173, 895, 823, 924 ], "page_idx": 9 }, { "type": "text", "text": "John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. ", "bbox": [ 169, 103, 825, 132 ], "page_idx": 10 }, { "type": "text", "text": "David Silver, Julian Schrittwieser, Karen Simonyan, Ioannis Antonoglou, Aja Huang, Arthur Guez, Thomas Hubert, Lucas Baker, Matthew Lai, Adrian Bolton, et al. Mastering the game of go without human knowledge. nature, 550(7676):354–359, 2017. ", "bbox": [ 178, 141, 823, 184 ], "page_idx": 10 }, { "type": "text", "text": "Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018. ", "bbox": [ 173, 193, 825, 208 ], "page_idx": 10 }, { "type": "text", "text": "Mingxing Tan, Bo Chen, Ruoming Pang, Vijay Vasudevan, Mark Sandler, Andrew Howard, and Quoc V Le. Mnasnet: Platform-aware neural architecture search for mobile. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2820–2828, 2019. ", "bbox": [ 176, 215, 823, 260 ], "page_idx": 10 }, { "type": "text", "text": "Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In Thirtieth AAAI conference on artificial intelligence, 2016. ", "bbox": [ 171, 267, 825, 297 ], "page_idx": 10 }, { "type": "text", "text": "Ziyu Wang, Tom Schaul, Matteo Hessel, Hado Hasselt, Marc Lanctot, and Nando Freitas. Dueling network architectures for deep reinforcement learning. In International conference on machine learning, pp. 1995–2003, 2016. ", "bbox": [ 176, 305, 821, 348 ], "page_idx": 10 }, { "type": "text", "text": "Yuhuai Wu, Elman Mansimov, Roger B Grosse, Shun Liao, and Jimmy Ba. Scalable trust-region method for deep reinforcement learning using kronecker-factored approximation. In Advances in neural information processing systems, pp. 5279–5288, 2017. ", "bbox": [ 176, 357, 825, 400 ], "page_idx": 10 }, { "type": "text", "text": "A SCORE TABLES AND CURVES ", "text_level": 1, "bbox": [ 176, 102, 452, 118 ], "page_idx": 11 }, { "type": "text", "text": "Mean scores of various methods for Atari domain are listed in Table 3 and 4. ", "bbox": [ 174, 150, 674, 165 ], "page_idx": 11 }, { "type": "table", "img_path": "images/3b50531ddfff889c389e426d48a60dc8a09a1a31993985989410f59ebdd89389.jpg", "table_caption": [ "Table 3: Mean final scores (last 100 episodes) of PPO, POP3D, BASELINE and TRPO on Atari games after 40M frames. The results are averaged on three trials. " ], "table_footnote": [], "table_body": "<table><tr><td>game</td><td>POP3D</td><td>PPO</td><td>BASELINE</td><td>TPRO</td></tr><tr><td>Alien</td><td>1510.80</td><td>1431.17</td><td>1311.23</td><td>1110.40</td></tr><tr><td>Amidar</td><td>729.15</td><td>790.75</td><td>655.10</td><td>200.56</td></tr><tr><td>Assault</td><td>5400.13</td><td>4438.82</td><td>1846.75</td><td>1363.46</td></tr><tr><td>Asterix</td><td>4310.67</td><td>3483.17</td><td>3657.67</td><td>2651.33</td></tr><tr><td>Asteroids</td><td>2488.10</td><td>1605.33</td><td>1615.37</td><td>2205.70</td></tr><tr><td>Atlantis</td><td>2193605.67</td><td>2140536.33</td><td>1515993.33</td><td>1419104.67</td></tr><tr><td>BankHeist</td><td>1212.23</td><td>1206.67</td><td>1124.43</td><td>1125.17</td></tr><tr><td>BattleZone</td><td>15466.67</td><td>14766.67</td><td>14690.00</td><td>15123.33</td></tr><tr><td>BeamRider</td><td>4549.00</td><td>2624.19</td><td>6898.09</td><td>5073.75</td></tr><tr><td>Bowling</td><td>38.99</td><td>47.27</td><td>30.48</td><td>31.24</td></tr><tr><td>Boxing</td><td>97.23</td><td>93.70</td><td>65.33</td><td>50.07</td></tr><tr><td>Breakout</td><td>458.41</td><td>281.93</td><td>67.70</td><td>40.65</td></tr><tr><td>Centipede</td><td>3315.44</td><td>3565.18</td><td>3393.93</td><td>3353.14</td></tr><tr><td>Chopper-Command</td><td>6308.33</td><td>4872.67</td><td>2676.00</td><td>2286.67</td></tr><tr><td>CrazyClimber</td><td>120247.33</td><td>105940.00</td><td>98219.67</td><td>87522.33</td></tr><tr><td>DemonAttack</td><td>61147.33</td><td>26740.57</td><td>57476.65</td><td>21525.08</td></tr><tr><td>DoubleDunk</td><td>-7.89</td><td>-11.22</td><td>-8.61</td><td>-10.04</td></tr><tr><td>Enduro</td><td>459.85</td><td>698.46</td><td>518.41</td><td>365.95</td></tr><tr><td>FishingDerby</td><td>28.99</td><td>17.72</td><td>-64.27</td><td>-69.64</td></tr><tr><td>Freeway</td><td>21.21</td><td>21.11</td><td>18.37</td><td>20.89</td></tr><tr><td>Frostbite</td><td>316.87</td><td>280.30</td><td>280.30</td><td>291.77</td></tr><tr><td>Gopher</td><td>6207.00</td><td>1791.00</td><td>940.87</td><td>938.27</td></tr><tr><td>Gravitar</td><td>557.17</td><td>753.50</td><td>449.00</td><td>495.17</td></tr><tr><td>IceHockey</td><td>-4.12</td><td>-4.83</td><td>-3.61</td><td>-4.61</td></tr><tr><td>Jamesbond</td><td>527.17</td><td>488.17</td><td>685.17</td><td>901.67</td></tr><tr><td>Kangaroo</td><td>3891.67</td><td>6845.00</td><td>1850.00</td><td>1214.67</td></tr><tr><td>Krull</td><td>7715.68</td><td>8329.08</td><td>7204.95</td><td>4881.65</td></tr><tr><td>KungFuMaster</td><td>33728.00</td><td>29958.67</td><td>29843.67</td><td>26808.00</td></tr><tr><td>Montezuma-Revenge</td><td>0.00</td><td>10.67</td><td>0.67</td><td>0.00</td></tr><tr><td>MsPacman</td><td>1683.87</td><td>1981.50</td><td>1170.70</td><td>1133.57</td></tr><tr><td>NameThisGame</td><td>6065.63</td><td>5397.47</td><td>5672.60</td><td>5604.10</td></tr><tr><td>Pitfall</td><td>0.00</td><td>-2.32</td><td>-17.26</td><td>-43.60</td></tr><tr><td>Pong</td><td>20.50</td><td>20.80</td><td>20.79</td><td>19.63</td></tr><tr><td>PrivateEye</td><td>79.67</td><td>36.50</td><td>99.67</td><td>99.33</td></tr><tr><td>Qbert</td><td>15396.67</td><td>14556.83</td><td>4114.00</td><td>3781.58</td></tr><tr><td>Riverraid</td><td>8052.23</td><td>7360.40</td><td>7722.00</td><td>6773.67</td></tr><tr><td>RoadRunner</td><td>44679.67</td><td>36289.33</td><td>43626.33</td><td>24061.33</td></tr><tr><td>Robotank</td><td>4.60</td><td>14.15</td><td>24.60</td><td>24.18</td></tr><tr><td>Seaquest</td><td>1807.47</td><td>1470.60</td><td>1501.47</td><td>926.40</td></tr><tr><td>SpaceInvaders</td><td>1216.15</td><td>944.63</td><td>814.53</td><td>634.07</td></tr><tr><td>StarGunner</td><td>48984.00</td><td>33862.00</td><td>47738.00</td><td>33442.67</td></tr><tr><td>Tennis</td><td>-8.32</td><td>-13.74</td><td>-19.13</td><td>-18.40</td></tr><tr><td>TimePilot</td><td>3770.33</td><td>5321.33</td><td>6278.33</td><td>5701.00</td></tr><tr><td>Tutankham</td><td>241.21</td><td>177.58</td><td>135.80</td><td>136.21</td></tr><tr><td>UpNDown</td><td>242701.51</td><td>153160.66</td><td>11815.87</td><td>10949.53</td></tr><tr><td>Venture</td><td>36.33</td><td>0.00</td><td>4.00</td><td>0.00</td></tr><tr><td>VideoPinball</td><td>37780.70</td><td>31577.24</td><td>21438.64</td><td>25095.20</td></tr><tr><td>WizardOfWor</td><td>4704.00</td><td>4886.67</td><td>3533.67</td><td>3103.00</td></tr><tr><td>Zaxxon</td><td>9472.00</td><td>5728.67</td><td>1179.67</td><td>4796.67</td></tr></table>", "bbox": [ 253, 238, 743, 885 ], "page_idx": 11 }, { "type": "table", "img_path": "images/5b807726bf18371054129dc6f645a6d52ca392f2f3bc60d0c20fcc192de19465.jpg", "table_caption": [ "Table 4: All episodes mean scores of PPO, POP3D, BASELINE and TRPO on Atari games after 40M frames. The results are averaged by three trials. " ], "table_footnote": [], "table_body": "<table><tr><td>game</td><td>POP3D</td><td>PPO</td><td>BASELINE</td><td>TRPO</td></tr><tr><td>Alien</td><td>1147.29</td><td>1115.94</td><td>851.13</td><td>841.08</td></tr><tr><td>Amidar</td><td>299.55</td><td>413.46</td><td>295.91</td><td>169.12</td></tr><tr><td>Assault</td><td>2139.15</td><td>2168.93</td><td>1159.50</td><td>971.78</td></tr><tr><td>Asterix</td><td>2004.43</td><td>2102.10</td><td>1884.68</td><td>1342.83</td></tr><tr><td>Asteroids</td><td>1652.48</td><td>1470.46</td><td>1477.71</td><td>1760.73</td></tr><tr><td>Atlantis</td><td>488134.03</td><td>596807.27</td><td>192798.74</td><td>174394.94</td></tr><tr><td>BankHeist</td><td>662.26</td><td>643.94</td><td>859.25</td><td>831.95</td></tr><tr><td>BattleZone</td><td>11131.44</td><td>9387.77</td><td>11674.30</td><td>12918.39</td></tr><tr><td>BeamRider</td><td>1965.27</td><td>1460.59</td><td>3321.25</td><td>2431.63</td></tr><tr><td>Bowling</td><td>37.97</td><td>39.41</td><td>33.90</td><td>30.99</td></tr><tr><td>Boxing</td><td>83.12</td><td>78.61</td><td>27.92</td><td>23.07</td></tr><tr><td>Breakout</td><td>143.60</td><td>124.98</td><td>29.99</td><td>26.56</td></tr><tr><td>Centipede</td><td>3056.81</td><td>3344.63</td><td>3042.48</td><td>3142.22</td></tr><tr><td>Chopper-</td><td></td><td></td><td></td><td></td></tr><tr><td>Command</td><td>3269.47</td><td>3106.14</td><td>1780.38</td><td>1595.82</td></tr><tr><td>CrazyClimber</td><td>97257.52</td><td>90169.60</td><td>69258.31</td><td>63189.78</td></tr><tr><td>DemonAttack</td><td>7611.27</td><td>7180.43</td><td>9814.42</td><td>6204.68</td></tr><tr><td>DoubleDunk</td><td>-13.70</td><td>-15.45</td><td>-15.93</td><td>-14.57</td></tr><tr><td>Enduro</td><td>107.84</td><td>321.20</td><td>92.59</td><td>140.67</td></tr><tr><td>FishingDerby</td><td>-21.00</td><td>-27.51</td><td>-81.90</td><td>-81.97</td></tr><tr><td>Freeway</td><td>17.76</td><td>15.87</td><td>15.93</td><td>17.33</td></tr><tr><td>Frostbite</td><td>276.47</td><td>267.73</td><td>270.42</td><td>270.57</td></tr><tr><td>Gopher</td><td>1556.29</td><td>1196.20</td><td>900.74</td><td>875.93</td></tr><tr><td>Gravitar</td><td>413.20</td><td>509.81</td><td>342.74</td><td>317.86</td></tr><tr><td>IceHockey</td><td>-4.67</td><td>-5.50</td><td>-4.61</td><td>-5.21</td></tr><tr><td>Jamesbond</td><td>358.54</td><td>394.45</td><td>380.91</td><td>519.01</td></tr><tr><td>Kangaroo</td><td>1614.63</td><td>2199.74</td><td>937.98</td><td>566.85</td></tr><tr><td>Krull</td><td>6538.16</td><td>7195.24</td><td>4760.66</td><td>3861.87</td></tr><tr><td>KungFuMaster</td><td>23253.96</td><td>23283.31</td><td>19637.58</td><td>18293.12</td></tr><tr><td>Montezuma- Revenge</td><td>0.14</td><td>0.74</td><td>0.22</td><td>0.12</td></tr><tr><td>MsPacman</td><td>1214.09</td><td>1482.77</td><td>860.63</td><td>864.84</td></tr><tr><td>NameThisGame</td><td>5353.14</td><td>5199.37</td><td>4562.32</td><td>4504.67</td></tr><tr><td>Pitfall</td><td>-2.41</td><td>-5.81</td><td>-31.27</td><td>-33.93</td></tr><tr><td>Pong</td><td>13.24</td><td>12.83</td><td>7.20</td><td>-2.91</td></tr><tr><td>PrivateEye</td><td>87.37</td><td>52.76</td><td>56.70</td><td>98.79</td></tr><tr><td>Qbert</td><td>5852.10</td><td>6744.13</td><td>1760.92</td><td>1679.03</td></tr><tr><td>Riverraid</td><td>5260.89</td><td>5487.17</td><td>5220.64</td><td>4549.22</td></tr><tr><td>RoadRunner</td><td>25456.31</td><td>24688.07</td><td>20385.91</td><td>16269.40</td></tr><tr><td>Robotank</td><td>3.08</td><td>8.65</td><td>13.89</td><td>14.57</td></tr><tr><td></td><td>1487.84</td><td></td><td></td><td>848.47</td></tr><tr><td>Seaquest</td><td></td><td>1120.15</td><td>1112.51</td><td>483.48</td></tr><tr><td>SpaceInvaders StarGunner</td><td>693.26</td><td>632.17</td><td>552.50</td><td>13341.23</td></tr><tr><td></td><td>14734.11</td><td>13643.80</td><td>16288.35</td><td>-21.04</td></tr><tr><td>Tennis</td><td>-19.86</td><td>-21.80</td><td>-21.84</td><td></td></tr><tr><td>TimePilot Tutankham</td><td>3396.61</td><td>4410.87</td><td>4718.46</td><td>4544.68 109.18</td></tr><tr><td></td><td>179.96</td><td>152.72</td><td>103.95</td><td>7085.02</td></tr><tr><td>UpNDown</td><td>38728.48</td><td>43208.99</td><td>5430.22</td><td></td></tr><tr><td>Venture</td><td>15.89</td><td>14.66</td><td>0.57</td><td>0.03</td></tr><tr><td>VideoPinball WizardOfWor</td><td>27346.44 2340.60</td><td>27549.55 2743.40</td><td>23998.09 2409.94</td><td>23705.39</td></tr><tr><td></td><td></td><td></td><td></td><td>2045.17</td></tr><tr><td>Zaxxon</td><td>3739.56</td><td>1813.90</td><td>256.78</td><td>1521.28</td></tr></table>", "bbox": [ 277, 141, 715, 811 ], "page_idx": 12 }, { "type": "table", "img_path": "images/ea18da1f333365c4964c83e6e2b5a98f721669a57a3d7d0b3b7ffdb4e3e86b43.jpg", "table_caption": [ "Table 5: All episodes mean scores of PPO, POP3D on Mujoco games after 10M frames. The results are averaged by three trials. " ], "table_footnote": [], "table_body": "<table><tr><td>game</td><td>PPO</td><td>POP3D</td></tr><tr><td>HalfCheetah</td><td>3250.22</td><td>2373.30</td></tr><tr><td>Hopper</td><td>1767.14</td><td>1257.72</td></tr><tr><td>InvertedDoublePendulum</td><td>3684.92</td><td>2561.77</td></tr><tr><td>InvertedPendulum</td><td>531.77</td><td>552.98</td></tr><tr><td>Reacher</td><td>-5.94</td><td>-8.05</td></tr><tr><td>Swimmer</td><td>94.01</td><td>108.27</td></tr><tr><td>Walker2d</td><td>1770.37</td><td>2439.54</td></tr></table>", "bbox": [ 328, 141, 665, 267 ], "page_idx": 13 }, { "type": "text", "text": "B EXPERIMENTS ", "text_level": 1, "bbox": [ 176, 297, 331, 314 ], "page_idx": 13 }, { "type": "text", "text": "B.1 HYPER-PARAMETERS ", "text_level": 1, "bbox": [ 176, 329, 367, 343 ], "page_idx": 13 }, { "type": "text", "text": "B.1.1 ATARI ", "bbox": [ 174, 354, 276, 369 ], "page_idx": 13 }, { "type": "text", "text": "PPO’s and POP3D’s hyper-parameters for Mujoco games are respectively listed in Table 6. ", "bbox": [ 173, 378, 769, 393 ], "page_idx": 13 }, { "type": "table", "img_path": "images/1128ba7ee3765c0c2adc3e7145f8030d5cb825c480a72c7d24f06233b45304f9.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>128 2.5 ×10-4 × α</td></tr><tr><td>Num epochs Mini-batch size</td><td>3 32×8</td></tr><tr><td>Discount (γ) GAE parameter (入)</td><td>0.99 0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td></td><td>0.1×α</td></tr><tr><td>Clipping parameter VF coeff. Entropy coeff.</td><td>1 0.01</td></tr></table>", "bbox": [ 215, 446, 488, 614 ], "page_idx": 13 }, { "type": "table", "img_path": "images/df21408e592b52b20ce9e7d0632477747a4f0ed023844ee27e992b7db3b674c5.jpg", "table_caption": [ "Table 6: Left: PPO’s hyper-parameters for Atari games. Right:POP3D’s hyper-parameters for Atari games. " ], "table_footnote": [], "table_body": "<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size Num epochs</td><td>128 2.5 ×10-4 × α 3</td></tr><tr><td>Mini-batch size Discount (γ)</td><td>32×8</td></tr><tr><td>GAE parameter (入)</td><td>0.99 0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td></td><td>1</td></tr><tr><td>VF coeff. Entropy coeff. KL penalty coeff.</td><td>0.01</td></tr></table>", "bbox": [ 504, 445, 777, 614 ], "page_idx": 13 }, { "type": "table", "img_path": "images/df53e03b5ffd013199d23b58a0a81ef707672d49d03f5fca6afa29215595e564.jpg", "table_caption": [ "Table 7: BASELINE’s hyper-parameters for Atari games. " ], "table_footnote": [], "table_body": "<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T)</td><td>128 2.5 ×10-4 × α</td></tr><tr><td>Adam step-size Num epochs</td><td>3</td></tr><tr><td>Mini-batch size</td><td>32×8</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入)</td><td>0.95</td></tr><tr><td>Number of actors</td><td>8</td></tr><tr><td>VF coeff.</td><td>1</td></tr><tr><td>Entropy coeff.</td><td>0.01</td></tr><tr><td>KL penalty coeff.</td><td>10.0</td></tr></table>", "bbox": [ 361, 669, 633, 837 ], "page_idx": 13 }, { "type": "text", "text": "B.1.2 MUJOCO ", "text_level": 1, "bbox": [ 174, 866, 294, 880 ], "page_idx": 13 }, { "type": "text", "text": "PPO’s and POP3D’s hyper-parameters for Mujoco games are respectively listed in Table 8. ", "bbox": [ 171, 890, 767, 905 ], "page_idx": 13 }, { "type": "table", "img_path": "images/d0bca410ae3bcf6acc54fe34a863a84e45b30ec069443b3f6d7232e3bdc753c0.jpg", "table_caption": [ "Table 8: Left: PPO’s hyper-parameters for Mujoco games. Right:POP3D’s hyper-parameters for Mujoco games. " ], "table_footnote": [], "table_body": "<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>2048 3×10-4</td></tr><tr><td>Num epochs Mini-batch size</td><td>10 64</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入) KL penalty coeff.</td><td>0.95 5.0</td></tr></table>", "bbox": [ 504, 463, 736, 592 ], "page_idx": 14 }, { "type": "table", "img_path": "images/ec09665c0b52f01198d5a018443c6156d178e34bce265b421f1b69a788be563a.jpg", "table_caption": [], "table_footnote": [], "table_body": "<table><tr><td>Hyper-parameter</td><td>Value</td></tr><tr><td>Horizon (T) Adam step-size</td><td>2048 3×10-4</td></tr><tr><td>Num epochs</td><td>10</td></tr><tr><td>Mini-batch size</td><td>64</td></tr><tr><td>Discount (γ)</td><td>0.99</td></tr><tr><td>GAE parameter (入) Clipping parameter</td><td>0.95</td></tr></table>", "bbox": [ 256, 464, 488, 592 ], "page_idx": 14 }, { "type": "image", "img_path": "images/5b4b33235a0ab6b0e0a9c1d57d3efcec9854cb8d2269eea795279d7288f562d1.jpg", "image_caption": [ "Figure 1: Score curves of three methods on Atari games within 40 million frame steps. " ], "image_footnote": [], "bbox": [ 274, 148, 709, 859 ], "page_idx": 15 }, { "type": "image", "img_path": "images/b334ff90f04d263256c24e4717cabc5143d181c1eaf5c3b306260b9cbbd026d5.jpg", "image_caption": [ "Figure 2: Score curves on 7 Mujoco games within 10 million frame steps. " ], "image_footnote": [], "bbox": [ 370, 409, 619, 573 ], "page_idx": 16 }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578# RANDOMIZED ENSEMBLED DOUBLE Q-LEARNING: LEARNING FAST WITHOUT A MODEL
Xinyue Chen1∗
Zijian Zhou1∗
Keith Ross1,2†
1 New York University Shanghai 2 New York University
# ABSTRACT
Using a high Update-To-Data (UTD) ratio, model-based methods have recently achieved much higher sample efficiency than previous model-free methods for continuous-action DRL benchmarks. In this paper, we introduce a simple modelfree algorithm, Randomized Ensembled Double Q-Learning (REDQ), and show that its performance is just as good as, if not better than, a state-of-the-art modelbased algorithm for the MuJoCo benchmark. Moreover, REDQ can achieve this performance using fewer parameters than the model-based method, and with less wall-clock run time. REDQ has three carefully integrated ingredients which allow it to achieve its high performance: (i) a UTD ratio $\gg 1$ ; (ii) an ensemble of $\mathrm { Q }$ functions; (iii) in-target minimization across a random subset of Q functions from the ensemble. Through carefully designed experiments, we provide a detailed analysis of REDQ and related model-free algorithms. To our knowledge, REDQ is the first successful model-free DRL algorithm for continuous-action spaces using a UTD ratio $\gg 1$ .
# 1 INTRODUCTION
Recently, model-based methods in continuous action space domains have achieved much higher sample efficiency than previous model-free methods. Model-based methods often attain higher sample efficiency by using a high Update-To-Data (UTD) ratio, which is the number of updates taken by the agent compared to the number of actual interactions with the environment. For example, Model-Based Policy Optimization (MBPO) (Janner et al., 2019), is a state-of-the-art model-based algorithm which updates the agent with a mix of real data from the environment and “fake” data from its model, and uses a large UTD ratio of 20-40. Compared to Soft-Actor-Critic (SAC), which is model-free and uses a UTD of 1, MBPO achieves much higher sample efficiency in the OpenAI MuJoCo benchmark (Todorov et al., 2012; Brockman et al., 2016). This raises the question of whether it is also possible to achieve such high performance without a model?
In this paper, we introduce a simple model-free algorithm called Randomized Ensemble Double Q learning (REDQ), and show that its performance is just as good as, if not better than, MBPO. The result indicates, that at least for the MuJoCo benchmark, simple model-free algorithms can attain the performance of current state-of-the-art model-based algorithms. Moreover, REDQ can achieve this performance using fewer parameters than MBPO, and with less wall-clock run time.
Like MBPO, REDQ employs a UTD ratio that is $\gg 1$ , but unlike MBPO it is model-free, has no roll outs, and performs all updates with real data. In addition to using a UTD ratio that is $\gg 1$ , it has two other carefully integrated ingredients: an ensemble of Q functions; and in-target minimization across a random subset of Q functions from the ensemble.
Through carefully designed experiments, we provide a detailed analysis of REDQ. We introduce the metrics of average Q-function bias and standard deviation (std) of Q-function bias. Our results show that using ensembles with in-target minimization reduces the std of the Q-function bias to close to zero for most of training, even when the UTD is very high. Furthermore, by adjusting the number of randomly selected Q-functions for in-target minimization, REDQ can control the average Q-function bias. In comparison with standard ensemble averaging and with SAC with a higher UTD, REDQ has much lower std of Q-function bias while maintaining an average bias that is negative but close to zero throughout most of training, resulting in significantly better learning performance. We perform an ablation study, and show that REDQ is very robust to choices of hyperparameters, and can work well with a small ensemble and a small number of Q functions in the in-target minimization. We also provide a theoretical analysis, providing additional insights into REDQ. Finally, we consider combining the REDQ algorithm with an online feature extractor network (OFENet) (Ota et al., 2020) to further improve performance, particularly for the more challenging environments Ant and Humanoid. We achieve more than $7 \mathbf { x }$ the sample efficiency of SAC to reach a score of 5000 for both Ant and Humanoid. In Humanoid, REDQ-OFE also greatly outperforms MBPO, reaching a score of 5000 at 150K interactions, which is $3 \mathbf { x }$ MBPO’s score at that point.
To ensure our comparisons are fair, and to ensure our results are reproducible (Henderson et al., 2018; Islam et al., 2017; Duan et al., 2016), we provide open source code1. For all algorithmic comparisons, we use the same codebase (except for MBPO, for which we use the authors’ code).
# 2 RANDOMIZED ENSEMBLED DOUBLE Q-LEARNING (REDQ)
Janner et al. (2019) proposed Model-Based Policy Optimization (MBPO), which was shown to be much more sample efficient than popular model-free algorithms such as SAC and PPO for the MuJoCo environments. MBPO learns a model, and generates “fake data” from its model as well as “real data” through environment interactions. It then performs parameter updates using both the fake and the real data. One of the distinguishing features of MBPO is that it has a UTD ratio $\gg 1$ for updating its Q functions, enabling MBPO to achieve high sample efficiency.
We propose Randomized Ensembled Double Q-learning (REDQ), a novel model-free algorithm whose sample-efficiency performance is just as good as, if not better than, the state-of-the-art modelbased algorithm for the MuJoCo benchmark. The pseudocode for REDQ is shown in Algorithm 1. REDQ can be used with any standard off-policy model-free algorithm, such as SAC (Haarnoja et al., 2018b), SOP (Wang et al., 2019), TD3 (Fujimoto et al., 2018), or DDPG (Lillicrap et al., 2015). For the sake of concreteness, we use SAC in Algorithm 1. REDQ has the following key components: $( i )$ To improve sample efficiency, the UTD ratio $G$ is much greater than one; $( i i )$ To reduce the variance in the Q-function estimate, REDQ uses an ensemble of $N$ Q-functions, with each Q-function randomly and independently initialized but updated with the same target; $( i i i )$ To reduce over-estimation bias, the target for the Q-function includes a minimization over a random subset $\mathcal { M }$ of the $N$ Q-functions. The size of the subset $\mathcal { M }$ is kept fixed, and is denoted as $M$ , and is referred to as the $i n$ -target minimization parameter. Since our default choice for $M$ is $M = 2$ , we refer to the algorithm as Randomized Ensembled Double Q-learning (REDQ).
REDQ shares some similarities with Maxmin Q-learning (Lan et al., 2020), which also uses ensembles and also minimizes over multiple Q-functions in the target. However, Maxmin Q-learning and REDQ have many differences, e.g., Maxmin Q-learning minimizes over the full ensemble in the target, whereas REDQ minimizes over a random subset of Q-functions. Unlike Maxmin Q-learning, REDQ controls over-estimation bias and variance of the Q estimate by separately setting $M$ and $N$ . REDQ has many possible variations, some of which are discussed in the ablation section.
REDQ has three key hyperparameters, $G , N$ , and $M$ . When $N = M = 2$ and $G = 1$ , then REDQ simply becomes the underlying off-policy algorithm such as SAC. When $N = M > 2$ and $G = 1$ , then REDQ is similar to, but not equivalent to, Maxmin Q-learning (Lan et al., 2020). In practice, we find $M = 2$ works well for REDQ, and that a wide range of values around $N = 1 0$ and $G = 2 0$ work well. To our knowledge, REDQ is the first successful model-free DRL algorithm for continuous-action spaces using a UTD ratio $G \gg 1$ .
# Algorithm 1 Randomized Ensembled Double Q-learning (REDQ)
1: Initialize policy parameters $\theta$ , $N$ Q-function parameters $\phi _ { i }$ , $i = 1 , \ldots , N$ , empty replay buffer $\mathcal { D }$ . Set target parameters $\phi _ { \mathrm { t a r g } , i } \phi _ { i }$ , for $i = 1 , 2 , \dots , N$
# 2: repeat
3: $a _ { t } \sim \pi _ { \theta } ( \cdot | s _ { t } )$ $r _ { t }$ $s _ { t + 1 }$
Add data to buffer: $\mathcal { D } \mathcal { D } \cup \{ ( s _ { t } , a _ { t } , r _ { t } , s _ { t + 1 } ) \}$
5: for $\cdot$ updates do 6: Sample a mini-batch $B = \{ ( s , a , r , s ^ { \prime } ) \}$ from $\mathcal { D }$ 7: Sample a set $\mathcal { M }$ of $\cdot$ distinct indices from $\{ 1 , 2 , \ldots , N \}$ 8: Compute the Q target $y$ (same for all of the $N$ Q-functions):
$$y = r + \gamma \left( \underset { i \in \mathcal { M } } { \operatorname* { m i n } } Q _ { \phi _ { \mathrm { t a r g } , i } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right) - \alpha \log \pi _ { \theta } \left( \tilde { a } ^ { \prime } \mid s ^ { \prime } \right) \right) , \quad \tilde { a } ^ { \prime } \sim \pi _ { \theta } \left( \cdot \mid s ^ { \prime } \right)$$
9: for $i = 1 , \ldots , N$ do
Update $\phi _ { i }$ with gradient descent using
$$\nabla _ { \phi } \frac { 1 } { | B | } \sum _ { ( s , a , r , s ^ { \prime } ) \in B } \left( Q _ { \phi _ { i } } ( s , a ) - y \right) ^ { 2 }$$
Update target networks with $\phi _ { \mathrm { t a r g } , i } \rho \phi _ { \mathrm { t a r g } , i } + ( 1 - \rho ) \phi _ { i }$
12: Update policy parameters $\theta$ with gradient ascent using
$$\nabla _ { \theta } \frac { 1 } { | B | } \sum _ { s \in B } \left( \frac { 1 } { N } \sum _ { i = 1 } ^ { N } Q _ { \phi _ { i } } \left( s , \widetilde { a } _ { \theta } ( s ) \right) - \alpha \log \pi _ { \theta } \left( \widetilde { a } _ { \theta } ( s ) | s \right) \right) , \quad \widetilde { a } _ { \theta } ( s ) \sim \pi _ { \theta } ( \cdot \vert s ) ,$$
# 2.1 EXPERIMENTAL RESULTS FOR REDQ
We now provide experimental results for REDQ and MBPO for the four most challenging MuJoCo environments, namely, Hopper, Walker2d, Ant, and Humanoid. We have taken great care to make a fair comparison of REDQ and MBPO. The MBPO results are reproduced using the author’s open source code, and we use the hyperparameters suggested in the MBPO paper, including $G = 2 0$ . We obtain MBPO results similar to those reported in the MBPO paper. For REDQ, we use $G = 2 0$ , $N = 1 0$ , and $M = 2$ for all environments. We use the evaluation protocol proposed in the MBPO paper. Specifically, after every epoch we run one test episode with the current policy and record the performance as the undiscounted sum of all the rewards in the episode. A more detailed discussion on hyperparameters and implementation details is given in the Appendix.
Figure 1 shows the training curves for REDQ, MBPO, and SAC. For each algorithm, we plot the average return of 5 independent trials as the solid curve, and plot the standard deviation across 5 seeds as the transparent shaded region. For each environment, we train each algorithm for exactly the same number of environment interactions as done in the MBPO paper. Figure 1 shows that both REDQ and MBPO learn much faster than SAC, with REDQ performing somewhat better than MBPO on the whole. In particular, REDQ learns significantly faster for Hopper, and has somewhat better asymptotic performance for Hopper, Walker2d, and Humanoid. A more detailed performance comparison is given in the Appendix, where it is shown that, averaging across the environments, REDQ performs $1 . 4 \mathbf { x }$ better than MBPO half-way through training and 1.1x better at the end of training. These results taken together are perhaps counter-intuitive. They show that a simple modelfree algorithm can achieve as good or better sample-efficiency performance as the state-of-the-art model-based algorithm for the MuJoCo environments.
Does REDQ achieve its sample efficiency using more computational resources than MBPO? We now compare the number of parameters used in REDQ and MBPO. With REDQ, for each Q network and the policy network, we use a multi-layer perceptron with two hidden layers, each with 256 units. For MBPO, we use the default network architectures for the Q networks, policy network, and model ensembles (Janner et al., 2019). The Appendix provides a table comparing the number of parameters: REDQ uses fewer parameters than MBPO for all four environments, specifically, between
 Figure 1: REDQ compared to MBPO and SAC. Both REDQ and MBPO use $G = 2 0$ .
$26 \%$ and $70 \%$ as many parameters depending on the environment. Additionally, we measured the runtime on a 2080-Ti GPU and found that MBPO roughly takes $7 5 \%$ longer. In summary, the results in this section show that the model-free algorithm REDQ is not only at least as sample efficient as MBPO, but also has fewer parameters and is significantly faster in terms of wall-clock time.
# 3 WHY DOES REDQ SUCCEED WHEREAS OTHERS FAIL?
REDQ is a simple model-free algorithm that matches the performance of a state-of-the-art modelbased algorithm. Key to REDQ’s sample efficiency is using a $\mathrm { U T D } \gg 1 .$ . Why is it that SAC and ordinary ensemble averaging (AVG) cannot do as well as REDQ by simply increasing the UTD?
To address these questions, let $Q ^ { \pi } ( s , a )$ be the action-value function for policy $\pi$ using the standard infinite-horizon discounted return definition. Let $Q _ { \phi } ( s , a )$ be an estimate of $Q ^ { \pi } ( s , a )$ , which is defined as the average of $Q _ { \phi _ { i } } ( s , a )$ , $i = 1 , \ldots , N$ , when using an ensemble. We define the bias of an estimate at state-action pair $( s , a )$ to be $Q _ { \phi } ( s , a ) - Q ^ { \pi } ( s , a )$ . We are primarily interested in the accuracy of $Q _ { \phi } ( s , a )$ over the state-action distribution of the current policy $\pi$ . To quantitatively analyze how estimation error accumulates in the training process, we perform an analysis that is similar to previous work (Van Hasselt et al., 2016; Fujimoto et al., 2018), but not exactly the same. We run a number of analysis episodes from different random initial states using the current policy $\pi$ . For each state-action pair visited, we obtain both the discounted Monte Carlo return and the estimated $\mathrm { Q }$ value using $Q _ { \phi }$ , and then compute the difference to obtain an estimate of the bias for that state-action pair. We then calculate the average and std of these bias values. The average gives us an idea of whether $Q _ { \phi }$ is in general overestimating or underestimating, and the std measures how uniform the bias is across different state-action pairs. We argue that the std is just as important as the average of the bias. As discussed in Van Hasselt et al. (2016), a uniform bias is not necessarily harmful as it does not change the action selection. Thus near-uniform bias can be preferable to a highly non-uniform bias with a small average value. Although average bias has been analyzed in several previous works (Van Hasselt et al., 2016; Fujimoto et al., 2018; Anschel et al., 2017), the std does not seem to have received much attention.
Since the MC return values can change significantly throughout training, to make comparisons more meaningful, we define the normalized bias of the estimate $Q _ { \phi } ( s , a )$ to be $( Q _ { \phi } ( s , a ) \ - $ $Q ^ { \pi } ( s , a ) ) / | E _ { \bar { s } , \bar { a } \sim \pi } ^ { - } [ Q ^ { \pi } ( \bar { s } , \bar { a } ) ] |$ , which is simply the bias divided by the absolute value of the expected discounted MC return for state-action pairs sampled from the current policy. We focus on the normalized bias in our analysis since it helps show how large the bias is, compared to the scale of the current MC return.
In this and the subsequent section, we compare REDQ with several algorithms and variants. We emphasize that all of the algorithms and variants use the same code base as used in the REDQ experiments (including using SAC as the underlying off-policy algorithm). The only difference is how the targets are calculated in lines 7 and 8 of Algorithm 1.
We first compare REDQ with two natural algorithms, which we call SAC-20 and ensemble averaging (AVG). SAC-20 is SAC but with $G$ increased from 1 (as in standard SAC) to 20. For AVG, we use an ensemble of Q functions, and when computing the Q target, we take the average of all Q values without any in-target minimization. In these comparisons, all three algorithms use a UTD of $G = 2 0$ . In the later ablation section we also have a detailed discussion on experimental results with Maxmin, and explain why it does not work well for the MuJoCo benchmark when using a large ensemble.
Figure 2 presents the results for Ant; the results for the other three environments are consistent with those for Ant and are shown in the Appendix. For each experiment we use 5 random seeds. We first note REDQ learns significantly faster than both SAC-20 and AVG. Strikingly, relative to the other two algorithms, REDQ has a very low normalized std of bias for most of training, indicating the bias across different in-distribution state-action pairs is about the same. Furthermore, throughout most of training, REDQ has a small and near-constant under-estimation bias. The shaded areas for mean and std of bias are also smaller, indicating that REDQ is robust to random initial conditions.
 Figure 2: Performance, mean and std of normalized Q bias for REDQ, AVG, and SAC for Ant. Figures for the other three environments have similar trends and are shown in the Appendix.
SAC with a UTD ratio of 20 performs poorly for the most challenging environments Ant and Humanoid. For SAC-20, the high UTD ratio leads to an average bias that fluctuates during training. We also see a high normalized std of bias, indicating that the bias is highly non-uniform, which can be detrimental. The bias values also have large variance across random initial seeds, as indicated by the large shaded area, showing that the bias in SAC-20 is sensitive to initial conditions. Comparing AVG and SAC-20, we see AVG performs significantly better than SAC-20 in Ant and Humanoid. This can be explained again by the bias: due to ensemble averaging, AVG can achieve a lower std of bias; and when it does, its performance improves significantly faster than SAC-20.
REDQ has two critical components that allow it to maintain stable and near-uniform bias under high UTD ratios: an ensemble and in-target minimization. AVG and SAC-20 each has one of these components but neither has both. Thus the success of REDQ is largely due to a careful integration of both of these critical components. Additionally, as shown in the ablation study, the random selection of Q functions in the in-target minimization can give REDQ a further performance boost.
# 3.1 THEORETICAL ANALYSIS
We now characterize the relation between the estimation error, the in-target minimization parameter $M$ and the size of the ensemble $N$ . We use the theoretical framework introduced in Thrun & Schwartz (1993) and extended in Lan et al. (2020). We do this for the tabular version of REDQ, for which the target for $Q ^ { i } ( s , a )$ for each $i = 1 , \ldots , N$ is:
$$r + \gamma \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } \operatorname* { m i n } _ { j \in \mathcal { M } } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } )$$
where $\mathcal { A }$ is the finite action space, $( s , a , r , s ^ { \prime } )$ is a transition, and $\mathcal { M }$ is again a uniformly random subset from $\{ 1 , \ldots , N \}$ with $| { \mathcal { M } } | = M$ . The complete pseudocode for tabular REDQ is provided in the Appendix.
Let $Q ^ { i } ( s , a ) - Q ^ { \pi } ( s , a )$ be the pre-update estimation bias for the ith Q-function, where $Q ^ { \pi } ( s , a )$ is once again the ground-truth Q-value for the current policy $\pi$ . We are interested in how the bias changes after an update, and how this change is effected by $M$ and $N$ . Similar to Thrun $\&$ Schwartz (1993) and Lan et al. (2020), define the post-update estimation bias as the difference between the target (1) and the target when using the ground-truth:
$$\begin{array} { r l } & { Z _ { M , N } \triangleq r + \gamma \underset { a ^ { \prime } \in A } { \operatorname* { m a x } } \underset { j \in \mathcal { M } } { \operatorname* { m i n } } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) - ( r + \gamma \underset { a ^ { \prime } \in A } { \operatorname* { m a x } } Q ^ { \pi } ( s ^ { \prime } , a ^ { \prime } ) ) } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \end{array}$$
Here we write $Z _ { M , N }$ to emphasize its dependence on both $M$ and $N$ . Following Thrun & Schwartz (1993) and Lan et al. (2020), fix $s$ and assume each $Q ^ { i } ( s , a )$ has a random approximation error $e _ { s a } ^ { i }$ :
$$Q ^ { i } ( s , a ) = Q ^ { \pi } ( s , a ) + e _ { s a } ^ { i }$$
where for each fixed $s { \mathrm { . } }$ , $\{ e _ { s a } ^ { i } \}$ are zero-mean independent random variables such that $\{ e _ { s a } ^ { i } \}$ are identically distributed across $i$ for each fixed $( s , a )$ pair. Note that due to the zero-mean assumption, the expected pre-update estimation bias is $\mathbb { E } [ Q ^ { i } ( s , a ) - Q ^ { \pi } ( s , a ) ] = 0$ . Thus if $\mathbb { E } \big [ Z _ { M , N } \big ] > 0$ , then the expected post-update bias is positive and there is a tendency for over-estimation accumulation; and if $\mathbf { \mathbb { E } } \big [ Z _ { M , N } \big ] < \mathbf { \dot { 0 } }$ , then there is a tendency for under-estimation accumulation.
Theorem 1. 1. For any fixed $M$ , $\mathbb { E } \left[ Z _ { M , N } \right]$ does not depend on $N$ .
2. $\mathbb { E } \left[ Z _ { 1 , N } \right] \geq 0$ for all $N \geq 1$ .
3. $\mathbb E \big [ Z _ { M + 1 , N } \big ] \leq \mathbb E \big [ Z _ { M , N } \big ]$ for any $M < N$ .
4. Suppose that $e _ { s a } ^ { i } \leq c$ for some $c > 0$ for all s, a and $i$ . Then there exists an $M$ such that for all $N \geq M$ , $\mathbb { E } \big [ Z _ { M , N } \big ] < 0$ .
Points 2-4 of the Theorem indicate that we can control the expected post-update bias $\mathbb { E } \left[ Z _ { M , N } \right]$ , bringing it from above zero (over estimation) to under zero (under estimation) by increasing $\bar { M }$ . Moreover, from the first point, the expected bias only depends on $M$ , which implies that increasing $N$ can reduce the variance of the ensemble average but does not change the expected post-update bias. Thus, we can control the post-update bias with $M$ and separately control the variance of the average of the ensemble with $N$ . Note that this is not possible for Maxmin Q-learning, for which $M = N$ , and thus increasing the ensemble size $N$ will also decrease the post-update bias, potentially making it more negative, which can be detrimental. Note that this also cannot be done for standard ensemble averaging, for which there is no in-target minimization parameter $M$ .
Note we make very weak assumptions on the distribution of the error term. Thrun & Schwartz (1993) and Lan et al. (2020) make a strong assumption, namely, the error term is uniformly distributed. Because our assumption is much weaker, our proof methodology in the Appendix is very different.
We also consider a variant of REDQ where instead of choosing a random set of size $M$ in the target, we calculate the target by taking the expected value over all possible subsets of size $M$ . In this case, the target in the tabular version becomes
$$Y _ { M , N } = r ( s , a ) + \gamma \frac { 1 } { { \binom { N } { M } } } \sum _ { \stackrel { B \subset \mathcal { N } } { | B | = M } } \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } )$$
We write the target here as $Y _ { M , N }$ to emphasize its dependence on both $M$ and $N$ . We refer to this variant of REDQ as “Weighted” since we can efficiently calculate the target as a weighted sum of a re-ordering of the $N$ Q-functions, as described in the Appendix.
The following theorem shows that the variance of this target goes to zero as $N \infty$ . We note, however, that in practice, some variance in the target may be beneficial in reducing overfitting or help exploration. We can retain some variance by keeping $N$ finite or using the unweighted REDQ scheme.
Let $\begin{array} { r } { v _ { M } : = \operatorname { V a r } ( \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) ) } \end{array}$ for any subset $B \subset { \mathcal { N } }$ where $| B | = M$ . (It is easily seen that $v _ { M }$ only depends on $M$ and not only the specific elements of $B$ .)
# Theorem 2.
$$\mathrm { V a r } ( Y _ { M , N } ) \leq G _ { M } ( N )$$
for some function $G _ { M } ( N )$ satisfying
$$\operatorname* { l i m } _ { N \infty } \frac { G _ { M } ( N ) } { M ^ { 2 } v _ { M } / N } = 1$$
Consequently,
$$\operatorname* { l i m } _ { N \infty } \mathrm { V a r } ( Y _ { M , N } ) = 0$$
Also in the Appendix we show that the tabular version of REDQ convergences to the optimal Q function with probability one.
# 4 REDQ VARIANTS AND ABLATIONS
In this section, we use ablations to provide further insight into REDQ. We focus on the Ant environment. We first look at how the ensemble size $N$ affects REDQ. The top row in Figure 3 shows REDQ with $N = 2 , 3 , 5 , 1 0 ,$ 15. We can see that when we increase the ensemble size, we generally get a more stable average bias, a lower std of bias, and stronger performance. The result shows that even a small ensemble (e.g., $N = 5$ ) can greatly help in stabilizing bias accumulation when training under high UTD.
 Figure 3: REDQ ablation results for Ant. The top row shows the effect of the ensemble size $N$ . The middle row shows the effect of the in-target minimization parameter $M$ . The bottom row compares REDQ to several variants.
The middle row of Figure 3 shows how $M$ , the in-target minimization parameter, can affect performance. When $M$ is not an integer, e.g., $M = 1 . 5$ , for each update, with probability 0.5 only one randomly-chosen Q function is used in the target, and with probability 0.5, two randomly-chosen functions are used. Similarly, for $M = 2 . 5$ , for each update either two or three Q functions are used. Consistent with the theoretical result in Theorem 1, by increasing $M$ we lower the average bias. When $M$ gets too large, the Q estimate becomes too conservative and the large negative bias makes learning difficult.
$M = 2$ , which has the overall best performance, strikes a good balance between average bias (small underestimation during most of training) and std of the bias (consistently small).
The bottom row of Figure 3 shows the results for different target computation methods. The Maxmin curve in the figures is a variant based on Maxmin Q-learning, where the min of all the Q networks in the ensemble is taken to compute the Q target. As the ensemble size increases, Maxmin Q-learning shifts from overestimation to underestimation (Lan et al., 2020); Figure 3 shows Maxmin with $N =$ 3 instead of $N = 1 0$ , since a large $N$ value will cause even more divergence of the Q values. When varying the ensemble size of Maxmin, we see the same problem as shown in the middle row of Figure 3. When we increase the ensemble size to be larger than 3, Maxmin starts to reduce the bias so much that we get a highly negative Q bias, which accumulates quickly, leading to instability in the Q networks and poor performance. In the Maxmin paper, it was mainly tested on Atari environments with a small finite action space, in which case it provides good performance. Our results show that when using environments with high-dimensional continuous action spaces, such as MuJoCo, the rapid accumulation of (negative) bias becomes a problem. This result parallels some recent research in offline (i.e., batch) DRL. In Agarwal et al. (2020), it is shown that with small finite action spaces, naive offline training with deep Q-networks (DQN) only slightly reduces performance. However, continuous action Q-learning based methods such as Deep Deterministic Policy Gradient and SAC suffer much more from Q bias accumulation compared to discrete action methods. Recent work shows that offline training with these methods often lead to poor performance, and can even entirely diverge (Fujimoto et al., 2019; Kumar et al., 2019).
Random ensemble mixture (REM) is a method originally proposed to boost performance of DQN in the discrete-action setting. REM uses the random convex combination of Q values to compute the target: it is similar to ensemble average (AVG), but with more randomization (Agarwal et al., 2020).
For Weighted, the target is computed as the expectation of all the REDQ targets, where the expectation is taken over all $N$ -choose-2 pairs of Q-functions. This leads to a formula that is a weighted sum of the ordered Q-functions, where the ordering is from the lowest to the highest Q value in the ensemble, as described in the Appendix. Our baseline REDQ in Algorithm 1 can be considered as a random-sample version of Weighted. For the MinPair REDQ variant, we divide the $1 0 \mathrm { Q }$ networks into 5 fixed pairs, and during an update we sample a pair of Q networks from these 5 fixed pairs.
From Figure 3 we see that REDQ and MinPair are the best and their performance is similar. For Ant, the performance of Weighted is much lower than REDQ. However, as shown in the Appendix, Weighted and REDQ have similar performance for the other three environments. The randomization might help alleviate overfitting in the early stage, or improve exploration. REM has performance similar to AVG, studied in Section 3. In terms of the Q bias, REM has a positive average bias, while REDQ, MinPair, and Weighted all have a small negative average bias. Overall these results indicate that the REDQ algorithm is robust across different mechanisms for choosing the functions, and that randomly choosing the Q functions can sometimes boost performance. Additional results and discussions are provided in the appendix.
# 4.1 IMPROVING REDQ WITH AUXILIARY FEATURE LEARNING
We now investigate whether we can further improve the performance of REDQ by incorporating better representation learning? Ota et al. (2020) recently proposed the online feature extractor network (OFENet), which learns representation vectors from environment data, and provides them to the agent as additional input, giving significant performance improvement.
Is it possible to further improve the performance of REDQ with OFENet? We trained an OFENet together with REDQ to provide extra input, giving the algorithm REDQ-OFE. We found that OFENet did not help much for Hopper and Walker2d, which may be because REDQ already learns very fast, leaving little room for improvement. But as shown in Figure 4, online feature extraction can further improve REDQ performance for the more challenging environments Ant and Humanoid.
REDQ-OFE achieves $7 \mathbf { x }$ the sample efficiency of SAC to reach 5000 on Ant and Humanoid, and outperforms MBPO with $3 . 1 2 \mathrm { x }$ and $1 . 2 6 \mathrm { x }$ the performance of MBPO at 150K and 300K data, respectively. A more detailed performance comparison table can be found in the Appendix.
 Figure 4: Performance of REDQ, REDQ with OFE, and SAC.
# 5 RELATED WORK
It has long been recognized that maximization bias in Q-learning can significantly impede learning. Thrun & Schwartz (1993) first highlighted the existence of maximization bias. Van Hasselt (2010) proposed Double Q-Learning to address maximization bias for the tabular case, and showed that in general it leads to an under-estimation bias. Van Hasselt et al. (2016) showed that adding Double Q-learning to deep Q networks (DQN) (Mnih et al., 2013; 2015) gives a major performance boost for the Atari games benchmark. For continuous-action spaces, Fujimoto et al. (2018) introduced clipped-double Q-learning (CDQ), which further reduces maximization bias and brings significant improvements over the deep deterministic policy gradient (DDPG) algorithm (Lillicrap et al., 2015). CDQ was later combined with entropy maximization in SAC to achieve even stronger performance (Haarnoja et al., 2018a;b). Other bias reduction techniques include using bias-correction terms (Lee et al., 2013), using weighted Q estimates (Zhang et al., 2017; Li & Hou, 2019), penalizing deterministic policies at early stage of training (Fox et al., 2015), using multi-step methods (Meng et al., 2020), performing weighted Bellman updates to mitigate error propagation (Lee et al., 2020), and truncating sampled Q estimates with distributional networks (Kuznetsov et al., 2020).
It has also long been recognized that using ensembles can improve the performance of DRL algorithms (Faußer & Schwenker, 2015; Osband et al., 2016). For Q-learning based methods, Anschel et al. (2017) use the average of multiple Q estimates to reduce variance. Agarwal et al. (2020) introduced Random Ensemble Mixture (REM), which enforces optimal Bellman consistency on random convex combinations of multiple Q estimates. Lan et al. (2020) introduced Maxmin Q-learning, as discussed in Sections 2-4. Although in discrete action domains it has been found that fine-tuning DQN variants, including the UTD, can boost performance, little experimental or theoretical analysis is given to explain how this improvement is obtained (Kielak, 2020; van Hasselt et al., 2019).
To address some of the critical issues in model-based learning (Langlois et al., 2019), recent methods such as MBPO combine a model ensemble with a carefully controlled rollout horizon to obtain better performance (Janner et al., 2019; Buckman et al., 2018). These model-based methods can also be enhanced with advanced sampling (Zhang et al., 2020), bidirectional models (Lai et al., 2020), or backprop through the model (Clavera et al., 2020), and be analyzed through new theoretical frameworks (Rajeswaran et al., 2020; Dong et al., 2020).
# 6 CONCLUSION
The contributions of this paper are as follows. (1) We propose a simple model-free algorithm that attains sample efficiency that is as good as or better than state-of-the-art model-based algorithms for the MuJoCo benchmark. This result indicates that, at least for the MuJoCo benchmark, models may not be necessary for achieving high sample efficiency. (2) Using carefully designed experiments, we explain why REDQ succeeds when other model-free algorithms with high UTD ratios fail. (3) Finally, we combine REDQ with OFE, and show that REDQ-OFE can learn extremely fast for the challenging environments Ant and Humanoid.
# REFERENCES
Rishabh Agarwal, Dale Schuurmans, and Mohammad Norouzi. An optimistic perspective on offline reinforcement learning. In International Conference on Machine Learning (ICML), 2020.
Oron Anschel, Nir Baram, and Nahum Shimkin. Averaged-dqn: Variance reduction and stabilization for deep reinforcement learning. In International Conference on Machine Learning, pp. 176–185, 2017.
Dimitri P Bertsekas and John N Tsitsiklis. Neuro-dynamic programming, volume 5. Athena Scientific Belmont, MA, 1996.
Ronen I Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for nearoptimal reinforcement learning. Journal of Machine Learning Research, 3(Oct):213–231, 2002.
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
Jacob Buckman, Danijar Hafner, George Tucker, Eugene Brevdo, and Honglak Lee. Sampleefficient reinforcement learning with stochastic ensemble value expansion. In Advances in Neural Information Processing Systems, pp. 8224–8234, 2018.
Kamil Ciosek, Quan Vuong, Robert Loftin, and Katja Hofmann. Better exploration with optimistic actor critic. In Advances in Neural Information Processing Systems, pp. 1787–1798, 2019.
Ignasi Clavera, Violet Fu, and Pieter Abbeel. Model-augmented actor-critic: Backpropagating through paths. arXiv preprint arXiv:2005.08068, 2020.
Kefan Dong, Yuping Luo, Tianhe Yu, Chelsea Finn, and Tengyu Ma. On the expressivity of neural networks for deep reinforcement learning. International Conference on Machine Learning (ICML), 2020.
Yan Duan, Xi Chen, Rein Houthooft, John Schulman, and Pieter Abbeel. Benchmarking deep reinforcement learning for continuous control. In International Conference on Machine Learning, pp. 1329–1338, 2016.
Stefan Faußer and Friedhelm Schwenker. Neural network ensembles in reinforcement learning. Neural Processing Letters, 41(1):55–69, 2015.
Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Remi Munos, Demis Hassabis, Olivier Pietquin, et al. Noisy networks for exploration. ICLR, 2018.
Roy Fox, Ari Pakman, and Naftali Tishby. Taming the noise in reinforcement learning via soft updates. arXiv preprint arXiv:1512.08562, 2015.
Scott Fujimoto, Herke van Hoof, and Dave Meger. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
Scott Fujimoto, David Meger, and Doina Precup. Off-policy deep reinforcement learning without exploration. In International Conference on Machine Learning, pp. 2052–2062, 2019.
Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Offpolicy maximum entropy deep reinforcement learning with a stochastic actor. arXiv preprint arXiv:1801.01290, 2018a.
Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, et al. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018b.
Peter Henderson, Riashat Islam, Philip Bachman, Joelle Pineau, Doina Precup, and David Meger. Deep reinforcement learning that matters. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
Riashat Islam, Peter Henderson, Maziar Gomrokchi, and Doina Precup. Reproducibility of benchmarked deep reinforcement learning tasks for continuous control. arXiv preprint arXiv:1708.04133, 2017.
Michael Janner, Justin Fu, Marvin Zhang, and Sergey Levine. When to trust your model: Modelbased policy optimization. In Advances in Neural Information Processing Systems, pp. 12519– 12530, 2019.
Kacper Kielak. Do recent advancements in model-based deep reinforcement learning really improve data efficiency? arXiv preprint arXiv:2003.10181, 2020.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
Aviral Kumar, Justin Fu, Matthew Soh, George Tucker, and Sergey Levine. Stabilizing off-policy q-learning via bootstrapping error reduction. In Advances in Neural Information Processing Systems, pp. 11784–11794, 2019.
Arsenii Kuznetsov, Pavel Shvechikov, Alexander Grishin, and Dmitry Vetrov. Controlling overestimation bias with truncated mixture of continuous distributional quantile critics. arXiv preprint arXiv:2005.04269, 2020.
Hang Lai, Jian Shen, Weinan Zhang, and Yong Yu. Bidirectional model-based policy optimization. arXiv preprint arXiv:2007.01995, 2020.
Qingfeng Lan, Yangchen Pan, Alona Fyshe, and Martha White. Maxmin q-learning: Controlling the estimation bias of q-learning. arXiv preprint arXiv:2002.06487, 2020.
Eric Langlois, Shunshi Zhang, Guodong Zhang, Pieter Abbeel, and Jimmy Ba. Benchmarking model-based reinforcement learning. arXiv preprint arXiv:1907.02057, 2019.
Donghun Lee, Boris Defourny, and Warren B Powell. Bias-corrected q-learning to control maxoperator bias in q-learning. In 2013 IEEE Symposium on Adaptive Dynamic Programming and Reinforcement Learning (ADPRL), pp. 93–99. IEEE, 2013.
Kimin Lee, Michael Laskin, Aravind Srinivas, and Pieter Abbeel. Sunrise: A simple unified framework for ensemble learning in deep reinforcement learning. arXiv preprint arXiv:2007.04938, 2020.
Zhunan Li and Xinwen Hou. Mixing update q-value for deep reinforcement learning. In 2019 International Joint Conference on Neural Networks (IJCNN), pp. 1–6. IEEE, 2019.
Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.
Lingheng Meng, Rob Gorbet, and Dana Kulic. The effect of multi-step methods on overestimation ´ in deep reinforcement learning. arXiv preprint arXiv:2006.12692, 2020.
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529, 2015.
Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped dqn. In Advances in neural information processing systems, pp. 4026–4034, 2016.
Kei Ota, Tomoaki Oiki, Devesh K Jha, Toshisada Mariyama, and Daniel Nikovski. Can increasing input dimensionality improve deep reinforcement learning? arXiv preprint arXiv:2003.01629, 2020.
Aravind Rajeswaran, Igor Mordatch, and Vikash Kumar. A game theoretic framework for model based reinforcement learning. arXiv preprint arXiv:2004.07804, 2020.
Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
Sebastian Thrun and Anton Schwartz. Issues in using function approximation for reinforcement learning. In Proceedings of the 1993 Connectionist Models Summer School Hillsdale, NJ. Lawrence Erlbaum, 1993.
Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In Intelligent Robots and Systems (IROS), 2012 IEEE/RSJ International Conference on, pp. 5026– 5033. IEEE, 2012.
John N Tsitsiklis. Asynchronous stochastic approximation and q-learning. Machine learning, 16 (3):185–202, 1994.
Hado Van Hasselt. Double q-learning. In Advances in neural information processing systems, pp. 2613–2621, 2010.
Hado Van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double qlearning. In AAAI, volume 2, pp. 5. Phoenix, AZ, 2016.
Hado P van Hasselt, Matteo Hessel, and John Aslanides. When to use parametric models in reinforcement learning? In Advances in Neural Information Processing Systems, pp. 14322–14333, 2019.
Che Wang, Yanqiu Wu, Quan Vuong, and Keith Ross. Striving for simplicity and performance in off-policy drl: Output normalization and non-uniform sampling. arXiv, pp. arXiv–1910, 2019.
Chi Zhang, Sanmukh Rao Kuppannagari, and Viktor K Prasanna. Maximum entropy model rollouts: Fast model based policy optimization without compounding errors. arXiv preprint arXiv:2006.04802, 2020.
Zongzhang Zhang, Zhiyuan Pan, and Mykel J Kochenderfer. Weighted double q-learning. In IJCAI, pp. 3455–3461, 2017.
# A THEORETICAL RESULTS
# A.1 TABULAR VERSION OF REDQ
In the tabular algorithm below, for clarity we use $G = 1$ .
# Algorithm 2 Tabular REDQ
1: Initialize 2: repeat3: Choo $\left\{ Q ^ { i } ( s , a ) , s \in \mathcal { S } , a \in \mathcal { A } \right\} _ { i = 1 } ^ { N }$ , observe $a \in { \mathcal { A } }$ $\left\{ Q ^ { i } ( s , a ) \right\} _ { i = 1 } ^ { N }$ $r$ $s ^ { \prime }$ 4: Randomly choose a subset $\mathcal { M }$ of size $M$ from $\{ 1 , . . , N \}$ 5: $\begin{array} { r } { y = r + \gamma \operatorname* { m a x } _ { a ^ { \prime } \in \mathcal { A } } \operatorname* { m i n } _ { j \in \mathcal { M } } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) } \end{array}$ 6: for $i = 1 , \ldots , N$ do: 7: $Q ^ { i } ( s , a ) \stackrel { . } { } Q ^ { i } ( s , a ) + \alpha ( y - Q ^ { i } ( s , a ) )$ 8: $s \gets s ^ { \prime }$ 9: until end
Alternatively in Algorithm 2, at each iteration we could just update one of the $Q ^ { i }$ functions.
# A.2 PROOF OF THEOREM 1
We first prove the following lemma:
Lemma 1. Let $X _ { 1 } , X _ { 2 } , \ldots$ be an infinite sequence of i.i.d. random variables. Let $F ( x )$ be the cdf of $X _ { m }$ and let $\tau = \operatorname* { i n f } \{ x : F ( x ) > 0 \}$ . Also let $Y _ { m } = \operatorname* { m i n } \{ X _ { 1 } , X _ { 2 } , \dots , X _ { m } \}$ . Then $Y _ { 1 } , Y _ { 2 } , \dots$ converges to $\tau$ almost surely.
# Proof:
Let $F _ { m } ( x )$ be the cdf of $Y _ { m }$ . Since $X _ { 1 } , . . . , X _ { m }$ are independent,
$$F _ { m } ( x ) = 1 - [ 1 - F ( x ) ] ^ { m }$$
For $x \ < \ \tau$ , $F _ { m } ( x ) = 0$ since $F ( x ) = 0$ . For $x > \tau , F _ { m } ( x ) \xrightarrow { m \infty } 1 \quad$ . Therefore, $Y _ { m }$ weakly converges to $\tau$ .
Moreover, for each $\omega \in \Omega$ , $\{ Y _ { m } ( \omega ) \}$ is a decreasing sequence. So $\{ Y _ { m } ( \omega ) \}$ either converges to a real number or $- \infty$ . Therefore $Y _ { m } Y$ almost surely for some random variable $Y$ . Combined with the result that $Y _ { m } \overset { d } { \to } \tau$ , we can conclude that
$$Y _ { m } \xrightarrow { a . s . } \tau$$
# Proof of Theorem 1:
1. Let $B _ { 1 } , B _ { 2 }$ be two subsets of $\mathcal { N } = \{ 1 , . . . , N \}$ of size $M$ . First of all, since $\{ Q ^ { j } ( s , a ) \} _ { j = 1 } ^ { N }$ are i.i.d for any $a \in \mathcal { A } , \operatorname* { m i n } _ { j \in B _ { 1 } } Q ^ { j } ( s , a )$ and $\textstyle \operatorname* { m i n } _ { j \in B _ { 2 } } Q ^ { j } ( s , a )$ are identically distributed. Furthermore, since $Q ^ { j } ( s , a )$ are independent for all $a \in { \mathcal { A } }$ and $1 \leq j \leq N$ , $\textstyle { \left\{ \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s , a ) \right\} } _ { a \in { \mathcal { A } } }$ are independent for any $B \subset { \mathcal { N } }$ . Denote the distribution function of $\textstyle \operatorname* { m a x } _ { a } \operatorname* { m i n } _ { j \in B _ { 1 } } Q ^ { j } ( s , a )$ as $F _ { 1 } ( x )$ and the distribution function of $\textstyle \operatorname* { m a x } _ { a } \operatorname* { m i n } _ { j \in B _ { 2 } } Q ^ { j } { \big ( } s , a { \big ) }$ as $F _ { 2 } ( x )$ . Then for any $x \in \mathbb { R }$ ,
$$\begin{array} { r l } & { F _ { 1 } ( x ) = \mathbb { P } \big ( \underset { a } { \operatorname* { m a x } } \underset { j \in B _ { 1 } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \le x \big ) = \mathbb { P } \big ( \cap _ { a \in \mathcal { A } } \left\{ \underset { i \in B _ { 1 } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \le x \right\} \big ) } \\ & { \quad \quad = \underset { a \in \mathcal { A } } { \prod } \mathbb { P } \big ( \underset { j \in B _ { 1 } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \le x \big ) = \underset { a \in \mathcal { A } } { \prod } \mathbb { P } \big ( \underset { j \in B _ { 2 } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \le x \big ) } \\ & { \quad \quad = \mathbb { P } \big ( \underset { a } { \operatorname* { m a x } } \underset { j \in B _ { 2 } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \le x \big ) = F _ { 2 } ( x ) } \end{array}$$
Therefore, we have proved that $\textstyle \operatorname* { m a x } _ { a } \operatorname* { m i n } _ { j \in B _ { 1 } } Q ^ { j } ( s , a )$ and $\textstyle \operatorname* { m a x } _ { a } \operatorname* { m i n } _ { j \in B _ { 2 } } Q ^ { j } ( s , a )$ are identically distributed. Then
$$\begin{array} { r l } & { \mathbb { E } \big [ Z _ { M , N } \big ] = \gamma \mathbb { E } \big [ ( \underset { a } { \operatorname* { m a x } } \underset { j \in \mathcal { M } } { \operatorname* { m i n } } Q ^ { j } ( s , a ) - \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) ) \big ] } \\ & { \quad \quad \quad = \gamma \mathbb { E } \big [ \frac { 1 } { \binom { N } { M } } \underset { | B | = M } { \overset { \sum } { \sum } } \underset { \substack { i \geq N } } { \operatorname* { m a x } } \underset { j \in B } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \big ] - \gamma \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) } \\ & { \quad \quad \quad = \gamma \bigg ( \mathbb { E } \big [ \underset { a } { \operatorname* { m a x } } \underset { 1 \leq j \leq M } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \big ] - \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) \bigg ) } \end{array}$$
which does not depend on $N$ .
2. It follows from 1 that
$$\mathbb { E } \big [ Z _ { 1 , N } \big ] = \gamma \bigg ( \mathbb { E } \big [ \operatorname* { m a x } _ { a } Q ^ { 1 } ( s , a ) \big ] - \operatorname* { m a x } _ { a } Q ^ { \pi } ( s , a ) \bigg )$$
Since $\operatorname* { m a x } _ { a } Q ^ { 1 } ( s , a ) \geq Q ^ { 1 } ( s , a ^ { \prime } )$ for all $a ^ { \prime } \in { \mathcal { A } }$ , we have
$$\mathbb { E } \big [ \operatorname* { m a x } _ { a } Q ^ { 1 } ( s , a ) \big ] \geq \mathbb { E } \big [ Q ^ { 1 } ( s , a ^ { \prime } ) \big ]$$
for all $a ^ { \prime } \in { \mathcal { A } }$ . Consequently,
$$\mathbb { E } \big [ \operatorname* { m a x } _ { a } Q ^ { 1 } ( s , a ) \big ] \geq \operatorname* { m a x } _ { a } \mathbb { E } \big [ Q ^ { 1 } ( s , a ) \big ] = \operatorname* { m a x } _ { a } Q ^ { \pi } ( s , a ) $$
$$\begin{array} { r l } & { \qquad \mathbf { \Phi } _ { a } ^ { a } } \\ & { \qquad \mathbb { E } \left[ Z _ { 1 , N } \right] = \gamma \left( \mathbb { E } \left[ \underset { a } { \mathrm { m a x } } Q ^ { 1 } ( s , a ) \right] - \underset { a } { \mathrm { m a x } } Q ^ { \pi } ( s , a ) \right) \geq 0 } \\ & { \qquad \mathrm { m a x } _ { a } \mathrm { m i n } _ { 1 \leq j \leq M } Q ^ { j } ( s , a ) \geq \mathrm { m a x } _ { a } \mathrm { m i n } _ { 1 \leq j \leq M + 1 } Q ^ { j } ( s , a ) , } \\ & { \qquad \mathbb { E } \left[ Z _ { M , N } \right] = \gamma \left( \mathbb { E } \left[ \underset { a } { \mathrm { m a x } } \underset { 1 \leq j \leq M + 1 } { \mathrm { m i n } } Q ^ { j } ( s , a ) \right] - \underset { a } { \mathrm { m a x } } Q ^ { \pi } ( s , a ) \right) } \\ & { \qquad \geq \gamma \left( \mathbb { E } \left[ \underset { a } { \mathrm { m a x } } \underset { 1 \leq j \leq M + 1 } { \mathrm { m i n } } Q ^ { j } ( s , a ) \right] - \underset { a } { \mathrm { m a x } } Q ^ { \pi } ( s , a ) \right) = \mathbb { E } \left[ Z _ { M + 1 , N } \right] } \end{array}$$
4. Let $F _ { a } ( x )$ be the cdf of $Q ^ { j } ( s , a )$ and let $\tau _ { a } = \operatorname* { i n f } \{ x : F _ { a } ( x ) > 0 \}$ . Here we assume the approximation error $e _ { s a } ^ { i }$ is non-trivial, which implies $\tau _ { a } < Q ^ { \pi } ( s , a )$ . Note that $\tau _ { a }$ can be equal to $- \infty$ . Let
$$Y _ { a } ^ { M } = \operatorname* { m i n } _ { 1 \leq i \leq M } Q ^ { j } ( s , a )$$
From Lemma 1 we have $Y _ { a } ^ { M }$ converges to $\tau _ { a }$ almost surely for each $a$ . Because the action space is finite, it therefore follows that
$$Y ^ { M } = \operatorname* { m a x } _ { a } Y _ { a } ^ { M }$$
converges almost surely to $\tau = \operatorname* { m a x } _ { a } \tau _ { a }$ . Furthermore, for each $a$ we have
$$Y _ { a } ^ { M } = \operatorname * { m i n } _ { 1 \leq j \leq M } Q ^ { j } ( s , a ) \geq \operatorname * { m i n } _ { 1 \leq j \leq M + 1 } Q ^ { j } ( s , a ) = Y _ { a } ^ { M + 1 }$$
from which it follows that $Y ^ { M } \ge Y ^ { M + 1 }$ . Thus $\{ Y ^ { M } \}$ is a monotonically decreasing sequence. We also note that due to the assumption $e _ { s a } ^ { i } \ \leq \ c$ for all $a$ and $i$ , and because $Q ^ { \pi } ( s , a )$ is finite for all $s$ and $a$ , it follows that $Y ^ { M } \leq d$ for all $M$ for a finite $d$ . Thus $\{ Y ^ { M } \}$ is a bounded-above, monotonically-decreasing sequence of random variables which converges almost surely to $\tau$ . We can therefore apply the monotone convergence theorem, giving
$$\begin{array} { r l } & { \mathbb { E } \big [ Z _ { M , N } \big ] = \gamma \bigg ( \mathbb { E } \big [ \underset { a } { \operatorname* { m a x } } \underset { 1 \leq j \leq M } { \operatorname* { m i n } } Q ^ { j } ( s , a ) \big ] - \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) \bigg ) } \\ & { \quad \quad \quad = \gamma \bigg ( \mathbb { E } [ \underset { a } { \operatorname* { m a x } } Y _ { a } ^ { M } ] - \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) \bigg ) \xrightarrow { M \to \infty } \gamma \bigg ( \underset { a } { \operatorname* { m a x } } \tau _ { a } - \underset { a } { \operatorname* { m a x } } Q ^ { \pi } ( s , a ) \bigg ) < 0 , } \end{array}$$
where the last inequality follows from $\tau _ { a } < Q ^ { \pi } ( s , a )$ for all actions $a$ .
# A.3 PROOF OF THEOREM 2
For convenience, define $\begin{array} { r } { Y _ { B } = \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) } \end{array}$ . Suppose $N > 2 M$
$$\begin{array} { l } { { \mathrm { V a r } ( Y _ { M , N } ) = \displaystyle \frac { \gamma ^ { 2 } } { \binom { N } { M } ^ { 2 } } \mathrm { V a r } ( \displaystyle \sum _ { B \subset N } Y _ { B } ) } \ ~ } \\ { { \mathrm { ~ } = \displaystyle \frac { \gamma ^ { 2 } ( M ! ) ^ { 2 } } { \left( \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) \right) ^ { 2 } } \biggl [ \sum _ { B \subset \mathcal { N } } \mathrm { V a r } ( Y _ { B } ) + 2 \cdot \sum _ { B _ { 1 } , B _ { 2 } \subset N } \mathrm { C o v } ( Y _ { B _ { 1 } } , Y _ { B _ { 2 } } ) \biggr ] } } \end{array}$$
Let $\begin{array} { r } { A = \sum _ { B _ { 1 } , B _ { 2 } \subset \mathcal { N } } \mathrm { C o v } ( Y _ { B _ { 1 } } , Y _ { B _ { 2 } } ) } \\ { B _ { 1 } \ne B _ { 2 } \qquad } \end{array}$ , which consists of
$$\begin{array} { r l r } { { \binom { \binom { N } { M } } { 2 } = \frac { 1 } { 2 } \cdot \frac { N ! } { ( N - M ) ! M ! } \cdot ( \frac { N ! } { ( N - M ) ! M ! } - 1 ) } } \\ & { } & { = \frac { 1 } { 2 ( M ! ) ^ { 2 } } \cdot \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) ^ { 2 } - \frac { N ! } { 2 \cdot M ! ( N - M ) ! } } \end{array}$$
terms. $\binom { \binom { N } { M } } { 2 }$ can be seen as a polynomial function of $N$ with degree $2 M$ . The coefficient for the term $N ^ { 2 M }$ i s 12(M!)2 . The coefficient for the term N 2M−1 i s $\begin{array} { r } { \frac { 1 } { 2 ( M ! ) ^ { 2 } } \cdot ( - 2 \sum _ { i = 0 } ^ { M - 1 } i ) } \end{array}$
Note that $Y _ { B _ { 1 } }$ and $Y _ { B _ { 2 } }$ are independent if $B _ { 1 } \cap B _ { 2 } = \mathcal { O }$ . The total number of different pairs $( B _ { 1 } , B _ { 2 } )$ such that $B _ { 1 } \cap B _ { 2 } = \emptyset$ is
$${ \binom { N } { 2 M } } \cdot { \binom { 2 M } { M } } \cdot { \frac { 1 } { 2 } } = { \frac { 1 } { 2 ( M ! ) ^ { 2 } } } \cdot { \frac { N ! } { ( N - 2 M ) ! } } = { \frac { 1 } { 2 ( M ! ) ^ { 2 } } } \cdot \Pi _ { i = 0 } ^ { 2 M - 1 } ( N - i )$$
This is again a polynomial function of $N$ with degree $2 M$ . The coefficient of the term $N ^ { 2 M }$ is 12(M!)2 . The coefficient of the term N 2M−1 is $\begin{array} { r } { \frac { 1 } { 2 ( M ! ) ^ { 2 } } \cdot ( - \sum _ { i = 0 } ^ { 2 M - 1 } i ) } \end{array}$ . So the number of non-zero terms in $A$ is at most
$$\begin{array} { l } { { { \displaystyle { \frac { 1 } { 2 ( M ! ) ^ { 2 } } } \cdot \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) ^ { 2 } - { \displaystyle { \frac { N ! } { 2 \cdot M ! ( N - M ) ! } } } - { \displaystyle { \frac { 1 } { 2 ( M ! ) ^ { 2 } } } \cdot \Pi _ { i = 0 } ^ { 2 M - 1 } ( N - i ) } } } } \\ { { { \displaystyle { = \frac { M ^ { 2 } } { 2 ( M ! ) ^ { 2 } } } \cdot N ^ { 2 M - 1 } + O ( N ^ { 2 M - 2 } ) } } } \end{array}$$
Moreover, by Cauchy-Schwarz inequality, for any $B _ { 1 } , B _ { 2 } \subset \mathcal { N }$
$$\mathrm { C o v } ( Y _ { B _ { 1 } } , Y _ { B _ { 2 } } ) \leq \sqrt { \mathrm { V a r } ( Y _ { B _ { 1 } } ) \cdot \mathrm { V a r } ( Y _ { B _ { 2 } } ) } = v _ { M }$$
Therefore,
$$A \leq [ \frac { M ^ { 2 } } { 2 ( M ! ) ^ { 2 } } \cdot N ^ { 2 M - 1 } + O ( N ^ { 2 M - 2 } ) ] v _ { M }$$
which implies
$$\begin{array} { r l } & { \mathrm { V a r } ( Y _ { M , N } ) = \displaystyle \frac { \gamma ^ { 2 } ( M ! ) ^ { 2 } } { \left( \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) \right) ^ { 2 } } \Biggl [ \sum _ { B \subset \mathcal { N } } \mathrm { V a r } ( Y _ { B } ) + 2 \cdot \sum _ { B _ { 1 } , B _ { 2 } \subset \mathcal { N } } \mathrm { C o v } ( Y _ { B _ { 1 } } , Y _ { B _ { 2 } } ) \Biggr ] } \\ & { \quad \quad \quad = \displaystyle \frac { \gamma ^ { 2 } ( M ! ) ^ { 2 } } { \left( \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) \right) ^ { 2 } } \Biggl [ \sum _ { B \subset \mathcal { N } } \mathrm { V a r } ( Y _ { B } ) + 2 A \Biggr ] } \\ & { \quad \quad \quad \leq \gamma ^ { 2 } \big [ M ^ { 2 } \cdot \frac { N ^ { 2 M - 1 } } { \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) ^ { 2 } } + O ( \frac { 1 } { N ^ { 2 } } ) \big ] v _ { M } \xrightarrow { N \to \infty } 0 } \end{array}$$
Moreover,
$$\operatorname* { l i m } _ { N \to \infty } \frac { M ^ { 2 } v _ { M } / N } { \left[ M ^ { 2 } \cdot \frac { N ^ { 2 M - 1 } } { \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) ^ { 2 } } + { \cal O } ( \frac { 1 } { N ^ { 2 } } ) \right] v _ { M } } = \operatorname* { l i m } _ { N \to \infty } \frac { \Pi _ { i = 0 } ^ { M - 1 } ( N - i ) ^ { 2 } } { N ^ { 2 M } } = 1$$
# A.4 PROOF OF CONVERGENCE OF TABULAR REDQ
Assuming that the step size satisfies the standard Robbins-Monro conditions, it is easily seen that the tabular version of REDQ converges with probability 1 to the optimal Q function. In fact, for our Weighted scheme, where we take the expectation over all sets of size $M$ , the convergence conditions in Lan et al. (2020) are fully satisfied.
For the randomized case, only very minor changes are needed in the proof in Lan et al. (2020). Note that in the case of REDQ, the underlying deterministic target is:
$$F \left( Q ^ { 1 } , Q ^ { 2 } , \dots , Q ^ { N } \right) ( s , a ) = r ( s , a ) + \gamma \sum _ { s ^ { \prime } } p \left( s ^ { \prime } \mid s , a \right) \sum _ { \stackrel { B \subset \mathcal { N } } { | B | = M } } \frac { 1 } { \left( { \frac { N } { M } } \right) } \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } )$$
Let $\tau$ be the operator that concatenates $N$ identical copies of $F$ , so that $\mathcal { T } \colon \mathbb { R } ^ { S \times A \times N } \mathbb { R } ^ { S \times A \times N }$ where $S$ and $A$ are the cardinalities of the state and action spaces, respectively. It is easy to show that the operator $\tau$ is a contraction with the $l _ { \infty }$ norm. The stochastic approximation noise term is given by
$$\ L _ { \nu } ( s , a ) = R - r ( s , a ) + \gamma \Big [ \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) - \sum _ { s ^ { \prime } } p \left( s ^ { \prime } \mid s , a \right) \sum _ { \stackrel { B \subset \mathcal { N } } { | B | = M } } \frac { 1 } { \binom { N } { M } } \operatorname* { m a x } _ { a ^ { \prime } } \operatorname* { m i n } _ { j \in B } Q ^ { j } ( s ^ { \prime } , a ^ { \prime } ) \Big ]$$
It is straightforward to show
$$\mathbb { E } \left[ \omega ^ { 2 } ( s , a ) \mid \mathcal { F } _ { \mathrm { p a s t } } \right] \leq \mathrm { V a r } \left( R \mid s , a \right) + \operatorname* { m a x } _ { 1 \leq i \leq N } \operatorname* { m a x } _ { s ^ { \prime } , a ^ { \prime } } \left( Q ^ { i } ( s ^ { \prime } , a ^ { \prime } ) \right) ^ { 2 }$$
As in Lan et al. (2020), it follows from the contraction property and (2) that REDQ converges with probability 1 to the optimal Q function (Tsitsiklis, 1994; Bertsekas & Tsitsiklis, 1996).
# B HYPERPARAMETERS AND IMPLEMENTATION DETAILS
Since MBPO builds on top of a SAC agent, to make our comparisons fair, meaningful, and consistent with previous work, we make all SAC related hyperparameters exactly the same as used in the MBPO paper (Janner et al., 2019). Table 1 gives a list of hyperparameter used in the experiments. For all the REDQ curves reported in the results section, we use a Q network ensemble size $N$ of 10. We use a UTD ratio $G$ of 20 on the four MuJoCo environments, which is the same value that was used in the MBPO paper. Thus most of the hyperparameters are made to be the same as in the MBPO paper to ensure fairness and consistency in comparisons.
For all the algorithms and variants, we also first obtain 5000 data points by randomly sampling actions from the action space without making parameter updates. In our experiments we found that using a high UTD from the very beginning with a very small amount of data can easily lead to complete divergence on SAC-20. Sampling a number of random datapoints at the start of training is also a common technique that has been used in previous model-free as well as model-based works (Haarnoja et al., 2018a; Fujimoto et al., 2018; Janner et al., 2019).
Table 1: REDQ hyperparameters
<table><tr><td rowspan=1 colspan=1>Parameter</td><td rowspan=1 colspan=1>Value</td></tr><tr><td rowspan=1 colspan=1>Sharedoptimizerlearning ratediscount (γ)target smoothing coefficient (p)replay buffer sizenumber of hidden layers forall networksnumber of hidden units per layermini-batch sizenonlinearityrandom starting data</td><td rowspan=1 colspan=1>Adam (Kingma& Ba,2014)3.10-40.990.0051062256256ReLU5000</td></tr><tr><td rowspan=1 colspan=1>REDQensemble size Nin-target minimization parameter MUTD ratio G</td><td rowspan=1 colspan=1>10220</td></tr><tr><td rowspan=1 colspan=1>OFENetrandom starting dataOFENet number of pretraining updatesOFENet UTD ratio</td><td rowspan=1 colspan=1>20.000100,0004</td></tr></table>
For the REDQ-OFE experiments, we implemented a minimal version of the OFENet in the original paper, with no batchnorm layers. We use the recommended hyperparameters as described in the original paper (Ota et al., 2020). Compared to REDQ without OFENet, the main difference is we now first collect 20,000 random data points (which is accounted for in the training curves), and then pre-train the OFENet for 100,000 updates, with the same learning rate and batch size. We then train OFENet together with REDQ agent, and the OFENet uses a UTD ratio of 4. We tried a simple hyperparameter search on Ant with 200,000, 100,000 and 50,000 pre-train updates, and learning rates of 1e-4, 3e-4, 5e-4, and a OFENet UTD of 1, 4 and 20. However, the results are not very different. It is possible that better results can be obtained through a more extensive hyperparameter search or other modifications.
# B.1 EFFICIENT CALCULATION OF TARGET FOR WEIGHTED VERSION OF REDQ
In section 4 we provided experimental results for the Weighted version of REDQ. Recall that in this version, instead of sampling a random subset $\mathcal { M }$ in the target, we average over all subsets $B$ in
$\{ 1 , \ldots , N \}$ of size $M$ :
$$y = r + \gamma \frac { 1 } { \binom { N } { M } } \sum _ { B } \left( \operatorname* { m i n } _ { i \in B } Q _ { \phi _ { \mathrm { t a r g } , i } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right) \right)$$
In practice, however, we do not need to sum over all $N$ choose $M$ subsets. Instead we can re-order the indices so that
$$Q _ { \phi _ { \mathrm { t a r g } , i } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right) \leq Q _ { \phi _ { \mathrm { t a r g } , i + 1 } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right)$$
for $i = 1 , \ldots , N - 1$ . After the re-ordering, we can use the identity:
$$\frac { 1 } { { \binom { N } { M } } } \sum _ { B } \left( \operatorname* { m i n } _ { i \in B } Q _ { \phi _ { \mathrm { t a r g } , i } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right) \right) = \frac { 1 } { { \binom { N } { M } } } \sum _ { i = 1 } ^ { N - M + 1 } { \binom { N - i } { M - 1 } } Q _ { \phi _ { \mathrm { t a r g } , i } } \left( s ^ { \prime } , \tilde { a } ^ { \prime } \right)$$
# C SAMPLE EFFICIENCY COMPARISON FOR REDQ, SAC AND MBPO
The sample efficiency claims made in the main paper are based on Table 2 and Table 3. Table 2 shows that compared to naive SAC, REDQ is much more sample efficient. REDQ reaches 3500 on Hopper with ${ 8 } \mathbf { { x } }$ sample efficiency, and reaches 5000 for Ant and Humanoid with ${ 5 } \mathrm { x }$ and $3 . 7 \mathbf { x }$ sample efficiency. After adding OFE, this becomes more than $7 \mathbf { x }$ on Ant and Humanoid. If we average all the numbers for the four environments, then REDQ is $5 . 0 \mathrm { x }$ as sample efficient, and $6 . 4 \mathrm { x }$ after including OFE results.
Table 3 compares REDQ to SAC and MBPO. As in the MBPO paper, we train for 125K for Hopper, and 300K for the other three environments (Janner et al., 2019). The numbers in Table 3 show the performance when trained to half and to the full length of the MBPO training limits. When averaging the numbers, we see that REDQ reaches $4 . 5 \mathrm { x }$ and $2 . 1 \mathbf { x }$ the performance of SAC at 150K and 300K. REDQ is also stronger than MBPO, with $1 . 4 \mathrm { x }$ and $1 . 1 \mathrm { x }$ the performance of MBPO at 150K and $3 0 0 \mathrm { K }$ . If we include the results of REDQ-OFE, then the numbers become $5 . 5 \mathrm { x }$ and $2 . 3 \mathbf { x }$ the SAC performance at 150K and 300K, and $1 . 8 \mathrm { x }$ and $1 . 2 \mathrm { x }$ the MBPO performance at 150 and 300K.
Table 2: Sample efficiency comparison of SAC and REDQ. The numbers show the amount of data collected when the specified performance level is reached. The last two columns show how many times REDQ and REDQ-OFE are more sample efficient than SAC in reaching that performance.
<table><tr><td>Score</td><td>SAC</td><td>REDQ</td><td>REDQ-OFE</td><td>REDQ faster</td><td>REDQ-OFE faster</td></tr><tr><td>Hopper at 3500</td><td>933K</td><td>116K</td><td>1</td><td>8.04</td><td>1</td></tr><tr><td>Walker2d at 3500</td><td>440K</td><td>141K</td><td>=</td><td>3.12</td><td>=</td></tr><tr><td>Ant at 5000</td><td>771K</td><td>153K</td><td>106K</td><td>5.04</td><td>7.27</td></tr><tr><td>Humanoid at 5000</td><td>945K</td><td>255K</td><td>134K</td><td>3.71</td><td>7.05</td></tr></table>
Table 3: Performance comparison of REDQ, REDQ-OFE, MBPO and SAC. The numbers show the performance achieved when the specific amount of data is collected. The last two columns show the ratio of REDQ or REDQ-OFE performance compared to SAC and MBPO performance.
<table><tr><td>Amount of data</td><td>SAC</td><td>MBPO</td><td>REDQ</td><td>REDQ/SAC</td><td>REDQ/MBPO</td></tr><tr><td>Hopper at 62K</td><td>594</td><td>1919</td><td>3278</td><td>5.52</td><td>1.71</td></tr><tr><td>Hopper at 125K Walker2d at150K</td><td>2404</td><td>3131</td><td>3517</td><td>1.46</td><td>1.12</td></tr><tr><td>Walker2dat 300K</td><td>760</td><td>3308</td><td>3544</td><td>4.66</td><td>1.07</td></tr><tr><td></td><td>2556</td><td>3537</td><td>4589</td><td>1.80</td><td>1.30</td></tr><tr><td>Ant at150K</td><td>1245</td><td>4388</td><td>4803</td><td>3.86</td><td>1.09</td></tr><tr><td>Ant at 300K</td><td>2485</td><td>5774</td><td>5369</td><td>2.16</td><td>0.93</td></tr><tr><td>Humanoid at150K</td><td>674</td><td>1604</td><td>2641</td><td>3.92</td><td>1.65</td></tr><tr><td>Humanoid at 300K</td><td>1633</td><td>4199</td><td>4674</td><td>2.86</td><td>1.11</td></tr><tr><td>Amount of data</td><td>SAC</td><td>MBPO</td><td>REDQ-OFE</td><td>OFE/SAC</td><td>OFE/MBPO</td></tr><tr><td>Antat150K</td><td>1245</td><td>4388</td><td>5524</td><td>4.44</td><td>1.26</td></tr><tr><td>Ant at 300K</td><td>2485</td><td>5774</td><td>6578</td><td>2.65</td><td>1.14</td></tr><tr><td>Humanoid at150K</td><td>674</td><td>1604</td><td>5011</td><td>7.43</td><td>3.12</td></tr><tr><td>Humanoid at 300K</td><td>1633</td><td>4199</td><td>5309</td><td>3.25</td><td>1.26</td></tr></table>
# D NUMBER OF PARAMETERS COMPARISON
Table 4 gives the number of parameters for MBPO, REDQ and REDQ-OFE, for all four environments. As discussed in the main paper, REDQ uses fewer parameters than MBPO for all four environments: between $26 \%$ and $70 \%$ as many parameters depending on the environment. After adding OFENet, REDQ still uses fewer parameters than MBPO, with $80 \%$ and $3 5 \%$ as many parameters on Ant and Humanoid. In particular, it is surprising that REDQ-OFE can achieve a much stronger result on Humanoid with much fewer parameters.
Table 4: Number of parameters in millions. REDQ uses the same network structure and ensemble size for all four environments. The difference in the number of parameters comes from the fact that the environments have very different observation and action dimensions, which will affect the size of the input and output layers of the networks.
<table><tr><td>Algorithm</td><td>Hopper</td><td>Walker2d</td><td>Ant</td><td>Humanoid</td></tr><tr><td>MBPO</td><td>1.106M</td><td>1.144M</td><td>1.617M</td><td>7.087M</td></tr><tr><td>REDQ N = 10</td><td>0.769M</td><td>0.795M</td><td>1.066M</td><td>1.840M</td></tr><tr><td>REDQ-OFE N = 10</td><td></td><td></td><td>1.294M</td><td>2.460M</td></tr></table>
# E ADDITIONAL RESULTS FOR REDQ, SAC-20, AND AVG
Due to lack of space, Figure 2 in Section 3 only compared REDQ with SAC-20 and AVG for the Ant environment. Figure 5 presents the results for all four environments. We can see that in all four environments, REDQ has much stronger performance and much lower std of bias compared to SAC-20 and AVG. Note in terms of average normalized bias, AVG is slightly closer to zero in Ant compared to REDQ, and SAC-20 is a bit closer to zero in Humanoid compared to REDQ; however, their std of normalized bias is consistently higher. This shows the importance of having a low std of the bias in addition to a close-to-zero average bias.
 Figure 5: Performance, mean and std of normalized Q bias for REDQ, AVG, and SAC. All three algorithms have a UTD ratio of 20.
# F REDQ AND SAC WITH AND WITHOUT POLICY DELAY
Note that in the REDQ pseudocode, the number of policy updates is always one for each data point collected. We set the UTD ratio for the policy update to always be one in order to isolate the effect of additional policy updates from Q updates. Note in this way, REDQ, SAC-20 and SAC-1 all take the same number of policy updates. This helps show that the performance gain mainly comes from the additional Q updates.
Having a lower number of policy updates can also be seen as a delayed policy update, or policy delay, and is a method that has been used in previous works to improve learning stability (Fujimoto et al., 2018). In this section we discuss how delayed policy update, or policy delay, impact the performance of REDQ and SAC (with UTD of 20). Figure 6 compares REDQ and SAC-20 with and without policy delay (NPD for no policy delay). We can see that having the policy delay consistently makes the bias and std of bias lower and more stable, although they have a smaller effect on REDQ than on SAC. Performance-wise SAC always gets a performance boost with policy delay, while REDQ sees improvement in Hopper and Humanoid, and becomes slightly worse in Walker2d and Ant. The results show that policy delay can be important under high UTD when the variance is not properly controlled. However, with enough variance reduction, the effect of policy delay is diminished, and in some cases having more policy update can give better performance.
 Figure 6: Performance, mean and std of normalized Q bias of REDQ and SAC, with and without policy delay.
# G REDQ AND SAC WITH DIFFERENT UTD RATIOS
How do different UTD ratio values $G$ impact the performance of REDQ and SAC? Figure 7 compares the two algorithms under UTD ratio values of 1, 5, 10 and 20 for the Ant environment. The results show that in the Ant environment, REDQ greatly benefits from larger UTD values, with UTD of 20 giving the best result. For SAC, performance improves slightly for UTD ratios of 5 and 10, but becomes much worse at 20. Looking at the normalized bias and the std of the bias, we see that changing the UTD ratio does not change the values very much for REDQ, while for SAC, we see that as the UTD ratio increases, both the mean and the std of the bias becomes larger and more unstable.
 Figure 7: Performance, mean and std of normalized Q bias for REDQ, and SAC, with different UTD ratios, in Ant environment.
# H ADDITIONAL RESULTS FOR WEIGHTED VARIANT
In this section we provide additional results for the Weighted variant. Figure 8 shows the performance and bias comparison on all four environments. Results show that Weighted and REDQ have similar average bias and std of bias. In terms of performance, Weighed is worse in Ant and Hopper, similar in Humanoid and slightly stronger in Walker2d. Overall REDQ seems to have stronger performance and is more robust. Randomness in the networks might help alleviate overfitting in the early stage, or improve exploration, as shown in previous studies (Osband et al., 2016; Fortunato et al., 2018). This can be important since positive bias in Q learning-based methods can sometimes help exploration. This is commonly referred to as optimistic initial values, or optimism in the face of uncertainty (Sutton & Barto, 2018; Brafman & Tennenholtz, 2002). Thus conservative Q estimates in recent algorithms can lead to the problem of pessimistic underexploration (Ciosek et al., 2019). An interesting future work direction is to study how robust and effective exploration can be achieved without relying on optimistic estimates.
 Figure 8: Performance, mean and std of normalized Q bias for REDQ and Weighted.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532# DIFFERENTIABLE PERTURB-AND-PARSE:SEMI-SUPERVISED PARSING WITH A STRUCTUREDVARIATIONAL AUTOENCODER
Caio Corro Ivan Titov ILCC, School of Informatics, University of Edinburgh ILLC, University of Amsterdam c.f.corro@uva.nl ititov@inf.ed.ac.uk
# ABSTRACT
Human annotation for syntactic parsing is expensive, and large resources are available only for a fraction of languages. A question we ask is whether one can leverage abundant unlabeled texts to improve syntactic parsers, beyond just using the texts to obtain more generalisable lexical features (i.e. beyond word embeddings). To this end, we propose a novel latent-variable generative model for semi-supervised syntactic dependency parsing. As exact inference is intractable, we introduce a differentiable relaxation to obtain approximate samples and compute gradients with respect to the parser parameters. Our method (Differentiable Perturb-and-Parse) relies on differentiable dynamic programming over stochastically perturbed arc weights. We demonstrate effectiveness of our approach with experiments on English, French and Swedish.
# 1 INTRODUCTION
A dependency tree is a lightweight syntactic structure exposing (possibly labeled) bi-lexical relations between words (Tesniere, 1959; Kaplan & Bresnan, 1982), see Figure 1. This representation \` has been widely studied by the NLP community leading to very efficient state-of-the-art parsers (Kiperwasser & Goldberg, 2016; Dozat & Manning, 2017; Ma & Hovy, 2017), motivated by the fact that dependency trees are useful in downstream tasks such as semantic parsing (Reddy et al., 2016; Marcheggiani & Titov, 2017), machine translation (Ding & Palmer, 2005; Bastings et al., 2017), information extraction (Culotta & Sorensen, 2004; Liu et al., 2015), question answering (Cui et al., 2005) and even as a filtering method for constituency parsing (Kong et al., 2015), among others.
Unfortunately, syntactic annotation is a tedious and expensive task, requiring highly-skilled human annotators. Consequently, even though syntactic annotation is now available for many languages, the datasets are often small. For example, 31 languages in the Universal Dependency Treebank,1 the largest dependency annotation resource, have fewer than 5,000 sentences, including such major languages as Vietnamese and Telugu. This makes the idea of using unlabeled texts as an additional source of supervision especially attractive.
In previous work, before the rise of deep learning, the semi-supervised parsing setting has been mainly tackled with two-step algorithms. On the one hand, feature extraction methods first learn an intermediate representation using an unlabeled dataset which is then used as input to train a supervised parser (Koo et al., 2008; Yu et al., 2008; Chen et al., 2009; Suzuki et al., 2011). On the other hand, the self-training and co-training methods start by learning a supervised parser that is then used to label extra data. Then, the parser is retrained with this additional annotation (Sagae & Tsujii, 2007; Kawahara & Uchimoto, 2008; McClosky et al., 2006). Nowadays, unsupervised feature extraction is achieved in neural parsers by the means of word embeddings (Mikolov et al., 2013; Peters et al., 2018). The natural question to ask is whether one can exploit unlabeled data in neural parsers beyond only inducing generalizable word representations.
 Figure 1: Dependency tree example: each arc represents a labeled relation between the head word (the source of the arc) and the modifier word (the destination of the arc). The first token is a fake root word.
Table 1: Number of labeled and unlabeled instances in each dataset.
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Labeled</td><td rowspan=1 colspan=1>Unlabeled</td></tr><tr><td rowspan=1 colspan=1>English</td><td rowspan=1 colspan=1>3984</td><td rowspan=1 colspan=1>35848</td></tr><tr><td rowspan=1 colspan=1>French</td><td rowspan=1 colspan=1>1476</td><td rowspan=1 colspan=1>13280</td></tr><tr><td rowspan=1 colspan=1>Swedish</td><td rowspan=1 colspan=1>4880</td><td rowspan=1 colspan=1>5331</td></tr></table>
Our method can be regarded as semi-supervised Variational Auto-Encoder (VAE, Kingma et al., 2014). Specifically, we introduce a probabilistic model (Section 3) parametrized with a neural network (Section 4). The model assumes that a sentence is generated conditioned on a latent dependency tree. Dependency parsing corresponds to approximating the posterior distribution over the latent trees within this model, achieved by the encoder component of VAE, see Figure 2a. The parameters of the generative model and the parser (i.e. the encoder) are estimated by maximizing the likelihood of unlabeled sentences. In order to ensure that the latent representation is consistent with treebank annotation, we combine the above objective with maximizing the likelihood of gold parse trees in the labeled data.
Training a VAE via backpropagation requires marginalization over the latent variables, which is intractable for dependency trees. In this case, previous work proposed approximate training methods, mainly differentiable Monte-Carlo estimation (Kingma & Welling, 2013; Rezende et al., 2014) and score function estimation, e.g. REINFORCE (Williams, 1992). However, REINFORCE is known to suffer from high variance (Mnih & Gregor, 2014). Therefore, we propose an approximate differentiable Monte-Carlo approach that we call Differentiable Perturb-and-Parse (Section 5). The key idea is that we can obtain a differentiable relaxation of an approximate sample by (1) perturbing weights of candidate dependencies and (2) performing structured argmax inference with differentiable dynamic programming, relying on the perturbed scores. In this way we bring together ideas of perturb-and-map inference (Papandreou & Yuille, 2011; Maddison et al., 2017) and continuous relaxation for dynamic programming (Mensch & Blondel, 2018). Our model differs from previous works on latent structured models which compute marginal probabilities of individual edges Kim et al. (2017); Liu & Lapata (2018). Instead, we sample a single tree from the distribution that is represented with a soft selection of arcs. Therefore, we preserve higher-order statistics, which can then inform the decoder. Computing marginals would correspond to making strong independence assumptions. We evaluate our semi-supervised parser on English, French and Swedish and show improvement over a comparable supervised baseline (Section 6).
Our main contributions can be summarized as follows: (1) we introduce a variational autoencoder for semi-supervised dependency parsing; (2) we propose the Differentiable Perturb-and-Parse method for its estimation; (3) we demonstrate the effectiveness of the approach on three different languages. In short, we introduce a novel generative model for learning latent syntactic structures.
# 2 DEPENDENCY PARSING
A dependency is a bi-lexical relation between a head word (the source) and a modifier word (the target), see Figure 1. The set of dependencies of a sentence defines a tree-shaped structure.2 In the parsing problem, we aim to compute the dependency tree of a given sentence.
Formally, we define a sentence as a sequence of tokens (words) from vocabulary $\mathbb { W }$ . We assume a one-to-one mapping between $\mathbb { W }$ and integers $1 \dots | \mathbb { W } |$ . Therefore, we write a sentence of length $n$ as a vector of integers $\pmb { s }$ of size $n + 1$ with $1 \leq s _ { i } \leq | \mathbb { W } |$ and where $s _ { 0 }$ is a special root symbol. A dependency tree of sentence $\pmb { s }$ is a matrix of booleans $T \in \{ 0 , 1 \} ^ { ( n + 1 ) \times ( n + 1 ) }$ with $T _ { h , m } = 1$ meaning that word $s _ { h }$ is the head of word $s _ { m }$ in the dependency tree.
 Figure 2: (a) Illustration of our probabilistic model with random variables $\pmb { s }$ , $_ { \mathbf { T } }$ and $_ z$ for sentences, dependency trees and sentence embeddings, respectively. The gray area delimits the latent space. Solid arcs denote the generative process, dashed arcs denotes posterior distributions over the latent variables. (b) Stochastic computation graph. (c) Illustration of the decoder when computing the probability distribution of $s _ { 4 }$ , the word at position 4. Dashed arcs at the bottom represent syntactic dependencies between word at position 4 and previous positions. At each step, the LSTM takes as input an embedding of the previous word $\scriptstyle { \mathcal { s } } _ { 0 }$ is a special start-of-sentence symbol). Then, the GCN combines different outputs of the LSTM by transforming them with respect to their syntactic relation with the current position. Finally, the probability of $s _ { 4 }$ is computed via the softmax function.
More specifically, a dependency tree $\mathbf { T }$ is the adjacency matrix of a directed graph with $n + 1$ vertices $\mathbf { v } _ { 0 } \ldots \mathbf { v } _ { n }$ . A matrix $\mathbf { T }$ is a valid dependency tree if and only if this graph is a $\mathbf { v } _ { 0 }$ -rooted spanning arborescence,3 i.e. the graph is connected, each vertex has at most one incoming arc and the only vertex without incoming arc is $\mathbf { v } _ { 0 }$ . A dependency tree is projective if and only if, for each arc $\mathbf { v } _ { h } \mathbf { v } _ { m }$ , if $h < m$ (resp. $m < h$ ) then there exists a path with arcs $\mathbf { T }$ from $\mathbf { V } _ { h }$ to each vertex $\mathbf { v } _ { k }$ such that $h < k < m$ (resp. $m < k < h$ ). From a linguistic point of view, projective dependency trees combine contiguous phrases (sequence of words) only. Intuitively, this means that we can draw the dependency tree above the sentence without crossing arcs.
Given a sentence $\pmb { s }$ , an arc-factored dependency parser computes the dependency tree $_ { \mathbf { T } }$ which maximizes a weighting function $\begin{array} { r } { f ( \mathbf { T } ; \mathbf { W } ) = \sum _ { h , m } { T _ { h , m } { W _ { h , m } } } } \end{array}$ , where $W$ is a matrix of dependency (arc) weights. This problem can be solved with a $\mathcal { O } ( n ^ { 2 } )$ time complexity (Tarjan, 1977; McDonald et al., 2005). If we restrict $\mathbf { T }$ to be a projective dependency tree, then the optimal solution can be computed with a $\mathcal { O } ( n ^ { 3 } )$ time complexity using dynamic programming (Eisner, 1996). Restricting the search space to projective trees is appealing for treebanks exhibiting this property (either exactly or approximately): they enforce a structural constraint that can be beneficial for accuracy, especially in a low-resource scenario. Moreover, using a more restricted search space of potential trees may be especially beneficial in a semi-supervised scenario: with a more restricted space a model is less likely to diverge from a treebank grammar and capture non-syntactic phenomena. Finally, Eisner’s algorithm (Eisner, 1996) can be described as a deduction system (Pereira & Warren, 1983), a framework that unifies many parsing algorithms. As such, our methodology could be applied to other grammar formalisms. For all these reasons, in this paper, we focus on projective dependency trees only.
# 3 GENERATIVE MODEL
We now turn to the learning problem, i.e. estimation of the matrix $W$ . We assume that we have access to a set of i.i.d. labeled sentences $\mathbb { L } = \{ \langle s , T \rangle , \dots \}$ and a set of i.i.d. unlabeled sentences $\mathbb { U } = \{ s , \ldots \}$ . In order to incorporate unlabeled data in the learning process, we introduce a generative model where the dependency tree is latent (Subsection 3.1). As such, we can maximize the likelihood of observed sentences even if the ground-truth dependency tree is unknown. We learn the parameters of this model using a variational Bayes approximation (Subsection 3.2) augmented with a discriminative objective on labeled data (Subsection 3.3).
# 3.1 GENERATIVE STORY
Under our probabilistic model, a sentence $\pmb { s }$ is generated from a continuous sentence embedding $_ { z }$ and with respect to a syntactic structure $\mathbf { T }$ . We formally define the generative process of a sentence of length $n$ as:
$$T \sim p ( T | n ) \qquad z \sim p ( z | n ) \qquad s \sim p ( s | T , z , n )$$
This Bayesian network is shown in Figure 2a. In order to simplify notation, we omit conditioning on $n$ in the following. $_ { \mathbf { T } }$ and $_ { z }$ are latent variables and $p ( s | \bar { T } , \bar { z ) }$ is the conditional likelihood of observations. We assume that the priors $p ( \pmb { T } )$ and $p ( z )$ are the uniform distribution over projective trees and the multivariate standard normal distribution, respectively. The true distribution underlying the observed data is unknown, so we have to learn a model $p _ { \theta } ( \pmb { s } | \pmb { T } , \pmb { z } )$ parametrized by $\theta$ that best fits the given samples:
$$\theta = \arg \operatorname* { m a x } _ { \theta } \sum _ { s } \log p _ { \theta } ( s )$$
Then, the posterior distribution of latent variables $p _ { \theta } ( \pmb { T } , z | \pmb { s } )$ models the probability of underlying representations (including dependency trees) with respect to a sentence. This conditional distribution can be written as:
$$p _ { \theta } ( \pmb { T } , z | \pmb { s } ) = \frac { p _ { \theta } ( \pmb { s } | \pmb { T } , z ) p ( \pmb { T } ) p ( z ) } { p _ { \theta } ( \pmb { s } ) }$$
In the next subsection, we explain how these two quantities can be estimated from data.
# 3.2 VARIATIONAL AUTO-ENCODERS
Computations in Equation 1 and Equation 2 require marginalization over the latent variables:
$$p _ { \theta } ( s ) = \sum _ { T } \int p _ { \theta } ( s , T , z ) d z$$
which is intractable in general. We rely on the Variational Auto-Encoder (VAE) framework to tackle this challenge (Kingma $\&$ Welling, 2013; Rezende et al., 2014). We introduce a variational distribution $q _ { \phi } ( T , z | s )$ which is intended to be similar to $p _ { \theta } ( \pmb { T } , z | s )$ . More formally, we want $\mathrm { K L } [ q _ { \phi } ( \pmb { T } , \pmb { z } | \pmb { s } ) ] | p _ { \theta } ( \pmb { T } , \pmb { z } | \pmb { s } ) ]$ to be as small as possible, where $\mathrm { K L }$ is the Kulback-Leibler (KL) divergence. Then, the following equality holds:
$$\begin{array} { r } { \log p _ { \theta } ( s ) = \mathbb { E } _ { q _ { \phi } ( T , z | s ) } [ \log p _ { \theta } ( s | T , z ) ] - \mathrm { K L } [ q _ { \phi } ( T , z | s ) | p ( T , z ) ] + \mathrm { K L } [ q _ { \phi } ( T , z | s ) | ] p _ { \theta } ( T , z | s ) ] } \end{array}$$
where $\log p _ { \theta } ( s )$ is called the evidence. The KL divergence is always positive, therefore by removing the last term we have:
$$\begin{array} { r } { \log p _ { \theta } ( s ) \geq \mathbb { E } _ { q _ { \phi } ( T , z \mid s ) } [ \log p _ { \theta } ( s | T , z ) ] - { \mathrm { K L } } [ q _ { \phi } ( T , z | s ) | p ( T , z ) ] = \tilde { \mathcal { E } } _ { \theta , \phi } ( s ) } \end{array}$$
where the right-hand side is called the Evidence Lower Bound (ELBO). By maximizing the ELBO term, the divergence KL $[ q _ { \phi } ( \pmb { T } , z | \pmb { s } ) \| p _ { \theta } ( \pmb { T } , z | \pmb { s } ) ]$ is implicitly minimized. Therefore, we define a surrogate objective, replacing the objective in Equation 1:
$$\theta = \arg \operatorname* { m a x } _ { \theta } \sum _ { s } \operatorname* { m a x } _ { \phi } \tilde { \mathcal { E } } _ { \theta , \phi } ( s )$$
The ELBO in Equation 4 has two components. First, the KL divergence with the prior, which usually has a closed form solution. For the distribution over dependency trees, it can be computed with the semiring algorithm of Li & Eisner (2009). Second, the non-trivial term $\mathbb { E } _ { q _ { \phi } ( T , z | s ) } [ \log p _ { \theta } ( s | T , z ) ]$ . During training, Monte-Carlo method provides a tractable and unbiased estimation of the expectation. Note that a single sample from $q _ { \phi } ( T , z | s )$ can be understood as encoding the observation into the latent space, whereas regenerating a sentence from the latent space can be understood as decoding. However, training a VAE requires the sampling process to be differentiable. In the case of the sentence embedding, we follow the usual setting and define $q _ { \phi } ( z | s )$ as a diagonal Gaussian: backpropagation through the the sampling process $z \sim q _ { \phi } ( z | s )$ can be achieved thanks to the reparametrization trick (Kingma & Welling, 2013; Rezende et al., 2014). Unfortunately, this approach cannot be applied to dependency tree sampling $T \sim q _ { \phi } ( T | s )$ . We tackle this issue in Section 5.
# 3.3 SEMI-SUPERVISED LEARNING
VAEs are a convenient approach for semi-supervised learning (Kingma et al., 2014) and have been successfully applied in NLP (Kocisk ˇ y et al., 2016; Xu et al., 2017; Zhou & Neubig, 2017; Yin et al., ´ 2018). In this scenario, we are given the dependency structure of a subset of the observations, i.e. $_ { \mathbf { T } }$ is an observed variable. Then, the supervised ELBO term is defined as:
$$\bar { \mathcal { E } } _ { \theta , \phi } ( s , \pmb { T } ) = \mathbb { E } _ { q _ { \phi } ( z | s ) } [ \log p _ { \theta } ( s | \pmb { T } , z ) ] - \mathrm { K L } [ q _ { \phi } ( z | s ) | p ( z ) ]$$
Note that our end goal is to estimate the posterior ditribution over dependency trees $q _ { \phi } ( \pmb { T } | s )$ , i.e. the dependency parser, which does not appear in the supervised ELBO. We want to explicitly use the labeled data in order to learn the parameters of this parser. This can be achieved by adding a discriminative training term to the overall loss.4
The loss function for training a semi-supervised VAE is:
$$\mathcal { L } _ { \boldsymbol { \theta , \phi } } ( \mathbb { L } , \mathbb { U } ) = - \sum _ { s , T \in \mathbb { L } } \log q _ { \phi } ( \boldsymbol { T } | s ) - \sum _ { s , T \in \mathbb { L } } \bar { \mathcal { E } } _ { \boldsymbol { \theta , \phi } } ( s , T ) - \sum _ { s \in \mathbb { U } } \tilde { \mathcal { E } } _ { \boldsymbol { \theta , \phi } } ( s )$$
where the first term is the standard loss for supervised learning of log-linear models (Johnson et al., 1999; Lafferty et al., 2001).
# 4 NEURAL PARAMETRIZATION
In this section, we describe the neural parametrization of the encoder distribution $q _ { \phi }$ (Subsection 4.1) and the decoder distribution $p _ { \theta }$ (Subsection 4.2). A visual representation is given in Figure 2b.
# 4.1 ENCODER
We factorize the encoder as $q _ { \phi } ( T , z | s ) = q _ { \phi } ( T | s ) q _ { \phi } ( z | s )$ . The categorical distribution over dependency trees is parametrized by a log-linear model (Lafferty et al., 2001) where the weight of an arc is given by the neural network of Kiperwasser $\&$ Goldberg (2016).The sentence embedding model is specified as a diagonal Gaussian parametrized by a LSTM, similarly to the seq2seq framework (Sutskever et al., 2014; Bowman et al., 2016). That is:
$$\begin{array} { c c } { { W = \mathrm { D E P W E I G H T S } ( s ) } } & { { \qquad m , \log v ^ { 2 } = \mathrm { E M B P A R A M S } ( s ) } } \\ { { q _ { \phi } ( T | s ) = \displaystyle \frac { \exp ( \sum _ { i , j } W _ { i , j } T _ { i , j } ) } { \sum _ { T ^ { \prime } } \exp ( \sum _ { i , j } W _ { i , j } T _ { i , j } ^ { \prime } ) } } } & { { \qquad q _ { \phi } ( z | s ) = \mathcal { N } ( z | m , v ) } } \end{array}$$
where $_ { m }$ and $\textbf { { v } }$ are mean and variance vectors, respectively.5
# 4.2 DECODER
We use an autoregressive decoder that combines an LSTM and a Graph Convolutional Network (GCN, Kipf & Welling, 2016; Marcheggiani & Titov, 2017). The LSTM keeps the history of generated words, while the GCN incorporate information about syntactic dependencies.
The hidden state of the LSTM is initialized with latent variable $_ z$ (the sentence embedding). Then, at each step $1 \leq i \leq n$ , an embedding associated with word at position $i - 1$ is fed as input. A special start-of-sentence symbol embedding is used at the first position.
Let $o ^ { i }$ be the hidden state of the LSTM at position $i$ . The standard seq2seq architecture uses this vector to predict the word at position $i$ . Instead, we transform it in order to take into account the syntactic structure described by the latent variable $\mathbf { T }$ . Due to the autoregressive nature of the decoder, we can only take into account dependencies $T _ { h , m }$ such that $h < i$ and $m < i$ . Before being fed to the GCN, the output of the LSTM is fed to distinct multi-layer perceptrons6 that characterize syntactic relations: if $s _ { h }$ is the head of $s _ { i }$ , $o ^ { h }$ is transformed with ${ \bf M L P } ^ { \curvearrowright }$ , if $s _ { m }$ is a modifier of $s _ { i }$ , $\pmb { o } ^ { m }$ is transformed with ${ \bf M L P } ^ { \curvearrowright }$ , and lastly $o ^ { i }$ is transformed with ${ \bf M L P } ^ { \bigcirc }$ . Formally, the GCN is defined as follows:
$$g ^ { i } = \operatorname { t a n h } \left( \mathbf { M } \mathbf { L } \mathbf { P } ^ { \mathcal { O } } ( \pmb { \sigma } ^ { i } ) + \sum _ { h = 0 } ^ { i - 1 } T _ { h , i } \times \mathbf { M } \mathbf { L } \mathbf { P } ^ { \mathcal { N } } ( \pmb { \sigma } ^ { h } ) + \sum _ { m = 0 } ^ { i - 1 } T _ { i , m } \times \mathbf { M } \mathbf { L } \mathbf { P } ^ { \mathcal { O } } ( \pmb { \sigma } ^ { m } ) \right)$$
The output vector $g ^ { i }$ is then used to estimate the probability of word $s _ { i }$ . The neural architecture of the decoder is illustrated on Figure 2c.
# 5 DIFFERENTIABLE PERTURB-AND-PARSE
Encoder-decoder architectures are usually straightforward to optimize with the back-propagation algorithm (Linnainmaa, 1976; LeCun et al., 2012) using any autodiff library. Unfortunately, our VAE contains stochastic nodes that can not be differentiated efficiently as marginalization is too expensive or intractable (see Figure 2b for the list of stochastic nodes in our computation graph). Kingma & Welling (2013) and Rezende et al. (2014) proposed to rely on a Monte-Carlo estimation of the gradient. This approximation is differentiable because the sampling process is moved out of the backpropagation path.7
In this section, we introduce our Differentiable Perturb-and-Parse operator to cope with the distribution over dependency trees. Firstly, in Subsection 5.1, we propose an approximate sampling process by computing the best parse tree with respect to independently perturbed arc weights. Secondly, we propose a differentiable surrogate of the parsing algorithm in Subsection 5.2.
# 5.1 PERTURB-AND-PARSE
Sampling from a categorical distributions can be achieved through the Gumbel-Max trick (Gumbel, 1954; Maddison et al., 2014).8 Unfortunately, this reparametrization is difficult to apply when the discrete variable can take an exponential number of values as in Markov Random Fields (MRF). Papandreou & Yuille (2011) proposed an approximate sampling process: each component is perturbed independently. Then, standard MAP inference algorithm computes the sample. This technique is called perturb-and-map.
Arc-factored dependency parsing can be expressed as a MRF where variable nodes represent arcs, singleton factors weight arcs and a fully connected factor forces the variable assignation to describe a valid dependency tree (Smith & Eisner, 2008). Therefore, we can apply the perturb-and-map method to dependency tree sampling:9
$$\begin{array} { r c l } { { W } } & { { = } } & { { \operatorname { E M B P A R A M S } ( s ) } } \\ { { P } } & { { \sim } } & { { \mathcal { G } ( 0 , 1 ) } } \\ { { T } } & { { = } } & { { \operatorname { E I S N E R } ( W + P ) } } \end{array}$$
where $\mathcal { G } ( 0 , 1 )$ is the Gumbel distribution, that is sampling matrix $_ { r }$ is equivalent to setting $P _ { i , j } =$ $- \log ( - \log U _ { i , j } ) )$ ) where $U _ { i , j } \sim \mathrm { U n i f o r m } ( 0 , 1 )$ .
<table><tr><td>Algorithm1 This function search the best split point for constructing an element given its span.b is a one-hot vector such that bi-k = 1iff k is the best split position.</td></tr><tr><td>1: function DEDUCE-URIGHT(i, j, W) 2: s ← null-initialized vec.of size j-i 3: fori≤k<jdo 4: Si-k←[ik] +[k+1△j]</td></tr><tr><td>+Wji</td></tr><tr><td>5: b ← ONE-HOT-ARGMAX(s) 6: BACKPTR[ij]←b</td></tr><tr><td>7: WEIGHT[i j]←bs</td></tr></table>
<table><tr><td>Algorithm2If item [ij]has contributed the optimal objective, this function sets Ti,j to 1.Then, it propagates the contribution in- formation to its antecedents.</td></tr><tr><td>1: function BACKTRACK-URIGHT(𝑖, j,T) 2: Ti,j←CONTRIB[i j]</td></tr><tr><td>3: b←BACKPTR[𝑖j] 4: fori≤k<jdo</td></tr><tr><td>CONTRIB[i△ k] ←bi-kTi,j 5: CONTRIB[k+1△j]←bi-kTi,j 6:</td></tr></table>
The (approximate) Monte-Carlo estimation of the expectation in Equation 3 is then defined as:10
$$\begin{array} { r } { { \mathbb E } _ { q _ { \phi } ( { \pmb T } | s ) } \left[ \log p _ { \theta } ( { \pmb s } | { \pmb T } ) \right] \simeq \log p _ { \theta } ( s | \mathrm { E I S N E R } ( { \pmb W } + { \pmb P } ) ) } \end{array}$$
where $\simeq$ denotes a Monte-Carlo estimation of the gradient, $\textstyle P \sim { \mathcal { G } } ( 0 , 1 )$ is sampled in the last line and EISNER is an algorithm that compute the projective dependency tree with maximum (perturbed) weight (Eisner, 1996). Therefore, the sampling process is outside of the backpropagation path. Unfortunately, the EISNER algorithm is built using ONE-HOT-ARGMAX operations that have illdefined partial derivatives. We propose a differentiable surrogate in the next section.
# 5.2 DIFFERENTIABLE PARSING ALGORITHM
We now propose a continuous relaxation of the projective dependency parsing algorithm. We start with a brief outline of the algorithm using the parsing-as-deduction formalism, restricting this presentation to the minimum needed to describe our continuous relaxation. We refer the reader to Eisner (1996) for an in-depth presentation.
The parsing-as-deduction formalism provides an unified presentation of many parsing algorithms (Pereira & Warren, 1983; Shieber et al., 1995). In this framework, a parsing algorithm is defined as a deductive system, i.e. as a set of axioms, a goal item and a set of deduction rules. Each deduced item represents a sub-analysis of the input. Regarding implementation, the common way is to rely on dynamic programming: items are deduced in a bottom-up fashion, from smaller sub-analyses to large ones. To this end, intermediate results are stored in a global chart.
For projective dependency parsing, the algorithm builds a chart whose items are of the form $[ i \triangleright j ]$ , $\left[ i \right] \varTheta \ j$ , $[ i \triangleright j ]$ and $[ i { \varDelta j } ]$ that represent sub-analyses from word $i$ to word $j$ . An item $[ i \triangleright j ]$ (resp. $[ i \complement j ] ,$ ) represents a sub-analysis where every word $s _ { k } , i \le k \le j$ is a descendant of $s _ { i }$ and where $s _ { j }$ cannot have any other modifier (resp. can have). The two other types are defined similarly for descendants of word $s _ { j }$ . In the first stage of the algorithm, the maximum weight of items are computed (deduced) in a bottom-up fashion. For example, the weight WEIGHT $[ i \stackrel { \bar { \mathbf { \sigma } } } { \supset } j ]$ is defined as the maximum of WEIGHT $[ i \triangleright k ] + \mathrm { w E I G H T } [ k + 1 \varDelta j ] ,$ , $\forall k$ s.t. $i \le k < j$ , plus $W _ { i , j }$ because $[ i \vartriangleright j ]$ assumes a dependency with head $s _ { i }$ and modifier $s _ { j }$ . In the second stage, the algorithm retrieves arcs whose scores have contributed to the optimal objective. Part of the pseudo-code for the first and second stages are given in Algorithm 1 and Algorithm 2, respectively. Note that, usually, the second stage is implemented with a linear time complexity but we cannot rely on this optimization for our continuous relaxation.
This algorithm can be thought of as the construction of a computational graph where WEIGHT, BACKPTR and CONTRIB are sets of nodes (variables). This graph includes ONE-HOT-ARGMAX operations that are not differentiable (see line 5 in Algorithm 1). This operation takes as input a vector of weights $\textbf { { v } }$ of size $k$ and returns a one-hot vector $^ o$ of the same size with $o _ { i } = 1$ if and only
if $v _ { i }$ is the element of maximum value:11
$$o _ { i } = \mathbb { 1 } [ \forall 1 \leq j \leq k , j \neq i : v _ { i } > v _ { j } ]$$
We follow a recent trend (Jang et al., 2017; Maddison et al., 2017; Goyal et al., 2017; 2018) in differentiable approximation of the ONE-HOT-ARGMAX function and replace it with the PEAKEDSOFTMAX operator:
$$o _ { i } = \frac { \exp ( 1 / \tau \ v _ { i } ) } { \sum _ { 1 \leq j \leq k } \exp ( 1 / \tau \ v _ { j } ) }$$
where $\tau > 0$ is a temperature hyperparameter controlling the smoothness of the relaxation: when $\tau \infty$ the relaxation becomes equivalent to ONE-HOT-ARGMAX. With this update, the parsing algorithm is fully differentiable.12 Note, however, that outputs are not valid dependency trees anymore. Indeed, then an output matrix $_ { \mathbf { T } }$ contains continuous values that represent soft selection of arcs. Mensch & Blondel (2018) introduced a alternative but similar approach for tagging with the Viterbi algorithm. We report pseudo-codes for the forward and backward passes of our continuous relaxation of EISNER’s algorithm in Appendix F.
# 5.3 DISCUSSION
The fact that $\mathbf { T }$ is a soft selection of arcs, and not a combinatorial structure, does not impact the decoder. Indeed, a GCN can be run over weighted graphs, the message passed between nodes is simply multiplied by the continuous weights. This is one of motivations for using GCNs rather than a Recursive LSTMs (Tai et al., 2015) in the decoder. On the one hand, running a GCN with a matrix that represents a soft selection of arcs (i.e. with real values) has the same computational cost than using a standard adjacency matrix (i.e. with binary elements) if we use matrix multiplication on GPU.13 On the other hand, a recursive network over a soft selection of arcs requires to build a $O ( n ^ { 2 } )$ set of RNN-cells that follow the dynamic programming chart where the possible inputs of a cell are multiplied by their corresponding weight in T, which is expensive and not GPU-friendly.
# 6 EXPERIMENTS
We ran a series of experiments on 3 different languages to test our method for semi-supervised dependency parsing: English, French and Swedish. Details about corpora can be found in Appendix C. The size of each dataset is reported in Table 1. Note that the setting is especially challenging for Swedish: the amount of unlabeled data we use here barely exceeds that of labeled data. The hyperparameters of our network are described in Appendix D. In order to ensure that we do not bias our model for the benefit of the semi-supervised scenario, we use the same parameters as Kiperwasser & Goldberg (2016) for the parser. Also, we did not perform any language-specific parameter selections. This makes us hope that our method can be applied to other languages with little extra effort. We stress that no part-of-speech tags are used as input in any part of our network. For English, the supervised parser took 1.5 hours to train on a NVIDIA Titan X GPU while the semi-supervised parser without sentence embedding, which sees 2 times more instances per epoch, took 3.5 hours to train.
Previous work has shown that learned latent structures tend to differ from linguistic syntactic structures (Kim et al., 2017; Williams et al., 2018). Therefore, we encourage the VAE to rely on latent structures close to the targeted ones by bootstrapping the training procedure with labeled data only. We follow a common practice for VAEs: we experimented with scaling down the KL-divergence of priors (Bowman et al., 2016; Miao et al., 2017; Yin et al., 2018). We use weights 0.01 the KLdivergence with the prior for distributions over sentence embeddings. For dependency trees, we report all experiments with the weight of 0, as removing the term or heavily downweighting it was yielding the best results. As the encoder is bootstrapped with the supervised loss, it is implicitly regularized toward linguistic trees, and the KL term would negate this effect. Intuitively, the KL term favors models which are uncertain on unlabeled examples, which may also be problematic, given that we would expect a strong parser to have sharp posteriors.
Table 2: (a) Parsing results: unlabeled attachment score / labeled attachment score. We also report results with the parser of (Kiperwasser & Goldberg, 2016) which uses a different discriminative loss for supervised training. (b) Recall / Precision evaluation with respect to dependency lengths for the supervised parser and the best semi-supervised parser on the English test set. Bold numbers highlight the main differences. (c) Recall / Precision evaluation with respect to dependency labels for multi-word expressions (mwe), adverbial modifiers (advmod) and appositional modifiers (appos). (a) Parsing results
<table><tr><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>English</td><td rowspan=1 colspan=1>French</td><td rowspan=1 colspan=1>Swedish</td></tr><tr><td rowspan=1 colspan=1>Supervised</td><td rowspan=1 colspan=1>88.79/84.74</td><td rowspan=1 colspan=1>84.09/77.58</td><td rowspan=1 colspan=1>86.59 /78.95</td></tr><tr><td rowspan=1 colspan=1>VAE w. z</td><td rowspan=1 colspan=1>89.39/85.44</td><td rowspan=1 colspan=1>84.43/77.89</td><td rowspan=1 colspan=1>86.92/80.01</td></tr><tr><td rowspan=1 colspan=1>VAE w/o z</td><td rowspan=1 colspan=1>89.50/ 85.48</td><td rowspan=1 colspan=1>84.69/78.49</td><td rowspan=1 colspan=1>86.97/79.80</td></tr><tr><td rowspan=1 colspan=1>Kipperwasser& Goldberg</td><td rowspan=1 colspan=1>89.88 / 86.49</td><td rowspan=1 colspan=1>84.30/77.83</td><td rowspan=1 colspan=1>86.93/ 80.12</td></tr></table>
(b) Dependency length analysis
<table><tr><td rowspan=1 colspan=1>Distance</td><td rowspan=1 colspan=1>SupervisedRe/Pr</td><td rowspan=1 colspan=1> Semi-sup.Re/Pr</td></tr><tr><td rowspan=1 colspan=1>(to root)</td><td rowspan=1 colspan=1>93.46 / 89.30</td><td rowspan=1 colspan=1>93.84 /92.41</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>95.61 /94.07</td><td rowspan=1 colspan=1>95.33/994.57</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>93.01/990.88</td><td rowspan=1 colspan=1>92.50/92.09</td></tr><tr><td rowspan=1 colspan=1>3...6</td><td rowspan=1 colspan=1>85.95/88.13</td><td rowspan=1 colspan=1>87.31/ 87.93</td></tr><tr><td rowspan=1 colspan=1>>7</td><td rowspan=1 colspan=1>72.47 / 83.26</td><td rowspan=1 colspan=1>78.72 / 83.11</td></tr></table>
(c) Dependency label analysis
<table><tr><td rowspan=1 colspan=1>Label</td><td rowspan=1 colspan=1>SupervisedRe/Pr</td><td rowspan=1 colspan=1> Semi-sup.Re/Pr</td></tr><tr><td rowspan=1 colspan=1>mwe</td><td rowspan=1 colspan=1>75.58 / 81.25</td><td rowspan=1 colspan=1>90.70/84.78</td></tr><tr><td rowspan=1 colspan=1>advmod</td><td rowspan=1 colspan=1>87.27/85.95</td><td rowspan=1 colspan=1>87.32/87.51</td></tr><tr><td rowspan=1 colspan=1>appos</td><td rowspan=1 colspan=1>77.49/880.27</td><td rowspan=1 colspan=1>81.39/81.03</td></tr></table>
# 6.1 PARSING RESULTS
For each dataset, we train under the supervised and the semi-supervised scenario. Moreover, in the semi-supervised setting, we experiment with and without latent sentence embedding $_ z$ . We compare only to the model of Kiperwasser & Goldberg (2016). Recently, even more accurate models have been proposed (e.g., Dozat & Manning, 2017). In principle, the ideas introduced in recent work are mostly orthogonal to our proposal as we can modify our VAE model accordingly. For example, we experimented with using bi-affine attention of Dozat & Manning (2017), though it has not turned out beneficial in our low-resource setting. Comparing to multiple previous parsers would have also required tuning each of them on our dataset, which is infeasible. Therefore, we only report results with a comparable baseline, i.e. trained with a structured hinge loss (Kiperwasser & Goldberg, 2016; Taskar et al., 2005). We did not perform further tuning in order to ensure that our analysis is not skewed toward one setting. Parsing results are summarized in Table 2a.
We observe a score increase in all three languages. Moreover, we observe that VAE performs slightly better without latent sentence embedding. We assume this is due to the fact that dependencies are more useful when no information leaks in the decoder through $_ z$ . Interestingly, we observe an improvement, albeit smaller, even on Swedish, where we used a very limited amount of unlabeled data. We note that training with structured hinge loss gives stronger results than our supervised baseline. In order to maintain the probabilistic interpretation of our model, we did not include a similar term in our model.
We conducted qualitative analyses for English.14 We report scores with respect to dependency lengths in Table 2b. We observe that the semi-supervised parser tends to correct two kind of errors. Firstly, it makes fewer mistakes on root attachments, i.e. the recall is similar between the two parsers but the precision of the semi-supervised one is higher. We hypothesis that root attachment errors come at a high price in the decoder because there is only a small fraction of the vocabulary that is observed with this syntactic function. Secondly, the semi-supervised parser recovers more long distance relations, i.e. the recall for dependencies with a distance superior or equal to 7 is higher. Intuitively, we assume these dependencies are more useful in the decoder: for short distance dependencies, the LSTM efficiently captures the context of the word to predict, whereas this information could be vanishing for long distances, meaning the GCN has more impact on the prediction. We also checked how the scores differ across dependency labels. We report main differences in Tables 2c. The largest improvements are obtained for multi-word expressions: this is particularly interesting because they are known to be challenging in NLP.
# 7 RELATED WORK
Dependency parsing in the low-ressource scenario has been of interest in the NLP community due to the expensive nature of annotation. On the one hand, transfer approaches learn a delexicalized parser for a resource-rich language which is then used to parse a low-resource one (Agic et al., 2016; ´ McDonald et al., 2011). On the other hand, the grammar induction approach learns a dependency parser in an unsupervised manner. Klein & Manning (2004) introduced the first generative model that outperforms the right-branching heuristic in English. Close to our work, Cai et al. (2017) use an auto-encoder setting where the decoder tries to rebuild the source sentence. However, their decoder is unstructured (e.g. it is not auto-regressive).
Variational Auto-Encoders (Kingma & Welling, 2013; Rezende et al., 2014) have been investigated in the semi-supervised settings (Kingma et al., 2014) for NLP. Kocisk ˇ y et al. (2016) learn a semantic ´ parser where the latent variable is a discrete sequence of symbols. Zhou & Neubig (2017) successfully applied the variational method to semi-supervised morphological re-inflection where discrete latent variables represent linguistic features (e.g. tense, part-of-speech tag). Yin et al. (2018) proposed a semi-supervised semantic parser. Similarly to our model, they rely on a structured latent variable. However, all of these systems use either categorical random variables or the REINFORCE score estimator. To the best of our knowledge, no previous work used continuous relaxation of a dynamic programming latent variable in the VAE setting.
The main challenge is backpropagation through discrete random variables. Maddison et al. (2017) and Jang et al. (2017) first introduced the Gumbel-Softmax operator for the categorical distribution. There are two issues regarding more complex discrete distributions. Firstly, one have to build a reparametrization of the the sampling process. Papandreou & Yuille (2011) showed that low-order perturbations provide samples of good qualities for graphical models. Secondly, one have to build a good differentiable surrogate to the structured arg max operator. Early work replaced the structured arg max with structured attention (Kim et al., 2017). However, computing the marginals over the parse forest is sensitive to numerical stability outside specific cases like non-projective dependency parsing (Liu & Lapata, 2018; Tran & Bisk, 2018). Mensch & Blondel (2018) proposed a stable algorithm based on dynamic program smoothing. Our approach is highly related but we describe a continuous relaxation using the parsing-as-deduction formalism. Peng et al. (2018) propose to replace the true gradient with a proxy that tries to satisfy constraints on a arg max operator via a projection. However, their approach is computationally expensive, so they remove the tree constraint on dependencies during backpropagation. A parallel line of work focuses on sparse structures that are differentiable (Martins & Astudillo, 2016; Niculae et al., 2018).
# 8 CONCLUSIONS
We presented a novel generative learning approach for semi-supervised dependency parsing. We model the dependency structure of a sentence as a latent variable and build a VAE. We hope to motivate investigation of latent syntactic structures via differentiable dynamic programming in neural networks. Future work includes research for an informative prior for the dependency tree distribution, for example by introducing linguistic knowledge (Naseem et al., 2010; Noji et al., 2016) or with an adversarial training criterion Makhzani et al. (2016). This work could also be extended to the unsupervised scenario.
# ACKNOWLEDGMENTS
We thank Diego Marcheggiani, Wilker Ferreira Aziz and Serhii Havrylov for their comments and suggestions. We thank the anonymous reviewers for their comments. The project was supported by the Dutch National Science Foundation (NWO VIDI 639.022.518) and European Research Council (ERC Starting Grant BroadSem 678254).
# REFERENCES
Anne Abeille, Lionel Cl ´ ement, and Alexandra Kinyon. Building a treebank for french. In ´ Proceedings of the Second International Conference on Language Resources and Evaluation (LREC’00). European Language Resources Association (ELRA), 2000. URL http://www.aclweb. org/anthology/L00-1175.
Zeljko Agi ˇ c, Anders Johannsen, Barbara Plank, H ´ ector Mart ´ ´ınez Alonso, Natalie Schluter, and Anders Søgaard. Multilingual projection for parsing truly low-resource languages. Transactions of the Association for Computational Linguistics, 4:301–312, 2016. URL http://aclweb. org/anthology/Q16-1022.
Rami Al-Rfou, Bryan Perozzi, and Steven Skiena. Polyglot: Distributed word representations for multilingual NLP. In Proceedings of the Seventeenth Conference on Computational Natural Language Learning, pp. 183–192, Sofia, Bulgaria, August 2013. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/W13-3520.
Joost Bastings, Ivan Titov, Wilker Aziz, Diego Marcheggiani, and Khalil Simaan. Graph convolutional encoders for syntax-aware neural machine translation. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1947–1957. Association for Computational Linguistics, 2017. URL http://www.aclweb.org/anthology/ D17-1208.
Samuel R. Bowman, Luke Vilnis, Oriol Vinyals, Andrew Dai, Rafal Jozefowicz, and Samy Bengio. Generating sentences from a continuous space. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pp. 10–21. Association for Computational Linguistics, 2016. doi: 10.18653/v1/K16-1002. URL http://www.aclweb.org/ anthology/K16-1002.
Jiong Cai, Yong Jiang, and Kewei Tu. CRF autoencoder for unsupervised dependency parsing. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1638–1643. Association for Computational Linguistics, 2017. URL http://aclweb.org/ anthology/D17-1171.
Wenliang Chen, Daisuke Kawahara, Kiyotaka Uchimoto, Yujie Zhang, and Hitoshi Isahara. Using short dependency relations from auto-parsed data for chinese dependency parsing. ACM Transactions on Asian Language Information Processing, pp. 10:1–10:20, 2009. ISSN 1530-0226.
Hang Cui, Renxu Sun, Keya Li, Min-Yen Kan, and Tat-Seng Chua. Question answering passage retrieval using dependency relations. In Proceedings of the 28th annual international ACM SIGIR conference on Research and development in information retrieval, pp. 400–407. ACM, 2005.
Aron Culotta and Jeffrey Sorensen. Dependency tree kernels for relation extraction. In Proceedings of the 42nd Annual Meeting of the Association for Computational Linguistics (ACL-04), 2004. URL http://www.aclweb.org/anthology/P04-1054.
Marie-Catherine De Marneffe and Christopher D Manning. Stanford typed dependencies manual. Technical report, Technical report, Stanford University, 2008.
Yuan Ding and Martha Palmer. Machine translation using probabilistic synchronous dependency insertion grammars. In Proceedings of the 43rd Annual Meeting of the Association for Computational Linguistics (ACL’05), pp. 541–548. Association for Computational Linguistics, 2005. URL http://www.aclweb.org/anthology/P05-1067.
Timothy Dozat and Christopher D Manning. Deep biaffine attention for neural dependency parsing. In Proceedings of the 2017 International Conference on Learning Representations, 2017.
Chris Dyer, Miguel Ballesteros, Wang Ling, Austin Matthews, and Noah A. Smith. Transitionbased dependency parsing with stack long short-term memory. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 334–343. Association for Computational Linguistics, 2015. doi: 10.3115/v1/P15-1033. URL http: //www.aclweb.org/anthology/P15-1033.
Jason Eisner. Inside-outside and forward-backward algorithms are just backprop (tutorial paper). In Proceedings of the Workshop on Structured Prediction for NLP, pp. 1–17. Association for Computational Linguistics, 2016. doi: 10.18653/v1/W16-5901. URL http://www.aclweb. org/anthology/W16-5901.
Jason M. Eisner. Three new probabilistic models for dependency parsing: An exploration. In COLING 1996 Volume 1: The 16th International Conference on Computational Linguistics, 1996. URL http://www.aclweb.org/anthology/C96-1058.
Joshua Goodman. Semiring parsing. Computational Linguistics, 25(4), 1999. URL http://www. aclweb.org/anthology/J99-4004.
Kartik Goyal, Chris Dyer, and Taylor Berg-Kirkpatrick. Differentiable scheduled sampling for credit assignment. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 366–371. Association for Computational Linguistics, 2017. doi: 10.18653/v1/P17-2058. URL http://www.aclweb.org/anthology/P17-2058.
Kartik Goyal, Graham Neubig, Chris Dyer, and Taylor Berg-Kirkpatrick. A continuous relaxation of beam search for end-to-end training of neural sequence models. In Thirty-Second AAAI Conference on Artificial Intelligence (AAAI-18), New Orleans, Louisiana, February 2018. URL https://arxiv.org/abs/1708.00111.
Emil Julius Gumbel. Statistical theory of extreme values and some practical applications: a series of lectures. Number 33. US Govt. Print. Office, 1954.
Johan Hall, Joakim Nivre, and Jens Nilsson. Discriminative classifiers for deterministic dependency parsing. In Proceedings of the COLING/ACL 2006 Main Conference Poster Sessions, pp. 316– 323. Association for Computational Linguistics, 2006. URL http://www.aclweb.org/ anthology/P06-2041.
Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. In Proceedings of the 2017 International Conference on Learning Representations, 2017.
Mark Johnson, Stuart Geman, Stephen Canon, Zhiyi Chi, and Stefan Riezler. Estimators for stochastic “unification-based” grammars. In Proceedings of the 37th Annual Meeting of the Association for Computational Linguistics, 1999. URL http://www.aclweb.org/anthology/ P99-1069.
Ronald M Kaplan and Joan Bresnan. Lexical-functional grammar: A formal system for grammatical representation. Formal Issues in Lexical-Functional Grammar, pp. 29–130, 1982.
Daisuke Kawahara and Kiyotaka Uchimoto. Learning reliability of parses for domain adaptation of dependency parsing. In Proceedings of the Third International Joint Conference on Natural Language Processing: Volume-II, 2008. URL http://www.aclweb.org/anthology/ I08-2097.
Yoon Kim, Carl Denton, Luong Hoang, and Alexander M Rush. Structured attention networks. In Proceedings of the 2017 International Conference on Learning Representations, 2017.
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
Diederik P Kingma, Shakir Mohamed, Danilo Jimenez Rezende, and Max Welling. Semi-supervised learning with deep generative models. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 3581–3589. Curran Associates, Inc., 2014. URL http://papers.nips.cc/paper/ 5352-semi-supervised-learning-with-deep-generative-models.pdf.
Eliyahu Kiperwasser and Yoav Goldberg. Simple and accurate dependency parsing using bidirectional LSTM feature representations. Transactions of the Association of Computational Linguistics, 4:313–327, 2016. URL http://www.aclweb.org/anthology/Q16-1023.
Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
Dan Klein and Christopher Manning. Corpus-based induction of syntactic structure: Models of dependency and constituency. In Proceedings of the 42nd Annual Meeting of the Association for Computational Linguistics (ACL-04), 2004. URL http://www.aclweb.org/ anthology/P04-1061.
Toma´s Ko ˇ cisk ˇ y, G ´ abor Melis, Edward Grefenstette, Chris Dyer, Wang Ling, Phil Blunsom, and´ Karl Moritz Hermann. Semantic parsing with semi-supervised sequential autoencoders. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 1078–1087. Association for Computational Linguistics, 2016. doi: 10.18653/v1/D16-1116. URL http://www.aclweb.org/anthology/D16-1116.
Lingpeng Kong, Alexander M. Rush, and Noah A. Smith. Transforming dependencies into phrase structures. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 788–798. Association for Computational Linguistics, 2015. doi: 10.3115/v1/N15-1080. URL http: //www.aclweb.org/anthology/N15-1080.
Terry Koo, Xavier Carreras, and Michael Collins. Simple semi-supervised dependency parsing. In Proceedings of ACL-08: HLT, pp. 595–603. Association for Computational Linguistics, 2008. URL http://www.aclweb.org/anthology/P08-1068.
John Lafferty, Andrew McCallum, and Fernando CN Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the International Conference on Machine Learning, 2001.
Yann A LeCun, Leon Bottou, Genevieve B Orr, and Klaus-Robert M ´ uller. Efficient backprop. In ¨ Neural networks: Tricks of the trade, pp. 9–48. Springer, 2012.
Zhifei Li and Jason Eisner. First- and second-order expectation semirings with applications to minimum-risk training on translation forests. In Proceedings of the 2009 Conference on Empirical Methods in Natural Language Processing, pp. 40–51. Association for Computational Linguistics, 2009. URL http://aclweb.org/anthology/D09-1005.
Wang Ling, Chris Dyer, Alan W Black, and Isabel Trancoso. Two/too simple adaptations of word2vec for syntax problems. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 1299–1304. Association for Computational Linguistics, 2015. doi: 10.3115/v1/N15-1142. URL http://www.aclweb.org/anthology/N15-1142.
Seppo Linnainmaa. Taylor expansion of the accumulated rounding error. BIT Numerical Mathematics, 16(2):146–160, 1976.
Yang Liu and Mirella Lapata. Learning structured text representations. Transactions of the Association for Computational Linguistics, 6:63–75, 2018. URL http://aclweb.org/ anthology/Q18-1005.
Yang Liu, Furu Wei, Sujian Li, Heng Ji, Ming Zhou, and Houfeng WANG. A dependency-based neural network for relation classification. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 2: Short Papers), pp. 285–290. Association for Computational Linguistics, 2015. doi: 10.3115/v1/P15-2047. URL http://www.aclweb.org/anthology/ P15-2047.
Xuezhe Ma and Eduard Hovy. Neural probabilistic model for non-projective mst parsing. In Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 59–69, Taipei, Taiwan, November 2017. Asian Federation of Natural Language Processing. URL http://www.aclweb.org/anthology/I17-1007.
Chris J. Maddison, Daniel Tarlow, and Tom Minka. A\* Sampling. In Advances in Neural Information Processing Systems 27, 2014.
Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables. In International Conference on Learning Representations, 2017.
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. In ICLR 2016 Workshop, International Conference on Learning Representations, 2016.
Diego Marcheggiani and Ivan Titov. Encoding sentences with graph convolutional networks for semantic role labeling. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 1507–1516. Association for Computational Linguistics, 2017. URL http://www.aclweb.org/anthology/D17-1159.
Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993.
Andre Martins and Ramon Astudillo. From softmax to sparsemax: A sparse model of attention and multi-label classification. In International Conference on Machine Learning, pp. 1614–1623, 2016.
David McClosky, Eugene Charniak, and Mark Johnson. Reranking and self-training for parser adaptation. In Proceedings of the 21st International Conference on Computational Linguistics and 44th Annual Meeting of the Association for Computational Linguistics, pp. 337–344. Association for Computational Linguistics, 2006. URL http://www.aclweb.org/anthology/ P06-1043.
Ryan McDonald, Fernando Pereira, Kiril Ribarov, and Jan Hajic. Non-projective dependency parsing using spanning tree algorithms. In Proceedings of Human Language Technology Conference and Conference on Empirical Methods in Natural Language Processing, 2005. URL http://www.aclweb.org/anthology/H05-1066.
Ryan McDonald, Slav Petrov, and Keith Hall. Multi-source transfer of delexicalized dependency parsers. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pp. 62–72. Association for Computational Linguistics, 2011. URL http://www. aclweb.org/anthology/D11-1006.
Arthur Mensch and Mathieu Blondel. Differentiable dynamic programming for structured prediction and attention. In In Proceedings of International Conference on Machine Learning, 2018.
Yishu Miao, Edward Grefenstette, and Phil Blunsom. Discovering discrete latent topics with neural variational inference. In International Conference on Machine Learning, 2017.
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pp. 3111–3119, 2013.
Andriy Mnih and Karol Gregor. Neural variational inference and learning in belief networks. In Proceedings of the 31st International Conference on Machine Learning, 2014.
Tahira Naseem, Harr Chen, Regina Barzilay, and Mark Johnson. Using universal linguistic knowledge to guide grammar induction. In Proceedings of the 2010 Conference on Empirical Methods in Natural Language Processing, pp. 1234–1244. Association for Computational Linguistics, 2010. URL http://www.aclweb.org/anthology/D10-1120.
Graham Neubig, Chris Dyer, Yoav Goldberg, Austin Matthews, Waleed Ammar, Antonios Anastasopoulos, Miguel Ballesteros, David Chiang, Daniel Clothiaux, Trevor Cohn, Kevin Duh, Manaal Faruqui, Cynthia Gan, Dan Garrette, Yangfeng Ji, Lingpeng Kong, Adhiguna Kuncoro, Gaurav Kumar, Chaitanya Malaviya, Paul Michel, Yusuke Oda, Matthew Richardson, Naomi Saphra, Swabha Swayamdipta, and Pengcheng Yin. Dynet: The dynamic neural network toolkit. arXiv preprint arXiv:1701.03980, 2017.
Vlad Niculae, Andre FT Martins, Mathieu Blondel, and Claire Cardie. SparseMAP: Differentiable ´ sparse structured inference. In Proceedings of ICML 2018, 2018.
J. Nivre, J. Nilsson, and J. Hall. Talbanken05: A swedish treebank with phrase structure and dependency annotation. In Proceedings of the Fifth International Conference on Language Resources and Evaluation (LREC’06). European Language Resources Association (ELRA), 2006. URL http://www.aclweb.org/anthology/L06-1121.
Hiroshi Noji, Yusuke Miyao, and Mark Johnson. Using left-corner parsing to encode universal structural constraints in grammar induction. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 33–43. Association for Computational Linguistics, 2016. doi: 10.18653/v1/D16-1004. URL http://www.aclweb.org/anthology/ D16-1004.
George Papandreou and Alan L Yuille. Perturb-and-MAP random fields: Using discrete optimization to learn and sample from energy models. In Computer Vision (ICCV), 2011 IEEE International Conference on, pp. 193–200. IEEE, 2011.
Hao Peng, Sam Thomson, and Noah A. Smith. Backpropagating through structured argmax using a spigot. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1863–1873. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/P18-1173.
Fernando C. N. Pereira and David H. D. Warren. Parsing as deduction. In 21st Annual Meeting of the Association for Computational Linguistics, 1983. URL http://www.aclweb.org/ anthology/P83-1021.
Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 2227–2237. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/N18-1202.
Siva Reddy, Oscar Tackstr ¨ om, Michael Collins, Tom Kwiatkowski, Dipanjan Das, Mark Steedman, ¨ and Mirella Lapata. Transforming dependency structures to logical forms for semantic parsing. Transactions of the Association for Computational Linguistics, 4:127–140, 2016.
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, volume 32 of Proceedings of Machine Learning Research, pp. 1278–1286, Bejing, China, 22–24 Jun 2014. PMLR. URL http://proceedings.mlr. press/v32/rezende14.html.
Kenji Sagae and Jun’ichi Tsujii. Dependency parsing and domain adaptation with lr models and parser ensembles. In Proceedings of the 2007 Joint Conference on Empirical Methods in Natural Language Processing and Computational Natural Language Learning (EMNLP-CoNLL), 2007. URL http://www.aclweb.org/anthology/D07-1111.
Djame Seddah, Reut Tsarfaty, Sandra K ´ ubler, Marie Candito, Jinho D. Choi, Rich ¨ ard Farkas, Jen- ´ nifer Foster, Iakes Goenaga, Koldo Gojenola Galletebeitia, Yoav Goldberg, Spence Green, Nizar Habash, Marco Kuhlmann, Wolfgang Maier, Joakim Nivre, Adam Przepiorkowski, Ryan Roth, ´ Wolfgang Seeker, Yannick Versley, Veronika Vincze, Marcin Wolinski, Alina Wr ´ oblewska, and ´ Eric Villemonte de la Clergerie. Overview of the spmrl 2013 shared task: A cross-framework evaluation of parsing morphologically rich languages. In Proceedings of the Fourth Workshop on Statistical Parsing of Morphologically-Rich Languages, pp. 146–182. Association for Computational Linguistics, 2013. URL http://www.aclweb.org/anthology/W13-4917.
Stuart M Shieber, Yves Schabes, and Fernando CN Pereira. Principles and implementation of deductive parsing. The Journal of logic programming, 24(1-2):3–36, 1995.
David Smith and Jason Eisner. Dependency parsing by belief propagation. In Proceedings of the 2008 Conference on Empirical Methods in Natural Language Processing, pp. 145–156. Association for Computational Linguistics, 2008. URL http://www.aclweb.org/anthology/ D08-1016.
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Z. Ghahramani, M. Welling, C. Cortes, N. D. Lawrence, and K. Q. Weinberger (eds.), Advances in Neural Information Processing Systems 27, pp. 3104–3112. Curran Associates, Inc., 2014. URL http://papers.nips.cc/paper/ 5346-sequence-to-sequence-learning-with-neural-networks.pdf.
Jun Suzuki, Hideki Isozaki, and Masaaki Nagata. Learning condensed feature representations from large unsupervised data sets for supervised learning. In Proceedings of the 49th Annual Meeting of the Association for Computational Linguistics: Human Language Technologies, pp. 636– 641. Association for Computational Linguistics, 2011. URL http://www.aclweb.org/ anthology/P11-2112.
Kai Sheng Tai, Richard Socher, and Christopher D. Manning. Improved semantic representations from tree-structured long short-term memory networks. In Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp. 1556–1566. Association for Computational Linguistics, 2015. doi: 10.3115/v1/P15-1150. URL http://www.aclweb.org/ anthology/P15-1150.
Robert Endre Tarjan. Finding optimum branchings. Networks, 7(1):25–35, 1977.
Ben Taskar, Vassil Chatalbashev, Daphne Koller, and Carlos Guestrin. Learning structured prediction models: A large margin approach. In Proceedings of the 22nd international conference on Machine learning, pp. 896–903. ACM, 2005.
Lucien Tesniere. \` Les el´ ements de Syntaxe structurale ´ . Editions Klincksieck, 1959.
Ke Tran and Yonatan Bisk. Inducing grammars with and for neural machine translation. In Proceedings of the 2nd Workshop on Neural Machine Translation and Generation, pp. 25–35. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/ W18-2704.
Adina Williams, Andrew Drozdov, and Samuel R Bowman. Do latent tree learning models identify meaningful structure in sentences? Transactions of the Association for Computational Linguistics, 6:253–267, 2018.
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
Weidi Xu, Haoze Sun, Chao Deng, and Ying Tan. Variational autoencoder for semi-supervised text classification. In AAAI, pp. 3358–3364, 2017.
Pengcheng Yin, Chunting Zhou, Junxian He, and Graham Neubig. Structvae: Tree-structured latent variable models for semi-supervised semantic parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 754–765. Association for Computational Linguistics, 2018. URL http://aclweb.org/anthology/ P18-1070.
Kun Yu, Daisuke Kawahara, and Sadao Kurohashi. Chinese dependency parsing with large scale automatically constructed case structures. In Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008), pp. 1049–1056. Coling 2008 Organizing Committee, 2008. URL http://www.aclweb.org/anthology/C08-1132.
Matthew D Zeiler. Adadelta: an adaptive learning rate method. arXiv preprint arXiv:1212.5701, 2012.
Chunting Zhou and Graham Neubig. Multi-space variational encoder-decoders for semi-supervised labeled sequence transduction. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 310–320. Association for Computational Linguistics, 2017. doi: 10.18653/v1/P17-1029. URL http://www.aclweb.org/ anthology/P17-1029.
# A REPARAMETRIZATION TRICK
Sampling from a diagonal Gaussian random variable with mean vector $_ { \mathbf { \nabla } } \mathbf { m } _ { \mathbf { \nabla } }$ and variance vector $\pmb { v }$ can be re-expressed as:
$$\begin{array} { l } { e \sim \mathcal { N } ( 0 , 1 ) } \\ { z = m + v \times e } \end{array}$$
where $_ { z }$ is the sample. As such, $\mathbf { \boldsymbol { e } } \sim \mathcal { N } ( \mathbf { \boldsymbol { 0 } } , \mathbf { \boldsymbol { 1 } } )$ is an input of the neural network for which we do not need to compute partial derivatives. This technique is called the reparametrization trick (Kingma & Welling, 2013; Rezende et al., 2014).
# B GUMBEL-MAX TRICK
Sampling from a categorical distributions can be achieved through the Gumbel-Max trick (Gumbel, 1954; Maddison et al., 2014). Randomly generated Gumbel noise is added to the log-probability of every element of the sample space. Then, the sample is simply the element with maximum perturbed log-probability. Let $d \in \triangle ^ { k }$ be a random variable taking values in the corner of the unit-simplex of dimension $k$ with probability:
$$p ( d \in \triangle ^ { k } ) = \frac { \exp ( \pmb { w } ^ { \top } d ) } { \sum _ { d ^ { \prime } \in \triangle ^ { k } } \exp ( \pmb { w } ^ { \top } d ^ { \prime } ) }$$
where $\textbf { \em w }$ is a vector of weights. Sampling $d \sim p ( d )$ can be re-expressed as follows:
$$\begin{array} { l } { \pmb { g } \sim \pmb { \mathcal { G } } ( 0 , 1 ) } \\ { \pmb { d } = \arg \operatorname* { m a x } ( \pmb { w } + \pmb { g } ) ^ { \top } \pmb { d } } \\ { \pmb { d } \in \triangle ^ { k } } \end{array}$$
where $\mathcal { G } ( 0 , 1 )$ is the Gumbel distribution. Sampling $\mathbf { \boldsymbol { \mathscr { g } } } \sim \mathcal { G } ( 0 , 1 )$ is equivalent to setting $g _ { i } =$ $- \log ( - \log u _ { i } ) )$ where $u _ { i } \sim \mathrm { U n i f o r m } ( 0 , 1 )$ . If $\pmb { w }$ is computed by a neural network, the sampling process is outside the backpropagation path.
# C CORPORA
English We use the Stanford Dependency conversion (De Marneffe & Manning, 2008) of the Penn Treebank (Marcus et al., 1993) with the usual section split: 02-21 for training, 22 for development and 23 for testing. In order to simulate our framework under a low-resource setting, the annotation is kept for $1 0 \%$ of the training set only: a labeled sentence is the sentence which has an index (in the training set) modulo 10 equal to zero.
French We use a similar setting with the French Treebank version distributed for the SPMRL 2013 shared task and the provided train/dev/test split (Abeille et al., 2000; Seddah et al., 2013). ´
Swedish We use the Talbanken dataset (Nivre et al., 2006) which contains two written text parts: the professional prose part (P) and the high school students’ essays part (G). We drop the annotation of (G) in order to use this section as unlabeled data. We split the (P) section in labeled train/dev/test using a pseudo-randomized scheme. We follow the splitting scheme of Hall et al. (2006) but fix section 9 as development instead of $k$ -fold cross-validation. Sentence $i$ is allocated to section $i$ mod 10. Then, section 1-8 are used for training, section 9 for dev and section 0 for test.
# D HYPER-PARAMETERS
Encoder: word embeddings We concatenate trainable word embeddings of size 100 with external word embeddings.15 We use the word-dropout settings of Kiperwasser & Goldberg (2016). For English, external embeddings are pre-trained with the structured skip n-gram objective (Ling et al., 2015).16 For French and Swedish, we use the Polyglot embeddings (Al-Rfou et al., 2013).17 We stress out that no part-of-speech tag is used as input in any part of our network.
Encoder: dependency parser The dependency parser is built upon a two-stack BiLSTM with a hidden layer size of 125 (i.e. the output at each position is of size 250). Each dependency is then weighted using a single-layer perceptron with a tanh activation function. Arc label prediction rely on a similar setting, we refer to the reader to Kiperwasser & Goldberg (2016) for more information about the parser’s architecture.
Encoder: sentence embedding The sentence is encoded into a fixed size vector with a simple leftto-right LSTM with an hidden size of 100. The hidden layer at the last position of the sentence is then fed to two distinct single-layer perceptrons, with an output size of 100 followed by a piecewise tanh activation function, that computes means and standard deviations of the diagonal Gaussian distribution.
Decoder The decoder use fixed pre-trained embeddings only. The recurrent layer of the decoder is a LSTM with an hidden layer size of $1 0 0 . ~ \mathrm { M L P } ^ { \sim }$ , ${ \bf M L P } ^ { \curvearrowright }$ and ${ \bf M L P } ^ { \mathrm { O } }$ are all single-layer perceptrons with an output size of 100 and without activation function.
Training We encourage the VAE to rely on latent structures close to the targeted ones by bootstrapping the training procedure with labeled data only. In the first two epochs, we train the network with the discriminative loss only. Then, for the next two epochs, we add the supervised ELBO term (Equation 5). Finally, after the 6th epoch, we also add the unsupervised ELBO term (Equation 3). We train our network using stochastic gradient descent for 30 epochs using Adadelta (Zeiler, 2012) with default parameters as provided by the Dynet library (Neubig et al., 2017). In the semisupervised scenario, we alternate between labeled and unlabeled instances. The temperature of the PEAKED-SOFTMAX operator is fixed to $\tau = 1$ .
# E COMPARISON WITH SEMIRING PARSING
Dynamic programs for parsing have been studied as abstract algorithms that can be instantiated with different semirings (Goodman, 1999). For example, computing the weight of the best parse relies on the $\langle \mathbb { R } , \operatorname* { m a x } , + \rangle$ semiring. This semiring can be augmented with set-valued operations to retrieve the best derivation. However, a straightforward implementation would have a $\hat { \mathcal { O } } ( n ^ { 5 } )$ space complexity: for each item in the chart, we also need to store the set of arcs. Under this formalism, the backpointer trick is a method to implicitly constructs these sets and maintain the optimal $\mathcal { O } ( n ^ { 3 } )$ complexity. Our continuous relaxation replaces the max operator with a smooth surrogate and the set values with a soft-selection of sets. Unfortunately, $\langle \mathbb { R }$ , PEAKED-SOFTMAXi is not a commutative monoid, therefore the semiring analogy is not transposable.
# F DIFFERENTIABLE DYNAMIC PROGRAMMING FOR PROJECTIVEDEPENDENCY PARSING
We describe how we can embed a continuous relaxation of projective dependency parsing as a node in a neural network. During the forward pass, we are given arc weights $W$ and we compute the relaxed projective dependency tree $_ { \mathbf { T } }$ that maximize the arc-factored weight $\begin{array} { r } { \sum _ { h , m } T _ { h , m } \times \bar { W _ { h , m } } } \end{array}$ . Each output variable $T _ { h , m } \in [ 0 , 1 ]$ is a soft selection of dependency with head-word $s _ { h }$ and modifier $s _ { m }$ . During back-propagation, we are given partial derivatives of the loss with respect to each arc and we compute the ones with respect to arc weights:
$$\frac { \partial \mathcal { L } } { \partial W _ { h , m } } = \sum _ { i , j } \frac { \partial \mathcal { L } } { \partial T _ { i , j } } \frac { \partial T _ { i , j } } { \partial W _ { h , m } }$$
Note that the Jacobian matrix has $\mathcal { O } ( n ^ { 4 } )$ values but we do need to explicitly compute it. The space and time complexity of the forward and backward passes are both cubic, similar to Eisner’s algorithm.
# F.1 FORWARD PASS
The forward pass is a two step algorithm:
1. First, we compute the cumulative weight of each item and store soft backpointers to keep track of contribution of antecedents. This step is commonly called to inside algorithm. 2. Then, we compute the contribution of each arc thanks to the backpointers. This step is somewhat similar to the arg max reconstruction algorithm.
The outline of the algorithm is given in Algorithm 3.
The inside algorithm computes the following variables:
• $a [ i \triangleright j ] [ k ]$ is the weight of item $[ i \triangleright j ]$ if we split its antecedent at $k$ . • $b [ i \triangleright j ] [ k ]$ is the soft backpointer to antecedents of item $[ i \triangleright j ]$ with split at $k$ . • $c [ i \triangleright j ]$ is the cumulative weight of item $[ i \triangleright j ]$ .
and similarly for the other chart values. The algorithm is given in Algorithm 5.
The backpointer reconstruction algorithm compute the contribution of each arc. We follow backpointers in reverse order in order to compute the contribution of each item $\tilde { c } [ i \triangleright j ]$ . The algorithm is given in Algorithm 6.
# F.2 BACKWARD PASS
During the backward pass, we compute the partial derivatives of variables using the chain rule, i.e. in the reverse order of their creation: we first run backpropagation through the backpointer reconstruction algorithm and then through the inside algorithm (see Algorithm 4). Given the partial derivatives in Figure 3, backpropagation through the backpointer reconstruction algorithm is straighforward to compute, see Algorithm 7. Partial derivatives of the inside algorithm’s variables are given in Figure 4.
<table><tr><td>Algorithm3Forward algorithm</td></tr><tr><td>function RELAXED-EISNER(</td></tr><tr><td>INSIDE()</td></tr><tr><td>BACKPTRO</td></tr><tr><td></td></tr><tr><td>fori=O...ndo for j=1...n do</td></tr><tr><td>if i<jthen</td></tr><tr><td>Ti,j←ci口j]</td></tr><tr><td>else if j<ithen Ti,j←i□j</td></tr></table>
<table><tr><td>Algorithm4Backward algorithm</td></tr><tr><td>function BACKPROP-RELAXED-EISNER()</td></tr><tr><td>BACKPROP-BACKPTR()</td></tr><tr><td>BACKPROP-INSIDE(</td></tr><tr><td></td></tr><tr><td>fori=O...ndo for j=1...n do</td></tr><tr><td>ifi<jthen</td></tr><tr><td>8L 8L ↑</td></tr><tr><td>Wi,j dc[iDj else if j<ithen</td></tr><tr><td>Algorithm 5 Inside algorithm - Forward pass</td></tr><tr><td>function INSIDE(n)</td></tr><tr><td>fori←O...ndo</td></tr><tr><td>c[𝑖△i]←O,c[i△i]←O,c[i△i]←O,c[ii]←0</td></tr><tr><td>forl←1...ndo</td></tr><tr><td>fori←O...n-ldo j←i+l</td></tr><tr><td>for k=i...j-1do</td></tr><tr><td>a[𝑖j][k]←c[𝑖△k]+c[k+1△j]</td></tr><tr><td>b[ij] ← softmax(a[i j])</td></tr><tr><td>c[iDj]←Wi,j +∑k=i.j-1b[iDj][]× a[ Dj][]</td></tr><tr><td>fork=i...j-1do</td></tr><tr><td>a[ij][k]←c[𝑖△k]+c[k+1△j] b[ij] ← softmax(a[ijl)</td></tr><tr><td>c[i□j]←Wj,i+∑k=i.j-1b[i △j][k] × a[i j][k]</td></tr><tr><td>for k=i+1...j do</td></tr><tr><td>a[i△j][k]←c[𝑖△k]+c[k△j]</td></tr><tr><td>b[i j] ← softmax(a[i jl)</td></tr><tr><td>c[i△j]←∑k=i+1.,jb[𝑖△j][k] × a[i△ j][k]</td></tr><tr><td></td></tr><tr><td>fork=i...j-1do</td></tr><tr><td>a[i △j][k]←c[𝑖△k]+c[kj] b[i △ j] ← softmax(a[i △ jl)</td></tr><tr><td>c[i△j]←∑k=i..j-1b[i △j][k]×a[i △j[k]</td></tr><tr><td>Algorithm 6 Backpointer reconstruction algorithm - Forward pass</td></tr><tr><td>function BACKPTR()</td></tr><tr><td>fori=O...ndo</td></tr><tr><td>forj=i...n do c[𝑖□j]←0,c[𝑖△j]←0,c[𝑖△j]←0,c[𝑖△j]←0</td></tr><tr><td>c[0△n]←1</td></tr><tr><td>forl=n...1do</td></tr><tr><td>fori=O...n-ldo</td></tr><tr><td>j←i+l</td></tr><tr><td>for k=i+1...j do</td></tr><tr><td>[ik][i△j]×b[i△j[]</td></tr><tr><td>[k△j]↑c[i△j]×b[i△j][]</td></tr><tr><td>for k=i...j-1 do</td></tr><tr><td>c[i△k]←c[i△j]×b[i△j][k]</td></tr><tr><td>[k△j]↑[i△j]×b[i△j[k]</td></tr><tr><td></td></tr><tr><td>for k=i...j-1 do [i△k]←[ij]×b[ij][k]</td></tr><tr><td>c[k+1△j]↑c[ij]×6[ij][k]</td></tr><tr><td></td></tr><tr><td>for k =i...j-1 do</td></tr><tr><td>[i△k]←[ij]×b[ij][k]</td></tr><tr><td>[k+1△j]←[ij]×b[𝑖j][]</td></tr></table>
$$\begin{array} { r l r l r l r l } & { \langle \Psi | \le K \le \xi \ge \frac { 1 } { 2 } ; } & & { \frac { \partial \langle \Psi | \le R \vec { \xi } \perp \vec { K } \_ j \big | } { \partial \xi } = b | \le \ \sqrt { \xi } , } & & { \forall \xi \le \ k \le \ j : } & & { \frac { \partial \langle \Psi | \le R \vec { \xi } \perp \vec { K } \_ j \big | } { \partial \xi } = c | \mathrm { t s } \cdot \ b | \le \vec { \xi } \big | } \\ & { \langle \Psi | \le K \le \xi \ge \frac { 1 } { 2 } ; } & & { \frac { \partial \langle \Psi | \cdot K \vec { \xi } \_ j \big | } { \partial \xi } - b | \sqrt { \xi } \big | \sqrt { \xi } \quad , } & & { \forall \xi \le \ k \le \ j : } & & { \frac { \partial \langle \Psi | \cdot K \vec { \xi } \_ j \big | } { \partial \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | } \\ & { \langle \Psi | \le K \le \xi \le \frac { 1 } { 2 } ; } & & { \frac { \partial \langle \Psi | \le R \vec { \xi } \_ j \big | } { \partial \xi } \big | \frac { 1 } { \partial \xi } \big | \frac { 1 } { \partial \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | \sqrt { \xi } \big | \xi \big | \xi \big | \xi \big | , } & & { \forall \xi \le \ k \le \ j \ } & & { \frac { \partial \langle \Psi | \cdot K \vec { \xi } \_ j \big | } { \partial \xi } \big | \sqrt { \xi } \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | } \\ & { \langle \Psi | \le K \le \xi \le \frac { 1 } { 2 } ; } & & \frac { \partial \langle \Psi | \cdot K \vec { \xi } \_ j \big | } { \partial \xi } \big | \frac { 1 } { \partial \xi } \big | \frac { 1 } { \partial \xi } \big | \sqrt { \xi } \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \xi \xi \xi \xi \xi \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \big | \xi \end{array}$$
<table><tr><td>Algorithm 7 Backpointer reconstruction algorithm - Backward pass</td><td></td></tr><tr><td>function BACKPROP-BACKPTR(n) for l=1...ndo</td><td></td></tr><tr><td>fori=O...n-ldo</td><td></td></tr><tr><td>j↑i+l</td><td></td></tr><tr><td>aL aL</td><td>3L 8 ↑ 0, ↑ 0, ↑0</td></tr><tr><td>0, dj dc[ij] fork=i...j-1do</td><td>i dcij</td></tr><tr><td>aL 仁 aL</td><td>6ij][]+ aL 6[ij][]</td></tr><tr><td>dii d[iK] 8L aL ↑</td><td>dc[k+14j] ci□j]+ 8 ci□j</td></tr><tr><td>6[ij][] i]</td><td>ac[k+14j]</td></tr><tr><td>fork=i...j-1do</td><td></td></tr><tr><td>8L 土 aL</td><td>6[i□j][]+ aL</td></tr><tr><td>Dj] aL 8L ↑</td><td>k] dc[k+1j] 8L</td></tr><tr><td>6[j][]</td><td>iDj+ C[iDj] ] dc[k+14j]</td></tr><tr><td></td><td></td></tr><tr><td>for=i...j-1do aL 仁 8L</td><td></td></tr><tr><td>diAj ac[ik]</td><td>6[i△j][]+ aL 6[i△j][] kj</td></tr><tr><td>8 ab[ij][k] 个</td><td>a i△j]+ 8 i△j]</td></tr><tr><td></td><td>dciZk] ci</td></tr><tr><td></td><td></td></tr><tr><td>for=i+1...j do</td><td></td></tr><tr><td>aL ↑</td><td>aL aL</td></tr><tr><td>j]</td><td>bi△j][k]+ 6[ij][]</td></tr><tr><td></td><td>dc[ik] d[i]</td></tr><tr><td>aL</td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td>aL cij]</td></tr><tr><td></td><td>ij+ 8</td></tr><tr><td></td><td></td></tr><tr><td>6[ij][]</td><td>ik]</td></tr><tr><td></td><td>dkj</td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr><tr><td></td><td></td></tr></table>
$$\begin{array} { r l r l } & { \mathrm { ~ w h e r e a g e ~ \_ t h ~ } } & { \frac { \mathrm { S u b s i n g ~ i n g ~ 1 } } { \mathrm { S u b s i n g ~ 1 } } } & { \quad \forall i \in \Sigma \setminus \Omega _ { \theta } } & { \frac { \mathrm { S u b s i n g ~ 1 } } { \mathrm { S u b s i n g ~ 1 } } } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \times \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \times \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \times \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \end{array}$$
Algorithm 8 Inside algorithm - Backward pass
function BACKPROP-INSIDE(n)
$$\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial c [ i \mathcal { L } j ] } 0 , \frac { \partial \mathcal { L } } { \partial c [ i \triangleright j ] } 0 , \frac { \partial \mathcal { L } } { \partial c [ i \mathcal { L } j ] } 0 , \frac { \partial \mathcal { L } } { \partial c [ i \triangleright j ] } 0 } \end{array}$$
do $\triangleright$ Backpropagation through the ”inside” algorithm $i = 0 \dots n - l$ do $j \gets i + l$ for $k = i \dots j - 1$ $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial b [ i \mathcal { A } j ] [ k ] } \^ { } - \frac { \partial \mathcal { L } } { \partial c [ i \mathcal { A } j ] } a [ i \mathcal { A } j ] [ k ] } \end{array}$ $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial a [ i \mathcal { A } j ] [ k ] } \frac { \partial \mathcal { L } } { \partial c [ i \mathcal { A } j ] } b [ i \mathcal { A } j ] [ k ] } \end{array}$ s = Pk=i...j−1 ∂L∂b[i j][k ] b[i j][k] . Backpropagate through the softmax function for k = i . . . j − 1 do ∂L∂a[i j][k] ← b[i j][k] ∂L∂b[i j][k] − s for $k = i \dots j - 1$ do ∂L +← ∂L ∂c[i k] ∂a[i j][k] $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial c [ k \varTheta _ { j } ] } \stackrel { + } { } \frac { \partial \mathcal { L } } { \partial a [ i \varTheta _ { j } ] [ k ] } } \end{array}$ for $k = i + 1 \ldots j$ do∂L $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial b [ i \triangleright j ] [ k ] } \frac { \partial \mathcal { L } } { \partial c [ i \triangleright j ] } a [ i \triangleright j ] [ k ] } \end{array}$ $\begin{array} { r } { \frac { \partial \mathcal { L } } { a [ i \triangleright j ] [ k ] } \frac { \partial \mathcal { L } } { \partial c [ i \triangleright j ] } { \partial b [ i \triangleright j ] [ k ] } } \end{array}$ s = Pk=i+1...j ∂L∂b[i j][k] b . Backpropagate through the softmax function for $k = i + 1 \dots j$ do for $\begin{array} { r l } & { \frac { \partial \mathcal { L } } { \partial a [ i \triangleright j ] [ k ] } b [ i \triangleright j ] [ k ] ( \frac { \partial \mathcal { L } } { \partial b [ i \triangleright j ] [ k ] } - s ) } \\ & { k = i + 1 \ldots j \bf { d o } } \\ & { \frac { \partial \mathcal { L } } { \partial c [ i \triangleright k ] } \frac { \partial \mathcal { L } } { \partial a [ i \triangleright j ] [ k ] } } \\ & { \frac { \partial \mathcal { L } } { \partial c [ k \triangleright j ] } \frac { \partial \mathcal { L } } { \partial a [ i \triangleright j ] [ k ] } } \end{array}$ $\begin{array} { r l } & { \begin{array} { r l } & { \mathrm { f o r ~ } k = i , \ldots , j - 1 \mathrm { ~ d o } } \\ & { \frac { \partial b ( k ) } { \partial a ( k ^ { 2 } ) [ k ] } \in - \frac { \partial C } { \partial ( k ^ { 2 } ) [ k ] } a [ i \coth ] } \\ & { \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } \in - \frac { \partial C } { \partial ( k ^ { 2 } ) [ k ] } b [ i \coth ] } \end{array} } \\ & { \begin{array} { r l } & { \mathrm { S ~ a c k ~ } } \\ & { \mathrm { f o r ~ } k = i , \ldots , j - 1 \frac { \partial C } { \partial ( k ^ { 2 } ) [ k ] } b [ i \coth ] } \\ & { \mathrm { f o r ~ } k = i , \ldots , j - 1 \mathrm { ~ d o } } \\ & { \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } b [ i \coth ] [ k ] ( \frac { \partial C } { \partial b [ k ^ { 2 } ] [ k ] } - s ) } \end{array} } \\ & { \begin{array} { r l } & { \mathrm { f o r ~ } k = i , \ldots , j - 1 \mathrm { ~ d o } } \\ & { \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } \in - b [ i \coth ] [ k ] ( \frac { \partial C } { \partial ( k ^ { 2 } ) [ k ] } - s ) } \end{array} } \\ & { \begin{array} { r l } & { \mathrm { f o r ~ } k = i , \ldots , j - 1 \mathrm { ~ d o } } \\ & { \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } \neq \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } } \\ & { \frac { \partial C } { \partial c [ k \coth ] } \neq \frac { \partial C } { \partial a ( k ^ { 2 } ) [ k ] } } \end{array} } \end{array}$ for $k = i \dots j - 1$ do $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial b [ i \sum j ] [ k ] } \frac { \partial \mathcal { L } } { \partial c [ i \sum j ] } a [ i \triangleright j ] [ k ] } \end{array}$ ← ∂L∂c[i j] a[i j][k] $\begin{array} { r } { \frac { \partial \mathcal { L } } { \partial a [ i \sum j ] [ k ] } \frac { \partial \mathcal { L } } { \partial c [ i \sum j ] } b [ i \triangleright j ] [ k ] } \end{array}$ $\begin{array} { r } { s = \sum _ { k = i \dots j - 1 } \frac { \partial \mathcal { L } } { \partial b [ i \sum j ] [ k ] } b [ i \triangleright j ] [ k ] } \end{array}$ . Backpropagate through the softmax function for k = i . . . j − 1 do ∂L∂a[i j][k] ← b[i j][k] ∂L∂b[i j][k] − s for k = i . . . j − 1 do ∂L +← ∂L ∂c[i k]∂L ∂a[i j][k]+ ∂L 24 ∂c[k+1 j] ∂a[i j][k]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193# FEATURE-MAP-LEVEL ONLINE ADVERSARIAL KNOWLEDGE DISTILLATION
Anonymous authors Paper under double-blind review
# ABSTRACT
Feature maps contain rich information about image intensity and spatial correlation. However, previous online knowledge distillation methods only utilize the class probabilities. Thus in this paper, we propose an online knowledge distillation method that transfers not only the knowledge of the class probabilities but also that of the feature map using the adversarial training framework. We train multiple networks simultaneously by employing discriminators to distinguish the feature map distributions of different networks. Each network has its corresponding discriminator which discriminates the feature map from its own as fake while classifying that of the other network as real. By training a network to fool the corresponding discriminator, it can learn the other network’s feature map distribution. Discriminators and networks are trained concurrently in a minimax twoplayer game. Also, we propose a novel cyclic learning scheme for training more than two networks together. We have applied our method to various network architectures on the classification task and discovered a significant improvement of performance especially in the case of training a pair of a small network and a large one.
# 1 INTRODUCTION
With the advent of Alexnet (Krizhevsky et al., 2012), deep convolution neural networks have achieved remarkable success in a variety of computer vision tasks. However, high-performance of deep neural network is often gained by increasing the depth or the width of a network. Deep and wide networks cost a large number of computation as well as memory storage which is not suitable for a resource-limited environment such as mobile or embedded systems. To overcome this issue, many researches have been conducted to develop smaller but accurate neural networks. Some of the well-known methods in this line of research are parameter quantization or binarization (Rastegari et al., 2016), pruning (Li et al., 2016) and knowledge distillation (KD) (Hinton et al., 2015).
KD has been an active area of research as a solution to improve the performance of a light-weight network by transferring the knowledge of a large pre-trained network (or an ensemble of small networks) as a teacher network. KD sets the teacher network’s class probabilities as a target which a small student network tries to mimic. By aligning the student’s predictions to those of the teacher, the student can improve its performance. Recently, some studies have shown that rather than using a pretrained teacher, simultaneously training networks to learn from each other in a peer-teaching manner is also possible. This approach is called online distillation. Deep mutual learning (DML) (Zhang et al., 2018) and on-the-fly native ensemble (ONE) (Lan et al., 2018) are the representative online distillation methods that show appealing results in the image classification tasks. Conventional distillation method requires pre-training a powerful teacher network and performs an one-way transfer to a relatively small and untrained student network. On the other hand, in online mutual distillation, there is no specific teacher-student role. All the student networks learn simultaneously by teaching each other from the start of training. It trains with the conventional cross-entropy loss from the ground truth label along with the mimicry loss to learn from its peers. Networks trained in such an online distillation way achieve results superior not only to the networks trained with the cross-entropy loss alone but also to those trained in conventional offline distillation manner from a pre-trained teacher network.
 Figure 1: The concept of online Adversarial Feature map Distillation (AFD) Each point represents a feature map for the corresponding input denoted by different colors. The thin line arrow indicates the evolvement of feature map data points as iteration goes on and the broader arrow indicates the way each method compares the feature maps from different networks. (a) In direct feature map alignment, networks are trained such that the distance between each pair of points with the same color is minimized. (b) In AFD, the discriminators contain information on feature map distributions and thus the networks are trained such that the distributions match. (best viewed in color)
However, aforementioned online distillation methods make use of only the logit information. While the logit contains the probabilistic information over classes, the feature map, the output of convolution layer, has more meaningful and abundant feature information on image intensity and spatial correlation. In offline distillation which utilizes a pre-trained model as a teacher network, many methods such as FitNet (Romero et al., 2014), attention transfer (AT) (Zagoruyko & Komodakis, 2016a) and factor transfer (FT) (Kim et al., 2018) make use of this intermediate feature representation as a target to learn for the student network, but in online distillation, to the best of our knowledge, no feature map-based knowledge distillation method has been proposed.
This is due to some challenges. Unlike the offline methods that have a clear target to mimic, there is no static target to follow in an online method. At every training iteration, the feature maps of the co-trained network change, thus in online feature map-level distillation, the problem turns into mimicking the moving target properly. While each node of the logit is confined to represent its assigned class probability which does not change drastically over iterations, at the feature map-level, much more flexibility comes into play, which makes the problem more challenging. Therefore, the direct aligning method such as using L1 or L2 distance is not suitable for online mutual feature map distillation because it updates the network parameters to generate a feature map that tries to mimic the current output feature map of the other network. In other words, the direct alignment method only tries to minimize the distance between the two feature map points (one for each network), hence it ignores the distributional difference between the two feature maps (Fig. 1(a)).
To alleviate this problem, in this paper, we propose a novel online distillation method that transfers the knowledge of feature maps adversarially as well as a cyclic learning framework for training more than two networks simultaneously. Unlike the direct aligning method, our adversarial distillation method enables a network to learn the overall feature map distribution of the co-trained network (Fig. 1(b)). Since the discriminator is trained to distinguish the difference between the networks’ feature map distributions (containing the history of feature maps for different input images) at every training iteration, by fooling the discriminator, the network learns the co-trained network’s changing feature map distribution. Exchanging the knowledge of feature map distribution facilitates the networks to converge to a better feature map manifold that generalizes better and yields more accurate results.
Our method consists of two major losses: 1) logit-based loss and 2) feature map-based loss. Logitbased loss is defined by two different loss terms which are conventional cross-entropy (CE) loss and the mutual distillation loss using the Kullback-Leibler divergence (KLD). Our newly proposed feature map-based loss is to distill the feature map indirectly via discriminators. We use the feature map from the last convolution layer since deeper convolution layer generates more meaningful features with a high-level abstraction (Kim et al., 2018). The adversarial training scheme of generative adversarial networks (GAN) (Goodfellow et al., 2014) is utilized to transfer the knowledge at feature map-level.
The contributions of this paper can be summarized as follows: 1) we propose an online knowledge distillation method that utilizes not only the logit but also the feature map from the convolution layer. 2) Our method transfers the knowledge of feature maps not by directly aligning them using
the distance loss but by learning their distributions using the adversarial training via discriminators. 3) We propose a novel cyclic learning scheme for training more than two networks simultaneously.
# 2 RELATED WORK
The idea of model compression by transferring the knowledge of a high performing model to a smaller model was originally proposed by Bucilua et al. (2006). Then in recent years, this research ˇ area got invigorated due to the work of knowledge distillation (KD) by Hinton et al. (2015). The main contribution of KD is to use the softened logit of pre-trained teacher network that has higher entropy as an extra supervision to train a student network. KD trains a compact student network to learn not only by the conventional CE loss subjected to the labeled data but also by the final outputs of the teacher network. While KD only utilizes the logit, method such as FitNet (Romero et al., 2014), AT (Zagoruyko & Komodakis, 2016a), FT (Kim et al., 2018) and KTAN (Liu et al., 2018) use the intermediate feature representation to transfer the knowledge of a teacher network.
Online Knowledge Distillation: Conventional offline methods require training a teacher model in advance while online methods do not require any pre-trained model. Instead, the networks teach each other mutually by sharing their knowledge throughout the training process. Some examples of recent online methods are DML (Zhang et al., 2018) and ONE (Lan et al., 2018) which demonstrate promising results. DML simply applies KD losses mutually, treating each other as teachers, and it achieves results that is even better than the offline KD method. The drawback of DML is that it lacks an appropriate teacher role, hence provides only limited information to each network. ONE pointed out this defect of DML. Rather than mutually distilling between the networks, ONE generates a gated ensemble logit of the training networks and uses it as a target to align for each network. ONE tries to create a powerful teacher logit that can provide more generalized information. The flaw of ONE is that it can not train different network architectures at the same time due to its architecture of sharing the low-level layers for the gating module. The common limitation of existing online methods is that they are dependent only on the logit and do not make any use of the feature map information. Considering that KD loss term is only applicable to the classification task, transferring knowledge at feature map-level can enlarge the applicability to other tasks. Therefore, our method proposes a distillation method that utilizes not only the logit but also the feature map via adversarial training, moreover, our method can be applied in case where the co-trained networks have different architectures.
Generative Adversarial Network (GAN): GAN (Goodfellow et al., 2014) is a generative model framework that is proposed with an adversarial training scheme, using a generator network $G$ and a discriminator network $D$ . $G$ learns to generate the real data distribution while $D$ is trained to distinguish the real samples of the dataset from the fake results generated by $G$ . The goal of $G$ is to trick $D$ to make a mistake of determining the fake results as the real samples. Though it was initially proposed for generative models, its adversarial training scheme is not limited to data generation. Adversarial training has been adapted to various tasks such as image translation (Isola et al., 2017; Zhu et al., 2017), captioning (Dai et al., 2017), semi-supervised learning (Miyato et al., 2016; Springenberg, 2015), reinforcement learning (Pfau & Vinyals, 2016), and many others. In this paper, we utilize GAN’s adversarial training strategy to transfer the knowledge at feature map-level in an online manner. The networks learn the other networks’ feature map distributions by trying to deceive the discriminators while the discriminators are trained to distinguish the different distributions of each network.
# 3 PROPOSED METHOD
In this section, we describe the overall process of our proposed Online Adversarial Feature map Distillation (AFD). As can be seen in Figure 2, when training two different networks, $\Theta _ { 1 }$ and $\Theta _ { 2 }$ , in an online manner, we employ two discriminators, $D _ { 1 }$ and $D _ { 2 }$ . We train $D _ { 1 }$ such that the feature map of $\Theta _ { 2 }$ is regarded as a real and that of $\Theta _ { 1 }$ is classified as a fake and do vice versa for discriminator $D _ { 2 }$ . Then, each network $\Theta _ { 1 }$ and $\Theta _ { 2 }$ are trained to fool its corresponding discriminator so that it can generate a feature map that mimics the other network’s feature map. Throughout this adversarial training, each network learns the feature map distribution of the other network. By exploiting both logit-based distillation loss and feature map-based adversarial loss together, we could observe a significant improvement of performance in various pairs of network architectures especially when training small and large networks together. Also we introduce a cyclic learning scheme for training more than two networks simultaneously. It reduces the number of required discriminators from $2 \times _ { 2 } C _ { K }$ (when employing discriminators bidirectionally between every network pairs.) to $K$ where $K$ is the number of networks participating. This cyclic learning framework not only requires less computation than the bidirectional way but also achieves better results compared to other online training schemes for multiple networks.
 Figure 2: Overall schematic of online adversarial feature map distillation (AFD). At feature maplevel, each network is trained to deceive the corresponding discriminator so that it can mimic the other network’s feature map distribution. While at logit-level, KL loss to learn the peer network’s logit is applied as well as the conventional CE loss.
First, we explain the conventional mutual knowledge distillation method conducted among the networks at the logit-level. Then we introduce our novel online feature map distillation method using the adversarial training scheme in addition to the cyclic learning framework for training more than two networks at the same time.
# 3.1 LOGIT-BASED MUTUAL KNOWLEDGE DISTILLATION
We use two loss terms for logit-based learning, one is the conventional cross-entropy(CE) loss and the other is mutual distillation loss between networks based on Kullback Leibler(KL) divergence. We formulate our proposed method assuming training two networks. Training scheme for more than two networks will be explained in Sec 3.3. Below is the overall logit-based loss for two networks:
$$\begin{array} { r l } & { \mathcal { L } _ { l o g i t } ^ { 1 } = \mathcal { L } _ { c e } ( y , \sigma ( z _ { 1 } ) ) + T ^ { 2 } \times \mathcal { L } _ { k l } ( \sigma ( z _ { 2 } / T ) , \sigma ( z _ { 1 } / T ) ) } \\ & { \mathcal { L } _ { l o g i t } ^ { 2 } = \mathcal { L } _ { c e } ( y , \sigma ( z _ { 2 } ) ) + T ^ { 2 } \times \mathcal { L } _ { k l } ( \sigma ( z _ { 1 } / T ) , \sigma ( z _ { 2 } / T ) ) . } \end{array}$$
Here, $\sigma ( \cdot )$ refers to softmax function and $z \in \mathbb { R } ^ { C }$ is the logit produced from a network for $C$ - class classification problem. The temperature term $T$ is used to control the level of smoothness in probabilities. As the temperature term $T$ goes up, it creates a more softened probability distribution. We use $T = 3$ for every experiment. $\mathcal { L } _ { c e }$ is the CE loss between the ground truth label $y$ and the softmax output $\sigma ( z )$ that is commonly used in image classification. $\mathcal { L } _ { k l }$ is the KL loss between the softened logit of each network. We multiply the KL loss term with $T ^ { 2 }$ because the gradients produced by the soft targets are scaled by $1 / \dot { T } ^ { 2 }$ . While the CE loss is between the correct labels and the outputs of the model, the KL loss is the KL distance between the outputs of two training networks. The KL loss provides an extra information from the peer network so that the network can improve its generalization performance. The difference with DML is that while DML updates asynchronously which means that it updates one network first and then the other network, our AFD updates the networks synchronously, not alternatingly. The CE loss trains the networks to predict the correct truth label while the mutual distillation loss tries to match the outputs of the peer-networks, enabling the networks to share the knowledge at logit-level.
# .2 FEATURE MAP-BASED LEARNING VIA ADVERSARIAL TRAINING
Our AFD uses adversarial training to transfer knowledge at feature map-level. We formulate our adversarial feature map distillation for two networks which will be extended for more networks later. We divide a network into two parts, one is the feature extractor part that generates a feature map and the other is the classifier part that transforms the feature map into a logit. Each network also has a corresponding discriminator which distinguishes different feature map distributions. The architecture of the discriminator is simply a series of Conv-Batch Normalization-Leaky ReLU-Conv-Sigmoid. It takes a feature map of the last layer and it reduces the spatial size and the number of channel of the feature map as it goes through the convolution operation so that it can produce a single scalar value. Then we apply the sigmoid function of the value to normalize it between 0 and 1.
We utilize the feature extractor part to enable feature map-level distillation. For the convenience of mathematical notation, we name the feature extractor part as $G _ { k }$ and its discriminator as $D _ { k }$ , $k$ indicates the network number. As depicted in Figure 2, each network has to fool its discriminator to mimic the peer network’s feature map and the discriminator has to discriminate from which network the feature map is originated. Following LSGAN (Mao et al., 2017), our overall adversarial loss for discriminator and the feature extractor can be written as below:
$$\begin{array} { r l } & { \mathcal { L } _ { D _ { 1 } } = [ 1 - D _ { 1 } ( G _ { 2 } ( x ) ) ] ^ { 2 } + [ D _ { 1 } ( G _ { 1 } ( x ) ) ] ^ { 2 } } \\ & { } \\ & { \mathcal { L } _ { G _ { 1 } } = [ 1 - D _ { 1 } ( G _ { 1 } ( x ) ) ] ^ { 2 } . } \end{array}$$
The feature extractors $G _ { 1 }$ and $G _ { 2 }$ take input $x$ and generate feature maps. The discriminator $D _ { 1 }$ takes a feature map and yields a scalar between 0 (fake) and 1 (real). It is trained to output 1 if the feature map came from the co-trained network (in this case, $G _ { 2 }$ ) or 0 if the feature map is produced from the network it belongs to ( $G _ { 1 }$ in this case). The goal of $D _ { 1 }$ is to minimize the discriminator loss term $\mathcal { L } _ { D 1 }$ by correctly distinguishing the two different feature map distributions while $G _ { 1 }$ ’s goal is to minimize the loss term ${ \mathcal L } _ { G _ { 1 } }$ by fooling $D _ { 1 }$ to make mistake of determining $G _ { 1 }$ ’s feature map as real and yield 1. Each training network’s object is to minimize $\mathcal { L } _ { G _ { k } }$ to mimic the peer network’s feature map distribution. This adversarial scheme works exactly the same by changing the role of two networks.
In case where the two networks’ feature map outputs have different channel sizes, for example a pair like (WRN-16-2, WRN-16-4) (Zagoruyko & Komodakis, 2016b), we use a transfer layer that is composed of a convolution layer, a batch normalization and a ReLU which converts the number of channels to that of peer network. The above loss terms change as ${ \mathcal { L } } _ { D _ { 1 } } = [ 1 - D _ { 1 } ( T _ { 2 } ( G _ { 2 } ( x ) ) ) ] ^ { 2 } +$ $[ D _ { 1 } ( T _ { 1 } ( G _ { 1 } ( x ) ) ) ] ^ { 2 }$ and $\mathcal { L } _ { G _ { 1 } } = [ 1 - D _ { 1 } ( T _ { 1 } ( G _ { 1 } ( x ) ) ) ] ^ { 2 }$ when using the transfer layer $T _ { k }$ .
Optimization: Combining both logit-based loss and the adversarial feature map-based loss, the overall loss for each network $\Theta _ { 1 }$ and $\Theta _ { 2 }$ are as follows:
$$\mathcal { L } _ { \Theta _ { 1 } } = \mathcal { L } _ { l o g i t } ^ { 1 } + \mathcal { L } _ { G _ { 1 } } , \qquad \mathcal { L } _ { \Theta _ { 2 } } = \mathcal { L } _ { l o g i t } ^ { 2 } + \mathcal { L } _ { G _ { 2 } }$$
However, the logit-based loss term by the same optimizer. In fact, they $\mathcal { L } _ { l o g i t } ^ { k }$ and the feature map-based loss term ptimized alternatingly in a same min $\mathcal { L } _ { G _ { k } }$ are not optimizedch. At every minibatch iteration, we infer an image into a model and it computes a logit and a feature map. Then we calculate the two loss terms and optimize the networks based on the two losses separately, meaning that we update the parameters by the logit-based loss once and then update again by the feature map-based loss. The reason we optimize separately for each loss term is because they use different learning rates. The adversarial loss requires much slower learning rate thus if we use the same optimizer with the same learning rate, the networks would not be optimized. Note that we do not infer for each loss term, inference is conducted only once, only the optimization is conducted twice, one for each loss term.
# 3.3 CYCLIC LEARNING FRAMEWORK
Our method proposes a novel cyclic peer-learning scheme for training more than two networks simultaneously. As can be seen in Figure 3, each network transfers its knowledge to its next peer network in an one-way cyclic manner. If we train $K$ number of networks together, each network distills its knowledge to its next network except the last network transfers its knowledge to the first network, creating a cyclic knowledge transfer flow as $1 \to 2 , 2 \to 3 , \cdots , ( K - 1 ) \to K , K \to 1$ . The main contribution of using this cyclic learning framework is to avoid employing too many number of discriminators. If we apply our adversarial loss for every pair of networks, it would demand two times the amount of every possible pair of $K$ networks which would cost a lot of computation. Also in Sec 4.5, we empirically show that our cyclic training scheme is better than other online methods’ training scheme for multiple networks.
 Figure 3: Schematic of cyclic-learning framework for training 3 networks simultaneously.
# 4 EXPERIMENT
In this section, to show the adequacy of our method, we first present comparison experiment with distance method and ablation study to analyze our method. Then we compare our approach with existing online knowledge distillation methods under different settings. First of all, we demonstrate results on using the same sub-network architectures in Sec 4.3. Then, we apply our method on subnetworks with different architectures in Sec 4.4. In Sec 4.5, we also show the results of training more than two networks to demonstrate that our method generalizes well even when the number of networks increases.
In most of the experiments, we use the CIFAR-100 (Krizhevsky et al.) dataset. It consists of 50K training images and 10K test images over 100 classes, accordingly it has 600 images per each class. All the reported results on CIFAR-100 are average of 5 experiments. Since our method uses two loss terms, logit-based loss and feature map-based loss, we use different learning details for each loss term. For overall learning schedule, we follow the learning schedule of ONE(Lan et al., 2018) to conduct fair comparison which is 300 epochs of training. In terms of logit-based loss, the learning rate starts at 0.1 and is multiplied by 0.1 at 150, 225 epoch. We optimize the logit-based loss using SGD with mini-batch size of 128, momentum 0.9 and weight decay of 1e-4. This learning details for logit-based loss is equally applied to other compared online distillation methods. For feature map-based loss, the learning rate starts at 2e-5 for both discriminators and feature extractors and is decayed by 0.1 at 75, 150 epoch. The feature map-based loss is optimized by ADAM(Kingma & Ba, 2014) with the same mini-batch size and weight decay of 1e-1.
In tables, ‘2 Net Avg’ and ‘Ens’ represents the average accuracy of the two sub-networks and the ensemble accuracy respectively. The average ensemble is used for AFD, DML and KD while ONE uses gated ensemble of sub-networks according to its methodology.
# .1 COMPARISON WITH DIRECT FEATURE MAP ALIGNMENT METHODS
Since our goal is to distill feature map information that suits for mutual online distillation, we briefly compare our method with conventional direct alignment method in Table 1. We train two networks together, in one setting, we use the same architecture (ResNet-32 (He et al., 2016)) and in the other, we use different types (WRN-16-2, WRN-28-2 (Zagoruyko & Komodakis, 2016b)). For $L _ { 1 }$ , each network is trained not only to follow the ground-truth label by CE loss, but also to mimic the other network’s feature map using the $L _ { 1 }$ distance loss. For $L _ { 1 } +$ KD, KD (Hinton et al., 2015) loss is applied mutually along with the $L _ { 1 }$ loss between the feature maps. We also compare our results with offline method, $L 1 +$ KD (offline) employs a pre-trained network as a teacher network and distills its feature map knowledge to an untrained student network by $L 1$ loss as well as the KD loss at logit level. ResNet-32 and WRN-28-2 that shows $6 9 . 7 9 \%$ and $7 3 . 6 2 \%$ accuracy are used as the teacher networks in the two settings respectively. The results clearly show that learning the distributions of feature maps with adversarial loss performs better than direct alignment method in both mutual online distillation and offline distillation. We could observe that using $L _ { 1 }$ distance loss actually disturbs the networks to learn good features in online environment. The accuracy of ResNet-32 has dropped more than $2 \%$ compared to its vanilla version accuracy $( 6 9 . 3 8 \% )$ and the accuracy of WRN-16-2 is also lower than its vanilla network $( 7 1 . 0 7 \% )$ . Even when combined with KD loss $( L 1 + \mathrm { K D } )$ , direct alignment method shows poor performance compared to ours in both online and offline manner. Though distance loss is used in many conventional offline methods, they suffer when it comes to online environment. In case of different architecture types, our method also outperforms the direct alignment method. It indicates that when it comes to online feature map distillation, transferring feature map information with direct alignment method such as $L 1$ distance is worse than indirect distillation that uses feature map distribution via adversarial loss.
Table 1: Top-1 accuracy( $\%$ ) comparison with direct alignment methods using CIFAR-100 dataset.
<table><tr><td>Model Type</td><td colspan="2">L1</td><td colspan="2">L1+ KD</td><td colspan="3">L1+KD(offline)</td><td colspan="2">AFD</td><td colspan="2"></td><td colspan="2">Vanilla</td></tr><tr><td>Same Arch.</td><td>2 Net Avg</td><td>Ens</td><td>2 NetAvg</td><td></td><td>Ens</td><td>Student</td><td>Teacher</td><td>Ens</td><td></td><td>2 Net Avg</td><td>Ens</td><td>Net</td><td></td></tr><tr><td>ResNet-32</td><td>66.82</td><td>70.69</td><td></td><td>70.16</td><td>72.44</td><td>71.91</td><td>69.79</td><td>72.07</td><td>74.03</td><td></td><td>75.64</td><td>69.38</td><td></td></tr><tr><td>Different Arch.</td><td>Net1 Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Student</td><td>Teacher</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td></tr><tr><td>WRN-(16-2,28-2)</td><td>69.84 73.41</td><td>74.63</td><td>72.35</td><td>74.82</td><td>75.10</td><td>73.94</td><td>73.62</td><td>76.56</td><td>75.88</td><td>77.08</td><td>77.82</td><td>71.07</td><td>73.50</td></tr></table>
Table 2: Ablation study of AFD. Top-1 accuracy $\% )$ on CIFAR-100 dataset.
<table><tr><td>Model Type</td><td colspan="3">w/o KD (Adv only)</td><td colspan="3">w/o Adv (KD only)</td><td colspan="3">Full model (AFD)</td></tr><tr><td>Same Arch.</td><td colspan="2">2 Net Avg</td><td>Ens</td><td colspan="2">2 Net Avg</td><td>Ens</td><td colspan="2">2 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-32</td><td colspan="2">70.09</td><td>74.77</td><td colspan="2">73.38</td><td>75.21</td><td colspan="2">74.03</td><td>75.64</td></tr><tr><td>WRN-16-2</td><td colspan="2">71.94</td><td>75.92</td><td colspan="2">74.81</td><td>76.20</td><td colspan="2">75.33</td><td>76.34</td></tr><tr><td>Different Arch.</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td></tr><tr><td>WRN-(16-2,28-2)</td><td>72.05</td><td>73.80</td><td>76.82</td><td>74.99</td><td>76.64</td><td>77.28</td><td>75.88</td><td>77.08</td><td>77.82</td></tr></table>
# 4.2 ABLATION STUDY
Table 2 shows the ablation study of our proposed method. We conduct experiments using the same and different sub-network architectures. We run three experiments with different training settings for each model case. The three settings are full model, without mutual knowledge distillation at logitlevel and without adversarial feature map distillation. When trained without the adversarial feature map distillation, the accuracy decreases in all three model cases. The accuracy of both ResNet-32 and WRN-16-2 dropped by $0 . 6 5 \%$ and $0 . 5 2 \%$ respectively, and those of (WRN-16-2, WRN-28-2) pair declined by $0 . 8 9 \%$ and $0 . 4 4 \%$ compared to the full model. Ensemble results are also lower than those of the full models. When only the adversarial feature map distillation is applied, the accuracy has increased by $0 . 7 1 \%$ and $0 . 8 7 \%$ compared to the vanilla versions of ResNet-32 and WRN-16-2 respectively. Especially in case of different sub-network architecture, the accuracy of WRN-16-2 has increased by almost $1 \%$ . Based on these experiments, we could confirm that adversarial feature map distillation has some efficacy of improving the performance in online environment.
# 4.3 SAME ARCHITECTURE
We compare our method with DML and ONE for training two sub-networks with the same architecture. The vanilla network refers to the original network trained without any distillation method. As shown in Table 3, in both ResNet and WRN serises, DML, ONE and AFD all improves the networks’ accuracy compared to the vanilla networks. However, AFD shows the highest improvement of performance in both sub-network and ensemble accuracy among the compared distillation methods. Especially in case of ResNet-20, ResNet-32 and WRN-16-2, our method significantly improves the accuracy by more than $4 \%$ compared to the vanilla version while other distillation methods improve around $3 \%$ on average except the ResNet-32 of DML.
Table 3: Top-1 accuracy $\% )$ comparison with other online distillation methods for training two same architecture networks as a pair on the CIFAR-100 dataset. The numbers in parentheses refer to the amount of increase in accuracy compared to the vanilla network.
<table><tr><td rowspan="2">Model Type</td><td colspan="2">DML</td><td colspan="2">ONE</td><td colspan="2">AFD</td><td rowspan="2">Vanila</td></tr><tr><td>2 Net Avg</td><td>Ens</td><td>2 Net Avg</td><td>Ens</td><td>2 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-20</td><td>70.90(+3.42%)</td><td>72.08</td><td>70.56(+3.08%)</td><td>72.26</td><td>71.72(+4.24%)</td><td>72.98</td><td>67.48</td></tr><tr><td>ResNet-32</td><td>73.40(+4.02%)</td><td>74.89</td><td>72.61(+3.23%)</td><td>74.07</td><td>74.03(+4.65%)</td><td>75.64</td><td>69.38</td></tr><tr><td>ResNet-56</td><td>75.48(+1.64%)</td><td>76.73</td><td>76.45(+2.61%)</td><td>77.16</td><td>77.25(+3.41%)</td><td>78.35</td><td>73.84</td></tr><tr><td>WRN-16-2</td><td>74.68(+3.61%)</td><td>75.81</td><td>73.85(+2.78%)</td><td>74.84</td><td>75.33(+4.26%)</td><td>76.34</td><td>71.07</td></tr><tr><td>WRN-16-4</td><td>78.17(+2.79%)</td><td>79.06</td><td>77.32(+1.94%)</td><td>77.79</td><td>78.55(+3.17%)</td><td>79.28</td><td>75.38</td></tr><tr><td>WRN-28-2</td><td>77.02(+3.52%)</td><td>78.64</td><td>76.67(+3.17%)</td><td>77.40</td><td>77.22(+3.72%)</td><td>78.72</td><td>73.50</td></tr><tr><td>WRN-28-4</td><td>79.16(+2.56%)</td><td>80.56</td><td>79.25(+2.65%)</td><td>79.73</td><td>79.46(+2.86%)</td><td>80.65</td><td>76.60</td></tr></table>
Table 4: Top-1 accuracy $( \% )$ comparison with other online distillation methods for training two different architectures as a pair on CIFAR-100 dataset.
<table><tr><td colspan="2">Model Types</td><td colspan="3">KD</td><td colspan="3">DML</td><td colspan="3">AFD</td></tr><tr><td>Net1</td><td>Net2</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td></tr><tr><td>ResNet-32</td><td>ResNet-56</td><td>72.92</td><td>76.27</td><td>76.71</td><td>73.48</td><td>76.35</td><td>76.74</td><td>74.13</td><td>76.69</td><td>77.11</td></tr><tr><td>ResNet-32</td><td>WRN-16-4</td><td>72.67</td><td>77.26</td><td>76.94</td><td>73.48</td><td>77.43</td><td>77.01</td><td>74.43</td><td>77.82</td><td>77.67</td></tr><tr><td>ResNet-56</td><td>WRN-28-4</td><td>75.48</td><td>78.91</td><td>79.23</td><td>76.03</td><td>79.32</td><td>79.38</td><td>77.95</td><td>79.21</td><td>80.01</td></tr><tr><td>ResNet-20</td><td>WRN-28-10</td><td>70.08</td><td>78.17</td><td>76.12</td><td>71.03</td><td>77.70</td><td>75.78</td><td>72.62</td><td>77.83</td><td>76.70</td></tr><tr><td>WRN-16-2</td><td>WRN-16-4</td><td>74.87</td><td>77.42</td><td>77.30</td><td>74.87</td><td>77.17</td><td>76.96</td><td>75.81</td><td>78.00</td><td>77.84</td></tr><tr><td>WRN-16-2</td><td>WRN-28-2</td><td>74.86</td><td>76.45</td><td>77.29</td><td>75.11</td><td>76.91</td><td>77.24</td><td>75.88</td><td>77.08</td><td>77.82</td></tr><tr><td>WRN-16-2</td><td>WRN-28-4</td><td>74.51</td><td>78.18</td><td>77.60</td><td>74.95</td><td>78.23</td><td>77.67</td><td>76.23</td><td>78.26</td><td>78.28</td></tr><tr><td colspan="2">Average</td><td>73.63</td><td>77.52</td><td>77.31</td><td>74.14</td><td>77.59</td><td>77.25</td><td>75.29</td><td>77.84</td><td>77.92</td></tr></table>
# 4.4 DIFFERENT ARCHITECTURE
In this section, we compare our method with DML and KD using different network architectures. We set Net2 as the higher capacity network. For KD, we use the ensemble of the two sub-networks as a teacher to mimic at every iteration. The difference with original KD (Hinton et al., 2015) is that it is an online learning method, not offline. We did not include ONE because ONE can not be applied in case where the sub-networks have different model types due to its architecture of sharing the lowlevel layers. In table 4, we could observe that our method shows better performance improvement than other methods in both Net1 and Net2 except for a couple of cases. The interesting result is that when AFD is applied, the performance of Net1 (smaller network) is improved significantly compared to other online distillation methods. This is because AFD can transfer the higher capacity network’s meaningful knowledge (feature map distribution) to the lower capacity one better than other online methods. When compared with KD and DML, AFD’s Net1 accuracy is higher by $1 . 6 6 \%$ and $1 . 1 5 \%$ and the ensemble accuracy is better by $0 . 6 1 \%$ and $0 . 6 7 \%$ on average respectively. In case of (WRN-16-2, WRN-28-4) pair, the Net1’s parameter size (0.70M) is more than 8 times smaller than Net2 (5.87M). Despite the large size difference, our method improves both networks’ accuracy, particularly our Net1 performance is better than KD and DML by $1 . 7 2 \%$ and $1 . 2 8 \%$ respectively. The performance of KD and DML seems to decline as the difference between the two model sizes gets larger. Throughout this experiment, we have shown that our method also works properly for different architectures of sub-networks even when two networks have large difference in their model sizes. Using our method, smaller network considerably benefits from the large network.
# 4.5 EXPANSION TO 3 NETWORKS
To show our method’s expandability for training more than two networks, we conduct experiment of training 3 networks in this section. As proposed in Sec 3.3, our method uses a cyclic learning framework rather than employing adversarial loss between every network pairs in order to reduce the amount of computation and memory. DML calculates the mutual knowledge distillation loss between every network pairs and uses the average of the losses. ONE generates a gated ensemble of the sub-networks and transfers the knowledge of the ensemble logit to each network. As it can be seen in Table 5, AFD outperforms the compared online distillation methods on both $3 \ \mathrm { N e t }$ average and ensemble accuracy in every model types. Comparing the results of Table 5 to that of Table 3, the overall tendency of performance gains compared to DML and ONE is maintained.
Table 5: Top-1 accuracy $\% )$ comparison with other online distillation methods using 3 networks on CIFAR-100 dataset. ’3 Net Avg’ represents the average accuracy of the 3 networks.
<table><tr><td rowspan="2">Model Type</td><td colspan="2">DML</td><td colspan="2">ONE</td><td colspan="2">AFD</td><td rowspan="2">Vanilla</td></tr><tr><td>3 Net Avg</td><td>Ens</td><td>3 Net Avg</td><td>Ens</td><td>3 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-32</td><td>73.43</td><td>76.11</td><td>73.25</td><td>74.94</td><td>74.14</td><td>76.64</td><td>69.38</td></tr><tr><td>ResNet-56</td><td>76.11</td><td>77.83</td><td>76.49</td><td>77.38</td><td>77.37</td><td>79.18</td><td>73.84</td></tr><tr><td>WRN-16-2</td><td>75.15</td><td>76.93</td><td>73.87</td><td>75.26</td><td>75.65</td><td>77.54</td><td>71.07</td></tr><tr><td>WRN-28-2</td><td>77.12</td><td>79.41</td><td>76.66</td><td>77.53</td><td>77.20</td><td>79.78</td><td>73.50</td></tr></table>
Table 6: Top-1 accuracy( $\textcircled{9}$ comparison with DML on ImageNet dataset.
<table><tr><td colspan="2">Model Types</td><td colspan="3">DML</td><td colspan="3">AFD</td><td colspan="2">Vanilla</td></tr><tr><td>Net1</td><td>Net2</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td></tr><tr><td>ResNet-18</td><td>ResNet-34</td><td>70.19</td><td>73.57</td><td>73.33</td><td>70.39</td><td>74.00</td><td>74.47</td><td>69.76</td><td>73.27</td></tr></table>
# 4.6 IMAGENET EXPERIMENT
We evaluate our method on ImageNet dataset to show that our method can also be applicable to a large scale image dataset. We use ImageNet LSVRC 2015 (Russakovsky et al., 2015) which has 1.2M training images and 50K validation images over 1,000 classes. We compare our method with DML using two pre-trained networks ResNet-18 and ResNet-34 as a pair. The results are after 30 epochs of training. As shown in Table 6, our method improves the networks better than DML.
# 5 CONCLUSION
We proposed an online knowledge distillation method that transfers the knowledge not only at logitlevel but also at feature map-level using the adversarial training scheme. Unlike existing online distillation methods, our method utilizes the feature map information and showed that knowledge transfer at feature map-level is possible even in an online environment. Through extensive experiments, we demonstrated the adequacy of adopting the distribution learning via adversarial training for online feature map distillation and could achieve better performance than existing online methods. We also introduced a novel cyclic learning framework for training multiple networks concurrently and presented its efficacy by comparing with existing approaches. We also confirmed that our method is broadly suitable to various architecture types from a very small network (ResNet-20) to a large (WRN-28-4) network. We hope that due to the work of our research, the area of knowledge distillation can be further advanced and studied by many researchers.
# REFERENCES
Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In ˇ Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006. Bo Dai, Sanja Fidler, Raquel Urtasun, and Dahua Lin. Towards diverse and natural image descriptions via a conditional gan. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2970–2979, 2017. Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017.
Jangho Kim, SeongUk Park, and Nojun Kwak. Paraphrasing complex network: Network compression via factor transfer. In Advances in Neural Information Processing Systems, pp. 2760–2769, 2018.
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-100 (canadian institute for advanced research). URL http://www.cs.toronto.edu/˜kriz/cifar.html.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
Xu Lan, Xiatian Zhu, and Shaogang Gong. Knowledge distillation by on-the-fly native ensemble. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pp. 7528–7538. Curran Associates Inc., 2018.
Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016.
Peiye Liu, Wu Liu, Huadong Ma, Tao Mei, and Mingoo Seok. Ktan: knowledge transfer adversarial network. arXiv preprint arXiv:1810.08126, 2018.
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2794–2802, 2017.
Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Adversarial training methods for semisupervised text classification. arXiv preprint arXiv:1605.07725, 2016.
David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic methods. arXiv preprint arXiv:1610.01945, 2016.
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pp. 525–542. Springer, 2016.
Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014.
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y.
Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015.
Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016a.
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016b.
Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4320– 4328, 2018.
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pp. 2223–2232, 2017.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057[ { "type": "text", "text": "FEATURE-MAP-LEVEL ONLINE ADVERSARIAL KNOWLEDGE DISTILLATION ", "text_level": 1, "bbox": [ 176, 101, 803, 146 ], "page_idx": 0 }, { "type": "text", "text": "Anonymous authors Paper under double-blind review ", "bbox": [ 183, 170, 398, 198 ], "page_idx": 0 }, { "type": "text", "text": "ABSTRACT ", "text_level": 1, "bbox": [ 454, 234, 544, 251 ], "page_idx": 0 }, { "type": "text", "text": "Feature maps contain rich information about image intensity and spatial correlation. However, previous online knowledge distillation methods only utilize the class probabilities. Thus in this paper, we propose an online knowledge distillation method that transfers not only the knowledge of the class probabilities but also that of the feature map using the adversarial training framework. We train multiple networks simultaneously by employing discriminators to distinguish the feature map distributions of different networks. Each network has its corresponding discriminator which discriminates the feature map from its own as fake while classifying that of the other network as real. By training a network to fool the corresponding discriminator, it can learn the other network’s feature map distribution. Discriminators and networks are trained concurrently in a minimax twoplayer game. Also, we propose a novel cyclic learning scheme for training more than two networks together. We have applied our method to various network architectures on the classification task and discovered a significant improvement of performance especially in the case of training a pair of a small network and a large one. ", "bbox": [ 233, 271, 764, 493 ], "page_idx": 0 }, { "type": "text", "text": "1 INTRODUCTION ", "text_level": 1, "bbox": [ 176, 534, 336, 549 ], "page_idx": 0 }, { "type": "text", "text": "With the advent of Alexnet (Krizhevsky et al., 2012), deep convolution neural networks have achieved remarkable success in a variety of computer vision tasks. However, high-performance of deep neural network is often gained by increasing the depth or the width of a network. Deep and wide networks cost a large number of computation as well as memory storage which is not suitable for a resource-limited environment such as mobile or embedded systems. To overcome this issue, many researches have been conducted to develop smaller but accurate neural networks. Some of the well-known methods in this line of research are parameter quantization or binarization (Rastegari et al., 2016), pruning (Li et al., 2016) and knowledge distillation (KD) (Hinton et al., 2015). ", "bbox": [ 174, 569, 825, 681 ], "page_idx": 0 }, { "type": "text", "text": "KD has been an active area of research as a solution to improve the performance of a light-weight network by transferring the knowledge of a large pre-trained network (or an ensemble of small networks) as a teacher network. KD sets the teacher network’s class probabilities as a target which a small student network tries to mimic. By aligning the student’s predictions to those of the teacher, the student can improve its performance. Recently, some studies have shown that rather than using a pretrained teacher, simultaneously training networks to learn from each other in a peer-teaching manner is also possible. This approach is called online distillation. Deep mutual learning (DML) (Zhang et al., 2018) and on-the-fly native ensemble (ONE) (Lan et al., 2018) are the representative online distillation methods that show appealing results in the image classification tasks. Conventional distillation method requires pre-training a powerful teacher network and performs an one-way transfer to a relatively small and untrained student network. On the other hand, in online mutual distillation, there is no specific teacher-student role. All the student networks learn simultaneously by teaching each other from the start of training. It trains with the conventional cross-entropy loss from the ground truth label along with the mimicry loss to learn from its peers. Networks trained in such an online distillation way achieve results superior not only to the networks trained with the cross-entropy loss alone but also to those trained in conventional offline distillation manner from a pre-trained teacher network. ", "bbox": [ 174, 688, 825, 922 ], "page_idx": 0 }, { "type": "image", "img_path": "images/152e0f91fd83e929bd1339fb8de49322b8e5b1b9dd90640fa5570de8581ff42d.jpg", "image_caption": [ "Figure 1: The concept of online Adversarial Feature map Distillation (AFD) Each point represents a feature map for the corresponding input denoted by different colors. The thin line arrow indicates the evolvement of feature map data points as iteration goes on and the broader arrow indicates the way each method compares the feature maps from different networks. (a) In direct feature map alignment, networks are trained such that the distance between each pair of points with the same color is minimized. (b) In AFD, the discriminators contain information on feature map distributions and thus the networks are trained such that the distributions match. (best viewed in color) " ], "image_footnote": [], "bbox": [ 174, 101, 823, 227 ], "page_idx": 1 }, { "type": "text", "text": "However, aforementioned online distillation methods make use of only the logit information. While the logit contains the probabilistic information over classes, the feature map, the output of convolution layer, has more meaningful and abundant feature information on image intensity and spatial correlation. In offline distillation which utilizes a pre-trained model as a teacher network, many methods such as FitNet (Romero et al., 2014), attention transfer (AT) (Zagoruyko & Komodakis, 2016a) and factor transfer (FT) (Kim et al., 2018) make use of this intermediate feature representation as a target to learn for the student network, but in online distillation, to the best of our knowledge, no feature map-based knowledge distillation method has been proposed. ", "bbox": [ 174, 353, 825, 464 ], "page_idx": 1 }, { "type": "text", "text": "This is due to some challenges. Unlike the offline methods that have a clear target to mimic, there is no static target to follow in an online method. At every training iteration, the feature maps of the co-trained network change, thus in online feature map-level distillation, the problem turns into mimicking the moving target properly. While each node of the logit is confined to represent its assigned class probability which does not change drastically over iterations, at the feature map-level, much more flexibility comes into play, which makes the problem more challenging. Therefore, the direct aligning method such as using L1 or L2 distance is not suitable for online mutual feature map distillation because it updates the network parameters to generate a feature map that tries to mimic the current output feature map of the other network. In other words, the direct alignment method only tries to minimize the distance between the two feature map points (one for each network), hence it ignores the distributional difference between the two feature maps (Fig. 1(a)). ", "bbox": [ 174, 470, 825, 625 ], "page_idx": 1 }, { "type": "text", "text": "To alleviate this problem, in this paper, we propose a novel online distillation method that transfers the knowledge of feature maps adversarially as well as a cyclic learning framework for training more than two networks simultaneously. Unlike the direct aligning method, our adversarial distillation method enables a network to learn the overall feature map distribution of the co-trained network (Fig. 1(b)). Since the discriminator is trained to distinguish the difference between the networks’ feature map distributions (containing the history of feature maps for different input images) at every training iteration, by fooling the discriminator, the network learns the co-trained network’s changing feature map distribution. Exchanging the knowledge of feature map distribution facilitates the networks to converge to a better feature map manifold that generalizes better and yields more accurate results. ", "bbox": [ 174, 631, 825, 756 ], "page_idx": 1 }, { "type": "text", "text": "Our method consists of two major losses: 1) logit-based loss and 2) feature map-based loss. Logitbased loss is defined by two different loss terms which are conventional cross-entropy (CE) loss and the mutual distillation loss using the Kullback-Leibler divergence (KLD). Our newly proposed feature map-based loss is to distill the feature map indirectly via discriminators. We use the feature map from the last convolution layer since deeper convolution layer generates more meaningful features with a high-level abstraction (Kim et al., 2018). The adversarial training scheme of generative adversarial networks (GAN) (Goodfellow et al., 2014) is utilized to transfer the knowledge at feature map-level. ", "bbox": [ 174, 762, 825, 875 ], "page_idx": 1 }, { "type": "text", "text": "The contributions of this paper can be summarized as follows: 1) we propose an online knowledge distillation method that utilizes not only the logit but also the feature map from the convolution layer. 2) Our method transfers the knowledge of feature maps not by directly aligning them using ", "bbox": [ 176, 882, 823, 924 ], "page_idx": 1 }, { "type": "text", "text": "the distance loss but by learning their distributions using the adversarial training via discriminators. \n3) We propose a novel cyclic learning scheme for training more than two networks simultaneously. ", "bbox": [ 171, 103, 821, 132 ], "page_idx": 2 }, { "type": "text", "text": "2 RELATED WORK ", "text_level": 1, "bbox": [ 176, 155, 341, 170 ], "page_idx": 2 }, { "type": "text", "text": "The idea of model compression by transferring the knowledge of a high performing model to a smaller model was originally proposed by Bucilua et al. (2006). Then in recent years, this research ˇ area got invigorated due to the work of knowledge distillation (KD) by Hinton et al. (2015). The main contribution of KD is to use the softened logit of pre-trained teacher network that has higher entropy as an extra supervision to train a student network. KD trains a compact student network to learn not only by the conventional CE loss subjected to the labeled data but also by the final outputs of the teacher network. While KD only utilizes the logit, method such as FitNet (Romero et al., 2014), AT (Zagoruyko & Komodakis, 2016a), FT (Kim et al., 2018) and KTAN (Liu et al., 2018) use the intermediate feature representation to transfer the knowledge of a teacher network. ", "bbox": [ 174, 188, 825, 313 ], "page_idx": 2 }, { "type": "text", "text": "Online Knowledge Distillation: Conventional offline methods require training a teacher model in advance while online methods do not require any pre-trained model. Instead, the networks teach each other mutually by sharing their knowledge throughout the training process. Some examples of recent online methods are DML (Zhang et al., 2018) and ONE (Lan et al., 2018) which demonstrate promising results. DML simply applies KD losses mutually, treating each other as teachers, and it achieves results that is even better than the offline KD method. The drawback of DML is that it lacks an appropriate teacher role, hence provides only limited information to each network. ONE pointed out this defect of DML. Rather than mutually distilling between the networks, ONE generates a gated ensemble logit of the training networks and uses it as a target to align for each network. ONE tries to create a powerful teacher logit that can provide more generalized information. The flaw of ONE is that it can not train different network architectures at the same time due to its architecture of sharing the low-level layers for the gating module. The common limitation of existing online methods is that they are dependent only on the logit and do not make any use of the feature map information. Considering that KD loss term is only applicable to the classification task, transferring knowledge at feature map-level can enlarge the applicability to other tasks. Therefore, our method proposes a distillation method that utilizes not only the logit but also the feature map via adversarial training, moreover, our method can be applied in case where the co-trained networks have different architectures. ", "bbox": [ 174, 319, 825, 569 ], "page_idx": 2 }, { "type": "text", "text": "Generative Adversarial Network (GAN): GAN (Goodfellow et al., 2014) is a generative model framework that is proposed with an adversarial training scheme, using a generator network $G$ and a discriminator network $D$ . $G$ learns to generate the real data distribution while $D$ is trained to distinguish the real samples of the dataset from the fake results generated by $G$ . The goal of $G$ is to trick $D$ to make a mistake of determining the fake results as the real samples. Though it was initially proposed for generative models, its adversarial training scheme is not limited to data generation. Adversarial training has been adapted to various tasks such as image translation (Isola et al., 2017; Zhu et al., 2017), captioning (Dai et al., 2017), semi-supervised learning (Miyato et al., 2016; Springenberg, 2015), reinforcement learning (Pfau & Vinyals, 2016), and many others. In this paper, we utilize GAN’s adversarial training strategy to transfer the knowledge at feature map-level in an online manner. The networks learn the other networks’ feature map distributions by trying to deceive the discriminators while the discriminators are trained to distinguish the different distributions of each network. ", "bbox": [ 173, 575, 825, 756 ], "page_idx": 2 }, { "type": "text", "text": "3 PROPOSED METHOD ", "text_level": 1, "bbox": [ 176, 779, 375, 795 ], "page_idx": 2 }, { "type": "text", "text": "In this section, we describe the overall process of our proposed Online Adversarial Feature map Distillation (AFD). As can be seen in Figure 2, when training two different networks, $\\Theta _ { 1 }$ and $\\Theta _ { 2 }$ , in an online manner, we employ two discriminators, $D _ { 1 }$ and $D _ { 2 }$ . We train $D _ { 1 }$ such that the feature map of $\\Theta _ { 2 }$ is regarded as a real and that of $\\Theta _ { 1 }$ is classified as a fake and do vice versa for discriminator $D _ { 2 }$ . Then, each network $\\Theta _ { 1 }$ and $\\Theta _ { 2 }$ are trained to fool its corresponding discriminator so that it can generate a feature map that mimics the other network’s feature map. Throughout this adversarial training, each network learns the feature map distribution of the other network. By exploiting both logit-based distillation loss and feature map-based adversarial loss together, we could observe a significant improvement of performance in various pairs of network architectures especially when training small and large networks together. Also we introduce a cyclic learning scheme for training more than two networks simultaneously. It reduces the number of required discriminators from $2 \\times _ { 2 } C _ { K }$ (when employing discriminators bidirectionally between every network pairs.) to $K$ where $K$ is the number of networks participating. This cyclic learning framework not only requires less computation than the bidirectional way but also achieves better results compared to other online training schemes for multiple networks. ", "bbox": [ 174, 811, 825, 924 ], "page_idx": 2 }, { "type": "image", "img_path": "images/59ee2b5d08ffdf4df067c9b42ab71081ff7a5d972694eb4afb866124a1cfea94.jpg", "image_caption": [ "Figure 2: Overall schematic of online adversarial feature map distillation (AFD). At feature maplevel, each network is trained to deceive the corresponding discriminator so that it can mimic the other network’s feature map distribution. While at logit-level, KL loss to learn the peer network’s logit is applied as well as the conventional CE loss. " ], "image_footnote": [], "bbox": [ 173, 102, 807, 321 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 174, 405, 825, 502 ], "page_idx": 3 }, { "type": "text", "text": "First, we explain the conventional mutual knowledge distillation method conducted among the networks at the logit-level. Then we introduce our novel online feature map distillation method using the adversarial training scheme in addition to the cyclic learning framework for training more than two networks at the same time. ", "bbox": [ 174, 503, 825, 558 ], "page_idx": 3 }, { "type": "text", "text": "3.1 LOGIT-BASED MUTUAL KNOWLEDGE DISTILLATION ", "text_level": 1, "bbox": [ 173, 580, 578, 594 ], "page_idx": 3 }, { "type": "text", "text": "We use two loss terms for logit-based learning, one is the conventional cross-entropy(CE) loss and the other is mutual distillation loss between networks based on Kullback Leibler(KL) divergence. We formulate our proposed method assuming training two networks. Training scheme for more than two networks will be explained in Sec 3.3. Below is the overall logit-based loss for two networks: ", "bbox": [ 174, 609, 825, 665 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/fcd21249998a9db9b30e86dba21450707cdab094400b1b6fbcf9f3ae8ae7b9a5.jpg", "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { l o g i t } ^ { 1 } = \\mathcal { L } _ { c e } ( y , \\sigma ( z _ { 1 } ) ) + T ^ { 2 } \\times \\mathcal { L } _ { k l } ( \\sigma ( z _ { 2 } / T ) , \\sigma ( z _ { 1 } / T ) ) } \\\\ & { \\mathcal { L } _ { l o g i t } ^ { 2 } = \\mathcal { L } _ { c e } ( y , \\sigma ( z _ { 2 } ) ) + T ^ { 2 } \\times \\mathcal { L } _ { k l } ( \\sigma ( z _ { 1 } / T ) , \\sigma ( z _ { 2 } / T ) ) . } \\end{array}\n$$", "text_format": "latex", "bbox": [ 310, 674, 686, 718 ], "page_idx": 3 }, { "type": "text", "text": "Here, $\\sigma ( \\cdot )$ refers to softmax function and $z \\in \\mathbb { R } ^ { C }$ is the logit produced from a network for $C$ - class classification problem. The temperature term $T$ is used to control the level of smoothness in probabilities. As the temperature term $T$ goes up, it creates a more softened probability distribution. We use $T = 3$ for every experiment. $\\mathcal { L } _ { c e }$ is the CE loss between the ground truth label $y$ and the softmax output $\\sigma ( z )$ that is commonly used in image classification. $\\mathcal { L } _ { k l }$ is the KL loss between the softened logit of each network. We multiply the KL loss term with $T ^ { 2 }$ because the gradients produced by the soft targets are scaled by $1 / \\dot { T } ^ { 2 }$ . While the CE loss is between the correct labels and the outputs of the model, the KL loss is the KL distance between the outputs of two training networks. The KL loss provides an extra information from the peer network so that the network can improve its generalization performance. The difference with DML is that while DML updates asynchronously which means that it updates one network first and then the other network, our AFD updates the networks synchronously, not alternatingly. The CE loss trains the networks to predict the correct truth label while the mutual distillation loss tries to match the outputs of the peer-networks, enabling the networks to share the knowledge at logit-level. ", "bbox": [ 173, 728, 825, 924 ], "page_idx": 3 }, { "type": "text", "text": ".2 FEATURE MAP-BASED LEARNING VIA ADVERSARIAL TRAINING ", "text_level": 1, "bbox": [ 184, 104, 651, 117 ], "page_idx": 4 }, { "type": "text", "text": "Our AFD uses adversarial training to transfer knowledge at feature map-level. We formulate our adversarial feature map distillation for two networks which will be extended for more networks later. We divide a network into two parts, one is the feature extractor part that generates a feature map and the other is the classifier part that transforms the feature map into a logit. Each network also has a corresponding discriminator which distinguishes different feature map distributions. The architecture of the discriminator is simply a series of Conv-Batch Normalization-Leaky ReLU-Conv-Sigmoid. It takes a feature map of the last layer and it reduces the spatial size and the number of channel of the feature map as it goes through the convolution operation so that it can produce a single scalar value. Then we apply the sigmoid function of the value to normalize it between 0 and 1. ", "bbox": [ 174, 130, 825, 256 ], "page_idx": 4 }, { "type": "text", "text": "We utilize the feature extractor part to enable feature map-level distillation. For the convenience of mathematical notation, we name the feature extractor part as $G _ { k }$ and its discriminator as $D _ { k }$ , $k$ indicates the network number. As depicted in Figure 2, each network has to fool its discriminator to mimic the peer network’s feature map and the discriminator has to discriminate from which network the feature map is originated. Following LSGAN (Mao et al., 2017), our overall adversarial loss for discriminator and the feature extractor can be written as below: ", "bbox": [ 174, 256, 825, 339 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/9c6c603581086d68a770553b9229d9275cab852060959b024e0091365ec1b005.jpg", "text": "$$\n\\begin{array} { r l } & { \\mathcal { L } _ { D _ { 1 } } = [ 1 - D _ { 1 } ( G _ { 2 } ( x ) ) ] ^ { 2 } + [ D _ { 1 } ( G _ { 1 } ( x ) ) ] ^ { 2 } } \\\\ & { } \\\\ & { \\mathcal { L } _ { G _ { 1 } } = [ 1 - D _ { 1 } ( G _ { 1 } ( x ) ) ] ^ { 2 } . } \\end{array}\n$$", "text_format": "latex", "bbox": [ 354, 348, 642, 391 ], "page_idx": 4 }, { "type": "text", "text": "The feature extractors $G _ { 1 }$ and $G _ { 2 }$ take input $x$ and generate feature maps. The discriminator $D _ { 1 }$ takes a feature map and yields a scalar between 0 (fake) and 1 (real). It is trained to output 1 if the feature map came from the co-trained network (in this case, $G _ { 2 }$ ) or 0 if the feature map is produced from the network it belongs to ( $G _ { 1 }$ in this case). The goal of $D _ { 1 }$ is to minimize the discriminator loss term $\\mathcal { L } _ { D 1 }$ by correctly distinguishing the two different feature map distributions while $G _ { 1 }$ ’s goal is to minimize the loss term ${ \\mathcal L } _ { G _ { 1 } }$ by fooling $D _ { 1 }$ to make mistake of determining $G _ { 1 }$ ’s feature map as real and yield 1. Each training network’s object is to minimize $\\mathcal { L } _ { G _ { k } }$ to mimic the peer network’s feature map distribution. This adversarial scheme works exactly the same by changing the role of two networks. ", "bbox": [ 173, 398, 825, 525 ], "page_idx": 4 }, { "type": "text", "text": "In case where the two networks’ feature map outputs have different channel sizes, for example a pair like (WRN-16-2, WRN-16-4) (Zagoruyko & Komodakis, 2016b), we use a transfer layer that is composed of a convolution layer, a batch normalization and a ReLU which converts the number of channels to that of peer network. The above loss terms change as ${ \\mathcal { L } } _ { D _ { 1 } } = [ 1 - D _ { 1 } ( T _ { 2 } ( G _ { 2 } ( x ) ) ) ] ^ { 2 } +$ $[ D _ { 1 } ( T _ { 1 } ( G _ { 1 } ( x ) ) ) ] ^ { 2 }$ and $\\mathcal { L } _ { G _ { 1 } } = [ 1 - D _ { 1 } ( T _ { 1 } ( G _ { 1 } ( x ) ) ) ] ^ { 2 }$ when using the transfer layer $T _ { k }$ . ", "bbox": [ 174, 531, 825, 603 ], "page_idx": 4 }, { "type": "text", "text": "Optimization: Combining both logit-based loss and the adversarial feature map-based loss, the overall loss for each network $\\Theta _ { 1 }$ and $\\Theta _ { 2 }$ are as follows: ", "bbox": [ 174, 608, 823, 637 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/354527b4c9202b8f142b1b4c9b207b1a7eb444046cae60dc8b7f5db254dffa4f.jpg", "text": "$$\n\\mathcal { L } _ { \\Theta _ { 1 } } = \\mathcal { L } _ { l o g i t } ^ { 1 } + \\mathcal { L } _ { G _ { 1 } } , \\qquad \\mathcal { L } _ { \\Theta _ { 2 } } = \\mathcal { L } _ { l o g i t } ^ { 2 } + \\mathcal { L } _ { G _ { 2 } }\n$$", "text_format": "latex", "bbox": [ 338, 647, 658, 667 ], "page_idx": 4 }, { "type": "text", "text": "However, the logit-based loss term by the same optimizer. In fact, they $\\mathcal { L } _ { l o g i t } ^ { k }$ and the feature map-based loss term ptimized alternatingly in a same min $\\mathcal { L } _ { G _ { k } }$ are not optimizedch. At every minibatch iteration, we infer an image into a model and it computes a logit and a feature map. Then we calculate the two loss terms and optimize the networks based on the two losses separately, meaning that we update the parameters by the logit-based loss once and then update again by the feature map-based loss. The reason we optimize separately for each loss term is because they use different learning rates. The adversarial loss requires much slower learning rate thus if we use the same optimizer with the same learning rate, the networks would not be optimized. Note that we do not infer for each loss term, inference is conducted only once, only the optimization is conducted twice, one for each loss term. ", "bbox": [ 173, 679, 825, 820 ], "page_idx": 4 }, { "type": "text", "text": "3.3 CYCLIC LEARNING FRAMEWORK ", "text_level": 1, "bbox": [ 176, 840, 444, 854 ], "page_idx": 4 }, { "type": "text", "text": "Our method proposes a novel cyclic peer-learning scheme for training more than two networks simultaneously. As can be seen in Figure 3, each network transfers its knowledge to its next peer network in an one-way cyclic manner. If we train $K$ number of networks together, each network distills its knowledge to its next network except the last network transfers its knowledge to the first network, creating a cyclic knowledge transfer flow as $1 \\to 2 , 2 \\to 3 , \\cdots , ( K - 1 ) \\to K , K \\to 1$ . The main contribution of using this cyclic learning framework is to avoid employing too many number of discriminators. If we apply our adversarial loss for every pair of networks, it would demand two times the amount of every possible pair of $K$ networks which would cost a lot of computation. Also in Sec 4.5, we empirically show that our cyclic training scheme is better than other online methods’ training scheme for multiple networks. ", "bbox": [ 176, 867, 823, 924 ], "page_idx": 4 }, { "type": "image", "img_path": "images/20e560521e4bd10e2bb504a563a10b0cff737518c82eda761a1ab98a29880778.jpg", "image_caption": [ "Figure 3: Schematic of cyclic-learning framework for training 3 networks simultaneously. " ], "image_footnote": [], "bbox": [ 176, 104, 820, 324 ], "page_idx": 5 }, { "type": "text", "text": "", "bbox": [ 174, 376, 825, 460 ], "page_idx": 5 }, { "type": "text", "text": "4 EXPERIMENT ", "text_level": 1, "bbox": [ 176, 481, 316, 496 ], "page_idx": 5 }, { "type": "text", "text": "In this section, to show the adequacy of our method, we first present comparison experiment with distance method and ablation study to analyze our method. Then we compare our approach with existing online knowledge distillation methods under different settings. First of all, we demonstrate results on using the same sub-network architectures in Sec 4.3. Then, we apply our method on subnetworks with different architectures in Sec 4.4. In Sec 4.5, we also show the results of training more than two networks to demonstrate that our method generalizes well even when the number of networks increases. ", "bbox": [ 174, 512, 825, 608 ], "page_idx": 5 }, { "type": "text", "text": "In most of the experiments, we use the CIFAR-100 (Krizhevsky et al.) dataset. It consists of 50K training images and 10K test images over 100 classes, accordingly it has 600 images per each class. All the reported results on CIFAR-100 are average of 5 experiments. Since our method uses two loss terms, logit-based loss and feature map-based loss, we use different learning details for each loss term. For overall learning schedule, we follow the learning schedule of ONE(Lan et al., 2018) to conduct fair comparison which is 300 epochs of training. In terms of logit-based loss, the learning rate starts at 0.1 and is multiplied by 0.1 at 150, 225 epoch. We optimize the logit-based loss using SGD with mini-batch size of 128, momentum 0.9 and weight decay of 1e-4. This learning details for logit-based loss is equally applied to other compared online distillation methods. For feature map-based loss, the learning rate starts at 2e-5 for both discriminators and feature extractors and is decayed by 0.1 at 75, 150 epoch. The feature map-based loss is optimized by ADAM(Kingma & Ba, 2014) with the same mini-batch size and weight decay of 1e-1. ", "bbox": [ 174, 616, 825, 784 ], "page_idx": 5 }, { "type": "text", "text": "In tables, ‘2 Net Avg’ and ‘Ens’ represents the average accuracy of the two sub-networks and the ensemble accuracy respectively. The average ensemble is used for AFD, DML and KD while ONE uses gated ensemble of sub-networks according to its methodology. ", "bbox": [ 176, 790, 823, 832 ], "page_idx": 5 }, { "type": "text", "text": ".1 COMPARISON WITH DIRECT FEATURE MAP ALIGNMENT METHODS ", "text_level": 1, "bbox": [ 186, 843, 666, 856 ], "page_idx": 5 }, { "type": "text", "text": "Since our goal is to distill feature map information that suits for mutual online distillation, we briefly compare our method with conventional direct alignment method in Table 1. We train two networks together, in one setting, we use the same architecture (ResNet-32 (He et al., 2016)) and in the other, we use different types (WRN-16-2, WRN-28-2 (Zagoruyko & Komodakis, 2016b)). For $L _ { 1 }$ , each network is trained not only to follow the ground-truth label by CE loss, but also to mimic the other network’s feature map using the $L _ { 1 }$ distance loss. For $L _ { 1 } +$ KD, KD (Hinton et al., 2015) loss is applied mutually along with the $L _ { 1 }$ loss between the feature maps. We also compare our results with offline method, $L 1 +$ KD (offline) employs a pre-trained network as a teacher network and distills its feature map knowledge to an untrained student network by $L 1$ loss as well as the KD loss at logit level. ResNet-32 and WRN-28-2 that shows $6 9 . 7 9 \\%$ and $7 3 . 6 2 \\%$ accuracy are used as the teacher networks in the two settings respectively. The results clearly show that learning the distributions of feature maps with adversarial loss performs better than direct alignment method in both mutual online distillation and offline distillation. We could observe that using $L _ { 1 }$ distance loss actually disturbs the networks to learn good features in online environment. The accuracy of ResNet-32 has dropped more than $2 \\%$ compared to its vanilla version accuracy $( 6 9 . 3 8 \\% )$ and the accuracy of WRN-16-2 is also lower than its vanilla network $( 7 1 . 0 7 \\% )$ . Even when combined with KD loss $( L 1 + \\mathrm { K D } )$ , direct alignment method shows poor performance compared to ours in both online and offline manner. Though distance loss is used in many conventional offline methods, they suffer when it comes to online environment. In case of different architecture types, our method also outperforms the direct alignment method. It indicates that when it comes to online feature map distillation, transferring feature map information with direct alignment method such as $L 1$ distance is worse than indirect distillation that uses feature map distribution via adversarial loss. ", "bbox": [ 176, 867, 823, 924 ], "page_idx": 5 }, { "type": "table", "img_path": "images/71b223c4a3a6959296498cc8094d50e582d7dfcbcc04f0a132f51dd4da0ff664.jpg", "table_caption": [ "Table 1: Top-1 accuracy( $\\%$ ) comparison with direct alignment methods using CIFAR-100 dataset. " ], "table_footnote": [], "table_body": "<table><tr><td>Model Type</td><td colspan=\"2\">L1</td><td colspan=\"2\">L1+ KD</td><td colspan=\"3\">L1+KD(offline)</td><td colspan=\"2\">AFD</td><td colspan=\"2\"></td><td colspan=\"2\">Vanilla</td></tr><tr><td>Same Arch.</td><td>2 Net Avg</td><td>Ens</td><td>2 NetAvg</td><td></td><td>Ens</td><td>Student</td><td>Teacher</td><td>Ens</td><td></td><td>2 Net Avg</td><td>Ens</td><td>Net</td><td></td></tr><tr><td>ResNet-32</td><td>66.82</td><td>70.69</td><td></td><td>70.16</td><td>72.44</td><td>71.91</td><td>69.79</td><td>72.07</td><td>74.03</td><td></td><td>75.64</td><td>69.38</td><td></td></tr><tr><td>Different Arch.</td><td>Net1 Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Student</td><td>Teacher</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td></tr><tr><td>WRN-(16-2,28-2)</td><td>69.84 73.41</td><td>74.63</td><td>72.35</td><td>74.82</td><td>75.10</td><td>73.94</td><td>73.62</td><td>76.56</td><td>75.88</td><td>77.08</td><td>77.82</td><td>71.07</td><td>73.50</td></tr></table>", "bbox": [ 174, 143, 825, 194 ], "page_idx": 6 }, { "type": "table", "img_path": "images/87b72e28a1c012cb97585365da685fbe4082722eabc68d30fa4933a4c15423fd.jpg", "table_caption": [ "Table 2: Ablation study of AFD. Top-1 accuracy $\\% )$ on CIFAR-100 dataset. " ], "table_footnote": [], "table_body": "<table><tr><td>Model Type</td><td colspan=\"3\">w/o KD (Adv only)</td><td colspan=\"3\">w/o Adv (KD only)</td><td colspan=\"3\">Full model (AFD)</td></tr><tr><td>Same Arch.</td><td colspan=\"2\">2 Net Avg</td><td>Ens</td><td colspan=\"2\">2 Net Avg</td><td>Ens</td><td colspan=\"2\">2 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-32</td><td colspan=\"2\">70.09</td><td>74.77</td><td colspan=\"2\">73.38</td><td>75.21</td><td colspan=\"2\">74.03</td><td>75.64</td></tr><tr><td>WRN-16-2</td><td colspan=\"2\">71.94</td><td>75.92</td><td colspan=\"2\">74.81</td><td>76.20</td><td colspan=\"2\">75.33</td><td>76.34</td></tr><tr><td>Different Arch.</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td></tr><tr><td>WRN-(16-2,28-2)</td><td>72.05</td><td>73.80</td><td>76.82</td><td>74.99</td><td>76.64</td><td>77.28</td><td>75.88</td><td>77.08</td><td>77.82</td></tr></table>", "bbox": [ 174, 229, 823, 319 ], "page_idx": 6 }, { "type": "text", "text": "", "bbox": [ 174, 334, 825, 584 ], "page_idx": 6 }, { "type": "text", "text": "4.2 ABLATION STUDY ", "text_level": 1, "bbox": [ 176, 603, 338, 616 ], "page_idx": 6 }, { "type": "text", "text": "Table 2 shows the ablation study of our proposed method. We conduct experiments using the same and different sub-network architectures. We run three experiments with different training settings for each model case. The three settings are full model, without mutual knowledge distillation at logitlevel and without adversarial feature map distillation. When trained without the adversarial feature map distillation, the accuracy decreases in all three model cases. The accuracy of both ResNet-32 and WRN-16-2 dropped by $0 . 6 5 \\%$ and $0 . 5 2 \\%$ respectively, and those of (WRN-16-2, WRN-28-2) pair declined by $0 . 8 9 \\%$ and $0 . 4 4 \\%$ compared to the full model. Ensemble results are also lower than those of the full models. When only the adversarial feature map distillation is applied, the accuracy has increased by $0 . 7 1 \\%$ and $0 . 8 7 \\%$ compared to the vanilla versions of ResNet-32 and WRN-16-2 respectively. Especially in case of different sub-network architecture, the accuracy of WRN-16-2 has increased by almost $1 \\%$ . Based on these experiments, we could confirm that adversarial feature map distillation has some efficacy of improving the performance in online environment. ", "bbox": [ 174, 628, 825, 795 ], "page_idx": 6 }, { "type": "text", "text": "4.3 SAME ARCHITECTURE ", "text_level": 1, "bbox": [ 176, 814, 366, 827 ], "page_idx": 6 }, { "type": "text", "text": "We compare our method with DML and ONE for training two sub-networks with the same architecture. The vanilla network refers to the original network trained without any distillation method. As shown in Table 3, in both ResNet and WRN serises, DML, ONE and AFD all improves the networks’ accuracy compared to the vanilla networks. However, AFD shows the highest improvement of performance in both sub-network and ensemble accuracy among the compared distillation methods. Especially in case of ResNet-20, ResNet-32 and WRN-16-2, our method significantly improves the accuracy by more than $4 \\%$ compared to the vanilla version while other distillation methods improve around $3 \\%$ on average except the ResNet-32 of DML. ", "bbox": [ 174, 840, 823, 922 ], "page_idx": 6 }, { "type": "table", "img_path": "images/e933a56f64699856ab78d11436dd30f6fb1bc6682b60d12e1fa2d2248c62ad5b.jpg", "table_caption": [ "Table 3: Top-1 accuracy $\\% )$ comparison with other online distillation methods for training two same architecture networks as a pair on the CIFAR-100 dataset. The numbers in parentheses refer to the amount of increase in accuracy compared to the vanilla network. " ], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">Model Type</td><td colspan=\"2\">DML</td><td colspan=\"2\">ONE</td><td colspan=\"2\">AFD</td><td rowspan=\"2\">Vanila</td></tr><tr><td>2 Net Avg</td><td>Ens</td><td>2 Net Avg</td><td>Ens</td><td>2 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-20</td><td>70.90(+3.42%)</td><td>72.08</td><td>70.56(+3.08%)</td><td>72.26</td><td>71.72(+4.24%)</td><td>72.98</td><td>67.48</td></tr><tr><td>ResNet-32</td><td>73.40(+4.02%)</td><td>74.89</td><td>72.61(+3.23%)</td><td>74.07</td><td>74.03(+4.65%)</td><td>75.64</td><td>69.38</td></tr><tr><td>ResNet-56</td><td>75.48(+1.64%)</td><td>76.73</td><td>76.45(+2.61%)</td><td>77.16</td><td>77.25(+3.41%)</td><td>78.35</td><td>73.84</td></tr><tr><td>WRN-16-2</td><td>74.68(+3.61%)</td><td>75.81</td><td>73.85(+2.78%)</td><td>74.84</td><td>75.33(+4.26%)</td><td>76.34</td><td>71.07</td></tr><tr><td>WRN-16-4</td><td>78.17(+2.79%)</td><td>79.06</td><td>77.32(+1.94%)</td><td>77.79</td><td>78.55(+3.17%)</td><td>79.28</td><td>75.38</td></tr><tr><td>WRN-28-2</td><td>77.02(+3.52%)</td><td>78.64</td><td>76.67(+3.17%)</td><td>77.40</td><td>77.22(+3.72%)</td><td>78.72</td><td>73.50</td></tr><tr><td>WRN-28-4</td><td>79.16(+2.56%)</td><td>80.56</td><td>79.25(+2.65%)</td><td>79.73</td><td>79.46(+2.86%)</td><td>80.65</td><td>76.60</td></tr></table>", "bbox": [ 173, 160, 825, 282 ], "page_idx": 7 }, { "type": "table", "img_path": "images/b10a09248791568a1031ea046b46587a8e6cf524863e16cd90869fe74b15302f.jpg", "table_caption": [ "Table 4: Top-1 accuracy $( \\% )$ comparison with other online distillation methods for training two different architectures as a pair on CIFAR-100 dataset. " ], "table_footnote": [], "table_body": "<table><tr><td colspan=\"2\">Model Types</td><td colspan=\"3\">KD</td><td colspan=\"3\">DML</td><td colspan=\"3\">AFD</td></tr><tr><td>Net1</td><td>Net2</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td></tr><tr><td>ResNet-32</td><td>ResNet-56</td><td>72.92</td><td>76.27</td><td>76.71</td><td>73.48</td><td>76.35</td><td>76.74</td><td>74.13</td><td>76.69</td><td>77.11</td></tr><tr><td>ResNet-32</td><td>WRN-16-4</td><td>72.67</td><td>77.26</td><td>76.94</td><td>73.48</td><td>77.43</td><td>77.01</td><td>74.43</td><td>77.82</td><td>77.67</td></tr><tr><td>ResNet-56</td><td>WRN-28-4</td><td>75.48</td><td>78.91</td><td>79.23</td><td>76.03</td><td>79.32</td><td>79.38</td><td>77.95</td><td>79.21</td><td>80.01</td></tr><tr><td>ResNet-20</td><td>WRN-28-10</td><td>70.08</td><td>78.17</td><td>76.12</td><td>71.03</td><td>77.70</td><td>75.78</td><td>72.62</td><td>77.83</td><td>76.70</td></tr><tr><td>WRN-16-2</td><td>WRN-16-4</td><td>74.87</td><td>77.42</td><td>77.30</td><td>74.87</td><td>77.17</td><td>76.96</td><td>75.81</td><td>78.00</td><td>77.84</td></tr><tr><td>WRN-16-2</td><td>WRN-28-2</td><td>74.86</td><td>76.45</td><td>77.29</td><td>75.11</td><td>76.91</td><td>77.24</td><td>75.88</td><td>77.08</td><td>77.82</td></tr><tr><td>WRN-16-2</td><td>WRN-28-4</td><td>74.51</td><td>78.18</td><td>77.60</td><td>74.95</td><td>78.23</td><td>77.67</td><td>76.23</td><td>78.26</td><td>78.28</td></tr><tr><td colspan=\"2\">Average</td><td>73.63</td><td>77.52</td><td>77.31</td><td>74.14</td><td>77.59</td><td>77.25</td><td>75.29</td><td>77.84</td><td>77.92</td></tr></table>", "bbox": [ 173, 342, 825, 477 ], "page_idx": 7 }, { "type": "text", "text": "", "bbox": [ 178, 500, 823, 527 ], "page_idx": 7 }, { "type": "text", "text": "4.4 DIFFERENT ARCHITECTURE ", "text_level": 1, "bbox": [ 176, 547, 403, 560 ], "page_idx": 7 }, { "type": "text", "text": "In this section, we compare our method with DML and KD using different network architectures. We set Net2 as the higher capacity network. For KD, we use the ensemble of the two sub-networks as a teacher to mimic at every iteration. The difference with original KD (Hinton et al., 2015) is that it is an online learning method, not offline. We did not include ONE because ONE can not be applied in case where the sub-networks have different model types due to its architecture of sharing the lowlevel layers. In table 4, we could observe that our method shows better performance improvement than other methods in both Net1 and Net2 except for a couple of cases. The interesting result is that when AFD is applied, the performance of Net1 (smaller network) is improved significantly compared to other online distillation methods. This is because AFD can transfer the higher capacity network’s meaningful knowledge (feature map distribution) to the lower capacity one better than other online methods. When compared with KD and DML, AFD’s Net1 accuracy is higher by $1 . 6 6 \\%$ and $1 . 1 5 \\%$ and the ensemble accuracy is better by $0 . 6 1 \\%$ and $0 . 6 7 \\%$ on average respectively. In case of (WRN-16-2, WRN-28-4) pair, the Net1’s parameter size (0.70M) is more than 8 times smaller than Net2 (5.87M). Despite the large size difference, our method improves both networks’ accuracy, particularly our Net1 performance is better than KD and DML by $1 . 7 2 \\%$ and $1 . 2 8 \\%$ respectively. The performance of KD and DML seems to decline as the difference between the two model sizes gets larger. Throughout this experiment, we have shown that our method also works properly for different architectures of sub-networks even when two networks have large difference in their model sizes. Using our method, smaller network considerably benefits from the large network. ", "bbox": [ 173, 573, 825, 835 ], "page_idx": 7 }, { "type": "text", "text": "4.5 EXPANSION TO 3 NETWORKS ", "text_level": 1, "bbox": [ 176, 854, 416, 868 ], "page_idx": 7 }, { "type": "text", "text": "To show our method’s expandability for training more than two networks, we conduct experiment of training 3 networks in this section. As proposed in Sec 3.3, our method uses a cyclic learning framework rather than employing adversarial loss between every network pairs in order to reduce the amount of computation and memory. DML calculates the mutual knowledge distillation loss between every network pairs and uses the average of the losses. ONE generates a gated ensemble of the sub-networks and transfers the knowledge of the ensemble logit to each network. As it can be seen in Table 5, AFD outperforms the compared online distillation methods on both $3 \\ \\mathrm { N e t }$ average and ensemble accuracy in every model types. Comparing the results of Table 5 to that of Table 3, the overall tendency of performance gains compared to DML and ONE is maintained. ", "bbox": [ 176, 882, 823, 924 ], "page_idx": 7 }, { "type": "table", "img_path": "images/e9a8f454cc8b61d91cf2be924ce2dc5ccf593f8dd14790c902383028d157ce60.jpg", "table_caption": [ "Table 5: Top-1 accuracy $\\% )$ comparison with other online distillation methods using 3 networks on CIFAR-100 dataset. ’3 Net Avg’ represents the average accuracy of the 3 networks. " ], "table_footnote": [], "table_body": "<table><tr><td rowspan=\"2\">Model Type</td><td colspan=\"2\">DML</td><td colspan=\"2\">ONE</td><td colspan=\"2\">AFD</td><td rowspan=\"2\">Vanilla</td></tr><tr><td>3 Net Avg</td><td>Ens</td><td>3 Net Avg</td><td>Ens</td><td>3 Net Avg</td><td>Ens</td></tr><tr><td>ResNet-32</td><td>73.43</td><td>76.11</td><td>73.25</td><td>74.94</td><td>74.14</td><td>76.64</td><td>69.38</td></tr><tr><td>ResNet-56</td><td>76.11</td><td>77.83</td><td>76.49</td><td>77.38</td><td>77.37</td><td>79.18</td><td>73.84</td></tr><tr><td>WRN-16-2</td><td>75.15</td><td>76.93</td><td>73.87</td><td>75.26</td><td>75.65</td><td>77.54</td><td>71.07</td></tr><tr><td>WRN-28-2</td><td>77.12</td><td>79.41</td><td>76.66</td><td>77.53</td><td>77.20</td><td>79.78</td><td>73.50</td></tr></table>", "bbox": [ 197, 146, 797, 234 ], "page_idx": 8 }, { "type": "table", "img_path": "images/5065616fc6455458e6cc953de6b7d1a02899c0684a82747320321fc4c157f01d.jpg", "table_caption": [ "Table 6: Top-1 accuracy( $\\textcircled{9}$ comparison with DML on ImageNet dataset. " ], "table_footnote": [], "table_body": "<table><tr><td colspan=\"2\">Model Types</td><td colspan=\"3\">DML</td><td colspan=\"3\">AFD</td><td colspan=\"2\">Vanilla</td></tr><tr><td>Net1</td><td>Net2</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td><td>Ens</td><td>Net1</td><td>Net2</td></tr><tr><td>ResNet-18</td><td>ResNet-34</td><td>70.19</td><td>73.57</td><td>73.33</td><td>70.39</td><td>74.00</td><td>74.47</td><td>69.76</td><td>73.27</td></tr></table>", "bbox": [ 181, 273, 816, 320 ], "page_idx": 8 }, { "type": "text", "text": "", "bbox": [ 173, 338, 825, 422 ], "page_idx": 8 }, { "type": "text", "text": "4.6 IMAGENET EXPERIMENT ", "text_level": 1, "bbox": [ 174, 439, 388, 453 ], "page_idx": 8 }, { "type": "text", "text": "We evaluate our method on ImageNet dataset to show that our method can also be applicable to a large scale image dataset. We use ImageNet LSVRC 2015 (Russakovsky et al., 2015) which has 1.2M training images and 50K validation images over 1,000 classes. We compare our method with DML using two pre-trained networks ResNet-18 and ResNet-34 as a pair. The results are after 30 epochs of training. As shown in Table 6, our method improves the networks better than DML. ", "bbox": [ 174, 465, 825, 535 ], "page_idx": 8 }, { "type": "text", "text": "5 CONCLUSION ", "text_level": 1, "bbox": [ 176, 554, 318, 570 ], "page_idx": 8 }, { "type": "text", "text": "We proposed an online knowledge distillation method that transfers the knowledge not only at logitlevel but also at feature map-level using the adversarial training scheme. Unlike existing online distillation methods, our method utilizes the feature map information and showed that knowledge transfer at feature map-level is possible even in an online environment. Through extensive experiments, we demonstrated the adequacy of adopting the distribution learning via adversarial training for online feature map distillation and could achieve better performance than existing online methods. We also introduced a novel cyclic learning framework for training multiple networks concurrently and presented its efficacy by comparing with existing approaches. We also confirmed that our method is broadly suitable to various architecture types from a very small network (ResNet-20) to a large (WRN-28-4) network. We hope that due to the work of our research, the area of knowledge distillation can be further advanced and studied by many researchers. ", "bbox": [ 174, 585, 825, 738 ], "page_idx": 8 }, { "type": "text", "text": "REFERENCES ", "text_level": 1, "bbox": [ 174, 758, 285, 773 ], "page_idx": 8 }, { "type": "text", "text": "Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In ˇ Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006. \nBo Dai, Sanja Fidler, Raquel Urtasun, and Dahua Lin. Towards diverse and natural image descriptions via a conditional gan. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2970–2979, 2017. \nIan Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014. ", "bbox": [ 173, 781, 826, 924 ], "page_idx": 8 }, { "type": "text", "text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ", "bbox": [ 174, 103, 821, 146 ], "page_idx": 9 }, { "type": "text", "text": "Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. ", "bbox": [ 171, 155, 823, 185 ], "page_idx": 9 }, { "type": "text", "text": "Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017. ", "bbox": [ 174, 194, 823, 237 ], "page_idx": 9 }, { "type": "text", "text": "Jangho Kim, SeongUk Park, and Nojun Kwak. Paraphrasing complex network: Network compression via factor transfer. In Advances in Neural Information Processing Systems, pp. 2760–2769, 2018. ", "bbox": [ 173, 246, 823, 289 ], "page_idx": 9 }, { "type": "text", "text": "Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. ", "bbox": [ 174, 299, 823, 327 ], "page_idx": 9 }, { "type": "text", "text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-100 (canadian institute for advanced research). URL http://www.cs.toronto.edu/˜kriz/cifar.html. ", "bbox": [ 173, 337, 823, 366 ], "page_idx": 9 }, { "type": "text", "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ", "bbox": [ 174, 375, 821, 417 ], "page_idx": 9 }, { "type": "text", "text": "Xu Lan, Xiatian Zhu, and Shaogang Gong. Knowledge distillation by on-the-fly native ensemble. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pp. 7528–7538. Curran Associates Inc., 2018. ", "bbox": [ 174, 428, 825, 470 ], "page_idx": 9 }, { "type": "text", "text": "Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning filters for efficient convnets. arXiv preprint arXiv:1608.08710, 2016. ", "bbox": [ 169, 479, 823, 508 ], "page_idx": 9 }, { "type": "text", "text": "Peiye Liu, Wu Liu, Huadong Ma, Tao Mei, and Mingoo Seok. Ktan: knowledge transfer adversarial network. arXiv preprint arXiv:1810.08126, 2018. ", "bbox": [ 169, 517, 823, 547 ], "page_idx": 9 }, { "type": "text", "text": "Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pp. 2794–2802, 2017. ", "bbox": [ 174, 556, 823, 601 ], "page_idx": 9 }, { "type": "text", "text": "Takeru Miyato, Andrew M Dai, and Ian Goodfellow. Adversarial training methods for semisupervised text classification. arXiv preprint arXiv:1605.07725, 2016. ", "bbox": [ 173, 608, 823, 638 ], "page_idx": 9 }, { "type": "text", "text": "David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic methods. arXiv preprint arXiv:1610.01945, 2016. ", "bbox": [ 173, 647, 823, 676 ], "page_idx": 9 }, { "type": "text", "text": "Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pp. 525–542. Springer, 2016. ", "bbox": [ 173, 685, 825, 729 ], "page_idx": 9 }, { "type": "text", "text": "Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. arXiv preprint arXiv:1412.6550, 2014. ", "bbox": [ 173, 738, 825, 767 ], "page_idx": 9 }, { "type": "text", "text": "Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV), 115(3):211–252, 2015. doi: 10.1007/s11263-015-0816-y. ", "bbox": [ 173, 776, 825, 833 ], "page_idx": 9 }, { "type": "text", "text": "Jost Tobias Springenberg. Unsupervised and semi-supervised learning with categorical generative adversarial networks. arXiv preprint arXiv:1511.06390, 2015. ", "bbox": [ 171, 843, 823, 872 ], "page_idx": 9 }, { "type": "text", "text": "Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016a. ", "bbox": [ 174, 882, 825, 922 ], "page_idx": 9 }, { "type": "text", "text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016b. ", "bbox": [ 173, 103, 823, 132 ], "page_idx": 10 }, { "type": "text", "text": "Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4320– 4328, 2018. ", "bbox": [ 174, 140, 823, 184 ], "page_idx": 10 }, { "type": "text", "text": "Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In Proceedings of the IEEE international conference on computer vision, pp. 2223–2232, 2017. ", "bbox": [ 173, 193, 823, 234 ], "page_idx": 10 }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288# Adaptive Machine Unlearning
Varun Gupta1, Christopher Jung1, Seth Neel2, Aaron Roth1, Saeed Sharifi-Malvajerdi1, and Chris Waites3
1University of Pennsylvania 2Harvard University 3Stanford University
# Abstract
Data deletion algorithms aim to remove the influence of deleted data points from trained models at a cheaper computational cost than fully retraining those models. However, for sequences of deletions, most prior work in the non-convex setting gives valid guarantees only for sequences that are chosen independently of the models that are published. If people choose to delete their data as a function of the published models (because they don’t like what the models reveal about them, for example), then the update sequence is adaptive. In this paper, we give a general reduction from deletion guarantees against adaptive sequences to deletion guarantees against non-adaptive sequences, using differential privacy and its connection to max information. Combined with ideas from prior work which give guarantees for non-adaptive deletion sequences, this leads to extremely flexible algorithms able to handle arbitrary model classes and training methodologies, giving strong provable deletion guarantees for adaptive deletion sequences. We show in theory how prior work for non-convex models fails against adaptive deletion sequences, and use this intuition to design a practical attack against the SISA algorithm of Bourtoule et al. [2021] on CIFAR-10, MNIST, Fashion-MNIST.
# 1 Introduction
Businesses like Facebook and Google depend on training sophisticated models on user data. Increasingly—in part because of regulations like the European Union’s General Data Protection Act and the California Consumer Privacy Act—these organizations are receiving requests to delete the data of particular users. But what should that mean? It is straightforward to delete a customer’s data from a database and stop using it to train future models. But what about models that have already been trained using an individual’s data? These are not necessarily safe; it is known that individual training data can be exfiltrated from models trained in standard ways via model inversion attacks [Shokri et al., 2017, Veale et al., 2018, Fredrikson et al., 2015]. Regulators are still grappling with when a trained model should be considered to contain personal data of individuals in the training set and the potential legal implications. In 2020 draft guidance, the U.K.’s Information Commissioner’s Office addressed how to comply with data deletion requests as they pertain to ML models:
If the request is for rectification or erasure of the data, this may not be possible without re-training the model...or deleting the model altogether [ICO, 2020].
Fully retraining the model every time a deletion request is received can be prohibitive in terms of both time and money—especially for large models and frequent deletion requests. The problem of data deletion (also known as machine unlearning) is to find an algorithmic middle ground between the compliant but impractical baseline of retraining, and the potentially illegal standard of doing nothing. We iteratively update models as deletion requests come in, with the twin goals of having computational cost that is substantially less than the cost of full retraining, and the guarantee that the models we produce are (almost) indistinguishable from the models that would have resulted from full retraining.
After an initial model is deployed deletion requests arrive over time as users make decisions about whether to delete their data. It is easy to see how these decisions may be adaptive with respect to the models. For example, security researchers may publish a new model inversion attack that identifies a specific subset of people in the training data, thus leading to increased deletion requests for people in that subset. In this paper we give the first machine unlearning algorithms that both have rigorous deletion guarantees against these kind of adaptive deletion sequence, and can accommodate arbitrary non-convex models like deep neural networks without requiring pretraining on non-user data.
# 1.1 Main Results
The deletion guarantees proven for several prior methods crucially rely on the implicit assumption that the points that are deleted are independent of the randomness used to train the models. However this assumption fails unless the sequence of deletion requests is chosen independently of the information that the model provider has made public. This is a very strong assumption, because users may wish to delete their data exactly because of what deployed models reveal about them.
We give a generic reduction. We show that if:
1. A data deletion algorithm $\mathcal { R } _ { A }$ for a learning algorithm $\mathcal { A }$ has deletion guarantees for oblivious sequences of deletion requests (as those from past work do), and 2. Information about the internal randomness of $\mathcal { R } _ { A }$ is revealed only in a manner that satisfies differential privacy, then
$( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ also satisfies data deletion guarantees against an adaptive sequence of deletion requests, that can depend in arbitrary ways on the information that the model provider has made public.
In Section 3, we motivate our main result with a theoretical example which illustrates that past method’s lack of guarantees for adaptive sequences is not simply a failure of analysis, but an actual failure of these methods to satisfy deletion guarantees for adaptive deletion sequences. As an exemplar, we use a variant of SISA from Bourtoule et al. [2021] that satisfies perfect deletion guarantees for non-adaptive deletion sequences and exhibit adaptive deletion sequences that strongly separate the resulting distribution on models compared to the retraining baseline.
The generic reduction found in Section 4 can be used to give adaptive data deletion mechanisms for a wide variety of problems by leveraging past work on deletion algorithms for non-adaptive sequences, and a line of work on differentially private aggregation [Papernot et al., 2018, Dwork and Feldman, 2018]. Since prior deletion algorithms themselves tend to use existing learning algorithms in a black-box way, the entire pipeline is modular and easy to bolt-on to existing methods. In Section 5, we show how this can be accomplished by using a variant of the SISA framework of Bourtoule et al. [2021] together with a differentially private aggregation method.
In Section 6, we complement our main result with a set of experimental results on CIFAR-10, MNIST, and Fashion-MNIST that demonstrate differential privacy may be useful in giving adaptive guarantees beyond the statement of our theorems. Specifically we show that small amounts of noise addition (insufficient for our theorems to apply) already serve to break the adaptive deletion strategies that we use to falsify the adaptive deletion guarantees in our experiments described in Section 3 and do so at minimal expense in model accuracy.
# 1.2 Related Work
Data deletion was introduced by Cao and Yang [2015]; we adopt the randomized formulation of Ginart et al. [2019]. Ginart et al. [2019] anticipate the problem of deletion requests that might be correlated with internal state of the algorithm, and define (and propose as a study for future work) robust data deletion which is a data deletion guarantee that holds for adversaries with knowledge of the internal state. Our insight is that we can provide deletion guarantees against adaptive sequences by instead obscuring the internal state of the algorithm using techniques from differential privacy.
We are the first to explicitly consider the problem of adaptive sequences of deletion requests, but some techniques from past work do have deletion guarantees that extend to adaptive sequences. Deterministic methods and methods that depend only on randomness that is sampled after the deletion request are already robust to adaptive deletion. This includes techniques that find an approximately optimal solution to a strongly convex problem and then perturb the solution to obscure the optimizer within a small radius e.g. Guo et al. [2019], Neel et al. [2021], Sekhari et al. [2021]. It also includes the approach of Golatkar et al. [2020a,b] which pre-trains a nonconvex model on data that will never be deleted and then does convex fine-tuning on user data on top of that. Techniques whose deletion guarantees depend on randomness sampled at training in general do not have guarantees against adaptive deletions. This includes algorithms given in Ginart et al. [2019], Bourtoule et al. [2021], Neel et al. [2021] — the SISA framework of Bourtoule et al. [2021] being of particular interest as it is agnostic to the class of models and training methodology, and so is extremely flexible.
Differential privacy has been used as a mitigation for adaptivity since the work of Dwork et al. [2015c,a]. In machine learning, it has been used to mitigate the bias of adaptive data gathering strategies as used in bandit learning algorithms [Neel and Roth, 2018]. The application that is most similar to our work is Hassidim et al. [2020], which uses differential privacy of the internal randomness of an algorithm (as we do) to reduce streaming algorithms with guarantees against adaptive adversarial streams to streaming algorithms with guarantees against oblivious adversaries. Our techniques differ; while Hassidim et al. [2020] reduce to the so-called “transfer theorem for linear and low sensitivity queries” developed over a series of works Dwork et al. [2015c], Bassily et al. [2021], Jung et al. [2020], we use a more general connection between differential privacy and “max-information” established in Dwork et al. [2015b], Rogers et al. [2016].
# 2 Preliminaries
Let $\mathcal { Z }$ be the data domain. A dataset $D$ is a multi-set of elements from $\mathcal { Z }$ . We consider update requests of two types: deletion and addition. These update requests are formally defined below, similar to how they are defined in [Neel et al., 2021].
Definition 2.1 (Update Operations and Sequences). An update $u$ is a pair $( z , \bullet )$ where $z \in { \mathcal { Z } }$ is $a$ datapoint and $\bullet \in \mathcal { T } = \{ ^ { \prime } \mathbf { a d d } ^ { \prime } , ^ { \prime } \mathbf { d e l e t e } ^ { \prime } \}$ determines the type of the update. An update sequence $U$ is a sequence $( u ^ { 1 } , u ^ { 2 } , \ldots )$ where $u ^ { t } \in \mathcal { Z } \times \mathcal { T }$ for all $t$ . Given a dataset $D$ and an update $u = ( z , \bullet )$ , the update operation is defined as:
$$D \circ u \triangleq { \left\{ { D \cup \{ z \} } \quad i f \bullet = { ' } { \mathsf { a d d } } ^ { \prime } \right.} _ { D \setminus \{ z \} } _ { i f \bullet = { ' } { \mathsf { d e l e t e } } ^ { \prime } }$$
Given an update sequence $U = ( u ^ { 1 } , u ^ { 2 } , \ldots ) ;$ , we have $D \circ U \triangleq ( ( ( D \circ u ^ { 1 } ) \circ u ^ { 2 } ) \circ \ldots ) .$ .
We use $\Theta$ to denote the space of models. A learning or training algorithm is a mapping $\mathcal { A } : \mathcal { Z } ^ { * } \to \Theta ^ { * }$ that maps a dataset $D \in { \mathcal { Z } } ^ { * }$ to a collection of models $\theta \in \Theta ^ { * }$ . An unlearning or update algorithm for $\mathcal { A }$ is a mapping $\mathcal { R } _ { A } : \mathcal { Z } ^ { * } \times ( \mathcal { Z } \times \mathcal { T } ) \times \mathcal { S } \to \Theta ^ { * }$ which takes in a data set $D \in { \mathcal { Z } } ^ { * }$ , an update request $u \in \mathcal { Z } \times \mathcal { T }$ , and some current state for the algorithms $s \in S$ (the domain $s$ can be arbitrary), and outputs an updated collection of models $\theta ^ { \prime } \in \Theta ^ { * }$ . In this paper we consider a setting in which a stream of update requests arrive in sequence. We note that in this sequential framework, the update algorithm $\mathcal { R } _ { A }$ also updates the state of the algorithm after each update request is processed; however, for notational economy, we do not explicitly write the updated state as an output of the algorithm.
At each round, we provide access to the models through a mapping $f _ { \mathrm { p u b l i s h } } ^ { t } : \Theta ^ { * } \to \Psi$ that takes in the collection of models and outputs some object $\psi \in \Psi$ . A published object $\psi \in \Psi$ can, for instance, be the aggregate predictions of the learned models on a data set, or, some aggregation of the models. To model adaptively chosen update sequences, we define an arbitrary “update requester” who interacts with the learning and unlearning algorithms $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ through the publishing function $f _ { \mathrm { p u b l i s h } }$ in rounds to generate a sequence of updates. The update requester is denoted by UpdReq and defined in Definition 2.2, and the interaction between the algorithms and the update requester is described in Algorithm 1.
Throughout we will use $u ^ { t }$ to denote the update request at round $t$ . We will use $D ^ { t }$ to denote the data set at round $t$ : $D ^ { 0 }$ is the initial training data set and for all $t \geq 1$ , $D ^ { t } = D ^ { t - 1 } \circ u ^ { t }$ . We will use $\theta ^ { t }$ to denote the learned models at round $t$ : $\theta ^ { 0 }$ is generated by the initial training algorithm $\mathcal { A }$ , and $\theta ^ { t }$ for $t \geq 1$ denotes the updated models at round $t$ generated by the update algorithm $\mathcal { R } _ { A }$ . $\psi ^ { t }$ denotes the published object at round $t$ : $\psi ^ { t } = f _ { \mathrm { p u b l i s h } } ^ { t } ( \theta ^ { t } )$ .
Algorithm 1: Interaction between $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ and UpdReq
<table><tr><td></td><td>1: Input: Data set D</td></tr><tr><td>2:</td><td>Let D°← D.</td></tr><tr><td>3:</td><td>Train 0° ← A(D).</td></tr><tr><td>4:</td><td>Publish y0←pubish(00).</td></tr><tr><td>5:</td><td> Save the initial state so.</td></tr><tr><td>6:</td><td>for t = 1,2,... do</td></tr><tr><td>7:</td><td> The update requester requests a new update, given the history of interaction:</td></tr><tr><td>8:</td><td>ut←UpdReq(o,u¹,1,u², ,ut-1,γt-1).</td></tr><tr><td>9:</td><td>The algorithms update, given ut:</td></tr><tr><td>10:</td><td>Update the models 0t ← RA (Dt-1,ut,st-1).</td></tr><tr><td>11:</td><td>Publish bt ← fpubish (0t).</td></tr><tr><td>12:</td><td>Save the updated state st .</td></tr><tr><td>13:</td><td>Update the data set Dt ← Dt-1 o ut .</td></tr></table>
Definition 2.2 (Update Requester (UpdReq)). The update sequence is generated by an update requester which is modeled by a (possibly randomized) mapping UpdReq : $\Psi ^ { * } \times ( \mathcal { Z } \times \mathcal { T } ) ^ { * } ( \mathcal { Z } \times \mathcal { T } )$ that takes as input the history of interaction between herself and the algorithms, and outputs a new update for the current round. Given an update requester UpdReq, algorithms $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ and publishing functions $\{ f _ { p u b l i s h } ^ { t } \} _ { t }$ , the update sequence $U = \{ u ^ { t } \} _ { t }$ can be written as
$$\boldsymbol { u } ^ { 1 } = \mathrm { U p d R e q } \left( \boldsymbol { \psi } ^ { 0 } \right) , \boldsymbol { u } ^ { 2 } = \mathrm { U p d R e q } \left( \boldsymbol { \psi } ^ { 0 } , \boldsymbol { u } ^ { 1 } , \boldsymbol { \psi } ^ { 1 } \right) , \boldsymbol { \cdot } , \boldsymbol { \cdot } , \boldsymbol { u } ^ { t } = \mathrm { U p d R e q } \left( \boldsymbol { \psi } ^ { 0 } , \boldsymbol { u } ^ { 1 } , \boldsymbol { \psi } ^ { 1 } , \boldsymbol { \cdot } , \boldsymbol { \cdot } , \boldsymbol { u } ^ { t - 1 } , \boldsymbol { \psi } ^ { t - 1 } \right)$$
We say an update requester UpdReq is nonadaptive if it is independent of the published objects, i.e., if there exists a mapping UpdR $\mathfrak { s q } ^ { \prime } : ( \mathcal { Z } \times \mathcal { T } ) ^ { \ast } ( \mathcal { Z } \times \mathcal { T } )$ such that for all $t \geq 1$ ,
$$u ^ { t } = \mathtt { U p d R e q } \left( \psi ^ { 0 } , u ^ { 1 } , \psi ^ { 1 } , u ^ { 2 } , \ldots , u ^ { t - 1 } , \psi ^ { t - 1 } \right) = \mathtt { U p d R e q } ^ { \prime } \left( u ^ { 1 } , u ^ { 2 } , \ldots , u ^ { t - 1 } \right)$$
This is equivalent to saying that the update sequence is fixed before the interaction occurs.
Following [Ginart et al., 2019], we propose the following definition for an unlearning algorithm in the sequential update setting ([Ginart et al., 2019] gives a definition for a single deletion request, whereas here we define a natural extension for an arbitrarily long sequence of deletions, as well as additions, that can be chosen adaptively.). Informally, we require that at every round, and for all possible update requesters, with high probability over the draw of the update sequence, no subset of models resulting from deletion occurs with substantially higher probability than it would have under full retraining.
Definition 2.3 $( \alpha , \beta , \gamma )$ -unlearning). We say that $\mathcal { R } _ { A }$ is an $( \alpha , \beta , \gamma )$ -unlearning algorithm for $\mathcal { A }$ if for all datasets $D = D ^ { 0 }$ and all update requesters UpdReq, the following condition holds: For every update step $t \geq 1$ , with probability at least $1 - \gamma$ over the draw of the update sequence $u ^ { \le t } \overset { \cdot } { = } \hat { ( } u ^ { 1 } , \ldots , \overset { \cdot } { u } ^ { t } )$ from UpdReq,
$$\begin{array} { r } { \forall E \subseteq \Theta ^ { * } : \quad \operatorname* { P r } \left[ \mathcal { R } _ { { \cal A } } \left( D ^ { t - 1 } , u ^ { t } , s ^ { t - 1 } \right) \in E \middle | u ^ { \leq t } \right] \leq e ^ { \alpha } \cdot \operatorname* { P r } \left[ { \cal A } \left( D ^ { t } \right) \in E \right] + \beta } \end{array}$$
We say $\mathcal { R } _ { A }$ is a nonadaptive $( \alpha , \beta , \gamma )$ -unlearning algorithm for $\mathcal { A }$ if the above condition holds for any nonadaptive UpdReq.
Remark 2.1. Our definition of unlearning is reminiscent of differential privacy, but following [Ginart et al., 2019], we ask only for $a$ one-sided guarantee: that the probability of any event under the unlearning scheme is not too much larger than the probability of the same event under full retraining, but not vice versa. The reason is that we do not want there to be events that can substantially increase an observer’s confidence that we did not engage in full retraining, but we do not object to observers who strongly update their beliefs that we did engage in full retraining. Our events $E$ are defined directly over the sets of models in $\Theta ^ { * }$ output by $\mathcal { A }$ and $\mathcal { R } _ { A }$ — note that because of information processing inequalities, this is only stronger than defining events $E$ over the observable outcome space $\Psi$ .
# 2.1 Differential Privacy and Max-Information
Differential privacy will be a key tool in our results. Let $\mathcal { X }$ denote an arbitrary data domain. We use $x \in \mathcal { X }$ to denote an individual element of $\mathcal { X }$ , and $X \in \mathcal { X } ^ { \ast }$ to denote a collection of elements from $\mathcal { X }$ — which we call a data set. We say two data sets $X , X ^ { \prime } \in { \mathcal { X } } ^ { * }$ are neighboring if they differ in at most one element. We say an algorithm $M : \mathcal { X } ^ { n } \mathcal { O }$ is differentially private if its output distributions on neighboring data sets are close, formalized below.
Definition 2.4 (Differential Privacy (DP) [Dwork et al., 2006b,a]). An algorithm $M : \mathcal { X } ^ { m } \mathcal { O }$ is $( \epsilon , \delta )$ -differentially private, if for every neighboring $X$ and $X ^ { \prime }$ , and for every $O \subseteq { \mathcal { O } }$ , we have $\mathrm { P r } \left[ M ( X ) \in O \right] \leq e ^ { \epsilon } \mathrm { P r } \left[ M ( \dot { X } ^ { \prime } ) \in O \right] + \delta$ .
We remark at the outset that the “datasets” to which we will eventually ask for differential privacy with respect to will not be the datasets on which our learning algorithms are trained, but will instead be collections of random bits parameterizing our randomized algorithms.
Differentially private algorithms are robust to data-independent post-processing:
Lemma 2.1 (Post-processing preserves DP [Dwork et al., 2006b]). If $M : \mathcal { X } ^ { m } \mathcal { O }$ is $( \epsilon , \delta )$ - differentially private, then for all $f : \mathcal { O } \mathcal { R }$ , we have $f \circ M : \mathcal { X } ^ { m } \mathcal { R }$ defined by $f \circ M ( X ) =$ $f ( M ( X ) )$ is $( \epsilon , \delta )$ -differentially private.
The max-information between two jointly distributed random variables measures how close their joint distribution is to the product of their corresponding marginal distributions.
Definition 2.5 (Max-Information [Dwork et al., 2015b]). Let $X$ and $Y$ be jointly distributed random variables over the domain $( \mathcal { X } , \mathcal { Y } )$ . The $\beta$ -approximate max-information between $X$ and $Y$ is:
$$I _ { \infty } ^ { \beta } ( X ; Y ) = \log \operatorname* { s u p } _ { \substack { E \subseteq ( \mathcal { X } , \mathcal { Y } ) , \operatorname* { P r } [ ( X , Y ) \in E ] > \beta } } \frac { \operatorname* { P r } [ ( X , Y ) \in E ] - \beta } { \operatorname* { P r } [ ( X \otimes Y ) \in E ] }$$
where $( X \otimes Y )$ represents the product distribution of $X$ and $Y$ .
The max-information of an algorithm $M$ that takes a dataset $X$ as input and outputs $M ( X )$ , is defined as the max-information between $X$ and $M ( X )$ for the worst case product distribution over $X$ :
Definition 2.6 (Max-Information of an Algorithm [Dwork et al., 2015b]). Let $M : \mathcal { X } ^ { m } \mathcal { O }$ be an Algorithm. We say $M$ has $\beta$ -approximate max-information of $k$ , written $T _ { \infty } ^ { \beta } ( M , m ) \leq k$ , if for every distribution $\mathcal { P }$ over $\mathcal { X }$ , we have $I _ { \infty } ^ { \beta } ( X ; M ( X ) ) \le k$ when $X \sim \mathcal { P } ^ { m }$ .
In this paper, we will use the fact that differentially private algorithms have bounded max-information:
Theorem 2.1 (DP implies bounded max-information [Rogers et al., 2016]). Let $M : \mathcal { X } ^ { m } \mathcal { O }$ be an $( \epsilon , \delta )$ -differentially private algorithm for $0 < \epsilon \le 1 / 2$ and $0 < \delta < \epsilon$ . Then, $I _ { \infty } ^ { \beta } ( M , m ) =$ $O \left( \epsilon ^ { 2 } m + m \sqrt { \delta / \epsilon } \right) f o r \beta = e ^ { - \epsilon ^ { 2 } m } + O \left( m \sqrt { \delta / \epsilon } \right) .$ .
# 3 Falsifying Unlearning Guarantees with Adaptivity
In this section we demonstrate that the deletion guarantees of algorithms in the SISA framework [Bourtoule et al., 2021] fail for adaptive deletion sequences. We give a clean toy construction which shows algorithms in the SISA framework fail to have nontrivial adaptive deletion guarantees even in the black-box setting when the models within each shard are not made public, only aggregations of their classification outputs. In the Appendix we experimentally evaluate a more realistic instantiation of this construction.
The setting we consider directly corresponds to the setting in which our final algorithms operate: what is made public is the aggregate predictions of the ensemble of models, but not the models themselves. For non-adaptive sequences of deletions, distributed algorithms of the sort described in Section 5 have perfect deletion guarantees. We demonstrate via a simple example that these guarantees dramatically fail for adaptive deletion sequences.
Suppose we have a dataset consisting of real-valued points with binary labels $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { 2 n }$ , $x _ { i } \in \mathbb { R } ^ { d }$ $y _ { i } \ \stackrel { - } { \in } \ \{ 0 , 1 \}$ in which there are exactly two copies of each distinct training example. Consider a simplistic classification model, resembling a lookup table, which given a point $x _ { i }$ predicts the label $y _ { i }$ if the model has been trained on $( x _ { i } , y _ { i } )$ and a dummy prediction value " $" \perp "$ otherwise:
$$f _ { \mathcal { D } } ( x _ { i } ) = \left\{ \begin{array} { l l } { y _ { i } } & { \mathrm { i f } \left( x _ { i } , y _ { i } \right) \in \mathcal { D } , } \\ { \perp } & { \mathrm { o t h e r w i s e } } \end{array} \right.$$
Consider what happens when the training algorithm randomly partitions this dataset into three pieces and trains such a model on each partition. This constructs an ensemble which, at query time, predicts the class with the majority vote. On this dataset, the ensemble will predict the labels of roughly $2 / 3$ of the training points correctly—that is, exactly those points for which the duplicates have fallen into distinct partitions, so that the ensemble gets the majority vote right.
We construct an adaptive adversary who chooses to delete exactly those training points that the ensemble correctly classifies (which are those points for whom the duplicates have fallen into distinct shards). The result is that the model resulting from this deletion sequence will misclassify every remaining training point. Full retraining (because it would rerandomize the partition) would again lead to training accuracy of approximately $2 / 3$ . Recalling that our deletion notion requires that the probability of any event under the unlearning scheme is not much larger than the probability of the same event under full retraining, this demonstrates that there are algorithms in the SISA framework — even if the models are not directly exposed — that do not satisfy $( \alpha , \beta , \gamma )$ -deletion guarantees for any nontrivial value of $\alpha$ . We formalize this below:
Theorem 3.1. There are learning and unlearning algorithms in the SISA framework $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ such that for any $\alpha _ { i }$ , and any $\beta , \gamma < 1 / 4$ , $\mathcal { R } _ { A }$ is not an $( \alpha , \beta , \gamma )$ -unlearning algorithm for $\mathcal { A }$ .
A proof of this theorem can be found in the appendix.
# 4 A Reduction from Adaptive to Nonadaptive Update Requesters
In our analysis we imagine without loss of generality that the learning algorithm $\mathcal { A }$ draws an i.i.d. sequence of random variables $r \sim \mathcal { P } ^ { m }$ (that encodes all the randomness to be used over the course of the updates) from some distribution $\mathcal { P }$ , and passes it to the unlearning algorithm $\mathcal { R } _ { A }$ . Note $r$ is drawn once in the initial training, and given $r$ , $\mathcal { A }$ and $\mathcal { R } _ { A }$ become deterministic mappings. We can also view the state $s ^ { t }$ as a deterministic mapping of $r$ , the update requests so far $u ^ { \le t } = ( \bar { u ^ { 1 } } , \dots , u ^ { t } )$ , and the original data set $D ^ { 0 }$ . We write $s ^ { t } = g ^ { t } \bar { ( } D ^ { 0 } , u ^ { \le t } , r \bar { ) }$ for some deterministic mapping $g ^ { t }$ . We can therefore summarize the trajectory of the algorithms $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ as follows.
In this view, the randomness $r$ used by the learning algorithm $\mathcal { A }$ and the subsequent invocations of the unlearning algorithm $\mathcal { R } _ { A }$ is represented as part of the internal state. Past analyses of unlearning algorithms have crucially assumed that $r$ is statistically independent of the updates $( \dot { u } ^ { 1 } , u ^ { 2 } , \dots )$ (which is the case for non-adaptive update requesters, but not for adaptive update requesters). In the following general theorem, we show that if a learning/unlearning pair satisfies unlearning guarantees against non-adaptive update requesters, and the publishing function is differentially private in the internal randomness $r$ , then the resulting algorithms also satisfy unlearning guarantees against adaptive update requesters. Note that what is important is that the publishing algorithms are differentially private in the internal randomness $r$ , not in the datapoints used for training.
Theorem 4.1 (A General Theorem). Fix a pair of learning and unlearning algorithms $( \mathcal { A } , \mathcal { R } _ { \mathcal { A } } )$ and the publishing functions $\{ f _ { p u b l i s h } ^ { t } \} _ { t }$ . Suppose for every round $t$ , the sequence of publishing functions $\{ f _ { p u b l i s h } ^ { t ^ { \prime } } \} _ { t ^ { \prime } \leq t }$ is $( \epsilon , \delta )$ -differentially private in $r \sim \mathcal { P } ^ { m }$ , for $0 < \epsilon \le 1 / 2$ and $0 < \delta < \epsilon$ . Suppose $\mathcal { R } _ { A }$ is a non-adaptive $( \alpha , \beta , \gamma )$ -unlearning algorithm for $\mathcal { A }$ . Then $\mathcal { R } _ { A }$ is an $( \alpha ^ { \prime } , \beta ^ { \prime } , \gamma ^ { \prime } )$ -unlearning algorithm for $\mathcal { A }$ for $\alpha ^ { \prime } = \alpha + \epsilon ^ { \prime } , \beta ^ { \prime } = \beta e ^ { \epsilon ^ { \prime } } + \sqrt { \delta ^ { \prime } } , \gamma ^ { \prime } = \gamma + \sqrt { \delta ^ { \prime } }$ where $\epsilon ^ { \prime } = O \left( \epsilon ^ { 2 } m + m \sqrt { \delta / \epsilon } \right)$ and $\delta ^ { \prime } = e ^ { - \epsilon ^ { 2 } m } + O \left( m \sqrt { \delta / \epsilon } \right) .$ .
The proof can be found in the Appendix, but at an intuitive level, it proceeds as follows. Because it does not change the joint distribution on update requests and internal state, we can imagine in our analysis that $r$ is redrawn after each update request from its conditional distribution, conditioned on the observed update sequence so far. Because the publishing function is differentially private in $r$ , by the fact that post-processing preserves differential privacy (Lemma 2.1), so is the update sequence. We may therefore apply the max-information bound (Theorem 2.1), which allows us to relate the conditional distribution on $r$ to its original (prior) distribution $\mathcal { P } ^ { m }$ . But resampling $r$ from $\mathcal { P } ^ { m }$ removes the dependence between $r$ and the update sequence, which places us in the non-adaptive case, and allows us to apply the hypothesized unlearning guarantees for nonadaptive update requesters.
Algorithm 2: ${ \mathcal { A } } ^ { \mathrm { d i s t r } }$ : Distributed Learning Algorithm
<table><tr><td>Input: dataset D = D° of size n Draw the shards: D = Sampler(D°,p), for every i ∈ [k]. Train the models: 0 = Asingle(D),for every i∈ [k]. Save the state: s°= ({D'}i∈[k],{}iε[k]) // to be used for the 1st update.</td></tr></table>
# 5 Distributed Algorithms
In this section, we describe a general family of distributed learning and unlearning algorithms that are in the spirit of the “SISA” framework of Bourtoule et al. [2021] (with one crucial modification). At a high level, the SISA framework operates by first randomly dividing the data into $k$ “shards”, and separately training a model on each shard. When a new point is deleted, it is removed from the shards that contained it, and only the models corresponding to those shards are retrained. The flexibility of this methodology is that the models and training procedures used in each shard can be arbitrary, as can the aggregation done at the end to convert the resulting ensemble into predictions: however these choices are instantiated, this framework gives a $( 0 , 0 , 0 )$ -unlearning algorithm against any non-adaptive update requester (Lemma 5.1). Here we show that if the $k$ shards are selected independently of one another, then we can apply our reduction given in the previous section with $m = k$ and obtain algorithms that satisfy deletion guarantees against adaptive update requesters.
A distributed learning algorithm $\mathcal { A } ^ { \mathrm { d i s t r } } : \mathcal { Z } ^ { * } \to \Theta ^ { * }$ is described by a single-shard learning algorithm $\mathcal { A } ^ { \mathrm { s i n g l e } } : \mathcal { Z } ^ { * } \to \Theta$ and a routine Sampler, used to select the points in a shard. Sampler, given a dataset $D$ and some probability $p \in [ 0 , 1 ]$ , includes each element of $D$ in the shard with probability $p$
Distributed learning algorithm ${ \mathcal { A } } ^ { \mathrm { d i s t r } }$ creates $k$ independent shards from the dataset $D$ of size $n$ by running Sampler $k$ times and training a model with $\bar { \mathcal { A } } ^ { \mathrm { s i n g l e } }$ on each shard $i \in [ k ]$ to form an ensemble of $k$ models. To emphasize that the randomness across shards is independent, we will instantiate $k$ independent samplers $\mathtt { S a m p l e r } _ { i }$ and training algorithms $\mathcal { A } _ { i } ^ { \mathrm { s i n g l e } }$ for each shard $i \in [ k ]$ . We formally describe ${ \mathcal { A } } ^ { \mathrm { d i s t r } }$ in Algorithm 2.
The state $s$ of the unlearning algorithm ${ \mathcal { R } } _ { A ^ { \mathrm { d i s t r } } }$ records the $k$ shards $\{ D _ { i } \} _ { i }$ and the ensemble of $k$ models $\{ \theta _ { i } \} _ { i }$ . Thus $\mathcal { S } = \{ \mathcal { Z } ^ { * } \} ^ { k } \times \Theta ^ { k }$ . As an update request $u$ is received, the update function removes the data point from every shard that contains it (for deletion) or adds the new point to each shard with probability $p$ (for addition). In either case, only the models corresponding to shards that have been updated are retrained using $\mathcal { A } ^ { \mathrm { s i n g l e } }$ . We formally describe ${ \mathcal { R } } _ { A ^ { \mathrm { d i s t r } } }$ in Algorithm 3.
First, we show that if the update requester is non-adaptive, ${ \mathcal { R } } _ { A ^ { \mathrm { d i s t r } } }$ is a $( 0 , 0 , 0 )$ -unlearning algorithm: Lemma 5.1. $\mathcal { R } _ { \mathcal { A } ^ { d i s t r } }$ is a non-adaptive $( 0 , 0 , 0 )$ -unlearning algorithm for $\mathcal { A } ^ { d i s t r }$ .
Now, by combining Lemma 5.1 and our general Theorem 4.1, we can show the following:
Theorem 5.1 (Unlearning Guarantees). If for every round $t$ , the sequence of publishing functions $\{ f _ { p u b l i s h } ^ { t ^ { \prime } } \} _ { t ^ { \prime } \leq t }$ is $( \epsilon , \delta )$ -differentially private in the random seeds $r \sim \mathcal { P } ^ { k }$ of the algorithms for $0 < \epsilon \leq 1 / 2$ and $0 < \delta < \epsilon _ { \cdot }$ , then $\mathcal { R } _ { \mathcal { A } ^ { d i s t r } }$ is an $( \alpha , \beta , \gamma )$ -unlearning algorithm for $\mathcal { A } ^ { d i s t r }$ where
$$\alpha = O \left( \epsilon ^ { 2 } k + k \sqrt { \delta / \epsilon } \right) , \quad \beta = \gamma = O \left( \sqrt { e ^ { - \epsilon ^ { 2 } k } + k \sqrt { \delta / \epsilon } } \right)$$
Next, we bound the time complexity of our algorithms:
Input: dataset $D ^ { t - 1 }$ , update $u ^ { t } = ( z ^ { t } , \bullet ^ { t } )$ , state $s ^ { t - 1 } = ( \{ D _ { i } ^ { t - 1 } \} _ { i \in [ k ] } , \{ \theta _ { i } ^ { t - 1 } \} _ { i \in [ k ] } )$ if $\bullet ^ { t } = { } ^ { \prime } \mathtt { d e l e t e } ^ { \prime }$ then $S = \left\{ i \in [ k ] : z ^ { t } \in D _ { i } ^ { t - 1 } \right\} / /$ the shards $z ^ { t }$ belongs to. else $S = \{ i \in [ k ] : \mathtt { S a m p l e r } _ { i } ( \{ z ^ { t } \} , p ) \neq \{ \} \} / \prime$ the shards $z ^ { t }$ will be added to. Update the shards: $D _ { i } ^ { t } = \left\{ { D _ { i } ^ { t - 1 } \circ u } \right.$ t if ot $i \in S$ se , for every $i \in [ k ]$ . Update the models: $\theta _ { i } ^ { t } = \Big \{ \mathcal { A } _ { i } ^ { \mathrm { s i n g l e } } ( D _ { i } ^ { t } )$ if ot $i \in S$ se , for every $i \in [ k ]$ . Update the state: $s ^ { t } = ( \{ D _ { i } ^ { t } \} _ { i \in [ k ] } , \{ \theta _ { i } ^ { t } \} _ { i \in [ k ] } ) / /$ to be used for the next update. Output: {θti }i∈[k]
Theorem 5.2 (Run-time Guarantees). Let $p = 1 / k$ . Suppose the publishing functions satisfy the differential privacy requirement of Theorem 5.1. Let $N ^ { t }$ denote the number of times $\mathcal { R } _ { \mathcal { A } } ^ { d i s t r }$ calls $\mathcal { A } ^ { s i n g l e }$ at round $t$ . We have that $N ^ { 0 } = k$ , and for every round $t \geq 1$ : 1) if the update requester is non-adaptive, for every $\xi$ , with probability at least $1 - \xi$ , $N ^ { t } \leq 1 + \sqrt { 2 \log { ( 1 / \xi ) } }$ . 2) if the update requester is adaptive, for every $\xi$ , with probability at least 1 − ξ, $N ^ { t } \leq 1 + \sqrt { 2 \log { ( ( n + t ) / \xi ) } }$ . Furthermore, for $\xi > \delta ^ { \prime }$ , with probability at least $1 - \xi$ , we have
$$\begin{array} { c } { { N ^ { t } \leq 1 + \operatorname* { m i n } \left\{ \sqrt { 2 \log \left( 2 ( n + t ) / ( \xi - \delta ^ { \prime } ) \right) } , \sqrt { 2 \epsilon ^ { \prime } + 2 \log \left( 2 / ( \xi - \delta ^ { \prime } ) \right) } \right\} } } \\ { { { } } } \\ { { = O \left( \epsilon ^ { 2 } k + k \sqrt { \delta / \epsilon } \right) a n d \delta ^ { \prime } = e ^ { - \epsilon ^ { 2 } k } + O \left( k \sqrt { \delta / \epsilon } \right) } } \end{array}$$
The proof can be found in the appendix, but at a high level it proceeds as follows. For a deletion request, we must retrain every shard that contains the point to be deleted. For a non-adaptive deletion request, we retrain one shard in expectation and we can obtain a high probability upper bound by using a Hoeffding bound. In the adaptive case, this may no longer be true, but there are two ways to obtain upper bounds that correspond to the two bounds in our Theorem. We can provide a worst-case upper bound on the number of shards that any of the √ $n$ data points belongs to, which incurs a cost of order $\sqrt { \log n }$ . Alternately, we can apply max-information bounds to reduce to the non-adaptive case, using an argument that is similar to our reduction for deletion guarantees.
Remark 5.1. We note that there is an alternative algorithm that one might consider, resulting from group differential privacy. If a learning algorithm satisfies $\frac { \epsilon } { k }$ −differential privacy, a valid unlearning procedure is to do nothing for $k$ updates and then fully retrain on the $( k + 1 ) ^ { t h }$ update. This follows from the −differential privacy guarantee the algorithm will have for groups of size $k$ . Our algorithm substantially outperforms this alternative algorithm as well, namely because our privacy parameter degrades much slower than in this group privacy baseline. Our analysis leverages adaptive composition of privacy across the publishing functions which means that privacy degrades with the square root of the number of updates, while it degrades linearly with group privacy. Consequently the group privacy baseline would require a full retraining every $k$ updates, but our algorithm requires a full retraining only every $k ^ { 2 }$ updates.
# 5.1 Private Aggregation
We briefly describe how we serve prediction requests by privately aggregating the output of the ensemble of models such that the published predictions are differentially private in the random seeds $r$ . At each round $t$ , while $\mathcal { R } _ { \mathcal { A } } ^ { \mathrm { d i s t r } }$ is waiting for the next update request $\hat { u ^ { t + 1 } }$ , we receive prediction requests $x$ and serve predictions $\hat { y }$ . For each prediction request, we privately aggregate the predictions made by the ensemble of models $\{ \theta _ { i } ^ { t } \} _ { i }$ ; Dwork and Feldman [2018] show several ways to privately aggregate predictions (one simple technique is to use the exponential mechanism to approximate the majority vote). Suppose we aggregate the predictions made by the ensemble of models using PrivatePredi $\mathfrak { L } _ { \epsilon ^ { \prime } } ^ { k } : \bar { \Theta } ^ { k } \times \mathcal { X } \stackrel { \left. } { \right. } \mathcal { Y }$ , which takes in an ensemble of $k$ models and a data point, aggregates predictions from the ensemble models, and outputs a label that is $\epsilon ^ { \prime }$ -differentially private in the models. If we receive $l ^ { t }$ many prediction requests $( x _ { 1 } ^ { t } , \ldots , x _ { l ^ { t } } ^ { t } )$ before our next update request $\boldsymbol u ^ { t + 1 }$ , we can write $( \hat { y } _ { 1 } ^ { t } , \dots , \hat { y } _ { l ^ { t } } ^ { t } ) = f _ { \mathrm { p u b l i s h } } ^ { t } ( \{ \theta _ { i } ^ { t } \} _ { i } )$ where $\begin{array} { r } { \hat { y } _ { j } ^ { t } = \mathtt { P r i v a t e P r e d i c t } _ { \epsilon ^ { \prime } } ^ { k } ( \{ \theta _ { i } ^ { t } \} _ { i } , x _ { j } ^ { t } ) . } \end{array}$ .
Theorem 5.1, tells us that desired unlearning parameters $( \alpha , \beta , \gamma )$ can be obtained by guaranteeing that the sequence of predictions is $( \epsilon , \delta )$ differentially private in the models (and hence $r$ ), for target parameters $\epsilon , \delta$ . As we serve prediction requests using PrivatePredict $\mathbf { \Sigma } _ { \epsilon ^ { \prime } } ^ { k }$ our privacy loss will accumulate and eventually exhaust our budget of $( \epsilon , \delta )$ -differential privacy. Hence we must track our accumulated privacy loss in the state of our unlearning algorithm, and when it is exhausted, fully retrain using $\bar { \mathcal { A } } ^ { \mathrm { d i s t r } }$ . This resamples $r$ and hence resets our privacy budget. Standard composition theorems (see Dwork and Roth [2014]) show that we exhaust our privacy budget (and need to fully retrain) every time the number of prediction requests made since the last full retraining exceeds $\left\lfloor { \frac { \epsilon ^ { 2 } } { 8 ( \epsilon ^ { \prime } ) ^ { 2 } \ln ( { \frac { 1 } { \delta } } ) } } \right\rfloor$ We formally describe this process denoted as PrivatePredictionInteraction $( \epsilon ^ { \prime } , \epsilon , \delta , k )$ in the appendix and state its unlearning guarantee in Theorem 5.3.
Theorem 5.3. The models $\{ \{ \theta _ { i } ^ { t } \} _ { i } \} _ { t }$ in PrivatePredictionInteraction $( \epsilon ^ { \prime } , \epsilon , \delta , k )$ satisfy $( \alpha , \beta , \gamma )$ -unlearning guarantee for $\mathcal { A } ^ { d i s t r }$ where $\begin{array} { r l r } { \alpha } & { { } = } & { O \left( \epsilon ^ { 2 } k + k \sqrt { \delta / \epsilon } \right) } \end{array}$ and $\beta , \gamma \quad = \quad$ $O \left( \sqrt { e ^ { - \epsilon ^ { 2 } k } + k \sqrt { \delta / \epsilon } } \right)$ , $i f 0 < \epsilon \leq 1 / 2$ and $0 < \delta < \epsilon$ .
# 6 Evaluation of Unlearning Guarantees
In this section we consider the white-box setting in which the models in each shard are made public. SISA continues to have perfect deletion guarantees against non-adaptive deletion sequences in this setting. Experimental results on CIFAR-10 [Krizhevsky and Hinton, 2009], MNIST [Lecun et al., 1998], and Fashion-MNIST [Xiao et al., 2017] show both the failure of SISA to satisfy adaptive deletion guarantees, and give evidence that differential privacy can mitigate this problem well beyond the setting of our theorems while achieving accuracy only modestly worse than SISA. The code for our experiments can be found at https://github.com/ChrisWaites/adaptive-machine-unlearning.
We train SISA with an ensemble of convolutional neural networks on several datasets of points with categorical labels. Given a new point at query time, each model in the ensemble votes on the most likely label and aggregates their votes. The models are exposed publicly. This scheme has perfect non-adaptive deletion guarantees.
To construct an adaptive deletion sequence to falsify the hypothesis that the scheme has adaptive deletion guarantees, we exploit the observation that neural networks are often overconfident in the correct label for points on which they have been trained. For each training point, we guess that it falls into the shard corresponding to the model that has the highest confidence for the correct label. We then delete points for which we guess that they fall into the first $k / 2$ of the shards, and do not delete any others. After deleting the targeted points, we compute a test statistic: the indicator of whether the average accuracy of the models from the targeted shards is lower than the average accuracy of the models from the non-targeted shards. Under full retraining, by the symmetry of the random partition, the expectation of this test statistic is 0.5. Thus under the null hypothesis that the deletion algorithm satisfies perfect deletion guarantees, the test statistic also has expectation 0.5. Therefore, to the extent that the expectation of the indicator differs from 0.5, we falsify the null hypothesis that SISA has adaptive data deletion guarantees, and larger deviations from 0.5 falsify weaker deletion guarantees.
We run this experiment on three datasets (CIFAR-10, MNIST, and Fashion-MNIST), and plot the results in Figure 1. We then repeat the experiment by adding various amounts of noise to the gradients in the model training process to guarantee finite levels of differential privacy (though much weaker privacy guarantees than would be needed to invoke our theorems). We observe that on each dataset, modest amounts of noise are sufficient to break our attack (i.e. $9 5 \%$ confidence intervals for the expectation of our indicator include 0.5, and hence fail to falsify the null hypothesis) while still approaching the accuracy of our models trained without differential privacy. This is also plotted in Figure 1. This gives evidence that differential privacy can improve deletion guarantees in the presence of adaptivity even in regimes beyond which our theory gives nontrivial guarantees.
Full experimental details can be found in the appendix.
 Figure 1: The top row and bottom row show experiments with $k = 6$ and $k = 2$ shards respectively. The 3 columns report on 3 datasets. The $x$ axis denotes estimated expectation of our test statistic (the null hypothesis is expectation 0.5). The $y$ axis denotes the accuracy of the ensemble after deletion. Each point is annotated with the noise multiplier used in DP-SGD, the standard deviation of Gaussian noise applied to gradients during training. A label of 0.0 for a point represents the baseline case of no noise (original SISA algorithm). Points are affixed with $9 5 \%$ confidence intervals along both axes (over the randomness of repeating the training/deletion experiment). Horizontal confidence intervals that overlap the line denoting expectation 0.5 fail to reject the null hypothesis that the algorithm has adaptive data deletion guarantees at $p \leq 0 . 0 5$ . We get to this point with a level of noise addition that results in only a modest degradation in ensemble performance compared to SISA.
# 7 Conclusion and Discussion
We identify an important blindspot in the data deletion literature (the tenuous implicit assumption that deletion requests are independent of previously released models), and provide a very general methodology to reduce adaptive deletion guarantees to oblivious deletion guarantees. Through this reduction we get the first model and training algorithm agnostic methodology that allows for deletion of arbitrary sequences of adaptively chosen points while giving rigorous guarantees. The constants that our theorems inherit from the max information bounds of Rogers et al. [2016] are such that in most realistic settings they will not give useful parameters. But we hope that these constants will be improved in future work, and we give empirical evidence that differential privacy mitigates adaptive deletion “attacks” at very practical levels, beyond the promises of our theoretical results. We note that like for differential privacy, the $( \alpha , \beta , \gamma )$ -deletion guarantees we give in this paper are parameterized, and are not meaningful absent a specification of those parameters. There is a risk with such technologies that they will be used with large values of the parameters that give only very weak guarantees, but will be described publicly in a way that glosses over this issue. We therefore recommend that if adopted in deployed products, deletion guarantees always be discussed in public in a way that is precise about what they promise, including the relevant parameter settings.
# Acknowledgements
V.G., C.J., A.R., and S.S. were supported in part by NSF grants CCF-1934876 and AF-1763307, and a grant from the Simons Foundation.
# References
Raef Bassily, Kobbi Nissim, Adam Smith, Thomas Steinke, Uri Stemmer, and Jonathan Ullman. Algorithmic stability for adaptive data analysis. SIAM Journal on Computing, (0):STOC16–377, 2021.
Lucas Bourtoule, Varun Chandrasekaran, Christopher Choquette-Choo, Hengrui Jia, Adelin Travers, Baiwu Zhang, David Lie, and Nicolas Papernot. Machine unlearning. In Proceedings of the 42nd IEEE Symposium on Security and Privacy, San Francisco, CA., 2021.
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
Yinzhi Cao and Junfeng Yang. Towards making systems forget with machine unlearning. In 2015 IEEE Symposium on Security and Privacy, pages 463–480. IEEE, 2015.
Cynthia Dwork and Vitaly Feldman. Privacy-preserving prediction. CoRR, abs/1803.10266, 2018. URL http://arxiv.org/abs/1803.10266.
Cynthia Dwork and Aaron Roth. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 9(3–4):211–407, 2014.
Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 486–503. Springer, 2006a.
Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of cryptography conference, pages 265–284. Springer, 2006b.
Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. The reusable holdout: Preserving validity in adaptive data analysis. Science, 349(6248):636–638, 2015a.
Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. Generalization in adaptive data analysis and holdout reuse. In Proceedings of the 28th International Conference on Neural Information Processing Systems-Volume 2, pages 2350–2358, 2015b.
Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Leon Roth. Preserving statistical validity in adaptive data analysis. In Proceedings of the forty-seventh annual ACM symposium on Theory of computing, pages 117–126, 2015c.
Matt Fredrikson, Somesh Jha, and Thomas Ristenpart. Model inversion attacks that exploit confidence information and basic countermeasures. In Indrajit Ray, Ninghui Li, and Christopher Kruegel, editors, Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, October 12-16, 2015, pages 1322–1333. ACM, 2015. doi: 10.1145/ 2810103.2813677. URL https://doi.org/10.1145/2810103.2813677.
Antonio Ginart, Melody Y. Guan, Gregory Valiant, and James Zou. Making AI forget you: Data deletion in machine learning. CoRR, abs/1907.05012, 2019. URL http://arxiv.org/abs/ 1907.05012.
Aditya Golatkar, Alessandro Achille, Avinash Ravichandran, Marzia Polito, and Stefano Soatto. Mixed-privacy forgetting in deep networks. arXiv preprint arXiv:2012.13431, 2020a.
Aditya Golatkar, Alessandro Achille, and Stefano Soatto. Forgetting outside the box: Scrubbing deep networks of information accessible from input-output observations. In European Conference on Computer Vision, pages 383–398. Springer, 2020b.
Chuan Guo, Tom Goldstein, Awni Hannun, and Laurens van der Maaten. Certified data removal from machine learning models. arXiv preprint arXiv:1911.03030, 2019.
Avinatan Hassidim, Haim Kaplan, Yishay Mansour, Yossi Matias, and Uri Stemmer. Adversarially robust streaming algorithms via differential privacy. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips. cc/paper/2020/hash/0172d289da48c48de8c5ebf3de9f7ee1-Abstract.html.
The U.K. Information Commissioner’s Office ICO. Guidance on the ai auditing framework. Draft Consultation, 2020. URL https://ico.org.uk/media/about-the-ico/consultations/ 2617219/guidance-on-the-ai-auditing-framework-draft-for-consultation.pdf.
Christopher Jung, Katrina Ligett, Seth Neel, Aaron Roth, Saeed Sharifi-Malvajerdi, and Moshe Shenfeld. A new analysis of differential privacy’s generalization guarantees. In 11th Innovations in Theoretical Computer Science Conference (ITCS 2020), volume 151, page 31. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, 2020.
Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009.
Yann Lecun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, pages 2278–2324, 1998.
Seth Neel and Aaron Roth. Mitigating bias in adaptive data gathering via differential privacy. In International Conference on Machine Learning, pages 3720–3729. PMLR, 2018.
Seth Neel, Aaron Roth, and Saeed Sharifi-Malvajerdi. Descent-to-delete: Gradient-based methods for machine unlearning. In Algorithmic Learning Theory, pages 931–962. PMLR, 2021.
Nicolas Papernot, Shuang Song, Ilya Mironov, Ananth Raghunathan, Kunal Talwar, and Úlfar Erlingsson. Scalable private learning with pate, 2018.
Nicolas Papernot, Abhradeep Thakurta, Shuang Song, Steve Chien, and Ulfar Erlingsson. Tempered sigmoid activations for deep learning with differential privacy. The 35th AAAI Conference on Artificial Intelligence, 2021.
Ryan Rogers, Aaron Roth, Adam Smith, and Om Thakkar. Max-information, differential privacy, and post-selection hypothesis testing. In 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS), pages 487–494. IEEE, 2016.
Ayush Sekhari, Jayadev Acharya, Gautam Kamath, and Ananda Theertha Suresh. Remember what you want to forget: Algorithms for machine unlearning. arXiv preprint arXiv:2103.03279, 2021.
Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks against machine learning models. In 2017 IEEE Symposium on Security and Privacy (SP), pages 3–18. IEEE, 2017.
Michael Veale, Reuben Binns, and Lilian Edwards. Algorithms that remember: Model inversion attacks and data protection law. CoRR, abs/1807.04644, 2018. URL http://arxiv.org/abs/ 1807.04644.
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. 2017.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543[ { "type": "text", "text": "Adaptive Machine Unlearning ", "text_level": 1, "bbox": [ 315, 122, 681, 147 ], "page_idx": 0 }, { "type": "text", "text": "Varun Gupta1, Christopher Jung1, Seth Neel2, Aaron Roth1, Saeed Sharifi-Malvajerdi1, and Chris Waites3 ", "bbox": [ 305, 198, 691, 227 ], "page_idx": 0 }, { "type": "text", "text": "1University of Pennsylvania 2Harvard University 3Stanford University ", "bbox": [ 406, 238, 591, 281 ], "page_idx": 0 }, { "type": "text", "text": "Abstract ", "text_level": 1, "bbox": [ 462, 321, 535, 338 ], "page_idx": 0 }, { "type": "text", "text": "Data deletion algorithms aim to remove the influence of deleted data points from trained models at a cheaper computational cost than fully retraining those models. However, for sequences of deletions, most prior work in the non-convex setting gives valid guarantees only for sequences that are chosen independently of the models that are published. If people choose to delete their data as a function of the published models (because they don’t like what the models reveal about them, for example), then the update sequence is adaptive. In this paper, we give a general reduction from deletion guarantees against adaptive sequences to deletion guarantees against non-adaptive sequences, using differential privacy and its connection to max information. Combined with ideas from prior work which give guarantees for non-adaptive deletion sequences, this leads to extremely flexible algorithms able to handle arbitrary model classes and training methodologies, giving strong provable deletion guarantees for adaptive deletion sequences. We show in theory how prior work for non-convex models fails against adaptive deletion sequences, and use this intuition to design a practical attack against the SISA algorithm of Bourtoule et al. [2021] on CIFAR-10, MNIST, Fashion-MNIST. ", "bbox": [ 233, 353, 764, 573 ], "page_idx": 0 }, { "type": "text", "text": "1 Introduction ", "text_level": 1, "bbox": [ 174, 598, 310, 616 ], "page_idx": 0 }, { "type": "text", "text": "Businesses like Facebook and Google depend on training sophisticated models on user data. Increasingly—in part because of regulations like the European Union’s General Data Protection Act and the California Consumer Privacy Act—these organizations are receiving requests to delete the data of particular users. But what should that mean? It is straightforward to delete a customer’s data from a database and stop using it to train future models. But what about models that have already been trained using an individual’s data? These are not necessarily safe; it is known that individual training data can be exfiltrated from models trained in standard ways via model inversion attacks [Shokri et al., 2017, Veale et al., 2018, Fredrikson et al., 2015]. Regulators are still grappling with when a trained model should be considered to contain personal data of individuals in the training set and the potential legal implications. In 2020 draft guidance, the U.K.’s Information Commissioner’s Office addressed how to comply with data deletion requests as they pertain to ML models: ", "bbox": [ 174, 630, 825, 781 ], "page_idx": 0 }, { "type": "text", "text": "If the request is for rectification or erasure of the data, this may not be possible without re-training the model...or deleting the model altogether [ICO, 2020]. ", "bbox": [ 232, 792, 764, 821 ], "page_idx": 0 }, { "type": "text", "text": "Fully retraining the model every time a deletion request is received can be prohibitive in terms of both time and money—especially for large models and frequent deletion requests. The problem of data deletion (also known as machine unlearning) is to find an algorithmic middle ground between the compliant but impractical baseline of retraining, and the potentially illegal standard of doing nothing. We iteratively update models as deletion requests come in, with the twin goals of having computational cost that is substantially less than the cost of full retraining, and the guarantee that the models we produce are (almost) indistinguishable from the models that would have resulted from full retraining. ", "bbox": [ 174, 832, 825, 901 ], "page_idx": 0 }, { "type": "text", "text": "", "bbox": [ 176, 90, 823, 132 ], "page_idx": 1 }, { "type": "text", "text": "After an initial model is deployed deletion requests arrive over time as users make decisions about whether to delete their data. It is easy to see how these decisions may be adaptive with respect to the models. For example, security researchers may publish a new model inversion attack that identifies a specific subset of people in the training data, thus leading to increased deletion requests for people in that subset. In this paper we give the first machine unlearning algorithms that both have rigorous deletion guarantees against these kind of adaptive deletion sequence, and can accommodate arbitrary non-convex models like deep neural networks without requiring pretraining on non-user data. ", "bbox": [ 174, 140, 825, 237 ], "page_idx": 1 }, { "type": "text", "text": "1.1 Main Results ", "text_level": 1, "bbox": [ 174, 257, 305, 272 ], "page_idx": 1 }, { "type": "text", "text": "The deletion guarantees proven for several prior methods crucially rely on the implicit assumption that the points that are deleted are independent of the randomness used to train the models. However this assumption fails unless the sequence of deletion requests is chosen independently of the information that the model provider has made public. This is a very strong assumption, because users may wish to delete their data exactly because of what deployed models reveal about them. ", "bbox": [ 174, 285, 825, 354 ], "page_idx": 1 }, { "type": "text", "text": "We give a generic reduction. We show that if: ", "bbox": [ 176, 361, 472, 376 ], "page_idx": 1 }, { "type": "text", "text": "1. A data deletion algorithm $\\mathcal { R } _ { A }$ for a learning algorithm $\\mathcal { A }$ has deletion guarantees for oblivious sequences of deletion requests (as those from past work do), and 2. Information about the internal randomness of $\\mathcal { R } _ { A }$ is revealed only in a manner that satisfies differential privacy, then ", "bbox": [ 200, 388, 825, 455 ], "page_idx": 1 }, { "type": "text", "text": "$( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ also satisfies data deletion guarantees against an adaptive sequence of deletion requests, that can depend in arbitrary ways on the information that the model provider has made public. ", "bbox": [ 176, 468, 825, 497 ], "page_idx": 1 }, { "type": "text", "text": "In Section 3, we motivate our main result with a theoretical example which illustrates that past method’s lack of guarantees for adaptive sequences is not simply a failure of analysis, but an actual failure of these methods to satisfy deletion guarantees for adaptive deletion sequences. As an exemplar, we use a variant of SISA from Bourtoule et al. [2021] that satisfies perfect deletion guarantees for non-adaptive deletion sequences and exhibit adaptive deletion sequences that strongly separate the resulting distribution on models compared to the retraining baseline. ", "bbox": [ 174, 502, 825, 587 ], "page_idx": 1 }, { "type": "text", "text": "The generic reduction found in Section 4 can be used to give adaptive data deletion mechanisms for a wide variety of problems by leveraging past work on deletion algorithms for non-adaptive sequences, and a line of work on differentially private aggregation [Papernot et al., 2018, Dwork and Feldman, 2018]. Since prior deletion algorithms themselves tend to use existing learning algorithms in a black-box way, the entire pipeline is modular and easy to bolt-on to existing methods. In Section 5, we show how this can be accomplished by using a variant of the SISA framework of Bourtoule et al. [2021] together with a differentially private aggregation method. ", "bbox": [ 174, 592, 826, 690 ], "page_idx": 1 }, { "type": "text", "text": "In Section 6, we complement our main result with a set of experimental results on CIFAR-10, MNIST, and Fashion-MNIST that demonstrate differential privacy may be useful in giving adaptive guarantees beyond the statement of our theorems. Specifically we show that small amounts of noise addition (insufficient for our theorems to apply) already serve to break the adaptive deletion strategies that we use to falsify the adaptive deletion guarantees in our experiments described in Section 3 and do so at minimal expense in model accuracy. ", "bbox": [ 174, 695, 825, 779 ], "page_idx": 1 }, { "type": "text", "text": "1.2 Related Work ", "text_level": 1, "bbox": [ 174, 800, 310, 815 ], "page_idx": 1 }, { "type": "text", "text": "Data deletion was introduced by Cao and Yang [2015]; we adopt the randomized formulation of Ginart et al. [2019]. Ginart et al. [2019] anticipate the problem of deletion requests that might be correlated with internal state of the algorithm, and define (and propose as a study for future work) robust data deletion which is a data deletion guarantee that holds for adversaries with knowledge of the internal state. Our insight is that we can provide deletion guarantees against adaptive sequences by instead obscuring the internal state of the algorithm using techniques from differential privacy. ", "bbox": [ 174, 827, 825, 911 ], "page_idx": 1 }, { "type": "text", "text": "We are the first to explicitly consider the problem of adaptive sequences of deletion requests, but some techniques from past work do have deletion guarantees that extend to adaptive sequences. Deterministic methods and methods that depend only on randomness that is sampled after the deletion request are already robust to adaptive deletion. This includes techniques that find an approximately optimal solution to a strongly convex problem and then perturb the solution to obscure the optimizer within a small radius e.g. Guo et al. [2019], Neel et al. [2021], Sekhari et al. [2021]. It also includes the approach of Golatkar et al. [2020a,b] which pre-trains a nonconvex model on data that will never be deleted and then does convex fine-tuning on user data on top of that. Techniques whose deletion guarantees depend on randomness sampled at training in general do not have guarantees against adaptive deletions. This includes algorithms given in Ginart et al. [2019], Bourtoule et al. [2021], Neel et al. [2021] — the SISA framework of Bourtoule et al. [2021] being of particular interest as it is agnostic to the class of models and training methodology, and so is extremely flexible. ", "bbox": [ 173, 90, 825, 257 ], "page_idx": 2 }, { "type": "text", "text": "Differential privacy has been used as a mitigation for adaptivity since the work of Dwork et al. [2015c,a]. In machine learning, it has been used to mitigate the bias of adaptive data gathering strategies as used in bandit learning algorithms [Neel and Roth, 2018]. The application that is most similar to our work is Hassidim et al. [2020], which uses differential privacy of the internal randomness of an algorithm (as we do) to reduce streaming algorithms with guarantees against adaptive adversarial streams to streaming algorithms with guarantees against oblivious adversaries. Our techniques differ; while Hassidim et al. [2020] reduce to the so-called “transfer theorem for linear and low sensitivity queries” developed over a series of works Dwork et al. [2015c], Bassily et al. [2021], Jung et al. [2020], we use a more general connection between differential privacy and “max-information” established in Dwork et al. [2015b], Rogers et al. [2016]. ", "bbox": [ 173, 263, 825, 401 ], "page_idx": 2 }, { "type": "text", "text": "2 Preliminaries ", "text_level": 1, "bbox": [ 174, 421, 318, 438 ], "page_idx": 2 }, { "type": "text", "text": "Let $\\mathcal { Z }$ be the data domain. A dataset $D$ is a multi-set of elements from $\\mathcal { Z }$ . We consider update requests of two types: deletion and addition. These update requests are formally defined below, similar to how they are defined in [Neel et al., 2021]. ", "bbox": [ 176, 452, 823, 494 ], "page_idx": 2 }, { "type": "text", "text": "Definition 2.1 (Update Operations and Sequences). An update $u$ is a pair $( z , \\bullet )$ where $z \\in { \\mathcal { Z } }$ is $a$ datapoint and $\\bullet \\in \\mathcal { T } = \\{ ^ { \\prime } \\mathbf { a d d } ^ { \\prime } , ^ { \\prime } \\mathbf { d e l e t e } ^ { \\prime } \\}$ determines the type of the update. An update sequence $U$ is a sequence $( u ^ { 1 } , u ^ { 2 } , \\ldots )$ where $u ^ { t } \\in \\mathcal { Z } \\times \\mathcal { T }$ for all $t$ . Given a dataset $D$ and an update $u = ( z , \\bullet )$ , the update operation is defined as: ", "bbox": [ 173, 498, 825, 555 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/96b4b5ec8998a0e7c67003ba2bfac3fc872c4ac9a59a896e8b6c404ede3d3cb3.jpg", "text": "$$\nD \\circ u \\triangleq { \\left\\{ { D \\cup \\{ z \\} } \\quad i f \\bullet = { ' } { \\mathsf { a d d } } ^ { \\prime } \\right.} _ { D \\setminus \\{ z \\} } _ { i f \\bullet = { ' } { \\mathsf { d e l e t e } } ^ { \\prime } }\n$$", "text_format": "latex", "bbox": [ 370, 563, 625, 598 ], "page_idx": 2 }, { "type": "text", "text": "Given an update sequence $U = ( u ^ { 1 } , u ^ { 2 } , \\ldots ) ;$ , we have $D \\circ U \\triangleq ( ( ( D \\circ u ^ { 1 } ) \\circ u ^ { 2 } ) \\circ \\ldots ) .$ . ", "bbox": [ 173, 606, 748, 623 ], "page_idx": 2 }, { "type": "text", "text": "We use $\\Theta$ to denote the space of models. A learning or training algorithm is a mapping $\\mathcal { A } : \\mathcal { Z } ^ { * } \\to \\Theta ^ { * }$ that maps a dataset $D \\in { \\mathcal { Z } } ^ { * }$ to a collection of models $\\theta \\in \\Theta ^ { * }$ . An unlearning or update algorithm for $\\mathcal { A }$ is a mapping $\\mathcal { R } _ { A } : \\mathcal { Z } ^ { * } \\times ( \\mathcal { Z } \\times \\mathcal { T } ) \\times \\mathcal { S } \\to \\Theta ^ { * }$ which takes in a data set $D \\in { \\mathcal { Z } } ^ { * }$ , an update request $u \\in \\mathcal { Z } \\times \\mathcal { T }$ , and some current state for the algorithms $s \\in S$ (the domain $s$ can be arbitrary), and outputs an updated collection of models $\\theta ^ { \\prime } \\in \\Theta ^ { * }$ . In this paper we consider a setting in which a stream of update requests arrive in sequence. We note that in this sequential framework, the update algorithm $\\mathcal { R } _ { A }$ also updates the state of the algorithm after each update request is processed; however, for notational economy, we do not explicitly write the updated state as an output of the algorithm. ", "bbox": [ 174, 632, 825, 744 ], "page_idx": 2 }, { "type": "text", "text": "At each round, we provide access to the models through a mapping $f _ { \\mathrm { p u b l i s h } } ^ { t } : \\Theta ^ { * } \\to \\Psi$ that takes in the collection of models and outputs some object $\\psi \\in \\Psi$ . A published object $\\psi \\in \\Psi$ can, for instance, be the aggregate predictions of the learned models on a data set, or, some aggregation of the models. To model adaptively chosen update sequences, we define an arbitrary “update requester” who interacts with the learning and unlearning algorithms $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ through the publishing function $f _ { \\mathrm { p u b l i s h } }$ in rounds to generate a sequence of updates. The update requester is denoted by UpdReq and defined in Definition 2.2, and the interaction between the algorithms and the update requester is described in Algorithm 1. ", "bbox": [ 174, 750, 826, 863 ], "page_idx": 2 }, { "type": "text", "text": "Throughout we will use $u ^ { t }$ to denote the update request at round $t$ . We will use $D ^ { t }$ to denote the data set at round $t$ : $D ^ { 0 }$ is the initial training data set and for all $t \\geq 1$ , $D ^ { t } = D ^ { t - 1 } \\circ u ^ { t }$ . We will use $\\theta ^ { t }$ to denote the learned models at round $t$ : $\\theta ^ { 0 }$ is generated by the initial training algorithm $\\mathcal { A }$ , and $\\theta ^ { t }$ for $t \\geq 1$ denotes the updated models at round $t$ generated by the update algorithm $\\mathcal { R } _ { A }$ . $\\psi ^ { t }$ denotes the published object at round $t$ : $\\psi ^ { t } = f _ { \\mathrm { p u b l i s h } } ^ { t } ( \\theta ^ { t } )$ . ", "bbox": [ 176, 869, 825, 911 ], "page_idx": 2 }, { "type": "table", "img_path": "images/49af37bb3ca08e560a92e8b40ce7bbcad36a565b9bdae3ca4959afdb266bd33a.jpg", "table_caption": [ "Algorithm 1: Interaction between $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ and UpdReq " ], "table_footnote": [], "table_body": "<table><tr><td></td><td>1: Input: Data set D</td></tr><tr><td>2:</td><td>Let D°← D.</td></tr><tr><td>3:</td><td>Train 0° ← A(D).</td></tr><tr><td>4:</td><td>Publish y0←pubish(00).</td></tr><tr><td>5:</td><td> Save the initial state so.</td></tr><tr><td>6:</td><td>for t = 1,2,... do</td></tr><tr><td>7:</td><td> The update requester requests a new update, given the history of interaction:</td></tr><tr><td>8:</td><td>ut←UpdReq(o,u¹,1,u², ,ut-1,γt-1).</td></tr><tr><td>9:</td><td>The algorithms update, given ut:</td></tr><tr><td>10:</td><td>Update the models 0t ← RA (Dt-1,ut,st-1).</td></tr><tr><td>11:</td><td>Publish bt ← fpubish (0t).</td></tr><tr><td>12:</td><td>Save the updated state st .</td></tr><tr><td>13:</td><td>Update the data set Dt ← Dt-1 o ut .</td></tr></table>", "bbox": [ 178, 113, 720, 308 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 173, 339, 823, 371 ], "page_idx": 3 }, { "type": "text", "text": "Definition 2.2 (Update Requester (UpdReq)). The update sequence is generated by an update requester which is modeled by a (possibly randomized) mapping UpdReq : $\\Psi ^ { * } \\times ( \\mathcal { Z } \\times \\mathcal { T } ) ^ { * } ( \\mathcal { Z } \\times \\mathcal { T } )$ that takes as input the history of interaction between herself and the algorithms, and outputs a new update for the current round. Given an update requester UpdReq, algorithms $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ and publishing functions $\\{ f _ { p u b l i s h } ^ { t } \\} _ { t }$ , the update sequence $U = \\{ u ^ { t } \\} _ { t }$ can be written as ", "bbox": [ 173, 375, 825, 445 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/4518acdec353d550f167a7e753c1d2dea3736017a727d5ca5e9755ddcf286abc.jpg", "text": "$$\n\\boldsymbol { u } ^ { 1 } = \\mathrm { U p d R e q } \\left( \\boldsymbol { \\psi } ^ { 0 } \\right) , \\boldsymbol { u } ^ { 2 } = \\mathrm { U p d R e q } \\left( \\boldsymbol { \\psi } ^ { 0 } , \\boldsymbol { u } ^ { 1 } , \\boldsymbol { \\psi } ^ { 1 } \\right) , \\boldsymbol { \\cdot } , \\boldsymbol { \\cdot } , \\boldsymbol { u } ^ { t } = \\mathrm { U p d R e q } \\left( \\boldsymbol { \\psi } ^ { 0 } , \\boldsymbol { u } ^ { 1 } , \\boldsymbol { \\psi } ^ { 1 } , \\boldsymbol { \\cdot } , \\boldsymbol { \\cdot } , \\boldsymbol { u } ^ { t - 1 } , \\boldsymbol { \\psi } ^ { t - 1 } \\right)\n$$", "text_format": "latex", "bbox": [ 181, 455, 820, 474 ], "page_idx": 3 }, { "type": "text", "text": "We say an update requester UpdReq is nonadaptive if it is independent of the published objects, i.e., if there exists a mapping UpdR $\\mathfrak { s q } ^ { \\prime } : ( \\mathcal { Z } \\times \\mathcal { T } ) ^ { \\ast } ( \\mathcal { Z } \\times \\mathcal { T } )$ such that for all $t \\geq 1$ , ", "bbox": [ 173, 481, 826, 511 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/787e0ccfabb01426b1d2ca8a285bb48e80098736481a4556a309978293362e34.jpg", "text": "$$\nu ^ { t } = \\mathtt { U p d R e q } \\left( \\psi ^ { 0 } , u ^ { 1 } , \\psi ^ { 1 } , u ^ { 2 } , \\ldots , u ^ { t - 1 } , \\psi ^ { t - 1 } \\right) = \\mathtt { U p d R e q } ^ { \\prime } \\left( u ^ { 1 } , u ^ { 2 } , \\ldots , u ^ { t - 1 } \\right)\n$$", "text_format": "latex", "bbox": [ 241, 518, 754, 537 ], "page_idx": 3 }, { "type": "text", "text": "This is equivalent to saying that the update sequence is fixed before the interaction occurs. ", "bbox": [ 171, 545, 763, 560 ], "page_idx": 3 }, { "type": "text", "text": "Following [Ginart et al., 2019], we propose the following definition for an unlearning algorithm in the sequential update setting ([Ginart et al., 2019] gives a definition for a single deletion request, whereas here we define a natural extension for an arbitrarily long sequence of deletions, as well as additions, that can be chosen adaptively.). Informally, we require that at every round, and for all possible update requesters, with high probability over the draw of the update sequence, no subset of models resulting from deletion occurs with substantially higher probability than it would have under full retraining. ", "bbox": [ 173, 570, 826, 656 ], "page_idx": 3 }, { "type": "text", "text": "Definition 2.3 $( \\alpha , \\beta , \\gamma )$ -unlearning). We say that $\\mathcal { R } _ { A }$ is an $( \\alpha , \\beta , \\gamma )$ -unlearning algorithm for $\\mathcal { A }$ if for all datasets $D = D ^ { 0 }$ and all update requesters UpdReq, the following condition holds: For every update step $t \\geq 1$ , with probability at least $1 - \\gamma$ over the draw of the update sequence $u ^ { \\le t } \\overset { \\cdot } { = } \\hat { ( } u ^ { 1 } , \\ldots , \\overset { \\cdot } { u } ^ { t } )$ from UpdReq, ", "bbox": [ 174, 660, 825, 717 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/c295b206a4b441920ca55ee78e1e09506489e57b0554e585b2708a730f93b6a0.jpg", "text": "$$\n\\begin{array} { r } { \\forall E \\subseteq \\Theta ^ { * } : \\quad \\operatorname* { P r } \\left[ \\mathcal { R } _ { { \\cal A } } \\left( D ^ { t - 1 } , u ^ { t } , s ^ { t - 1 } \\right) \\in E \\middle | u ^ { \\leq t } \\right] \\leq e ^ { \\alpha } \\cdot \\operatorname* { P r } \\left[ { \\cal A } \\left( D ^ { t } \\right) \\in E \\right] + \\beta } \\end{array}\n$$", "text_format": "latex", "bbox": [ 230, 724, 766, 746 ], "page_idx": 3 }, { "type": "text", "text": "We say $\\mathcal { R } _ { A }$ is a nonadaptive $( \\alpha , \\beta , \\gamma )$ -unlearning algorithm for $\\mathcal { A }$ if the above condition holds for any nonadaptive UpdReq. ", "bbox": [ 171, 752, 823, 782 ], "page_idx": 3 }, { "type": "text", "text": "Remark 2.1. Our definition of unlearning is reminiscent of differential privacy, but following [Ginart et al., 2019], we ask only for $a$ one-sided guarantee: that the probability of any event under the unlearning scheme is not too much larger than the probability of the same event under full retraining, but not vice versa. The reason is that we do not want there to be events that can substantially increase an observer’s confidence that we did not engage in full retraining, but we do not object to observers who strongly update their beliefs that we did engage in full retraining. Our events $E$ are defined directly over the sets of models in $\\Theta ^ { * }$ output by $\\mathcal { A }$ and $\\mathcal { R } _ { A }$ — note that because of information processing inequalities, this is only stronger than defining events $E$ over the observable outcome space $\\Psi$ . ", "bbox": [ 173, 786, 825, 911 ], "page_idx": 3 }, { "type": "text", "text": "2.1 Differential Privacy and Max-Information ", "text_level": 1, "bbox": [ 176, 90, 508, 106 ], "page_idx": 4 }, { "type": "text", "text": "Differential privacy will be a key tool in our results. Let $\\mathcal { X }$ denote an arbitrary data domain. We use $x \\in \\mathcal { X }$ to denote an individual element of $\\mathcal { X }$ , and $X \\in \\mathcal { X } ^ { \\ast }$ to denote a collection of elements from $\\mathcal { X }$ — which we call a data set. We say two data sets $X , X ^ { \\prime } \\in { \\mathcal { X } } ^ { * }$ are neighboring if they differ in at most one element. We say an algorithm $M : \\mathcal { X } ^ { n } \\mathcal { O }$ is differentially private if its output distributions on neighboring data sets are close, formalized below. ", "bbox": [ 173, 116, 825, 185 ], "page_idx": 4 }, { "type": "text", "text": "Definition 2.4 (Differential Privacy (DP) [Dwork et al., 2006b,a]). An algorithm $M : \\mathcal { X } ^ { m } \\mathcal { O }$ is $( \\epsilon , \\delta )$ -differentially private, if for every neighboring $X$ and $X ^ { \\prime }$ , and for every $O \\subseteq { \\mathcal { O } }$ , we have $\\mathrm { P r } \\left[ M ( X ) \\in O \\right] \\leq e ^ { \\epsilon } \\mathrm { P r } \\left[ M ( \\dot { X } ^ { \\prime } ) \\in O \\right] + \\delta$ . ", "bbox": [ 174, 189, 823, 233 ], "page_idx": 4 }, { "type": "text", "text": "We remark at the outset that the “datasets” to which we will eventually ask for differential privacy with respect to will not be the datasets on which our learning algorithms are trained, but will instead be collections of random bits parameterizing our randomized algorithms. ", "bbox": [ 174, 242, 825, 286 ], "page_idx": 4 }, { "type": "text", "text": "Differentially private algorithms are robust to data-independent post-processing: ", "bbox": [ 176, 291, 699, 306 ], "page_idx": 4 }, { "type": "text", "text": "Lemma 2.1 (Post-processing preserves DP [Dwork et al., 2006b]). If $M : \\mathcal { X } ^ { m } \\mathcal { O }$ is $( \\epsilon , \\delta )$ - differentially private, then for all $f : \\mathcal { O } \\mathcal { R }$ , we have $f \\circ M : \\mathcal { X } ^ { m } \\mathcal { R }$ defined by $f \\circ M ( X ) =$ $f ( M ( X ) )$ is $( \\epsilon , \\delta )$ -differentially private. ", "bbox": [ 174, 309, 826, 353 ], "page_idx": 4 }, { "type": "text", "text": "The max-information between two jointly distributed random variables measures how close their joint distribution is to the product of their corresponding marginal distributions. ", "bbox": [ 174, 363, 823, 392 ], "page_idx": 4 }, { "type": "text", "text": "Definition 2.5 (Max-Information [Dwork et al., 2015b]). Let $X$ and $Y$ be jointly distributed random variables over the domain $( \\mathcal { X } , \\mathcal { Y } )$ . The $\\beta$ -approximate max-information between $X$ and $Y$ is: ", "bbox": [ 173, 395, 823, 424 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/c01dbe67c5f13bd3c0e5eb1ead4db719c15dd45a5707b961fc413e7c40663f11.jpg", "text": "$$\nI _ { \\infty } ^ { \\beta } ( X ; Y ) = \\log \\operatorname* { s u p } _ { \\substack { E \\subseteq ( \\mathcal { X } , \\mathcal { Y } ) , \\operatorname* { P r } [ ( X , Y ) \\in E ] > \\beta } } \\frac { \\operatorname* { P r } [ ( X , Y ) \\in E ] - \\beta } { \\operatorname* { P r } [ ( X \\otimes Y ) \\in E ] }\n$$", "text_format": "latex", "bbox": [ 290, 430, 705, 467 ], "page_idx": 4 }, { "type": "text", "text": "where $( X \\otimes Y )$ represents the product distribution of $X$ and $Y$ . ", "bbox": [ 174, 473, 593, 488 ], "page_idx": 4 }, { "type": "text", "text": "The max-information of an algorithm $M$ that takes a dataset $X$ as input and outputs $M ( X )$ , is defined as the max-information between $X$ and $M ( X )$ for the worst case product distribution over $X$ : ", "bbox": [ 174, 498, 825, 527 ], "page_idx": 4 }, { "type": "text", "text": "Definition 2.6 (Max-Information of an Algorithm [Dwork et al., 2015b]). Let $M : \\mathcal { X } ^ { m } \\mathcal { O }$ be an Algorithm. We say $M$ has $\\beta$ -approximate max-information of $k$ , written $T _ { \\infty } ^ { \\beta } ( M , m ) \\leq k$ , if for every distribution $\\mathcal { P }$ over $\\mathcal { X }$ , we have $I _ { \\infty } ^ { \\beta } ( X ; M ( X ) ) \\le k$ when $X \\sim \\mathcal { P } ^ { m }$ . ", "bbox": [ 173, 531, 825, 575 ], "page_idx": 4 }, { "type": "text", "text": "In this paper, we will use the fact that differentially private algorithms have bounded max-information: ", "bbox": [ 169, 584, 823, 601 ], "page_idx": 4 }, { "type": "text", "text": "Theorem 2.1 (DP implies bounded max-information [Rogers et al., 2016]). Let $M : \\mathcal { X } ^ { m } \\mathcal { O }$ be an $( \\epsilon , \\delta )$ -differentially private algorithm for $0 < \\epsilon \\le 1 / 2$ and $0 < \\delta < \\epsilon$ . Then, $I _ { \\infty } ^ { \\beta } ( M , m ) =$ $O \\left( \\epsilon ^ { 2 } m + m \\sqrt { \\delta / \\epsilon } \\right) f o r \\beta = e ^ { - \\epsilon ^ { 2 } m } + O \\left( m \\sqrt { \\delta / \\epsilon } \\right) .$ . ", "bbox": [ 173, 617, 825, 671 ], "page_idx": 4 }, { "type": "text", "text": "3 Falsifying Unlearning Guarantees with Adaptivity ", "text_level": 1, "bbox": [ 173, 685, 624, 704 ], "page_idx": 4 }, { "type": "text", "text": "In this section we demonstrate that the deletion guarantees of algorithms in the SISA framework [Bourtoule et al., 2021] fail for adaptive deletion sequences. We give a clean toy construction which shows algorithms in the SISA framework fail to have nontrivial adaptive deletion guarantees even in the black-box setting when the models within each shard are not made public, only aggregations of their classification outputs. In the Appendix we experimentally evaluate a more realistic instantiation of this construction. ", "bbox": [ 173, 717, 825, 801 ], "page_idx": 4 }, { "type": "text", "text": "The setting we consider directly corresponds to the setting in which our final algorithms operate: what is made public is the aggregate predictions of the ensemble of models, but not the models themselves. For non-adaptive sequences of deletions, distributed algorithms of the sort described in Section 5 have perfect deletion guarantees. We demonstrate via a simple example that these guarantees dramatically fail for adaptive deletion sequences. ", "bbox": [ 174, 806, 825, 877 ], "page_idx": 4 }, { "type": "text", "text": "Suppose we have a dataset consisting of real-valued points with binary labels $\\{ ( x _ { i } , y _ { i } ) \\} _ { i = 1 } ^ { 2 n }$ , $x _ { i } \\in \\mathbb { R } ^ { d }$ $y _ { i } \\ \\stackrel { - } { \\in } \\ \\{ 0 , 1 \\}$ in which there are exactly two copies of each distinct training example. Consider a simplistic classification model, resembling a lookup table, which given a point $x _ { i }$ predicts the label $y _ { i }$ if the model has been trained on $( x _ { i } , y _ { i } )$ and a dummy prediction value \" $\" \\perp \"$ otherwise: ", "bbox": [ 173, 882, 823, 911 ], "page_idx": 4 }, { "type": "text", "text": "", "bbox": [ 171, 90, 825, 119 ], "page_idx": 5 }, { "type": "equation", "img_path": "images/2dad0327245c5c034647574ad26888aa1312e4c98faf0655406d013a697d07cc.jpg", "text": "$$\nf _ { \\mathcal { D } } ( x _ { i } ) = \\left\\{ \\begin{array} { l l } { y _ { i } } & { \\mathrm { i f } \\left( x _ { i } , y _ { i } \\right) \\in \\mathcal { D } , } \\\\ { \\perp } & { \\mathrm { o t h e r w i s e } } \\end{array} \\right.\n$$", "text_format": "latex", "bbox": [ 390, 125, 604, 160 ], "page_idx": 5 }, { "type": "text", "text": "Consider what happens when the training algorithm randomly partitions this dataset into three pieces and trains such a model on each partition. This constructs an ensemble which, at query time, predicts the class with the majority vote. On this dataset, the ensemble will predict the labels of roughly $2 / 3$ of the training points correctly—that is, exactly those points for which the duplicates have fallen into distinct partitions, so that the ensemble gets the majority vote right. ", "bbox": [ 173, 171, 825, 242 ], "page_idx": 5 }, { "type": "text", "text": "We construct an adaptive adversary who chooses to delete exactly those training points that the ensemble correctly classifies (which are those points for whom the duplicates have fallen into distinct shards). The result is that the model resulting from this deletion sequence will misclassify every remaining training point. Full retraining (because it would rerandomize the partition) would again lead to training accuracy of approximately $2 / 3$ . Recalling that our deletion notion requires that the probability of any event under the unlearning scheme is not much larger than the probability of the same event under full retraining, this demonstrates that there are algorithms in the SISA framework — even if the models are not directly exposed — that do not satisfy $( \\alpha , \\beta , \\gamma )$ -deletion guarantees for any nontrivial value of $\\alpha$ . We formalize this below: ", "bbox": [ 173, 247, 826, 372 ], "page_idx": 5 }, { "type": "text", "text": "Theorem 3.1. There are learning and unlearning algorithms in the SISA framework $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ such that for any $\\alpha _ { i }$ , and any $\\beta , \\gamma < 1 / 4$ , $\\mathcal { R } _ { A }$ is not an $( \\alpha , \\beta , \\gamma )$ -unlearning algorithm for $\\mathcal { A }$ . ", "bbox": [ 174, 375, 823, 405 ], "page_idx": 5 }, { "type": "text", "text": "A proof of this theorem can be found in the appendix. ", "bbox": [ 173, 414, 526, 429 ], "page_idx": 5 }, { "type": "text", "text": "4 A Reduction from Adaptive to Nonadaptive Update Requesters ", "text_level": 1, "bbox": [ 173, 446, 732, 465 ], "page_idx": 5 }, { "type": "text", "text": "In our analysis we imagine without loss of generality that the learning algorithm $\\mathcal { A }$ draws an i.i.d. sequence of random variables $r \\sim \\mathcal { P } ^ { m }$ (that encodes all the randomness to be used over the course of the updates) from some distribution $\\mathcal { P }$ , and passes it to the unlearning algorithm $\\mathcal { R } _ { A }$ . Note $r$ is drawn once in the initial training, and given $r$ , $\\mathcal { A }$ and $\\mathcal { R } _ { A }$ become deterministic mappings. We can also view the state $s ^ { t }$ as a deterministic mapping of $r$ , the update requests so far $u ^ { \\le t } = ( \\bar { u ^ { 1 } } , \\dots , u ^ { t } )$ , and the original data set $D ^ { 0 }$ . We write $s ^ { t } = g ^ { t } \\bar { ( } D ^ { 0 } , u ^ { \\le t } , r \\bar { ) }$ for some deterministic mapping $g ^ { t }$ . We can therefore summarize the trajectory of the algorithms $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ as follows. ", "bbox": [ 173, 478, 826, 577 ], "page_idx": 5 }, { "type": "text", "text": "In this view, the randomness $r$ used by the learning algorithm $\\mathcal { A }$ and the subsequent invocations of the unlearning algorithm $\\mathcal { R } _ { A }$ is represented as part of the internal state. Past analyses of unlearning algorithms have crucially assumed that $r$ is statistically independent of the updates $( \\dot { u } ^ { 1 } , u ^ { 2 } , \\dots )$ (which is the case for non-adaptive update requesters, but not for adaptive update requesters). In the following general theorem, we show that if a learning/unlearning pair satisfies unlearning guarantees against non-adaptive update requesters, and the publishing function is differentially private in the internal randomness $r$ , then the resulting algorithms also satisfy unlearning guarantees against adaptive update requesters. Note that what is important is that the publishing algorithms are differentially private in the internal randomness $r$ , not in the datapoints used for training. ", "bbox": [ 173, 633, 825, 761 ], "page_idx": 5 }, { "type": "text", "text": "Theorem 4.1 (A General Theorem). Fix a pair of learning and unlearning algorithms $( \\mathcal { A } , \\mathcal { R } _ { \\mathcal { A } } )$ and the publishing functions $\\{ f _ { p u b l i s h } ^ { t } \\} _ { t }$ . Suppose for every round $t$ , the sequence of publishing functions $\\{ f _ { p u b l i s h } ^ { t ^ { \\prime } } \\} _ { t ^ { \\prime } \\leq t }$ is $( \\epsilon , \\delta )$ -differentially private in $r \\sim \\mathcal { P } ^ { m }$ , for $0 < \\epsilon \\le 1 / 2$ and $0 < \\delta < \\epsilon$ . Suppose $\\mathcal { R } _ { A }$ is a non-adaptive $( \\alpha , \\beta , \\gamma )$ -unlearning algorithm for $\\mathcal { A }$ . Then $\\mathcal { R } _ { A }$ is an $( \\alpha ^ { \\prime } , \\beta ^ { \\prime } , \\gamma ^ { \\prime } )$ -unlearning algorithm for $\\mathcal { A }$ for $\\alpha ^ { \\prime } = \\alpha + \\epsilon ^ { \\prime } , \\beta ^ { \\prime } = \\beta e ^ { \\epsilon ^ { \\prime } } + \\sqrt { \\delta ^ { \\prime } } , \\gamma ^ { \\prime } = \\gamma + \\sqrt { \\delta ^ { \\prime } }$ where $\\epsilon ^ { \\prime } = O \\left( \\epsilon ^ { 2 } m + m \\sqrt { \\delta / \\epsilon } \\right)$ and $\\delta ^ { \\prime } = e ^ { - \\epsilon ^ { 2 } m } + O \\left( m \\sqrt { \\delta / \\epsilon } \\right) .$ . ", "bbox": [ 173, 762, 825, 875 ], "page_idx": 5 }, { "type": "text", "text": "The proof can be found in the Appendix, but at an intuitive level, it proceeds as follows. Because it does not change the joint distribution on update requests and internal state, we can imagine in our analysis that $r$ is redrawn after each update request from its conditional distribution, conditioned on the observed update sequence so far. Because the publishing function is differentially private in $r$ , by the fact that post-processing preserves differential privacy (Lemma 2.1), so is the update sequence. We may therefore apply the max-information bound (Theorem 2.1), which allows us to relate the conditional distribution on $r$ to its original (prior) distribution $\\mathcal { P } ^ { m }$ . But resampling $r$ from $\\mathcal { P } ^ { m }$ removes the dependence between $r$ and the update sequence, which places us in the non-adaptive case, and allows us to apply the hypothesized unlearning guarantees for nonadaptive update requesters. ", "bbox": [ 173, 882, 821, 912 ], "page_idx": 5 }, { "type": "table", "img_path": "images/75b45716a089d8a2549115650460c6df9fe917ad406518bdf6dd3055e3d50ee3.jpg", "table_caption": [ "Algorithm 2: ${ \\mathcal { A } } ^ { \\mathrm { d i s t r } }$ : Distributed Learning Algorithm " ], "table_footnote": [], "table_body": "<table><tr><td>Input: dataset D = D° of size n Draw the shards: D = Sampler(D°,p), for every i ∈ [k]. Train the models: 0 = Asingle(D),for every i∈ [k]. Save the state: s°= ({D'}i∈[k],{}iε[k]) // to be used for the 1st update.</td></tr></table>", "bbox": [ 179, 113, 758, 194 ], "page_idx": 6 }, { "type": "text", "text": "", "bbox": [ 173, 222, 825, 334 ], "page_idx": 6 }, { "type": "text", "text": "5 Distributed Algorithms ", "text_level": 1, "bbox": [ 174, 352, 400, 369 ], "page_idx": 6 }, { "type": "text", "text": "In this section, we describe a general family of distributed learning and unlearning algorithms that are in the spirit of the “SISA” framework of Bourtoule et al. [2021] (with one crucial modification). At a high level, the SISA framework operates by first randomly dividing the data into $k$ “shards”, and separately training a model on each shard. When a new point is deleted, it is removed from the shards that contained it, and only the models corresponding to those shards are retrained. The flexibility of this methodology is that the models and training procedures used in each shard can be arbitrary, as can the aggregation done at the end to convert the resulting ensemble into predictions: however these choices are instantiated, this framework gives a $( 0 , 0 , 0 )$ -unlearning algorithm against any non-adaptive update requester (Lemma 5.1). Here we show that if the $k$ shards are selected independently of one another, then we can apply our reduction given in the previous section with $m = k$ and obtain algorithms that satisfy deletion guarantees against adaptive update requesters. ", "bbox": [ 173, 382, 826, 535 ], "page_idx": 6 }, { "type": "text", "text": "A distributed learning algorithm $\\mathcal { A } ^ { \\mathrm { d i s t r } } : \\mathcal { Z } ^ { * } \\to \\Theta ^ { * }$ is described by a single-shard learning algorithm $\\mathcal { A } ^ { \\mathrm { s i n g l e } } : \\mathcal { Z } ^ { * } \\to \\Theta$ and a routine Sampler, used to select the points in a shard. Sampler, given a dataset $D$ and some probability $p \\in [ 0 , 1 ]$ , includes each element of $D$ in the shard with probability $p$ ", "bbox": [ 174, 540, 823, 583 ], "page_idx": 6 }, { "type": "text", "text": "Distributed learning algorithm ${ \\mathcal { A } } ^ { \\mathrm { d i s t r } }$ creates $k$ independent shards from the dataset $D$ of size $n$ by running Sampler $k$ times and training a model with $\\bar { \\mathcal { A } } ^ { \\mathrm { s i n g l e } }$ on each shard $i \\in [ k ]$ to form an ensemble of $k$ models. To emphasize that the randomness across shards is independent, we will instantiate $k$ independent samplers $\\mathtt { S a m p l e r } _ { i }$ and training algorithms $\\mathcal { A } _ { i } ^ { \\mathrm { s i n g l e } }$ for each shard $i \\in [ k ]$ . We formally describe ${ \\mathcal { A } } ^ { \\mathrm { d i s t r } }$ in Algorithm 2. ", "bbox": [ 174, 588, 825, 662 ], "page_idx": 6 }, { "type": "text", "text": "The state $s$ of the unlearning algorithm ${ \\mathcal { R } } _ { A ^ { \\mathrm { d i s t r } } }$ records the $k$ shards $\\{ D _ { i } \\} _ { i }$ and the ensemble of $k$ models $\\{ \\theta _ { i } \\} _ { i }$ . Thus $\\mathcal { S } = \\{ \\mathcal { Z } ^ { * } \\} ^ { k } \\times \\Theta ^ { k }$ . As an update request $u$ is received, the update function removes the data point from every shard that contains it (for deletion) or adds the new point to each shard with probability $p$ (for addition). In either case, only the models corresponding to shards that have been updated are retrained using $\\mathcal { A } ^ { \\mathrm { s i n g l e } }$ . We formally describe ${ \\mathcal { R } } _ { A ^ { \\mathrm { d i s t r } } }$ in Algorithm 3. ", "bbox": [ 174, 667, 825, 739 ], "page_idx": 6 }, { "type": "text", "text": "First, we show that if the update requester is non-adaptive, ${ \\mathcal { R } } _ { A ^ { \\mathrm { d i s t r } } }$ is a $( 0 , 0 , 0 )$ -unlearning algorithm: Lemma 5.1. $\\mathcal { R } _ { \\mathcal { A } ^ { d i s t r } }$ is a non-adaptive $( 0 , 0 , 0 )$ -unlearning algorithm for $\\mathcal { A } ^ { d i s t r }$ . ", "bbox": [ 173, 746, 823, 779 ], "page_idx": 6 }, { "type": "text", "text": "Now, by combining Lemma 5.1 and our general Theorem 4.1, we can show the following: ", "bbox": [ 171, 786, 766, 801 ], "page_idx": 6 }, { "type": "text", "text": "Theorem 5.1 (Unlearning Guarantees). If for every round $t$ , the sequence of publishing functions $\\{ f _ { p u b l i s h } ^ { t ^ { \\prime } } \\} _ { t ^ { \\prime } \\leq t }$ is $( \\epsilon , \\delta )$ -differentially private in the random seeds $r \\sim \\mathcal { P } ^ { k }$ of the algorithms for $0 < \\epsilon \\leq 1 / 2$ and $0 < \\delta < \\epsilon _ { \\cdot }$ , then $\\mathcal { R } _ { \\mathcal { A } ^ { d i s t r } }$ is an $( \\alpha , \\beta , \\gamma )$ -unlearning algorithm for $\\mathcal { A } ^ { d i s t r }$ where ", "bbox": [ 174, 806, 825, 852 ], "page_idx": 6 }, { "type": "equation", "img_path": "images/129e8e9ed74c537bbd51cd4895d8c06221772667ff86984801778b047e7df81f.jpg", "text": "$$\n\\alpha = O \\left( \\epsilon ^ { 2 } k + k \\sqrt { \\delta / \\epsilon } \\right) , \\quad \\beta = \\gamma = O \\left( \\sqrt { e ^ { - \\epsilon ^ { 2 } k } + k \\sqrt { \\delta / \\epsilon } } \\right)\n$$", "text_format": "latex", "bbox": [ 292, 854, 705, 888 ], "page_idx": 6 }, { "type": "text", "text": "Next, we bound the time complexity of our algorithms: ", "bbox": [ 174, 897, 535, 912 ], "page_idx": 6 }, { "type": "text", "text": "Input: dataset $D ^ { t - 1 }$ , update $u ^ { t } = ( z ^ { t } , \\bullet ^ { t } )$ , state $s ^ { t - 1 } = ( \\{ D _ { i } ^ { t - 1 } \\} _ { i \\in [ k ] } , \\{ \\theta _ { i } ^ { t - 1 } \\} _ { i \\in [ k ] } )$ \nif $\\bullet ^ { t } = { } ^ { \\prime } \\mathtt { d e l e t e } ^ { \\prime }$ then $S = \\left\\{ i \\in [ k ] : z ^ { t } \\in D _ { i } ^ { t - 1 } \\right\\} / /$ the shards $z ^ { t }$ belongs to. \nelse $S = \\{ i \\in [ k ] : \\mathtt { S a m p l e r } _ { i } ( \\{ z ^ { t } \\} , p ) \\neq \\{ \\} \\} / \\prime$ the shards $z ^ { t }$ will be added to. \nUpdate the shards: $D _ { i } ^ { t } = \\left\\{ { D _ { i } ^ { t - 1 } \\circ u } \\right.$ t if ot $i \\in S$ se , for every $i \\in [ k ]$ . \nUpdate the models: $\\theta _ { i } ^ { t } = \\Big \\{ \\mathcal { A } _ { i } ^ { \\mathrm { s i n g l e } } ( D _ { i } ^ { t } )$ if ot $i \\in S$ se , for every $i \\in [ k ]$ . \nUpdate the state: $s ^ { t } = ( \\{ D _ { i } ^ { t } \\} _ { i \\in [ k ] } , \\{ \\theta _ { i } ^ { t } \\} _ { i \\in [ k ] } ) / /$ to be used for the next update. \nOutput: {θti }i∈[k] ", "bbox": [ 183, 112, 779, 291 ], "page_idx": 7 }, { "type": "text", "text": "Theorem 5.2 (Run-time Guarantees). Let $p = 1 / k$ . Suppose the publishing functions satisfy the differential privacy requirement of Theorem 5.1. Let $N ^ { t }$ denote the number of times $\\mathcal { R } _ { \\mathcal { A } } ^ { d i s t r }$ calls $\\mathcal { A } ^ { s i n g l e }$ at round $t$ . We have that $N ^ { 0 } = k$ , and for every round $t \\geq 1$ : 1) if the update requester is non-adaptive, for every $\\xi$ , with probability at least $1 - \\xi$ , $N ^ { t } \\leq 1 + \\sqrt { 2 \\log { ( 1 / \\xi ) } }$ . 2) if the update requester is adaptive, for every $\\xi$ , with probability at least 1 − ξ, $N ^ { t } \\leq 1 + \\sqrt { 2 \\log { ( ( n + t ) / \\xi ) } }$ . Furthermore, for $\\xi > \\delta ^ { \\prime }$ , with probability at least $1 - \\xi$ , we have ", "bbox": [ 173, 321, 825, 414 ], "page_idx": 7 }, { "type": "equation", "img_path": "images/ae1774c441c6ddb0054e6f3f295ae6b952de2af5475d4b11fb5793e00a93a87f.jpg", "text": "$$\n\\begin{array} { c } { { N ^ { t } \\leq 1 + \\operatorname* { m i n } \\left\\{ \\sqrt { 2 \\log \\left( 2 ( n + t ) / ( \\xi - \\delta ^ { \\prime } ) \\right) } , \\sqrt { 2 \\epsilon ^ { \\prime } + 2 \\log \\left( 2 / ( \\xi - \\delta ^ { \\prime } ) \\right) } \\right\\} } } \\\\ { { { } } } \\\\ { { = O \\left( \\epsilon ^ { 2 } k + k \\sqrt { \\delta / \\epsilon } \\right) a n d \\delta ^ { \\prime } = e ^ { - \\epsilon ^ { 2 } k } + O \\left( k \\sqrt { \\delta / \\epsilon } \\right) } } \\end{array}\n$$", "text_format": "latex", "bbox": [ 236, 419, 743, 481 ], "page_idx": 7 }, { "type": "text", "text": "The proof can be found in the appendix, but at a high level it proceeds as follows. For a deletion request, we must retrain every shard that contains the point to be deleted. For a non-adaptive deletion request, we retrain one shard in expectation and we can obtain a high probability upper bound by using a Hoeffding bound. In the adaptive case, this may no longer be true, but there are two ways to obtain upper bounds that correspond to the two bounds in our Theorem. We can provide a worst-case upper bound on the number of shards that any of the √ $n$ data points belongs to, which incurs a cost of order $\\sqrt { \\log n }$ . Alternately, we can apply max-information bounds to reduce to the non-adaptive case, using an argument that is similar to our reduction for deletion guarantees. ", "bbox": [ 173, 488, 825, 599 ], "page_idx": 7 }, { "type": "text", "text": "Remark 5.1. We note that there is an alternative algorithm that one might consider, resulting from group differential privacy. If a learning algorithm satisfies $\\frac { \\epsilon } { k }$ −differential privacy, a valid unlearning procedure is to do nothing for $k$ updates and then fully retrain on the $( k + 1 ) ^ { t h }$ update. This follows from the \u000f−differential privacy guarantee the algorithm will have for groups of size $k$ . Our algorithm substantially outperforms this alternative algorithm as well, namely because our privacy parameter degrades much slower than in this group privacy baseline. Our analysis leverages adaptive composition of privacy across the publishing functions which means that privacy degrades with the square root of the number of updates, while it degrades linearly with group privacy. Consequently the group privacy baseline would require a full retraining every $k$ updates, but our algorithm requires a full retraining only every $k ^ { 2 }$ updates. ", "bbox": [ 173, 603, 825, 746 ], "page_idx": 7 }, { "type": "text", "text": "5.1 Private Aggregation ", "text_level": 1, "bbox": [ 174, 761, 352, 776 ], "page_idx": 7 }, { "type": "text", "text": "We briefly describe how we serve prediction requests by privately aggregating the output of the ensemble of models such that the published predictions are differentially private in the random seeds $r$ . At each round $t$ , while $\\mathcal { R } _ { \\mathcal { A } } ^ { \\mathrm { d i s t r } }$ is waiting for the next update request $\\hat { u ^ { t + 1 } }$ , we receive prediction requests $x$ and serve predictions $\\hat { y }$ . For each prediction request, we privately aggregate the predictions made by the ensemble of models $\\{ \\theta _ { i } ^ { t } \\} _ { i }$ ; Dwork and Feldman [2018] show several ways to privately aggregate predictions (one simple technique is to use the exponential mechanism to approximate the majority vote). Suppose we aggregate the predictions made by the ensemble of models using PrivatePredi $\\mathfrak { L } _ { \\epsilon ^ { \\prime } } ^ { k } : \\bar { \\Theta } ^ { k } \\times \\mathcal { X } \\stackrel { \\left. } { \\right. } \\mathcal { Y }$ , which takes in an ensemble of $k$ models and a data point, aggregates predictions from the ensemble models, and outputs a label that is $\\epsilon ^ { \\prime }$ -differentially private in the models. If we receive $l ^ { t }$ many prediction requests $( x _ { 1 } ^ { t } , \\ldots , x _ { l ^ { t } } ^ { t } )$ before our next update request $\\boldsymbol u ^ { t + 1 }$ , we can write $( \\hat { y } _ { 1 } ^ { t } , \\dots , \\hat { y } _ { l ^ { t } } ^ { t } ) = f _ { \\mathrm { p u b l i s h } } ^ { t } ( \\{ \\theta _ { i } ^ { t } \\} _ { i } )$ where $\\begin{array} { r } { \\hat { y } _ { j } ^ { t } = \\mathtt { P r i v a t e P r e d i c t } _ { \\epsilon ^ { \\prime } } ^ { k } ( \\{ \\theta _ { i } ^ { t } \\} _ { i } , x _ { j } ^ { t } ) . } \\end{array}$ . ", "bbox": [ 173, 786, 825, 911 ], "page_idx": 7 }, { "type": "text", "text": "", "bbox": [ 174, 90, 823, 125 ], "page_idx": 8 }, { "type": "text", "text": "Theorem 5.1, tells us that desired unlearning parameters $( \\alpha , \\beta , \\gamma )$ can be obtained by guaranteeing that the sequence of predictions is $( \\epsilon , \\delta )$ differentially private in the models (and hence $r$ ), for target parameters $\\epsilon , \\delta$ . As we serve prediction requests using PrivatePredict $\\mathbf { \\Sigma } _ { \\epsilon ^ { \\prime } } ^ { k }$ our privacy loss will accumulate and eventually exhaust our budget of $( \\epsilon , \\delta )$ -differential privacy. Hence we must track our accumulated privacy loss in the state of our unlearning algorithm, and when it is exhausted, fully retrain using $\\bar { \\mathcal { A } } ^ { \\mathrm { d i s t r } }$ . This resamples $r$ and hence resets our privacy budget. Standard composition theorems (see Dwork and Roth [2014]) show that we exhaust our privacy budget (and need to fully retrain) every time the number of prediction requests made since the last full retraining exceeds $\\left\\lfloor { \\frac { \\epsilon ^ { 2 } } { 8 ( \\epsilon ^ { \\prime } ) ^ { 2 } \\ln ( { \\frac { 1 } { \\delta } } ) } } \\right\\rfloor$ We formally describe this process denoted as PrivatePredictionInteraction $( \\epsilon ^ { \\prime } , \\epsilon , \\delta , k )$ in the appendix and state its unlearning guarantee in Theorem 5.3. ", "bbox": [ 173, 130, 826, 280 ], "page_idx": 8 }, { "type": "text", "text": "Theorem 5.3. The models $\\{ \\{ \\theta _ { i } ^ { t } \\} _ { i } \\} _ { t }$ in PrivatePredictionInteraction $( \\epsilon ^ { \\prime } , \\epsilon , \\delta , k )$ satisfy $( \\alpha , \\beta , \\gamma )$ -unlearning guarantee for $\\mathcal { A } ^ { d i s t r }$ where $\\begin{array} { r l r } { \\alpha } & { { } = } & { O \\left( \\epsilon ^ { 2 } k + k \\sqrt { \\delta / \\epsilon } \\right) } \\end{array}$ and $\\beta , \\gamma \\quad = \\quad$ $O \\left( \\sqrt { e ^ { - \\epsilon ^ { 2 } k } + k \\sqrt { \\delta / \\epsilon } } \\right)$ , $i f 0 < \\epsilon \\leq 1 / 2$ and $0 < \\delta < \\epsilon$ . ", "bbox": [ 173, 287, 825, 361 ], "page_idx": 8 }, { "type": "text", "text": "6 Evaluation of Unlearning Guarantees ", "text_level": 1, "bbox": [ 173, 388, 519, 407 ], "page_idx": 8 }, { "type": "text", "text": "In this section we consider the white-box setting in which the models in each shard are made public. SISA continues to have perfect deletion guarantees against non-adaptive deletion sequences in this setting. Experimental results on CIFAR-10 [Krizhevsky and Hinton, 2009], MNIST [Lecun et al., 1998], and Fashion-MNIST [Xiao et al., 2017] show both the failure of SISA to satisfy adaptive deletion guarantees, and give evidence that differential privacy can mitigate this problem well beyond the setting of our theorems while achieving accuracy only modestly worse than SISA. The code for our experiments can be found at https://github.com/ChrisWaites/adaptive-machine-unlearning. ", "bbox": [ 173, 428, 826, 526 ], "page_idx": 8 }, { "type": "text", "text": "We train SISA with an ensemble of convolutional neural networks on several datasets of points with categorical labels. Given a new point at query time, each model in the ensemble votes on the most likely label and aggregates their votes. The models are exposed publicly. This scheme has perfect non-adaptive deletion guarantees. ", "bbox": [ 174, 531, 825, 588 ], "page_idx": 8 }, { "type": "text", "text": "To construct an adaptive deletion sequence to falsify the hypothesis that the scheme has adaptive deletion guarantees, we exploit the observation that neural networks are often overconfident in the correct label for points on which they have been trained. For each training point, we guess that it falls into the shard corresponding to the model that has the highest confidence for the correct label. We then delete points for which we guess that they fall into the first $k / 2$ of the shards, and do not delete any others. After deleting the targeted points, we compute a test statistic: the indicator of whether the average accuracy of the models from the targeted shards is lower than the average accuracy of the models from the non-targeted shards. Under full retraining, by the symmetry of the random partition, the expectation of this test statistic is 0.5. Thus under the null hypothesis that the deletion algorithm satisfies perfect deletion guarantees, the test statistic also has expectation 0.5. Therefore, to the extent that the expectation of the indicator differs from 0.5, we falsify the null hypothesis that SISA has adaptive data deletion guarantees, and larger deviations from 0.5 falsify weaker deletion guarantees. ", "bbox": [ 174, 593, 825, 760 ], "page_idx": 8 }, { "type": "text", "text": "We run this experiment on three datasets (CIFAR-10, MNIST, and Fashion-MNIST), and plot the results in Figure 1. We then repeat the experiment by adding various amounts of noise to the gradients in the model training process to guarantee finite levels of differential privacy (though much weaker privacy guarantees than would be needed to invoke our theorems). We observe that on each dataset, modest amounts of noise are sufficient to break our attack (i.e. $9 5 \\%$ confidence intervals for the expectation of our indicator include 0.5, and hence fail to falsify the null hypothesis) while still approaching the accuracy of our models trained without differential privacy. This is also plotted in Figure 1. This gives evidence that differential privacy can improve deletion guarantees in the presence of adaptivity even in regimes beyond which our theory gives nontrivial guarantees. ", "bbox": [ 174, 765, 825, 891 ], "page_idx": 8 }, { "type": "text", "text": "Full experimental details can be found in the appendix. ", "bbox": [ 174, 897, 534, 911 ], "page_idx": 8 }, { "type": "image", "img_path": "images/44fba5964c6c783ca2ae42a63a10ae0552b68072bfa7bccf8697ae8c62cbba64.jpg", "image_caption": [ "Figure 1: The top row and bottom row show experiments with $k = 6$ and $k = 2$ shards respectively. The 3 columns report on 3 datasets. The $x$ axis denotes estimated expectation of our test statistic (the null hypothesis is expectation 0.5). The $y$ axis denotes the accuracy of the ensemble after deletion. Each point is annotated with the noise multiplier used in DP-SGD, the standard deviation of Gaussian noise applied to gradients during training. A label of 0.0 for a point represents the baseline case of no noise (original SISA algorithm). Points are affixed with $9 5 \\%$ confidence intervals along both axes (over the randomness of repeating the training/deletion experiment). Horizontal confidence intervals that overlap the line denoting expectation 0.5 fail to reject the null hypothesis that the algorithm has adaptive data deletion guarantees at $p \\leq 0 . 0 5$ . We get to this point with a level of noise addition that results in only a modest degradation in ensemble performance compared to SISA. " ], "image_footnote": [], "bbox": [ 191, 93, 820, 373 ], "page_idx": 9 }, { "type": "text", "text": "7 Conclusion and Discussion ", "text_level": 1, "bbox": [ 176, 558, 426, 575 ], "page_idx": 9 }, { "type": "text", "text": "We identify an important blindspot in the data deletion literature (the tenuous implicit assumption that deletion requests are independent of previously released models), and provide a very general methodology to reduce adaptive deletion guarantees to oblivious deletion guarantees. Through this reduction we get the first model and training algorithm agnostic methodology that allows for deletion of arbitrary sequences of adaptively chosen points while giving rigorous guarantees. The constants that our theorems inherit from the max information bounds of Rogers et al. [2016] are such that in most realistic settings they will not give useful parameters. But we hope that these constants will be improved in future work, and we give empirical evidence that differential privacy mitigates adaptive deletion “attacks” at very practical levels, beyond the promises of our theoretical results. We note that like for differential privacy, the $( \\alpha , \\beta , \\gamma )$ -deletion guarantees we give in this paper are parameterized, and are not meaningful absent a specification of those parameters. There is a risk with such technologies that they will be used with large values of the parameters that give only very weak guarantees, but will be described publicly in a way that glosses over this issue. We therefore recommend that if adopted in deployed products, deletion guarantees always be discussed in public in a way that is precise about what they promise, including the relevant parameter settings. ", "bbox": [ 173, 599, 825, 808 ], "page_idx": 9 }, { "type": "text", "text": "Acknowledgements ", "text_level": 1, "bbox": [ 176, 842, 338, 858 ], "page_idx": 9 }, { "type": "text", "text": "V.G., C.J., A.R., and S.S. were supported in part by NSF grants CCF-1934876 and AF-1763307, and a grant from the Simons Foundation. ", "bbox": [ 174, 882, 823, 911 ], "page_idx": 9 }, { "type": "text", "text": "References ", "text_level": 1, "bbox": [ 174, 89, 267, 106 ], "page_idx": 10 }, { "type": "text", "text": "Raef Bassily, Kobbi Nissim, Adam Smith, Thomas Steinke, Uri Stemmer, and Jonathan Ullman. Algorithmic stability for adaptive data analysis. SIAM Journal on Computing, (0):STOC16–377, 2021. ", "bbox": [ 174, 114, 825, 155 ], "page_idx": 10 }, { "type": "text", "text": "Lucas Bourtoule, Varun Chandrasekaran, Christopher Choquette-Choo, Hengrui Jia, Adelin Travers, Baiwu Zhang, David Lie, and Nicolas Papernot. Machine unlearning. In Proceedings of the 42nd IEEE Symposium on Security and Privacy, San Francisco, CA., 2021. ", "bbox": [ 174, 166, 823, 209 ], "page_idx": 10 }, { "type": "text", "text": "James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman-Milne, and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax. ", "bbox": [ 173, 219, 825, 276 ], "page_idx": 10 }, { "type": "text", "text": "Yinzhi Cao and Junfeng Yang. Towards making systems forget with machine unlearning. In 2015 IEEE Symposium on Security and Privacy, pages 463–480. IEEE, 2015. ", "bbox": [ 173, 286, 825, 316 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork and Vitaly Feldman. Privacy-preserving prediction. CoRR, abs/1803.10266, 2018. URL http://arxiv.org/abs/1803.10266. ", "bbox": [ 169, 325, 826, 356 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork and Aaron Roth. The algorithmic foundations of differential privacy. Foundations and Trends® in Theoretical Computer Science, 9(3–4):211–407, 2014. ", "bbox": [ 169, 364, 825, 395 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork, Krishnaram Kenthapadi, Frank McSherry, Ilya Mironov, and Moni Naor. Our data, ourselves: Privacy via distributed noise generation. In Annual International Conference on the Theory and Applications of Cryptographic Techniques, pages 486–503. Springer, 2006a. ", "bbox": [ 178, 404, 825, 448 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of cryptography conference, pages 265–284. Springer, 2006b. ", "bbox": [ 173, 457, 823, 488 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. The reusable holdout: Preserving validity in adaptive data analysis. Science, 349(6248):636–638, 2015a. ", "bbox": [ 173, 497, 826, 539 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Roth. Generalization in adaptive data analysis and holdout reuse. In Proceedings of the 28th International Conference on Neural Information Processing Systems-Volume 2, pages 2350–2358, 2015b. ", "bbox": [ 173, 549, 826, 593 ], "page_idx": 10 }, { "type": "text", "text": "Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Leon Roth. Preserving statistical validity in adaptive data analysis. In Proceedings of the forty-seventh annual ACM symposium on Theory of computing, pages 117–126, 2015c. ", "bbox": [ 176, 603, 825, 647 ], "page_idx": 10 }, { "type": "text", "text": "Matt Fredrikson, Somesh Jha, and Thomas Ristenpart. Model inversion attacks that exploit confidence information and basic countermeasures. In Indrajit Ray, Ninghui Li, and Christopher Kruegel, editors, Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security, Denver, CO, USA, October 12-16, 2015, pages 1322–1333. ACM, 2015. doi: 10.1145/ 2810103.2813677. URL https://doi.org/10.1145/2810103.2813677. ", "bbox": [ 174, 656, 826, 727 ], "page_idx": 10 }, { "type": "text", "text": "Antonio Ginart, Melody Y. Guan, Gregory Valiant, and James Zou. Making AI forget you: Data deletion in machine learning. CoRR, abs/1907.05012, 2019. URL http://arxiv.org/abs/ 1907.05012. ", "bbox": [ 174, 737, 826, 780 ], "page_idx": 10 }, { "type": "text", "text": "Aditya Golatkar, Alessandro Achille, Avinash Ravichandran, Marzia Polito, and Stefano Soatto. Mixed-privacy forgetting in deep networks. arXiv preprint arXiv:2012.13431, 2020a. ", "bbox": [ 168, 790, 825, 820 ], "page_idx": 10 }, { "type": "text", "text": "Aditya Golatkar, Alessandro Achille, and Stefano Soatto. Forgetting outside the box: Scrubbing deep networks of information accessible from input-output observations. In European Conference on Computer Vision, pages 383–398. Springer, 2020b. ", "bbox": [ 174, 829, 823, 872 ], "page_idx": 10 }, { "type": "text", "text": "Chuan Guo, Tom Goldstein, Awni Hannun, and Laurens van der Maaten. Certified data removal from machine learning models. arXiv preprint arXiv:1911.03030, 2019. ", "bbox": [ 174, 883, 821, 911 ], "page_idx": 10 }, { "type": "text", "text": "Avinatan Hassidim, Haim Kaplan, Yishay Mansour, Yossi Matias, and Uri Stemmer. Adversarially robust streaming algorithms via differential privacy. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020. URL https://proceedings.neurips. cc/paper/2020/hash/0172d289da48c48de8c5ebf3de9f7ee1-Abstract.html. ", "bbox": [ 174, 90, 826, 174 ], "page_idx": 11 }, { "type": "text", "text": "The U.K. Information Commissioner’s Office ICO. Guidance on the ai auditing framework. Draft Consultation, 2020. URL https://ico.org.uk/media/about-the-ico/consultations/ 2617219/guidance-on-the-ai-auditing-framework-draft-for-consultation.pdf. ", "bbox": [ 174, 184, 826, 227 ], "page_idx": 11 }, { "type": "text", "text": "Christopher Jung, Katrina Ligett, Seth Neel, Aaron Roth, Saeed Sharifi-Malvajerdi, and Moshe Shenfeld. A new analysis of differential privacy’s generalization guarantees. In 11th Innovations in Theoretical Computer Science Conference (ITCS 2020), volume 151, page 31. Schloss Dagstuhl– Leibniz-Zentrum fuer Informatik, 2020. ", "bbox": [ 174, 234, 826, 291 ], "page_idx": 11 }, { "type": "text", "text": "Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. 2009. ", "bbox": [ 171, 300, 825, 315 ], "page_idx": 11 }, { "type": "text", "text": "Yann Lecun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. In Proceedings of the IEEE, pages 2278–2324, 1998. ", "bbox": [ 174, 323, 823, 353 ], "page_idx": 11 }, { "type": "text", "text": "Seth Neel and Aaron Roth. Mitigating bias in adaptive data gathering via differential privacy. In International Conference on Machine Learning, pages 3720–3729. PMLR, 2018. ", "bbox": [ 174, 361, 821, 391 ], "page_idx": 11 }, { "type": "text", "text": "Seth Neel, Aaron Roth, and Saeed Sharifi-Malvajerdi. Descent-to-delete: Gradient-based methods for machine unlearning. In Algorithmic Learning Theory, pages 931–962. PMLR, 2021. ", "bbox": [ 174, 398, 823, 429 ], "page_idx": 11 }, { "type": "text", "text": "Nicolas Papernot, Shuang Song, Ilya Mironov, Ananth Raghunathan, Kunal Talwar, and Úlfar Erlingsson. Scalable private learning with pate, 2018. ", "bbox": [ 174, 438, 825, 467 ], "page_idx": 11 }, { "type": "text", "text": "Nicolas Papernot, Abhradeep Thakurta, Shuang Song, Steve Chien, and Ulfar Erlingsson. Tempered sigmoid activations for deep learning with differential privacy. The 35th AAAI Conference on Artificial Intelligence, 2021. ", "bbox": [ 174, 476, 821, 518 ], "page_idx": 11 }, { "type": "text", "text": "Ryan Rogers, Aaron Roth, Adam Smith, and Om Thakkar. Max-information, differential privacy, and post-selection hypothesis testing. In 2016 IEEE 57th Annual Symposium on Foundations of Computer Science (FOCS), pages 487–494. IEEE, 2016. ", "bbox": [ 173, 527, 825, 570 ], "page_idx": 11 }, { "type": "text", "text": "Ayush Sekhari, Jayadev Acharya, Gautam Kamath, and Ananda Theertha Suresh. Remember what you want to forget: Algorithms for machine unlearning. arXiv preprint arXiv:2103.03279, 2021. ", "bbox": [ 171, 579, 823, 608 ], "page_idx": 11 }, { "type": "text", "text": "Reza Shokri, Marco Stronati, Congzheng Song, and Vitaly Shmatikov. Membership inference attacks against machine learning models. In 2017 IEEE Symposium on Security and Privacy (SP), pages 3–18. IEEE, 2017. ", "bbox": [ 173, 616, 825, 659 ], "page_idx": 11 }, { "type": "text", "text": "Michael Veale, Reuben Binns, and Lilian Edwards. Algorithms that remember: Model inversion attacks and data protection law. CoRR, abs/1807.04644, 2018. URL http://arxiv.org/abs/ 1807.04644. ", "bbox": [ 171, 667, 823, 709 ], "page_idx": 11 }, { "type": "text", "text": "Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. 2017. ", "bbox": [ 171, 719, 823, 748 ], "page_idx": 11 }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243# KNOWLEDGE TRANSFER VIA STUDENT-TEACHER COLLABORATION
Anonymous authors Paper under double-blind review
# ABSTRACT
Accompanying with the flourish development in various fields, deep neural networks, however, are still facing with the plight of high computational costs and storage. One way to compress these heavy models is knowledge transfer (KT), in which a light student network is trained through absorbing the knowledge from a powerful teacher network. In this paper, we propose a novel knowledge transfer method which employs a Student-Teacher Collaboration (STC) network during the knowledge transfer process. This is done by connecting the front part of the student network to the back part of the teacher network as the STC network. The back part of the teacher network takes the intermediate representation from the front part of the student network as input to make the prediction. The difference between the prediction from the collaboration network and the output tensor from the teacher network is taken into account of the loss during the train process. Through back propagation, the teacher network provides guidance to the student network in a gradient signal manner. In this way, our method takes advantage of the knowledge from the entire teacher network, who instructs the student network in learning process. Through plentiful experiments, it is proved that our STC method outperforms other KT methods with conventional strategy.
# 1 INTRODUCTION
Deep neural networks have produced breakthrough results in various fields, such as computer vision (Krizhevsky et al., 2012; He et al., 2016) and natural language processing (Mikolov et al., 2010) in recent years. Through a mass of studies (Neyshabur et al., 2017; Canziani et al., 2016; Novak et al., 2018), researchers have proved that a DNN with larger capacity will have a better generalizability, which leads to a better performance. However, larger capacity will also cause heavier computational costs and storage, making these powerful models difficult to meet real-time requirements on embedded systems.
One way to compress these heavy models is knowledge transfer (KT). As can be seen in Figure 1(a), KT is a method to improve the performance of a light student network by absorbing the knowledge from a strong teacher network. In the early studies of KT such as knowledge distillation (KD) (Hinton et al., 2015), researchers took advantage of the output vector from teacher networks, converted it into “soft target” and trained the student network with the soft target and the ground-truth. KD can only be applied in classification task since the “soft target” is produced by the softmax function with temperature T. In recent studies, many methods focused on the intermediate representation of the teacher network, in which the feature map (Romero et al., 2015), attention map (Zagoruyko & Komodakis, 2016a) or the factor (Kim et al., 2018) extracted from student network are induced to mimic the corresponding one from teacher network by minimizing the difference between them. Figure 1(b) and Figure 1(c) are the overview of AT and FT. As can be seen, the role of the teacher network in these two methods is simply to provide an intermediate representation for imitation while does not give extra help during the training process. Moreover, due to divergence of the structure between the student and teacher networks, the student network usually cannot generate the same intermediate representation as the teacher network. In this case, an intermediate representation with the smallest difference does not equal to an accurate prediction.
 Figure 1: Overview of the proposed student-teacher collaboration method compared with other methods. (a) Student and teacher network. (b) Attention transfer (c) Factor transfer (d) Studentteacher collaboration. Different from the previous methods, we employ a collaboration network which is a connection of the front part of the student network and the back part of the teacher network. The difference between the predictions from the collaboration network and the teacher network is taken into account of loss during the training process. It can be clearly seen that our STC method additionally utilizes the knowledge from the top part of the teacher network.
To address the above problems, we propose a novel knowledge transfer method as illustrated in Figure 1(d). Different from the previous methods, we employ a collaboration network which is a connection of the front part of the student network and the back part of the teacher network during the training process. Specifically, we select a set of corresponding layers from the student and teacher networks. The front part and the back part of the selected layers of student and teacher networks are called student sub-network and teacher sub-network respectively. The teacher sub-network takes the intermediate representation from the student sub-network as input to make the prediction. Unlike KD using the soft target, in our method, the output tensor from the teacher network is directly treated as the target of the collaboration network. In this manner, our method can be applied to different tasks. During the training process, the difference between the predictions from the collaboration network and the teacher network is taken into account of the loss. Through back propagation, the gradient signal in the back part of the teacher network can be transferred to the student network and supervises the training process. In this way, teacher network in our method instructs student network on how to get the “answer”, rather than just give an intermediate representation for mimicking as in previous methods. It can be clearly seen from Figure 1 that our method additionally utilizes the knowledge from the teacher sub-network, compared with the previous methods. It is worth noting that the collaboration network is only used during the training process, the student network with the original structure is used for prediction during the inference time.
Our contributions can be summarized as follows:
• We propose a novel knowledge transfer method, additionally utilizing the knowledge from the back part of the teacher network by employing a collaboration network structure. To the best of our knowledge, the training strategy of insturcting the student network with a collaboration network has never been used. • The teacher network in our method instructs student network on how to get the right “answer”, rather than just give an intermediate representation for mimicking as in previous methods. • We take the output tensor from the teacher network as the target of the collaboration network, which brings good generalizability to our method on different tasks. • We experimentally show that our method outperforms other methods with conventional strategy on various datasets in different tasks.
# 2 RELATED WORKS
To reduce the model size as well as the computational costs of deep neural networks, a variety of methods have been proposed. These methods can be summarized into five categories: network pruning, parameter quantization, tensor decomposition, efficient architecture design and knowledge transfer. Network pruning is a way to reduce the redundancy in the neural networks(LeCun et al., 1990). Han et al. (2015) pruned the network by removing the unimportant connections. Later network pruning methods operate at channel or filter levels(Han et al., 2015; Yamamoto & Maeno, 2018; Liu et al., 2018; He et al., 2017). Parameter quantization aims at compressing the model by reducing the number of bits occupied by the weights or neurons. In Gupta et al. (2015), Vanhoucke et al. (2011), Zhuang et al. and Rastegari et al. (2016), authors trained convolutional neural networks using 16-bit, 8-bit, 4-bit and 1-bit weights respectively. Han et al. (2016) optimized the model combined with network pruning, quantization and huffman coding. Tensor decomposition compresses the networks by decomposing dense convolutional kernels with low-rank approximations, including CP-decomposition(Lebedev et al., 2014), Tucker decomposition(Kim et al., 2016) and tensor ring decomposition(Zhao et al., 2016). Efficient network architecture design is an interesting approach to accelerate the model, such as SqueezeNet (Iandola et al., 2017), Mobilenet (Howard et al., 2017), ShuffleNet (Zhang et al., 2018) and Xception (Chollet, 2017).
In addition to the above four strategies that will partially change the components of the network, knowledge transfer is another way to compress the model by improving the performance of a lighter student network with the knowledge from a stronger teacher network. To the best of our knowledge, the earliest work of knowledge transfer is Bucilua et al. (2006), which to train a small model with data labeled by an ensemble of large model. Li et al. (2014) took the KL divergence between the posterior probabilities produced by the softmax operation from student and teacher model as loss function for knowledge transfer. Hinton et al. (2015) proposed a method called knowledge distillation (KD), converting the posterior probabilities extracted from teacher network into “soft targets”. In Fitnets (Romero et al., 2015), they regarded the feature map extracted from the teacher network as hints, and trained the student network by mimicking the corresponding feature maps of student and teacher networks. Attention transfer (AT) (Zagoruyko & Komodakis, 2016a) computed the summations of the feature map across the channel to generate the attention map and trained the student network by minimizing the difference between the attention map of corresponding blocks. Factor transfer (FT) (Kim et al., 2018) employed a paraphraser and a translator to translate the knowledge in the feature maps into factors. The student network is optimized by minimizing the $l _ { 2 }$ loss between student and teacher factors. In Ding et al. (2019), authors compressed the CNN-DBLSTM model on OCR task with Tucker decomposition and the knowledge in the teacher’s BLSTM and inner product layers. There are also studies on knowledge transfer utilizing the adversarial networks, such as $\mathrm { X u }$ et al., Belagiannis et al. (2018) and Wang et al. (2018).
# 3 METHOD
An eminent teacher should not only give a referenced answer to a student, but also teach student how to get the answer. Analogously, during the training process of the student network, a teacher network should teach the student network how to make the right prediction to play a role as an eminent teacher. In this section, we will firstly explain some concerns in the previous knowledge transfer methods and then describe our method in detail to explain how the teacher network instructs the student network’s learning process in our method.
# 3.1 CONCERNS IN THE PREVIOUS METHODS
Previous knowledge transfer methods, such as AT (Zagoruyko & Komodakis, 2016a) and FT (Kim et al., 2018), train the student network by minimizing the difference between the intermediate representations extracted from the corresponding layers of student and teacher networks. However, this training strategy contains the following problems.
The first problem is that the teacher network in the previous methods simply provided an intermediate representation for imitation but did not teach student network how to get it. Therefore, the guidance from teacher network is limited in the previous methods. Another problem is the intermediate representation from teacher network is treated as the target in these method. However, due to the divergence of the structure between the student and teacher networks, the student network usually cannot generate the same intermediate representation as the teacher network. In this case, an intermediate representation with the smallest difference does not equal to an accurate prediction. What’s more, the intermediate representation is extracted from the hidden layer of the network, so the knowledge in the subsequent layers of the teacher network cannot be utilized.
 Figure 2: Training process of the proposed student-teacher collaboration method. We take the output tensor from the teacher network as the target of the collaboration network. The student network is trained with the collaboration loss and the classification loss. During the training process, the weights of the teacher network and teacher sub-network are fixed, only the weights of student network are updated.
# 3.2 STUDENT-TEACHER COLLABORATION
To address the above problems, we proposed a novel training strategy for knowledge transfer in our method which is insturcting the student network with a collaboration network during the training process. As illustrated in Figure 2, our method consists of three steps. Firstly, we forward propagate a pretrained teacher network $\tau$ with the input data $\pmb { I }$ to get the target $O _ { t }$ . Secondly, we connect all the front part of a selected layer of the student network which we called student sub-network to the corresponding layer1 of the teacher network as a collaboration network. The subsequent layers of the teacher network which we called teacher sub-network takes the intermediate representation from the student sub-network as input to produce the prediction $O _ { c }$ . The forward propagation of the collaboration network can be formulated as:
$$O _ { c } = \mathcal { T } _ { s u b } ( x _ { s } ^ { l _ { s } } ) = \mathcal { T } _ { s u b } \circ f ( w _ { s } ^ { l _ { s } } x _ { s } ^ { l _ { s } - 1 } )$$
where $c$ and $s$ are the symbol for collaboration and student network respectively. $\tau _ { s u b }$ denotes the calculations of the teacher sub-network. $f$ denotes the activation function. $l , x$ and $w$ denotes the layer number, intermediate representation and weights of the network respectively. Biases are omitted for simplifying notations.
After forward propagate the collaboration network, we compute the difference between the predictions from the collaboration network and the teacher network as the STC loss $\pmb { L } _ { S T C }$ . The back propagation of STC loss can be formulated as:
$$\frac { \partial { \cal L } _ { S T C } ( { \cal O } _ { c } , { \cal O } _ { t } ) } { \partial w ^ { l _ { s } } } = \frac { \partial { \cal L } _ { S T C } ( { \cal O } _ { c } , { \cal O } _ { t } ) } { \partial { \cal O } _ { c } } \frac { \partial { \cal O } _ { c } } { \partial x _ { s } ^ { l _ { s } } } \frac { \partial x _ { s } ^ { l _ { s } } } { \partial w _ { s } ^ { l _ { s } } }$$
where $O _ { t }$ denotes the output tensor from teacher network. Biases are omitted for simplifying notations.
As can be seen in Eq. 2, the teacher network instructs the training process of the student network in a gradient signal manner. To be specific, the gradient signal of the teacher sub-network $\frac { \partial O _ { c } } { \partial { \pmb x } _ { s } ^ { l _ { s } } }$ plays a role of weight parameters in the backward propagation formula, which indicates that the teacher network provides guidance to the student network on which element in the weights $\mathbf { \Delta } w ^ { l _ { s } }$ should be paid more attention to during the training process. Since we directly take the output tensor of the teacher network as the target of the collaboration network, this training strategy is more accurate than minimizing the difference between the intermediate representations as previous methods did. Moreover, it can be clearly seen from Figure 2 that our method additionally utilizes the back part of the teacher network, which will bring more knowledge for student network during the training process.
There are also optional selections of target in our method, which are soft target as in Hinton et al. (2015) and the ground-truth target. However, since there is no knowledge of the teacher network in the ground-truth target, it is not a good choice for our method. As for the soft target, it can only be applied to classification task, because it is generated by the softmax function with temperature T. We will demonstrate the experimental results of different selections of the target in Sec. 4.
# 3.3 LOSS FUNCTION
The loss function $\mathbf { { L } } _ { t o t a l }$ for training student network in classification task can be separated into two items, i.e. the classification loss $\scriptstyle { L _ { C F } }$ and the student-teacher collaboration (STC) loss $L _ { S T C }$ :
$$\begin{array} { r l } & { \pmb { L } _ { t o t a l } = \alpha \pmb { L } _ { S T C } + ( 1 - \alpha ) \pmb { L } _ { C F } } \\ & { \pmb { L } _ { S T C } = \pmb { \mathcal { C } } ( \pmb { T } _ { s u b } \circ \pmb { S } _ { l _ { s } } ( \pmb { I } ) - \pmb { \mathcal { T } } ( \pmb { I } ) ) } \\ & { \qquad \pmb { L } _ { C F } = \pmb { \mathcal { C } } ( \pmb { S } ( \pmb { I } ) , \pmb { G } ) } \end{array}$$
where $c$ denotes the cross entropy loss, $\pmb { S } _ { l _ { s } }$ denotes the front part calculations of the student network and $G$ denotes the ground-truth label respectively.
We train the student network by minimizing the weighted sum of two loss as shown in Eq. 3, where weight $\alpha$ is a hyper-parameter. Specifically, the STC loss is the cross-entropy between the predictions from collaboration and teacher networks, the classification loss is the cross-entropy between the prediction from student network and ground-truth. During the training process, the weights of the teacher sub-network are fixed, only the weights of the student network are updated.
For other types of tasks, the training process can be achieved by replacing the cross-entropy loss with the corresponding loss, such as smooth- $\mathbf { \cdot L } _ { 1 }$ loss for bounding-box regression (Girshick, 2015).
# 3.4 INTEGRATING WITH KD
Knowledge distillation (KD) Hinton et al. (2015) trains the student network with the soft target from teacher network. The definition of soft target is $p = s o f t m a x ( \frac { o } { T } )$ , where $o$ is the output tensor of teacher logits (pre-softmax activations) and $T$ is a temperature. Since KD takes no additional storage and computational costs during training, it can be integrated with other knowledge transfer methods, such as AT Zagoruyko & Komodakis (2016a) and FT Kim et al. (2018) in the classification task. However, these methods result in performance degradation when integrating with KD in some cases, because of the fact that mimicking the intermediate representations does not equal to a good prediction of student network.
In contrast, our method takes the output tensor from teacher network as the target, which is consistent with KD. During experiments, our method shows good synergy integrating with KD, thus further improves the performance of student network. We will demonstrate these results in Sec. 4.
# 4 EXPERIMENTS
In this section, we demonstrate the performance of proposed STC method in classification task on CIFAR-10 (Krizhevsky et al., 2014), CIFAR-100 (Krizhevsky et al., 2009), ImageNet LSVRC 2012 (Deng et al., 2009) datasets and object detection task on PASCAL VOC 2007 (Everingham & Winn, 2006) dataset. Firstly, we evaluate the STC performance integrated with or without KD (Hinton et al., 2015) of various student and teacher models on CIFAR-10, CIFAR-100 and ImageNet
Table 1: Top-1 classification error $( \% )$ on CIFAR-10 dataset. The first 7 columns are from manuscript of Kim et al. (2018).
<table><tr><td>Student</td><td>Teacher</td><td>KD</td><td>AT</td><td>+KD</td><td>FT +KD</td><td>STC</td><td>+KD</td></tr><tr><td>ResNet-20 (7.78)</td><td>ResNet-56 (6.36)</td><td>7.19</td><td>7.13</td><td>6.89</td><td>6.85</td><td>7.04</td><td>6.53 6.3</td></tr><tr><td>ResNet-20 (7.78)</td><td>WRN-40-1 (6.52)</td><td>7.09</td><td>7.34</td><td>7.00</td><td>6.85</td><td>6.95</td><td>6.30 6.22</td></tr><tr><td>VGG-13 (5.99)</td><td>WRN-46-4 (4.22)</td><td>5.71</td><td>5.54</td><td>5.30</td><td>4.84</td><td>4.65</td><td>4.82 4.63</td></tr><tr><td>WRN-16-1 (8.62)</td><td>WRN-16-2 (5.99)</td><td>7.64</td><td>8.10</td><td>7.52</td><td>7.64</td><td>7.59</td><td>7.15 7.05</td></tr></table>
Table 2: Top-1 classification error $( \% )$ on CIFAR-100 dataset. The first 7 columns are from manuscript of Kim et al. (2018).
<table><tr><td>Student</td><td>Teacher</td><td>KD</td><td>AT</td><td>+KD</td><td>FT</td><td>+KD STC</td><td>+KD</td></tr><tr><td>ResNet-20 (31.24)</td><td>ResNet-110 (26.99)</td><td>33.14</td><td>31.04</td><td>34.78</td><td>29.08</td><td>32.19 28.75</td><td>28.53</td></tr><tr><td>ResNet-56 (28.04)</td><td>ResNet-110 (26.99)</td><td>27.96</td><td>27.28</td><td>28.01</td><td>25.62</td><td>26.93 25.33</td><td>24.92</td></tr></table>
ILSVRC2012 datasets, compared with AT (Zagoruyko & Komodakis, 2016a) and FT (Kim et al., 2018). Secondly, we evaluate our method on PASCAL VOC 2007 dataset for object detection task compared with FT to show the generalizability of our method. Finally, we illustrate the result of different types of target on CIFAR-10 dataset.
# 4.1 CIFAR
CIFAR-10 and CIFAR-100 both are the basic image classification datasets and are used to evaluate the performance in many knowledge transfer methods (Zagoruyko & Komodakis, 2016a; Kim et al., 2018; Huang & Wang, 2017). For these two sets, we train the student network for 500 epochs with a mini-batch size of 128 and weight decay of $1 0 ^ { - 4 }$ . The learning rate starts from 0.1 and is divided by 10 at 150, 300 and 400 epochs. $\alpha$ is set to 0.3 on CIFAR-10 and 0.5 on CIFAR100 empirically. For data augmentation, we following the policy in He et al. (2016). In order to make the experimental results more convincing, we use the same student and teacher networks as FT (Kim et al., 2018) did, including ResNet (He et al., 2016), Wide ResNet (WRN) (Zagoruyko & Komodakis, 2016b) and VGG (Simonyan & Zisserman, 2014). For CIFAR-10, the corresponding student and teacher networks are 1) ResNet-20 and ResNet-56, which have same width (number of channels) and different depth (number of layers). 2) ResNet-20 and WRN-40-1, which have different width and depth. 3) WRN-16-1 and WRN-16-2, which have same depth and different width. 4) VGG-13 and WRN-46-4, where residual block exists in WRN but not in VGG. For CIFAR-100, the corresponding student and teacher networks are 1) ResNet-56 and ResNet-110. 2) Resnet-20 and ResNet-110. For cases that the intermediate representation from the student sub-network has different number of channels with the teacher sub-network, a simple convolutional layer is employed to transform the dimension.
In Table 1 and Table 2, “Student” column shows the type of student network and the number in parentheses is the performance of student network trained from scratch. “Teacher” column provides the type of teacher network and the performance of pretrained teacher network by our implementation. $" + \mathrm { K D } ^ { \prime \prime }$ column provides the performance of the corresponding method combined with KD.
Performance on CIFAR-10 is shown in Table 1, for all the cases our STC method outperforms other knowledge transfer methods no matter with or without KD. We can find another result that AT and our method show good synergy when integrating with KD on CIFAR-10 dataset, while FT has conflicts with KD in some cases.
As shown in Table 2, on CIFAR-100 dataset, our method achieves the best performance among all the methods in both cases of integrated with or without KD. Different from CIFAR-10 dataset, after combining with KD, both AT and FT have an obvious performance degradation on CIFAR-100. This is because the data of CIFAR-100 are more complex than CIFAR-10 and the teacher network (ResNet-110) is deeper than that of CIFAR-10. In this case, the knowledge from the teacher subnetwork is vital for the student network.
# 4.2 IMAGENET
To demonstrate the performance of our method on large dataset, we choose ResNet-18 as student network and ResNet-34 as teacher network training on ImageNet ILSVRC2012 dataset, which consists of 1.2 million training images and 50 thousand validation images. We optimize the student network with a mini-batch size of 512 and weight decay of $1 0 ^ { - 4 }$ on 4 GPUs. The $\alpha$ are set to 0.5 empirically. The learning rate starts from 0.1 and is divided by 10 when the error plateaus. A $2 2 4 \times 2 2 4$ crop is randomly sampled from an image or its horizontal flip for data augmentation. We evaluate the performance of KD, AT, FT and proposed method STC. Top-1 and Top-5 error rates as shown in Table 3.
As can be seen, our STC method consistently outperforms other methods on both Top-1 and Top5 error rates on ImageNet dataset. KD method suffers from the gap of depths between teacher and student network, leads to an even worse performance than training the student from scratch. KT and AT, again, show the conflicts when combined with KD, since they target at mimicking the intermediate representation but not the prediction. In contrast, our STC method improve the performance of student network by $1 . 3 6 \%$ Top-1 error rate without KD and $1 . 6 1 \%$ Top-1 error rate combined with KD, consistently shows good synergy integrated with KD.
Table 3: Top-1 and Top-5 classification error $( \% )$ on ImageNet ILSVRC2012 dataset. Pretrained student and teacher network are from PyTorch (Paszke et al., 2017) model zoo. Other statistics are gathered from our implementations.
<table><tr><td rowspan=1 colspan=1>error(%)</td><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>KD</td><td rowspan=1 colspan=1>AT+KD</td><td rowspan=1 colspan=1>FT+KD</td><td rowspan=1 colspan=1>STC +KD</td></tr><tr><td rowspan=1 colspan=1>Top-1</td><td rowspan=1 colspan=1>ResNet-18 (30.24)</td><td rowspan=1 colspan=1>ResNet-34 (26.69)</td><td rowspan=1 colspan=1>33.77</td><td rowspan=1 colspan=1>29.5232.80</td><td rowspan=1 colspan=1>29.0830.30</td><td rowspan=1 colspan=1>28.88 28.63</td></tr><tr><td rowspan=1 colspan=1>Top-5</td><td rowspan=1 colspan=1>ResNet-18 (10.92)</td><td rowspan=1 colspan=1>ResNet-34 (8.58)</td><td rowspan=1 colspan=1>12.29</td><td rowspan=1 colspan=1>9.9511.89</td><td rowspan=1 colspan=1>9.7510.47</td><td rowspan=1 colspan=1>9.669.54</td></tr></table>
# 4.3 PASCAL VOC 2007
To verify the generalizability of our method on different tasks, we evaluate the performance of our method on PASCAL VOC 2007 detection dataset. We use Faster-RCNN (Ren et al., 2015) pipeline for evaluation as Kim et al. (2018) did, which are VGG-16 backbone for student network and ResNet-101 backbone for teacher network specifically. We train the student network for 15 epochs with a mini-batch size of 16. The learning rate starts from 0.01 and is divided by 10 at 6 and 11 epochs. The $\alpha$ are set to 0.5 empirically. Since the proposal boxes from RPN module in teacher and student network are of different spatial positions, we extract the RPN and detector module of the teacher network as the teacher sub-network and the backbone of student network as student sub-network, which can be seen in Figure 3.
 Figure 3: STC method on object detection task. We take the backbone of the student network as student sub-network and RPN, ROI pooling, detector module of teacher network as teacher subnetwork.
Table 4 is the performance of our method compared with FT on PASCAL VOC 2007 dataset. As can be seen, the mAP of the student network is promoted by $1 . 6 \%$ in our method, while that in FT is $0 . 8 \%$ . This result proves that our method can be applied to various tasks and is superior to the previous methods.
Table 4: Mean average precision $( \% )$ on PASCAL VOC 2007 dataset. Both student and teacher network follow the Faster-RCNN pipeline. The backbone of student and teacher networks are VGG16 and ResNet-101 respectively.
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>mAP</td></tr><tr><td rowspan=1 colspan=1>FT</td><td rowspan=1 colspan=1>VGG-16 backbone(69.4)</td><td rowspan=1 colspan=1>ResNet-101 backbone (75.2)</td><td rowspan=1 colspan=1>70.3</td></tr><tr><td rowspan=1 colspan=1>STC</td><td rowspan=1 colspan=1>VGG-16 backbone(69.4)</td><td rowspan=1 colspan=1>ResNet-101backbone (75.2)</td><td rowspan=1 colspan=1>71.0</td></tr></table>
# 4.4 ABLATION STUDY
In this paragraph, we evaluate the performance of different selections of the target in our method on CIFAR-10 dataset, using the same student and teacher network as Sec. 4.1.
The performance of various target can be seen in Table 5. In Table 5, “output tensor (t)” and “soft target (t)” denote the output tensor and the soft target are generated from the teacher networks. “ground-truth (d)” denotes the ground-truth target is from the dataset. For the generating of the soft target, we follow the fashion in Hinton et al. (2015).
As can be seen, the selection of ground-truth target gets the worst results among all the cases. This is because the ground-truth target does not contain knowledge in the teacher network, so there is limited help in improving the performance of the student network.
For the selection of soft target, even though it can get about the same performance, it can only be employed on classification task, because the soft target is produced by the softmax function with temperature T. Considering the generalizability of our method on different tasks, we choose the output tensor from teacher network as the target.
Table 5: Top-1 classification error $\% )$ of different selections of the target on CIFAR-10 dataset.
<table><tr><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>output tensor (t)</td><td rowspan=1 colspan=1>soft target (t)</td><td rowspan=1 colspan=1> ground-truth (d)</td></tr><tr><td rowspan=1 colspan=1>ResNet-20 (7.78)</td><td rowspan=1 colspan=1>ResNet-56 (6.39)</td><td rowspan=1 colspan=1>6.53</td><td rowspan=1 colspan=1>6.59</td><td rowspan=1 colspan=1>6.78</td></tr><tr><td rowspan=1 colspan=1>ResNet-20 (7.78)</td><td rowspan=1 colspan=1>WRN-40-1(6.84)</td><td rowspan=1 colspan=1>6.30</td><td rowspan=1 colspan=1>6.55</td><td rowspan=1 colspan=1>6.83</td></tr><tr><td rowspan=1 colspan=1>VGG-13 (5.99)</td><td rowspan=1 colspan=1>WRN-46-4 (4.44)</td><td rowspan=1 colspan=1>4.82</td><td rowspan=1 colspan=1>4.80</td><td rowspan=1 colspan=1>5.17</td></tr><tr><td rowspan=1 colspan=1>WRN-16-1 (8.62)</td><td rowspan=1 colspan=1>WRN-16-2 (6.27)</td><td rowspan=1 colspan=1>7.15</td><td rowspan=1 colspan=1>7.39</td><td rowspan=1 colspan=1>8.01</td></tr></table>
# 5 CONCLUSION
In this paper, we proposed a novel knowledge transfer method called student-teacher collaboration (STC). Different from previous methods, our method employs a collaboration network by connecting the front part of the student network and the back part of the teacher network during the training process. We take the difference between the output predictions from the collaboration network and the teacher network into account of the loss to train the student network. Through back propagation, the knowledge of the teacher sub-network can be additionally utilized in a gradient signal manner. Specifically, the teacher network provides guidance to the student network on which element in the weights should be paid more attention to during the training process.
Through plentiful experiments, it is proved that our STC method outperforms previous knowledge transfer methods on various datasets and has good generalizability on different tasks. What’s more, our method has good synergy integrated with KD to further improve the performance of the student network, while other methods result in accuracy degradation in some cases.
To the best of our knowledge, the training strategy which is insturcting the student network with a collaboration network has never been used in other knowledge transfer methods. We believe that this novel idea will further promote the development of knowledge transfer.
# REFERENCES
Vasileios Belagiannis, Azade Farshad, and Fabio Galasso. Adversarial network compression. 03 2018.
Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006.
Alfredo Canziani, Adam Paszke, and Eugenio Culurciello. An analysis of deep neural network models for practical applications. arXiv preprint arXiv:1605.07678, 2016.
Francois Chollet. Xception: Deep learning with depthwise separable convolutions. computer vision and pattern recognition, pp. 1800–1807, 2017.
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009.
Haisong Ding, Kai Chen, and Qiang Huo. Compressing cnn-dblstm models for ocr with teacherstudent learning and tucker decomposition. Pattern Recognition, 96, 07 2019. doi: 10.1016/j. patcog.2019.07.002.
Mark Everingham and John Winn. The pascal visual object classes challenge 2007 (voc2007) development kit. International Journal of Computer Vision, 111(1):98–136, 2006.
Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pp. 1440–1448, 2015.
Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. Computer Science, 2015.
S. Han, J. Pool, J. Tran, and W. J. Dally. Learning both weights and connections for efficient neural networks. neural information processing systems, pp. 1135–1143, 2015.
S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. international conference on learning representations, 2016.
K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016.
Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017.
Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv: Computer Vision and Pattern Recognition, 2017.
Zehao Huang and Naiyan Wang. Like what you like: Knowledge distill via neuron selectivity transfer. arXiv preprint arXiv:1707.01219, 2017.
Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and $\mathrm { i 0 . 5 m b }$ model size. arXiv: Computer Vision and Pattern Recognition, 2017.
Jangho Kim, Seounguk Park, and Nojun Kwak. Paraphrasing complex network: Network compression via factor transfer. neural information processing systems, pp. 2760–2769, 2018.
Yong-Deok Kim, Eunhyeok Park, Sungjoo Yoo, Taelim Choi, Lu Yang, and Dongjun Shin. Compression of deep convolutional neural networks for fast and low power mobile applications. 05 2016.
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 and cifar-100 datasets. URl: https://www. cs. toronto. edu/kriz/cifar. html, 6, 2009.
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 55, 2014.
Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition, 2014. URL http://arxiv.org/abs/1412.6553. cite arxiv:1412.6553.
Y. LeCun, J. S. Denker, and S. A. Solla. Optimal brain damage. In Advances in neural information processing systems, pp. 598–605, 1990.
J. Li, R. Zhao, J.-T Huang, and Y. Gong. Learning small-size dnn with output-distribution-based criteria. Proceedings of the Annual Conference of the International Speech Communication Association, INTERSPEECH, pp. 1910–1914, 01 2014.
Zhenhua Liu, Jizheng Xu, Xiulian Peng, and Ruiqin Xiong. Frequency-domain dynamic pruning for convolutional neural networks. In Advances in Neural Information Processing Systems, pp. 1043–1053, 2018.
Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent\` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010.
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pp. 5947–5956, 2017.
Roman Novak, Yasaman Bahri, Daniel A Abolafia, Jeffrey Pennington, and Jascha SohlDickstein. Sensitivity and generalization in neural networks: an empirical study. arXiv preprint arXiv:1802.08760, 2018.
Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017.
M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pp. 525– 542. Springer, 2016.
Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99, 2015.
Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. international conference on learning representations, 2015.
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
V. Vanhoucke, A. Senior, and M.Z. Mao. Improving the speed of neural networks on cpus. 2011.
Xiaojie Wang, Rui Zhang, Yu Sun, and Jianzhong Qi. Kdgan: Knowledge distillation with generative adversarial networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 775–786. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/ 7358-kdgan-knowledge-distillation-with-generative-adversarial-networks. pdf.
Zheng Xu, Yen-Chang Hsu, and Jiawei Huang. Training shallow and thin networks for acceleration via knowledge distillation with conditional adversarial networks.
Kohei Yamamoto and Kurato Maeno. Pcas: Pruning channels with attention statistics. 2018.
Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016a.
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016b.
Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. computer vision and pattern recognition, pp. 6848–6856, 2018.
Qibin Zhao, Guoxu Zhou, Shengli Xie, Liqing Zhang, and Andrzej Cichocki. Tensor ring decomposition. 06 2016.
Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Towards effective lowbitwidth convolutional neural networks.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293[ { "type": "text", "text": "KNOWLEDGE TRANSFER VIA STUDENT-TEACHER COLLABORATION ", "text_level": 1, "bbox": [ 176, 98, 821, 146 ], "page_idx": 0 }, { "type": "text", "text": "Anonymous authors Paper under double-blind review ", "bbox": [ 183, 171, 398, 198 ], "page_idx": 0 }, { "type": "text", "text": "ABSTRACT ", "text_level": 1, "bbox": [ 454, 236, 544, 251 ], "page_idx": 0 }, { "type": "text", "text": "Accompanying with the flourish development in various fields, deep neural networks, however, are still facing with the plight of high computational costs and storage. One way to compress these heavy models is knowledge transfer (KT), in which a light student network is trained through absorbing the knowledge from a powerful teacher network. In this paper, we propose a novel knowledge transfer method which employs a Student-Teacher Collaboration (STC) network during the knowledge transfer process. This is done by connecting the front part of the student network to the back part of the teacher network as the STC network. The back part of the teacher network takes the intermediate representation from the front part of the student network as input to make the prediction. The difference between the prediction from the collaboration network and the output tensor from the teacher network is taken into account of the loss during the train process. Through back propagation, the teacher network provides guidance to the student network in a gradient signal manner. In this way, our method takes advantage of the knowledge from the entire teacher network, who instructs the student network in learning process. Through plentiful experiments, it is proved that our STC method outperforms other KT methods with conventional strategy. ", "bbox": [ 233, 275, 764, 511 ], "page_idx": 0 }, { "type": "text", "text": "1 INTRODUCTION ", "text_level": 1, "bbox": [ 176, 558, 336, 574 ], "page_idx": 0 }, { "type": "text", "text": "Deep neural networks have produced breakthrough results in various fields, such as computer vision (Krizhevsky et al., 2012; He et al., 2016) and natural language processing (Mikolov et al., 2010) in recent years. Through a mass of studies (Neyshabur et al., 2017; Canziani et al., 2016; Novak et al., 2018), researchers have proved that a DNN with larger capacity will have a better generalizability, which leads to a better performance. However, larger capacity will also cause heavier computational costs and storage, making these powerful models difficult to meet real-time requirements on embedded systems. ", "bbox": [ 174, 597, 825, 694 ], "page_idx": 0 }, { "type": "text", "text": "One way to compress these heavy models is knowledge transfer (KT). As can be seen in Figure 1(a), KT is a method to improve the performance of a light student network by absorbing the knowledge from a strong teacher network. In the early studies of KT such as knowledge distillation (KD) (Hinton et al., 2015), researchers took advantage of the output vector from teacher networks, converted it into “soft target” and trained the student network with the soft target and the ground-truth. KD can only be applied in classification task since the “soft target” is produced by the softmax function with temperature T. In recent studies, many methods focused on the intermediate representation of the teacher network, in which the feature map (Romero et al., 2015), attention map (Zagoruyko & Komodakis, 2016a) or the factor (Kim et al., 2018) extracted from student network are induced to mimic the corresponding one from teacher network by minimizing the difference between them. Figure 1(b) and Figure 1(c) are the overview of AT and FT. As can be seen, the role of the teacher network in these two methods is simply to provide an intermediate representation for imitation while does not give extra help during the training process. Moreover, due to divergence of the structure between the student and teacher networks, the student network usually cannot generate the same intermediate representation as the teacher network. In this case, an intermediate representation with the smallest difference does not equal to an accurate prediction. ", "bbox": [ 174, 703, 825, 922 ], "page_idx": 0 }, { "type": "image", "img_path": "images/206032eee583c8289e602d20a96d66e95d1232ad882a298c7b22d17a51ba7b6c.jpg", "image_caption": [ "Figure 1: Overview of the proposed student-teacher collaboration method compared with other methods. (a) Student and teacher network. (b) Attention transfer (c) Factor transfer (d) Studentteacher collaboration. Different from the previous methods, we employ a collaboration network which is a connection of the front part of the student network and the back part of the teacher network. The difference between the predictions from the collaboration network and the teacher network is taken into account of loss during the training process. It can be clearly seen that our STC method additionally utilizes the knowledge from the top part of the teacher network. " ], "image_footnote": [], "bbox": [ 194, 108, 808, 344 ], "page_idx": 1 }, { "type": "text", "text": "To address the above problems, we propose a novel knowledge transfer method as illustrated in Figure 1(d). Different from the previous methods, we employ a collaboration network which is a connection of the front part of the student network and the back part of the teacher network during the training process. Specifically, we select a set of corresponding layers from the student and teacher networks. The front part and the back part of the selected layers of student and teacher networks are called student sub-network and teacher sub-network respectively. The teacher sub-network takes the intermediate representation from the student sub-network as input to make the prediction. Unlike KD using the soft target, in our method, the output tensor from the teacher network is directly treated as the target of the collaboration network. In this manner, our method can be applied to different tasks. During the training process, the difference between the predictions from the collaboration network and the teacher network is taken into account of the loss. Through back propagation, the gradient signal in the back part of the teacher network can be transferred to the student network and supervises the training process. In this way, teacher network in our method instructs student network on how to get the “answer”, rather than just give an intermediate representation for mimicking as in previous methods. It can be clearly seen from Figure 1 that our method additionally utilizes the knowledge from the teacher sub-network, compared with the previous methods. It is worth noting that the collaboration network is only used during the training process, the student network with the original structure is used for prediction during the inference time. ", "bbox": [ 174, 483, 825, 732 ], "page_idx": 1 }, { "type": "text", "text": "Our contributions can be summarized as follows: ", "bbox": [ 176, 739, 495, 753 ], "page_idx": 1 }, { "type": "text", "text": "• We propose a novel knowledge transfer method, additionally utilizing the knowledge from the back part of the teacher network by employing a collaboration network structure. To the best of our knowledge, the training strategy of insturcting the student network with a collaboration network has never been used. \n• The teacher network in our method instructs student network on how to get the right “answer”, rather than just give an intermediate representation for mimicking as in previous methods. \n• We take the output tensor from the teacher network as the target of the collaboration network, which brings good generalizability to our method on different tasks. \n• We experimentally show that our method outperforms other methods with conventional strategy on various datasets in different tasks. ", "bbox": [ 173, 766, 826, 924 ], "page_idx": 1 }, { "type": "text", "text": "2 RELATED WORKS ", "text_level": 1, "bbox": [ 176, 102, 354, 117 ], "page_idx": 2 }, { "type": "text", "text": "To reduce the model size as well as the computational costs of deep neural networks, a variety of methods have been proposed. These methods can be summarized into five categories: network pruning, parameter quantization, tensor decomposition, efficient architecture design and knowledge transfer. Network pruning is a way to reduce the redundancy in the neural networks(LeCun et al., 1990). Han et al. (2015) pruned the network by removing the unimportant connections. Later network pruning methods operate at channel or filter levels(Han et al., 2015; Yamamoto & Maeno, 2018; Liu et al., 2018; He et al., 2017). Parameter quantization aims at compressing the model by reducing the number of bits occupied by the weights or neurons. In Gupta et al. (2015), Vanhoucke et al. (2011), Zhuang et al. and Rastegari et al. (2016), authors trained convolutional neural networks using 16-bit, 8-bit, 4-bit and 1-bit weights respectively. Han et al. (2016) optimized the model combined with network pruning, quantization and huffman coding. Tensor decomposition compresses the networks by decomposing dense convolutional kernels with low-rank approximations, including CP-decomposition(Lebedev et al., 2014), Tucker decomposition(Kim et al., 2016) and tensor ring decomposition(Zhao et al., 2016). Efficient network architecture design is an interesting approach to accelerate the model, such as SqueezeNet (Iandola et al., 2017), Mobilenet (Howard et al., 2017), ShuffleNet (Zhang et al., 2018) and Xception (Chollet, 2017). ", "bbox": [ 174, 133, 825, 356 ], "page_idx": 2 }, { "type": "text", "text": "In addition to the above four strategies that will partially change the components of the network, knowledge transfer is another way to compress the model by improving the performance of a lighter student network with the knowledge from a stronger teacher network. To the best of our knowledge, the earliest work of knowledge transfer is Bucilua et al. (2006), which to train a small model with data labeled by an ensemble of large model. Li et al. (2014) took the KL divergence between the posterior probabilities produced by the softmax operation from student and teacher model as loss function for knowledge transfer. Hinton et al. (2015) proposed a method called knowledge distillation (KD), converting the posterior probabilities extracted from teacher network into “soft targets”. In Fitnets (Romero et al., 2015), they regarded the feature map extracted from the teacher network as hints, and trained the student network by mimicking the corresponding feature maps of student and teacher networks. Attention transfer (AT) (Zagoruyko & Komodakis, 2016a) computed the summations of the feature map across the channel to generate the attention map and trained the student network by minimizing the difference between the attention map of corresponding blocks. Factor transfer (FT) (Kim et al., 2018) employed a paraphraser and a translator to translate the knowledge in the feature maps into factors. The student network is optimized by minimizing the $l _ { 2 }$ loss between student and teacher factors. In Ding et al. (2019), authors compressed the CNN-DBLSTM model on OCR task with Tucker decomposition and the knowledge in the teacher’s BLSTM and inner product layers. There are also studies on knowledge transfer utilizing the adversarial networks, such as $\\mathrm { X u }$ et al., Belagiannis et al. (2018) and Wang et al. (2018). ", "bbox": [ 174, 362, 825, 627 ], "page_idx": 2 }, { "type": "text", "text": "3 METHOD ", "text_level": 1, "bbox": [ 176, 646, 281, 662 ], "page_idx": 2 }, { "type": "text", "text": "An eminent teacher should not only give a referenced answer to a student, but also teach student how to get the answer. Analogously, during the training process of the student network, a teacher network should teach the student network how to make the right prediction to play a role as an eminent teacher. In this section, we will firstly explain some concerns in the previous knowledge transfer methods and then describe our method in detail to explain how the teacher network instructs the student network’s learning process in our method. ", "bbox": [ 174, 678, 825, 761 ], "page_idx": 2 }, { "type": "text", "text": "3.1 CONCERNS IN THE PREVIOUS METHODS ", "text_level": 1, "bbox": [ 176, 780, 491, 792 ], "page_idx": 2 }, { "type": "text", "text": "Previous knowledge transfer methods, such as AT (Zagoruyko & Komodakis, 2016a) and FT (Kim et al., 2018), train the student network by minimizing the difference between the intermediate representations extracted from the corresponding layers of student and teacher networks. However, this training strategy contains the following problems. ", "bbox": [ 174, 804, 823, 861 ], "page_idx": 2 }, { "type": "text", "text": "The first problem is that the teacher network in the previous methods simply provided an intermediate representation for imitation but did not teach student network how to get it. Therefore, the guidance from teacher network is limited in the previous methods. Another problem is the intermediate representation from teacher network is treated as the target in these method. However, due to the divergence of the structure between the student and teacher networks, the student network usually cannot generate the same intermediate representation as the teacher network. In this case, an intermediate representation with the smallest difference does not equal to an accurate prediction. What’s more, the intermediate representation is extracted from the hidden layer of the network, so the knowledge in the subsequent layers of the teacher network cannot be utilized. ", "bbox": [ 176, 867, 823, 922 ], "page_idx": 2 }, { "type": "image", "img_path": "images/809b017244274bca8c289f8970d78c5d7ecdb7492118a537cb9b1768c4460671.jpg", "image_caption": [ "Figure 2: Training process of the proposed student-teacher collaboration method. We take the output tensor from the teacher network as the target of the collaboration network. The student network is trained with the collaboration loss and the classification loss. During the training process, the weights of the teacher network and teacher sub-network are fixed, only the weights of student network are updated. " ], "image_footnote": [], "bbox": [ 236, 98, 754, 303 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 174, 411, 825, 482 ], "page_idx": 3 }, { "type": "text", "text": "3.2 STUDENT-TEACHER COLLABORATION ", "text_level": 1, "bbox": [ 176, 498, 477, 512 ], "page_idx": 3 }, { "type": "text", "text": "To address the above problems, we proposed a novel training strategy for knowledge transfer in our method which is insturcting the student network with a collaboration network during the training process. As illustrated in Figure 2, our method consists of three steps. Firstly, we forward propagate a pretrained teacher network $\\tau$ with the input data $\\pmb { I }$ to get the target $O _ { t }$ . Secondly, we connect all the front part of a selected layer of the student network which we called student sub-network to the corresponding layer1 of the teacher network as a collaboration network. The subsequent layers of the teacher network which we called teacher sub-network takes the intermediate representation from the student sub-network as input to produce the prediction $O _ { c }$ . The forward propagation of the collaboration network can be formulated as: ", "bbox": [ 173, 523, 825, 650 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/908d3c765060d498922cab4c64d220e701ae2047adefd61b523b0d446ecc2942.jpg", "text": "$$\nO _ { c } = \\mathcal { T } _ { s u b } ( x _ { s } ^ { l _ { s } } ) = \\mathcal { T } _ { s u b } \\circ f ( w _ { s } ^ { l _ { s } } x _ { s } ^ { l _ { s } - 1 } )\n$$", "text_format": "latex", "bbox": [ 357, 667, 640, 686 ], "page_idx": 3 }, { "type": "text", "text": "where $c$ and $s$ are the symbol for collaboration and student network respectively. $\\tau _ { s u b }$ denotes the calculations of the teacher sub-network. $f$ denotes the activation function. $l , x$ and $w$ denotes the layer number, intermediate representation and weights of the network respectively. Biases are omitted for simplifying notations. ", "bbox": [ 174, 694, 825, 751 ], "page_idx": 3 }, { "type": "text", "text": "After forward propagate the collaboration network, we compute the difference between the predictions from the collaboration network and the teacher network as the STC loss $\\pmb { L } _ { S T C }$ . The back propagation of STC loss can be formulated as: ", "bbox": [ 174, 757, 825, 799 ], "page_idx": 3 }, { "type": "equation", "img_path": "images/26f2889451f875a671f022f4d24dfac000710d103e2433b5dcdf8b67d7a2a401.jpg", "text": "$$\n\\frac { \\partial { \\cal L } _ { S T C } ( { \\cal O } _ { c } , { \\cal O } _ { t } ) } { \\partial w ^ { l _ { s } } } = \\frac { \\partial { \\cal L } _ { S T C } ( { \\cal O } _ { c } , { \\cal O } _ { t } ) } { \\partial { \\cal O } _ { c } } \\frac { \\partial { \\cal O } _ { c } } { \\partial x _ { s } ^ { l _ { s } } } \\frac { \\partial x _ { s } ^ { l _ { s } } } { \\partial w _ { s } ^ { l _ { s } } }\n$$", "text_format": "latex", "bbox": [ 334, 803, 663, 839 ], "page_idx": 3 }, { "type": "text", "text": "where $O _ { t }$ denotes the output tensor from teacher network. Biases are omitted for simplifying notations. ", "bbox": [ 176, 849, 825, 877 ], "page_idx": 3 }, { "type": "text", "text": "As can be seen in Eq. 2, the teacher network instructs the training process of the student network in a gradient signal manner. To be specific, the gradient signal of the teacher sub-network $\\frac { \\partial O _ { c } } { \\partial { \\pmb x } _ { s } ^ { l _ { s } } }$ plays a role of weight parameters in the backward propagation formula, which indicates that the teacher network provides guidance to the student network on which element in the weights $\\mathbf { \\Delta } w ^ { l _ { s } }$ should be paid more attention to during the training process. Since we directly take the output tensor of the teacher network as the target of the collaboration network, this training strategy is more accurate than minimizing the difference between the intermediate representations as previous methods did. Moreover, it can be clearly seen from Figure 2 that our method additionally utilizes the back part of the teacher network, which will bring more knowledge for student network during the training process. ", "bbox": [ 174, 103, 825, 247 ], "page_idx": 4 }, { "type": "text", "text": "There are also optional selections of target in our method, which are soft target as in Hinton et al. (2015) and the ground-truth target. However, since there is no knowledge of the teacher network in the ground-truth target, it is not a good choice for our method. As for the soft target, it can only be applied to classification task, because it is generated by the softmax function with temperature T. We will demonstrate the experimental results of different selections of the target in Sec. 4. ", "bbox": [ 174, 253, 825, 324 ], "page_idx": 4 }, { "type": "text", "text": "3.3 LOSS FUNCTION ", "text_level": 1, "bbox": [ 176, 340, 328, 356 ], "page_idx": 4 }, { "type": "text", "text": "The loss function $\\mathbf { { L } } _ { t o t a l }$ for training student network in classification task can be separated into two items, i.e. the classification loss $\\scriptstyle { L _ { C F } }$ and the student-teacher collaboration (STC) loss $L _ { S T C }$ : ", "bbox": [ 173, 367, 823, 395 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/539858756a4c31fa15bf2d7bc3d748a2eae6a15b04bae04dc9b57f0f93c3b82c.jpg", "text": "$$\n\\begin{array} { r l } & { \\pmb { L } _ { t o t a l } = \\alpha \\pmb { L } _ { S T C } + ( 1 - \\alpha ) \\pmb { L } _ { C F } } \\\\ & { \\pmb { L } _ { S T C } = \\pmb { \\mathcal { C } } ( \\pmb { T } _ { s u b } \\circ \\pmb { S } _ { l _ { s } } ( \\pmb { I } ) - \\pmb { \\mathcal { T } } ( \\pmb { I } ) ) } \\\\ & { \\qquad \\pmb { L } _ { C F } = \\pmb { \\mathcal { C } } ( \\pmb { S } ( \\pmb { I } ) , \\pmb { G } ) } \\end{array}\n$$", "text_format": "latex", "bbox": [ 375, 400, 622, 455 ], "page_idx": 4 }, { "type": "text", "text": "where $c$ denotes the cross entropy loss, $\\pmb { S } _ { l _ { s } }$ denotes the front part calculations of the student network and $G$ denotes the ground-truth label respectively. ", "bbox": [ 173, 459, 821, 487 ], "page_idx": 4 }, { "type": "text", "text": "We train the student network by minimizing the weighted sum of two loss as shown in Eq. 3, where weight $\\alpha$ is a hyper-parameter. Specifically, the STC loss is the cross-entropy between the predictions from collaboration and teacher networks, the classification loss is the cross-entropy between the prediction from student network and ground-truth. During the training process, the weights of the teacher sub-network are fixed, only the weights of the student network are updated. ", "bbox": [ 174, 493, 823, 564 ], "page_idx": 4 }, { "type": "text", "text": "For other types of tasks, the training process can be achieved by replacing the cross-entropy loss with the corresponding loss, such as smooth- $\\mathbf { \\cdot L } _ { 1 }$ loss for bounding-box regression (Girshick, 2015). ", "bbox": [ 174, 570, 825, 599 ], "page_idx": 4 }, { "type": "text", "text": "3.4 INTEGRATING WITH KD ", "text_level": 1, "bbox": [ 176, 616, 382, 631 ], "page_idx": 4 }, { "type": "text", "text": "Knowledge distillation (KD) Hinton et al. (2015) trains the student network with the soft target from teacher network. The definition of soft target is $p = s o f t m a x ( \\frac { o } { T } )$ , where $o$ is the output tensor of teacher logits (pre-softmax activations) and $T$ is a temperature. Since KD takes no additional storage and computational costs during training, it can be integrated with other knowledge transfer methods, such as AT Zagoruyko & Komodakis (2016a) and FT Kim et al. (2018) in the classification task. However, these methods result in performance degradation when integrating with KD in some cases, because of the fact that mimicking the intermediate representations does not equal to a good prediction of student network. ", "bbox": [ 174, 641, 825, 753 ], "page_idx": 4 }, { "type": "text", "text": "In contrast, our method takes the output tensor from teacher network as the target, which is consistent with KD. During experiments, our method shows good synergy integrating with KD, thus further improves the performance of student network. We will demonstrate these results in Sec. 4. ", "bbox": [ 176, 761, 825, 803 ], "page_idx": 4 }, { "type": "text", "text": "4 EXPERIMENTS ", "text_level": 1, "bbox": [ 176, 823, 326, 838 ], "page_idx": 4 }, { "type": "text", "text": "In this section, we demonstrate the performance of proposed STC method in classification task on CIFAR-10 (Krizhevsky et al., 2014), CIFAR-100 (Krizhevsky et al., 2009), ImageNet LSVRC 2012 (Deng et al., 2009) datasets and object detection task on PASCAL VOC 2007 (Everingham & Winn, 2006) dataset. Firstly, we evaluate the STC performance integrated with or without KD (Hinton et al., 2015) of various student and teacher models on CIFAR-10, CIFAR-100 and ImageNet ", "bbox": [ 174, 853, 823, 924 ], "page_idx": 4 }, { "type": "table", "img_path": "images/b18a6a1c97cad58654778feb20d2d912a5325787125bc0b7626877c4f34a3308.jpg", "table_caption": [ "Table 1: Top-1 classification error $( \\% )$ on CIFAR-10 dataset. The first 7 columns are from manuscript of Kim et al. (2018). " ], "table_footnote": [], "table_body": "<table><tr><td>Student</td><td>Teacher</td><td>KD</td><td>AT</td><td>+KD</td><td>FT +KD</td><td>STC</td><td>+KD</td></tr><tr><td>ResNet-20 (7.78)</td><td>ResNet-56 (6.36)</td><td>7.19</td><td>7.13</td><td>6.89</td><td>6.85</td><td>7.04</td><td>6.53 6.3</td></tr><tr><td>ResNet-20 (7.78)</td><td>WRN-40-1 (6.52)</td><td>7.09</td><td>7.34</td><td>7.00</td><td>6.85</td><td>6.95</td><td>6.30 6.22</td></tr><tr><td>VGG-13 (5.99)</td><td>WRN-46-4 (4.22)</td><td>5.71</td><td>5.54</td><td>5.30</td><td>4.84</td><td>4.65</td><td>4.82 4.63</td></tr><tr><td>WRN-16-1 (8.62)</td><td>WRN-16-2 (5.99)</td><td>7.64</td><td>8.10</td><td>7.52</td><td>7.64</td><td>7.59</td><td>7.15 7.05</td></tr></table>", "bbox": [ 184, 140, 813, 214 ], "page_idx": 5 }, { "type": "table", "img_path": "images/addd7bd538b040c3af94be373024583639230857d004acdef01f37557eb2d431.jpg", "table_caption": [ "Table 2: Top-1 classification error $( \\% )$ on CIFAR-100 dataset. The first 7 columns are from manuscript of Kim et al. (2018). " ], "table_footnote": [], "table_body": "<table><tr><td>Student</td><td>Teacher</td><td>KD</td><td>AT</td><td>+KD</td><td>FT</td><td>+KD STC</td><td>+KD</td></tr><tr><td>ResNet-20 (31.24)</td><td>ResNet-110 (26.99)</td><td>33.14</td><td>31.04</td><td>34.78</td><td>29.08</td><td>32.19 28.75</td><td>28.53</td></tr><tr><td>ResNet-56 (28.04)</td><td>ResNet-110 (26.99)</td><td>27.96</td><td>27.28</td><td>28.01</td><td>25.62</td><td>26.93 25.33</td><td>24.92</td></tr></table>", "bbox": [ 184, 276, 815, 321 ], "page_idx": 5 }, { "type": "text", "text": "ILSVRC2012 datasets, compared with AT (Zagoruyko & Komodakis, 2016a) and FT (Kim et al., 2018). Secondly, we evaluate our method on PASCAL VOC 2007 dataset for object detection task compared with FT to show the generalizability of our method. Finally, we illustrate the result of different types of target on CIFAR-10 dataset. ", "bbox": [ 174, 357, 825, 412 ], "page_idx": 5 }, { "type": "text", "text": "4.1 CIFAR ", "text_level": 1, "bbox": [ 174, 440, 264, 455 ], "page_idx": 5 }, { "type": "text", "text": "CIFAR-10 and CIFAR-100 both are the basic image classification datasets and are used to evaluate the performance in many knowledge transfer methods (Zagoruyko & Komodakis, 2016a; Kim et al., 2018; Huang & Wang, 2017). For these two sets, we train the student network for 500 epochs with a mini-batch size of 128 and weight decay of $1 0 ^ { - 4 }$ . The learning rate starts from 0.1 and is divided by 10 at 150, 300 and 400 epochs. $\\alpha$ is set to 0.3 on CIFAR-10 and 0.5 on CIFAR100 empirically. For data augmentation, we following the policy in He et al. (2016). In order to make the experimental results more convincing, we use the same student and teacher networks as FT (Kim et al., 2018) did, including ResNet (He et al., 2016), Wide ResNet (WRN) (Zagoruyko & Komodakis, 2016b) and VGG (Simonyan & Zisserman, 2014). For CIFAR-10, the corresponding student and teacher networks are 1) ResNet-20 and ResNet-56, which have same width (number of channels) and different depth (number of layers). 2) ResNet-20 and WRN-40-1, which have different width and depth. 3) WRN-16-1 and WRN-16-2, which have same depth and different width. 4) VGG-13 and WRN-46-4, where residual block exists in WRN but not in VGG. For CIFAR-100, the corresponding student and teacher networks are 1) ResNet-56 and ResNet-110. 2) Resnet-20 and ResNet-110. For cases that the intermediate representation from the student sub-network has different number of channels with the teacher sub-network, a simple convolutional layer is employed to transform the dimension. ", "bbox": [ 174, 470, 825, 707 ], "page_idx": 5 }, { "type": "text", "text": "In Table 1 and Table 2, “Student” column shows the type of student network and the number in parentheses is the performance of student network trained from scratch. “Teacher” column provides the type of teacher network and the performance of pretrained teacher network by our implementation. $\" + \\mathrm { K D } ^ { \\prime \\prime }$ column provides the performance of the corresponding method combined with KD. ", "bbox": [ 176, 714, 825, 770 ], "page_idx": 5 }, { "type": "text", "text": "Performance on CIFAR-10 is shown in Table 1, for all the cases our STC method outperforms other knowledge transfer methods no matter with or without KD. We can find another result that AT and our method show good synergy when integrating with KD on CIFAR-10 dataset, while FT has conflicts with KD in some cases. ", "bbox": [ 174, 776, 823, 833 ], "page_idx": 5 }, { "type": "text", "text": "As shown in Table 2, on CIFAR-100 dataset, our method achieves the best performance among all the methods in both cases of integrated with or without KD. Different from CIFAR-10 dataset, after combining with KD, both AT and FT have an obvious performance degradation on CIFAR-100. This is because the data of CIFAR-100 are more complex than CIFAR-10 and the teacher network (ResNet-110) is deeper than that of CIFAR-10. In this case, the knowledge from the teacher subnetwork is vital for the student network. ", "bbox": [ 174, 839, 825, 922 ], "page_idx": 5 }, { "type": "text", "text": "4.2 IMAGENET ", "text_level": 1, "bbox": [ 174, 103, 292, 117 ], "page_idx": 6 }, { "type": "text", "text": "To demonstrate the performance of our method on large dataset, we choose ResNet-18 as student network and ResNet-34 as teacher network training on ImageNet ILSVRC2012 dataset, which consists of 1.2 million training images and 50 thousand validation images. We optimize the student network with a mini-batch size of 512 and weight decay of $1 0 ^ { - 4 }$ on 4 GPUs. The $\\alpha$ are set to 0.5 empirically. The learning rate starts from 0.1 and is divided by 10 when the error plateaus. A $2 2 4 \\times 2 2 4$ crop is randomly sampled from an image or its horizontal flip for data augmentation. We evaluate the performance of KD, AT, FT and proposed method STC. Top-1 and Top-5 error rates as shown in Table 3. ", "bbox": [ 173, 130, 825, 241 ], "page_idx": 6 }, { "type": "text", "text": "As can be seen, our STC method consistently outperforms other methods on both Top-1 and Top5 error rates on ImageNet dataset. KD method suffers from the gap of depths between teacher and student network, leads to an even worse performance than training the student from scratch. KT and AT, again, show the conflicts when combined with KD, since they target at mimicking the intermediate representation but not the prediction. In contrast, our STC method improve the performance of student network by $1 . 3 6 \\%$ Top-1 error rate without KD and $1 . 6 1 \\%$ Top-1 error rate combined with KD, consistently shows good synergy integrated with KD. ", "bbox": [ 173, 248, 825, 347 ], "page_idx": 6 }, { "type": "table", "img_path": "images/a66ec033925e4d20dde2838cd360b8f1c76699602cc81a8d90a37f08903d7e35.jpg", "table_caption": [ "Table 3: Top-1 and Top-5 classification error $( \\% )$ on ImageNet ILSVRC2012 dataset. Pretrained student and teacher network are from PyTorch (Paszke et al., 2017) model zoo. Other statistics are gathered from our implementations. " ], "table_footnote": [], "table_body": "<table><tr><td rowspan=1 colspan=1>error(%)</td><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>KD</td><td rowspan=1 colspan=1>AT+KD</td><td rowspan=1 colspan=1>FT+KD</td><td rowspan=1 colspan=1>STC +KD</td></tr><tr><td rowspan=1 colspan=1>Top-1</td><td rowspan=1 colspan=1>ResNet-18 (30.24)</td><td rowspan=1 colspan=1>ResNet-34 (26.69)</td><td rowspan=1 colspan=1>33.77</td><td rowspan=1 colspan=1>29.5232.80</td><td rowspan=1 colspan=1>29.0830.30</td><td rowspan=1 colspan=1>28.88 28.63</td></tr><tr><td rowspan=1 colspan=1>Top-5</td><td rowspan=1 colspan=1>ResNet-18 (10.92)</td><td rowspan=1 colspan=1>ResNet-34 (8.58)</td><td rowspan=1 colspan=1>12.29</td><td rowspan=1 colspan=1>9.9511.89</td><td rowspan=1 colspan=1>9.7510.47</td><td rowspan=1 colspan=1>9.669.54</td></tr></table>", "bbox": [ 178, 414, 821, 460 ], "page_idx": 6 }, { "type": "text", "text": "4.3 PASCAL VOC 2007 ", "text_level": 1, "bbox": [ 176, 488, 361, 502 ], "page_idx": 6 }, { "type": "text", "text": "To verify the generalizability of our method on different tasks, we evaluate the performance of our method on PASCAL VOC 2007 detection dataset. We use Faster-RCNN (Ren et al., 2015) pipeline for evaluation as Kim et al. (2018) did, which are VGG-16 backbone for student network and ResNet-101 backbone for teacher network specifically. We train the student network for 15 epochs with a mini-batch size of 16. The learning rate starts from 0.01 and is divided by 10 at 6 and 11 epochs. The $\\alpha$ are set to 0.5 empirically. Since the proposal boxes from RPN module in teacher and student network are of different spatial positions, we extract the RPN and detector module of the teacher network as the teacher sub-network and the backbone of student network as student sub-network, which can be seen in Figure 3. ", "bbox": [ 173, 513, 825, 640 ], "page_idx": 6 }, { "type": "image", "img_path": "images/2c41b13a1b5199c7d9922e2e19e3458db4a06fc579e6106a287e69a3f7765d5c.jpg", "image_caption": [ "Figure 3: STC method on object detection task. We take the backbone of the student network as student sub-network and RPN, ROI pooling, detector module of teacher network as teacher subnetwork. " ], "image_footnote": [], "bbox": [ 284, 656, 709, 864 ], "page_idx": 6 }, { "type": "text", "text": "Table 4 is the performance of our method compared with FT on PASCAL VOC 2007 dataset. As can be seen, the mAP of the student network is promoted by $1 . 6 \\%$ in our method, while that in FT is $0 . 8 \\%$ . This result proves that our method can be applied to various tasks and is superior to the previous methods. ", "bbox": [ 173, 103, 825, 160 ], "page_idx": 7 }, { "type": "table", "img_path": "images/63ad865d82af4d6c859b4cbbbf951256178c0ce568f087302877787c9fd91bca.jpg", "table_caption": [ "Table 4: Mean average precision $( \\% )$ on PASCAL VOC 2007 dataset. Both student and teacher network follow the Faster-RCNN pipeline. The backbone of student and teacher networks are VGG16 and ResNet-101 respectively. " ], "table_footnote": [], "table_body": "<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>mAP</td></tr><tr><td rowspan=1 colspan=1>FT</td><td rowspan=1 colspan=1>VGG-16 backbone(69.4)</td><td rowspan=1 colspan=1>ResNet-101 backbone (75.2)</td><td rowspan=1 colspan=1>70.3</td></tr><tr><td rowspan=1 colspan=1>STC</td><td rowspan=1 colspan=1>VGG-16 backbone(69.4)</td><td rowspan=1 colspan=1>ResNet-101backbone (75.2)</td><td rowspan=1 colspan=1>71.0</td></tr></table>", "bbox": [ 238, 227, 758, 272 ], "page_idx": 7 }, { "type": "text", "text": "4.4 ABLATION STUDY ", "text_level": 1, "bbox": [ 174, 297, 339, 311 ], "page_idx": 7 }, { "type": "text", "text": "In this paragraph, we evaluate the performance of different selections of the target in our method on CIFAR-10 dataset, using the same student and teacher network as Sec. 4.1. ", "bbox": [ 176, 324, 823, 352 ], "page_idx": 7 }, { "type": "text", "text": "The performance of various target can be seen in Table 5. In Table 5, “output tensor (t)” and “soft target (t)” denote the output tensor and the soft target are generated from the teacher networks. “ground-truth (d)” denotes the ground-truth target is from the dataset. For the generating of the soft target, we follow the fashion in Hinton et al. (2015). ", "bbox": [ 174, 358, 825, 415 ], "page_idx": 7 }, { "type": "text", "text": "As can be seen, the selection of ground-truth target gets the worst results among all the cases. This is because the ground-truth target does not contain knowledge in the teacher network, so there is limited help in improving the performance of the student network. ", "bbox": [ 174, 421, 825, 463 ], "page_idx": 7 }, { "type": "text", "text": "For the selection of soft target, even though it can get about the same performance, it can only be employed on classification task, because the soft target is produced by the softmax function with temperature T. Considering the generalizability of our method on different tasks, we choose the output tensor from teacher network as the target. ", "bbox": [ 174, 470, 823, 527 ], "page_idx": 7 }, { "type": "table", "img_path": "images/e5e6c66ab21857a34ecebb80376df5d16e5068033947d8d52d5b8ff9c2a8143b.jpg", "table_caption": [ "Table 5: Top-1 classification error $\\% )$ of different selections of the target on CIFAR-10 dataset. " ], "table_footnote": [], "table_body": "<table><tr><td rowspan=1 colspan=1>Student</td><td rowspan=1 colspan=1>Teacher</td><td rowspan=1 colspan=1>output tensor (t)</td><td rowspan=1 colspan=1>soft target (t)</td><td rowspan=1 colspan=1> ground-truth (d)</td></tr><tr><td rowspan=1 colspan=1>ResNet-20 (7.78)</td><td rowspan=1 colspan=1>ResNet-56 (6.39)</td><td rowspan=1 colspan=1>6.53</td><td rowspan=1 colspan=1>6.59</td><td rowspan=1 colspan=1>6.78</td></tr><tr><td rowspan=1 colspan=1>ResNet-20 (7.78)</td><td rowspan=1 colspan=1>WRN-40-1(6.84)</td><td rowspan=1 colspan=1>6.30</td><td rowspan=1 colspan=1>6.55</td><td rowspan=1 colspan=1>6.83</td></tr><tr><td rowspan=1 colspan=1>VGG-13 (5.99)</td><td rowspan=1 colspan=1>WRN-46-4 (4.44)</td><td rowspan=1 colspan=1>4.82</td><td rowspan=1 colspan=1>4.80</td><td rowspan=1 colspan=1>5.17</td></tr><tr><td rowspan=1 colspan=1>WRN-16-1 (8.62)</td><td rowspan=1 colspan=1>WRN-16-2 (6.27)</td><td rowspan=1 colspan=1>7.15</td><td rowspan=1 colspan=1>7.39</td><td rowspan=1 colspan=1>8.01</td></tr></table>", "bbox": [ 184, 566, 813, 640 ], "page_idx": 7 }, { "type": "text", "text": "5 CONCLUSION ", "text_level": 1, "bbox": [ 174, 669, 320, 685 ], "page_idx": 7 }, { "type": "text", "text": "In this paper, we proposed a novel knowledge transfer method called student-teacher collaboration (STC). Different from previous methods, our method employs a collaboration network by connecting the front part of the student network and the back part of the teacher network during the training process. We take the difference between the output predictions from the collaboration network and the teacher network into account of the loss to train the student network. Through back propagation, the knowledge of the teacher sub-network can be additionally utilized in a gradient signal manner. Specifically, the teacher network provides guidance to the student network on which element in the weights should be paid more attention to during the training process. ", "bbox": [ 173, 700, 825, 813 ], "page_idx": 7 }, { "type": "text", "text": "Through plentiful experiments, it is proved that our STC method outperforms previous knowledge transfer methods on various datasets and has good generalizability on different tasks. What’s more, our method has good synergy integrated with KD to further improve the performance of the student network, while other methods result in accuracy degradation in some cases. ", "bbox": [ 174, 818, 825, 875 ], "page_idx": 7 }, { "type": "text", "text": "To the best of our knowledge, the training strategy which is insturcting the student network with a collaboration network has never been used in other knowledge transfer methods. We believe that this novel idea will further promote the development of knowledge transfer. ", "bbox": [ 176, 882, 823, 924 ], "page_idx": 7 }, { "type": "text", "text": "REFERENCES ", "text_level": 1, "bbox": [ 176, 103, 287, 117 ], "page_idx": 8 }, { "type": "text", "text": "Vasileios Belagiannis, Azade Farshad, and Fabio Galasso. Adversarial network compression. 03 2018. ", "bbox": [ 174, 126, 823, 154 ], "page_idx": 8 }, { "type": "text", "text": "Cristian Bucilua, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In Proceedings of the 12th ACM SIGKDD international conference on Knowledge discovery and data mining, pp. 535–541. ACM, 2006. ", "bbox": [ 176, 162, 821, 205 ], "page_idx": 8 }, { "type": "text", "text": "Alfredo Canziani, Adam Paszke, and Eugenio Culurciello. An analysis of deep neural network models for practical applications. arXiv preprint arXiv:1605.07678, 2016. ", "bbox": [ 171, 213, 821, 243 ], "page_idx": 8 }, { "type": "text", "text": "Francois Chollet. Xception: Deep learning with depthwise separable convolutions. computer vision and pattern recognition, pp. 1800–1807, 2017. ", "bbox": [ 171, 251, 825, 280 ], "page_idx": 8 }, { "type": "text", "text": "Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In 2009 IEEE conference on computer vision and pattern recognition, pp. 248–255. Ieee, 2009. ", "bbox": [ 173, 287, 823, 332 ], "page_idx": 8 }, { "type": "text", "text": "Haisong Ding, Kai Chen, and Qiang Huo. Compressing cnn-dblstm models for ocr with teacherstudent learning and tucker decomposition. Pattern Recognition, 96, 07 2019. doi: 10.1016/j. patcog.2019.07.002. ", "bbox": [ 173, 339, 823, 382 ], "page_idx": 8 }, { "type": "text", "text": "Mark Everingham and John Winn. The pascal visual object classes challenge 2007 (voc2007) development kit. International Journal of Computer Vision, 111(1):98–136, 2006. ", "bbox": [ 169, 390, 821, 421 ], "page_idx": 8 }, { "type": "text", "text": "Ross Girshick. Fast r-cnn. In Proceedings of the IEEE international conference on computer vision, pp. 1440–1448, 2015. ", "bbox": [ 173, 428, 823, 458 ], "page_idx": 8 }, { "type": "text", "text": "Suyog Gupta, Ankur Agrawal, Kailash Gopalakrishnan, and Pritish Narayanan. Deep learning with limited numerical precision. Computer Science, 2015. ", "bbox": [ 173, 465, 823, 494 ], "page_idx": 8 }, { "type": "text", "text": "S. Han, J. Pool, J. Tran, and W. J. Dally. Learning both weights and connections for efficient neural networks. neural information processing systems, pp. 1135–1143, 2015. ", "bbox": [ 171, 502, 823, 534 ], "page_idx": 8 }, { "type": "text", "text": "S. Han, H. Mao, and W. J. Dally. Deep compression: Compressing deep neural networks with pruning, trained quantization and huffman coding. international conference on learning representations, 2016. ", "bbox": [ 174, 540, 823, 583 ], "page_idx": 8 }, { "type": "text", "text": "K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. ", "bbox": [ 171, 592, 823, 621 ], "page_idx": 8 }, { "type": "text", "text": "Yihui He, Xiangyu Zhang, and Jian Sun. Channel pruning for accelerating very deep neural networks. In The IEEE International Conference on Computer Vision (ICCV), Oct 2017. ", "bbox": [ 171, 628, 821, 659 ], "page_idx": 8 }, { "type": "text", "text": "Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015. ", "bbox": [ 171, 666, 825, 695 ], "page_idx": 8 }, { "type": "text", "text": "Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. Mobilenets: Efficient convolutional neural networks for mobile vision applications. arXiv: Computer Vision and Pattern Recognition, 2017. ", "bbox": [ 174, 704, 823, 747 ], "page_idx": 8 }, { "type": "text", "text": "Zehao Huang and Naiyan Wang. Like what you like: Knowledge distill via neuron selectivity transfer. arXiv preprint arXiv:1707.01219, 2017. ", "bbox": [ 171, 755, 823, 785 ], "page_idx": 8 }, { "type": "text", "text": "Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and $\\mathrm { i 0 . 5 m b }$ model size. arXiv: Computer Vision and Pattern Recognition, 2017. ", "bbox": [ 174, 792, 823, 835 ], "page_idx": 8 }, { "type": "text", "text": "Jangho Kim, Seounguk Park, and Nojun Kwak. Paraphrasing complex network: Network compression via factor transfer. neural information processing systems, pp. 2760–2769, 2018. ", "bbox": [ 173, 843, 821, 873 ], "page_idx": 8 }, { "type": "text", "text": "Yong-Deok Kim, Eunhyeok Park, Sungjoo Yoo, Taelim Choi, Lu Yang, and Dongjun Shin. Compression of deep convolutional neural networks for fast and low power mobile applications. 05 2016. ", "bbox": [ 176, 882, 823, 922 ], "page_idx": 8 }, { "type": "text", "text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. Cifar-10 and cifar-100 datasets. URl: https://www. cs. toronto. edu/kriz/cifar. html, 6, 2009. ", "bbox": [ 173, 103, 823, 132 ], "page_idx": 9 }, { "type": "text", "text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012. ", "bbox": [ 174, 140, 821, 183 ], "page_idx": 9 }, { "type": "text", "text": "Alex Krizhevsky, Vinod Nair, and Geoffrey Hinton. The cifar-10 dataset. online: http://www. cs. toronto. edu/kriz/cifar. html, 55, 2014. ", "bbox": [ 169, 191, 823, 220 ], "page_idx": 9 }, { "type": "text", "text": "Vadim Lebedev, Yaroslav Ganin, Maksim Rakhuba, Ivan Oseledets, and Victor Lempitsky. Speeding-up convolutional neural networks using fine-tuned cp-decomposition, 2014. URL http://arxiv.org/abs/1412.6553. cite arxiv:1412.6553. ", "bbox": [ 174, 229, 823, 272 ], "page_idx": 9 }, { "type": "text", "text": "Y. LeCun, J. S. Denker, and S. A. Solla. Optimal brain damage. In Advances in neural information processing systems, pp. 598–605, 1990. ", "bbox": [ 169, 280, 823, 309 ], "page_idx": 9 }, { "type": "text", "text": "J. Li, R. Zhao, J.-T Huang, and Y. Gong. Learning small-size dnn with output-distribution-based criteria. Proceedings of the Annual Conference of the International Speech Communication Association, INTERSPEECH, pp. 1910–1914, 01 2014. ", "bbox": [ 174, 318, 823, 361 ], "page_idx": 9 }, { "type": "text", "text": "Zhenhua Liu, Jizheng Xu, Xiulian Peng, and Ruiqin Xiong. Frequency-domain dynamic pruning for convolutional neural networks. In Advances in Neural Information Processing Systems, pp. 1043–1053, 2018. ", "bbox": [ 171, 368, 823, 411 ], "page_idx": 9 }, { "type": "text", "text": "Toma´s Mikolov, Martin Karafi ˇ at, Luk ´ a´s Burget, Jan ˇ Cernock ˇ y, and Sanjeev Khudanpur. Recurrent\\` neural network based language model. In Eleventh annual conference of the international speech communication association, 2010. ", "bbox": [ 173, 419, 823, 463 ], "page_idx": 9 }, { "type": "text", "text": "Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pp. 5947–5956, 2017. ", "bbox": [ 174, 470, 823, 513 ], "page_idx": 9 }, { "type": "text", "text": "Roman Novak, Yasaman Bahri, Daniel A Abolafia, Jeffrey Pennington, and Jascha SohlDickstein. Sensitivity and generalization in neural networks: an empirical study. arXiv preprint arXiv:1802.08760, 2018. ", "bbox": [ 173, 522, 821, 565 ], "page_idx": 9 }, { "type": "text", "text": "Adam Paszke, Sam Gross, Soumith Chintala, Gregory Chanan, Edward Yang, Zachary DeVito, Zeming Lin, Alban Desmaison, Luca Antiga, and Adam Lerer. Automatic differentiation in pytorch. 2017. ", "bbox": [ 171, 573, 825, 617 ], "page_idx": 9 }, { "type": "text", "text": "M. Rastegari, V. Ordonez, J. Redmon, and A. Farhadi. Xnor-net: Imagenet classification using binary convolutional neural networks. In European Conference on Computer Vision, pp. 525– 542. Springer, 2016. ", "bbox": [ 171, 625, 823, 667 ], "page_idx": 9 }, { "type": "text", "text": "Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster r-cnn: Towards real-time object detection with region proposal networks. In Advances in neural information processing systems, pp. 91–99, 2015. ", "bbox": [ 173, 676, 823, 719 ], "page_idx": 9 }, { "type": "text", "text": "Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. international conference on learning representations, 2015. ", "bbox": [ 173, 727, 823, 770 ], "page_idx": 9 }, { "type": "text", "text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ", "bbox": [ 171, 779, 823, 808 ], "page_idx": 9 }, { "type": "text", "text": "V. Vanhoucke, A. Senior, and M.Z. Mao. Improving the speed of neural networks on cpus. 2011. ", "bbox": [ 173, 815, 812, 832 ], "page_idx": 9 }, { "type": "text", "text": "Xiaojie Wang, Rui Zhang, Yu Sun, and Jianzhong Qi. Kdgan: Knowledge distillation with generative adversarial networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 775–786. Curran Associates, Inc., 2018. URL http://papers.nips.cc/paper/ 7358-kdgan-knowledge-distillation-with-generative-adversarial-networks. pdf. ", "bbox": [ 173, 840, 890, 924 ], "page_idx": 9 }, { "type": "text", "text": "Zheng Xu, Yen-Chang Hsu, and Jiawei Huang. Training shallow and thin networks for acceleration via knowledge distillation with conditional adversarial networks. ", "bbox": [ 173, 103, 823, 132 ], "page_idx": 10 }, { "type": "text", "text": "Kohei Yamamoto and Kurato Maeno. Pcas: Pruning channels with attention statistics. 2018. ", "bbox": [ 174, 141, 781, 156 ], "page_idx": 10 }, { "type": "text", "text": "Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. arXiv preprint arXiv:1612.03928, 2016a. ", "bbox": [ 176, 165, 825, 207 ], "page_idx": 10 }, { "type": "text", "text": "Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. arXiv preprint arXiv:1605.07146, 2016b. ", "bbox": [ 176, 215, 823, 244 ], "page_idx": 10 }, { "type": "text", "text": "Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. Shufflenet: An extremely efficient convolutional neural network for mobile devices. computer vision and pattern recognition, pp. 6848–6856, 2018. ", "bbox": [ 173, 253, 823, 296 ], "page_idx": 10 }, { "type": "text", "text": "Qibin Zhao, Guoxu Zhou, Shengli Xie, Liqing Zhang, and Andrzej Cichocki. Tensor ring decomposition. 06 2016. ", "bbox": [ 173, 305, 823, 334 ], "page_idx": 10 }, { "type": "text", "text": "Bohan Zhuang, Chunhua Shen, Mingkui Tan, Lingqiao Liu, and Ian Reid. Towards effective lowbitwidth convolutional neural networks. ", "bbox": [ 173, 343, 823, 372 ], "page_idx": 10 }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444# MULTI-SCALE ATTRIBUTED NODE EMBEDDING
Anonymous authors Paper under double-blind review
# ABSTRACT
We present network embedding algorithms that capture information about a node from the local distribution over node attributes around it, as observed over random walks following an approach similar to Skip-gram. Observations from neighborhoods of different sizes are either pooled (AE) or encoded distinctly in a multiscale approach (MUSAE). Capturing attribute-neighborhood relationships over multiple scales is useful for a diverse range of applications, including latent feature identification across disconnected networks with similar attributes. We prove theoretically that matrices of node-feature pointwise mutual information are implicitly factorized by the embeddings. Experiments show that our algorithms are robust, computationally efficient and outperform comparable models on social, web and citation network datasets.
# 1 INTRODUCTION
Node embedding is a fundamental technique in network analysis that serves as a precursor to numerous downstream machine learning and optimisation tasks, e.g. community detection, network visualization and link prediction (Perozzi et al., 2014; Grover & Leskovec, 2016; Tang et al., 2015). Several recent network embedding methods, such as Deepwalk (Perozzi et al., 2014), Node2Vec (Grover & Leskovec, 2016) and Walklets (Perozzi et al., 2017), achieve impressive performance by learning the network structure following an approach similar to Word2Vec Skip-gram (Mikolov et al., 2013b), originally designed for word embedding. In these works, sequences of neighboring nodes are generated from random walks over a network, and representations are distilled from extracted node-node proximity statistics that capture local neighbourhood information.
When the nodes of a network have attributes (or features), their embeddings can be used to capture information about the attributes in their local neighbourhood. For a social network, attributes might represent a person’s interests, habits, history or preferences. The pattern of node attributes are often similar in a neighborhood, and conversely, nodes with similar attributes are more likely to be connected. This property is known as homophily. Attributed network embedding methods (Yang et al., 2015; Huang et al., 2017; Liao et al., 2018) leverage this additional information to supplement that of node neighbourhood structure, benefiting many applications, e.g. recommender systems, node classification and link prediction (Yang et al., 2018; Yang & Yang, 2018; Zhang et al., 2018).
The neighborhood of a node can be considered at different path lengths, or scales. In a social network, near neighbors may correspond to classmates, whereas nodes separated by greater scales may be in different cities or countries. Attributes of neighbors at different scales can be considered separately (multi-scale) or pooled in some way (e.g. weighted average). Figure 1a shows how the attribute distribution over neighbourhoods at different scales can indicate nodes with similar network roles even if they are distant in the network, or even in different networks. Methods that take attributes of nearby nodes into account generalizes those that do not, e.g. Perozzi et al. (2017), for which feature vectors can be considered standard basis vectors.
Many embedding methods correspond to matrix factorization, indeed some attributed embedding methods (e.g. Yang et al. (2018)) explicitly factorize a matrix of link-attribute information. Embeddings learned using Skip-gram are known to factorize a matrix of pointwise mutual information (PMI) of co-occurrences between each word and local context words (Levy & Goldberg, 2014). Related network embedding methods (Perozzi et al., 2014; Grover & Leskovec, 2016; Tang et al., 2015; Qiu et al., 2018) also implicitly factorize PMI matrices based on the probability of encountering each (context) node on a random walk from each starting node (Qiu et al., 2018).
 Figure 1: Phenomena affecting and inspiring the design of the multi-scale attributed network embedding procedure. In Figure 1a attributed nodes D and G have the same feature set and their nearest neighbours also exhibit equivalent sets of features, whereas features at higher order neighbourhoods differ. Figure 1b shows that as the order of neighbourhoods considered $( r )$ increases, the product of the adjacency matrix power and the feature matrix becomes less sparse. This suggests that an implicit decomposition method would be computationally beneficial.
Our key contributions are:
1. to introduce the first Skip-gram style embedding algorithms that consider attribute distributions over local neighborhoods, both pooled $( A E )$ and multi-scale (MUSAE), and their counterparts that attribute distinct features to each node (AE-EGO and MUSAE-EGO); 2. to theoretically prove that their embeddings approximately factorize PMI matrices based on the product of an adjacency matrix power and node-feature matrix; 3. to show that popular network embedding methods DeepWalk (Perozzi et al., 2014) and Walklets (Perozzi et al., 2017) are special cases of our $A E$ and MUSAE; 4. we show empirically that $A E$ and MUSAE embeddings enable strong performance at regression, classification, and link prediction tasks for real-world networks (e.g. Wikipedia and Facebook), are computationally scalable and enable transfer learning between networks.
We provide reference implementations of $A E$ and MUSAE, together with the datasets used for evaluation at https://github.com/iclr2020/MUSAE.
# 2 RELATED WORK
Efficient unsupervised learning of node embeddings for large networks has seen unprecedented development in recent years. The current paradigm focuses on learning latent space representations of nodes such that those that share neighbors (Perozzi et al., 2014; Tang et al., 2015; Grover & Leskovec, 2016; Perozzi et al., 2017), structural roles (Ribeiro et al., 2017; Ahmed et al., 2018) or attributes are located close together in the embedding space. Our work falls under the last of these categories as our goal is to learn similar latent representations for nodes with similar sets of features in their neighborhoods, both on a pooled and multi-scale basis.
Neighborhood preserving node embedding procedures place nodes with common first, second and higher order neighbors within close proximity in the embedding space. Recent works in the neighborhood preserving node embedding literature were inspired by the Skip-gram model (Mikolov et al., 2013a;b), which generates word embeddings by implicitly factorizing a shifted pointwise mutual information (PMI) matrix (Levy & Goldberg, 2014) obtained from a text corpus. This procedure inspired DeepWalk (Perozzi et al., 2014), a method which generates truncated random walks over a graph to obtain a “corpus” from which the Skip-gram model generates neighborhood preserving node embeddings. In doing so, DeepWalk implicitly factorizes a PMI matrix, which can be shown, based on the underlying first-order Markov process, to correspond to the mean of a set of normalized adjacency matrix powers up to a given order (Qiu et al., 2018). Such pooling of matrices can be suboptimal since neighbors over increasing path lengths (or scales) are treated equally or according to fixed weightings (Mikolov et al., 2013a; Grover & Leskovec, 2016); whereas it has been found that an optimal weighting may be task or dataset specific (Abu-El-Haija et al., 2018). In contrast, multi-scale node embedding methods such as LINE (Tang et al., 2015), GraRep (Cao et al., 2015) and Walklets (Perozzi et al., 2017) separately learn lower-dimensional node embedding components from each adjacency matrix power and concatenate them to form the full node representation. Such un-pooled representations, comprising distinct but less information at each scale, are found to give higher performance in a number of downstream settings, without increasing the overall number of free parameters (Perozzi et al., 2017).
Attributed node embedding procedures refine ideas from neighborhood based node embeddings to also incorporate node attributes (equivalently, features or labels) (Yang et al., 2015; Liao et al., 2018; Huang et al., 2017; Yang et al., 2018; Yang & Yang, 2018). Similarities between both a node’s neighborhood structure and features contribute to determining pairwise proximity in the node embedding space. These models follow quite different strategies to obtain such representations. The most elemental procedure, TADW (Yang et al., 2015), decomposes a convex combination of normalized adjacency matrix powers into a matrix product that includes the feature matrix. Several other models, such as SINE (Zhang et al., 2018) and ASNE (Liao et al., 2018), implicitly factorize a matrix formed by concatenating the feature and adjacency matrices. Other approaches such as TENE (Yang & Yang, 2018), formulate the attributed node embedding task as a joint non-negative matrix factorization problem in which node representations obtained from sub-tasks are used to regularize one another. AANE (Huang et al., 2017) uses a similar network structure based regularization approach, in which a node feature similarity matrix is decomposed using the alternating direction method of multipliers. The method most similar to our own is BANE (Yang et al., 2018), in which the product of a normalized adjacency matrix power and a feature matrix is explicitly factorized to obtain attributed node embeddings. Many other methods exist, but do not consider the attributes of higher order neighborhoods (Yang et al., 2015; Liao et al., 2018; Huang et al., 2017; Zhang et al., 2018; Yang & Yang, 2018).
The relationship between our pooled $( A E )$ and multi-scale (MUSAE) attributed node embedding methods mirrors that between graph convolutional neural networks (GCNNs) and multi-scale GCNNs. Widely used graph convolutional layers, such as GCN (Kipf & Welling, 2017), GraphSage (Hamilton et al., 2017), GAT (Velickovi ˇ c et al., 2018), ´ APPNP (Klicpera et al., 2019), SGCONV (Wu et al., 2019) and ClusterGCN (Chiang et al., 2019), create latent node representations that pool node attributes from arbitrary order neighborhoods, which are then inseparable and unrecoverable. In contrast, MixHop (Abu-El-Haija et al., 2019) learns latent features for each proximity.
# 3 ATTRIBUTED EMBEDDING MODELS
We now define algorithms to learn node embeddings using the attributes of nearby nodes, that allows both node and attribute embeddings to be learned jointly. The aim is to learn similar embeddings for nodes that occur in neighbourhoods of similar attributes; and similar embeddings for attributes that often occur in similar neighbourhoods of nodes. Let $\mathcal { G } = ( \mathbb { V } , \mathbb { L } )$ be an undirected graph of interest where $\mathbb { V }$ and $\mathbb { L }$ are the sets of vertices and edges (or links) respectively; and let $\mathbb { F }$ be the set of all possible node features (i.e. attributes). We define $\mathbb { F } _ { v } \subseteq \mathbb { F }$ as the subset of features belonging to each node $v \in \mathbb { V }$ . An embedding of nodes is a mapping $g : \mathbb { V } \to \mathbb { R } ^ { d }$ that assigns a $d$ -dimensional representation g(v) (or simply gv) to each node v and is fully described by a matrix G ∈ R|V|×d. Similarly, an embedding of the features (to the same latent space) is a mapping $h : \mathbb { F } \mathbb { R } ^ { d }$ with embeddings denoted $h ( f )$ (or simply $h _ { f }$ ), and is fully described by a matrix $H \in \mathbb { R } ^ { | \mathbb { F } | \times d }$ .
# 3.1 ATTRIBUTED EMBEDDING
The Attributed Embedding $( A E )$ procedure is described by Algorithm 1. We sample $n$ nodes $w _ { 1 }$ , from which to start attributed random walks on $\mathcal { G }$ , with probability proportional to their degree (Line 2). From each starting node, a node sequence of length $l$ is sampled over $\mathcal { G }$ (Line 3), where sampling follows a first order random walk. For a given window size $t$ , we iterate over each of the first $l - t$ nodes of the sequence termed source nodes $w _ { j }$ (Line 4). For each source node, we consider the following $t$ nodes as target nodes (Line 5). For each target node $w _ { j + r }$ , we add the tuple $( w _ { j } , f )$ to the corpus $\mathbb { D }$ for each target feature $f \in \mathbb { F } _ { w _ { j + r } }$ (Lines 6 and 7). We also consider features of the source node $f \in \mathbb { F } _ { w _ { j } }$ , adding each $( w _ { j + r } , f )$ tuple to $\mathbb { D }$ (Lines 9 and 10). Running Skip-gram on $\mathbb { D }$ with $b$ negative samples (Line 15) generates the $d$ -dimensional node and feature embeddings.

Algorithm 1: AE sampling and training procedure
 Algorithm 2: MUSAE sampling and training procedure
# 3.2 MULTI-SCALE ATTRIBUTED EMBEDDING
The $A E$ method (Algorithm 1) pools feature sets of neighborhoods at different proximities. Inspired by the performance of (unattributed) multi-scale node embeddings, we adapt the $A E$ algorithm to give multi-scale attributed node embeddings (MUSAE). The embedding component of a node $v \in \mathbb { V }$ for a specific proximity $r \in \{ 1 , . . . , t \}$ is given by a mapping $g ^ { r } : \mathbb { V } \overset { } { } \mathbb { R } ^ { d / t }$ (assuming $t$ divides $d )$ . Similarly, the embedding component of feature $f \in \mathbb { F }$ at proximity $r$ is given by a mapping $h ^ { r } : \mathbb { F } \mathbb { R } ^ { \dot { d } / t }$ . Concatenating gives a $d$ -dimensional embedding for each node and feature.
The Multi-Scale Attributed Embedding procedure is described by Algorithm 2. We again sample $n$ starting nodes $w _ { 1 }$ with a probability proportional to node degree (Line 2) and, for each, sample a node sequence of length $l$ over $\mathcal { G }$ (Line 3) according to either a first or second order random walk. For a given window size $t$ , we iterate over the first $l - t$ (source) nodes $w _ { j }$ of the sequence (Line 4) and for each source node we iterate through the $t$ (target) nodes $w _ { j + r }$ that follow (Line 5). We again consider each target node feature $f \in \mathbb { F } _ { w _ { j + r } }$ , but now add tuples $( w _ { j } , f )$ to a sub-corpus $\mathbb { D } _ { \stackrel { r } { \to } }$ (Lines 6 and 7). We add tuples $( w _ { j + r } , f )$ to another sub-corpus $\mathbb { D } _ { \mathcal { L } }$ for each source node feature $\dot { \boldsymbol { f } } \in \mathbb { F } _ { w _ { j } }$ (Lines 9 and 10). Running Skip-gram on each sub-corpus $\mathbb { D } _ { r } ^ { } = \mathbb { D } _ { \hat { \neq } } \cup \mathbb { D } _ { \hat { \varepsilon } }$ with $b$ negative samples (Line 16) output $t$ $\textstyle { \left( { \frac { d } { t } } \right) }$ -dimensional node and feature embeddings that are concatenated.
# 4 ATTRIBUTED EMBEDDING AS IMPLICIT MATRIX FACTORIZATION
Levy & Goldberg (2014) showed that the loss function of Skip-gram with negative sampling (SGNS) is minimized if the embedding matrices factorize a matrix of pointwise mutual information (PMI) of word co-occurrence statistics. Specifically, for a word dictionary $\mathbb { V }$ with $| \mathbb { V } | = n$ , SGNS (with $b$ negative samples) outputs two embedding matrices $W , C \in \mathbb { R } ^ { d \times n }$ such that $\forall w , c \in \mathbb { V }$ :
$$\begin{array} { r } { \pmb { w } _ { w } ^ { \top } \pmb { c } _ { c } \approx \mathrm { l o g } \left( \frac { \# ( w , c ) | \mathbb { D } | } { \# ( w ) \# ( c ) } \right) - \mathrm { l o g } b , } \end{array}$$
where $\# ( w , c ) , \# ( w ) , \# ( c )$ denote counts of word-context pair $( w , c )$ , $w$ and $c$ over a corpus $\mathbb { D }$ ; and word embeddings ${ \pmb w } _ { \pmb w }$ , $\pmb { c } _ { c } \in \mathbb { R } ^ { d }$ are columns of $W$ and $C$ corresponding to $w$ and $c$ respectively. Considering $\frac { \# ( w ) } { | { \mathbb D } | }$ , $\frac { \# ( c ) } { | { \mathbb D } | }$ , $\scriptstyle { \frac { \# ( w , c ) } { | \mathbb { D } | } }$ as empirical estimates of $p ( w )$ , $p ( c )$ and $p ( w , c )$ respectively shows:
$$\mathbf { } W ^ { \top } C \approx [ \operatorname { P M I } ( w , c ) - \log b ] _ { w , c \in \mathbb { V } } \ ,$$
i.e. an approximate low-rank factorization of a shifted PMI matrix (low rank since typically $d \ll n$ ).
Qiu et al. (2018) extended this result to node embedding models that apply SGNS to a “corpus” generated from random walks over the graph. In the case of DeepWalk where random walks are first-order Markov, the joint probability distributions over nodes at different stages of a random walk can be expressed in closed form. A closed form then follows for the factorized PMI matrix. We show that $A E$ and MUSAE implicitly perform analogous matrix factorizations.
Notation: $A \in \mathbb { R } ^ { n \times n }$ denotes the adjacency matrix and $D \in \mathbb { R } ^ { n \times n }$ the diagonal degree matrix of a graph $\mathcal { G }$ , i.e. $\begin{array} { r } { D _ { w , w } = \deg ( w ) = \sum _ { v } A _ { w , v } } \end{array}$ . We denote the volume of $\mathcal { G }$ by $\begin{array} { r } { c = \sum _ { v , w } A _ { v , w } } \end{array}$ . We define the binary attribute matrix $\pmb { F } \in \{ 0 , 1 \} ^ { | \mathbb { V } | \times | \mathbb { F } | }$ by $\pmb { F } _ { w , f } = \mathbf { 1 } _ { f \in \mathbb { F } _ { w } }$ , $\forall w \in \mathbb { V } , f \in \mathbb { F }$ . For ease of notation, we let $P { = } D ^ { - 1 } A$ and $\scriptstyle E = d i a g ( \mathbf { 1 } ^ { \top } D F )$ , where diag indicates a diagonal matrix.
Interpretation: Assuming $\mathcal { G }$ is ergodic: $\begin{array} { r } { p ( w ) = \frac { d e g ( w ) } { c } , w \in \mathbb { V } } \end{array}$ is the stationary distribution over nodes, i.e. $c ^ { - 1 } D = d i a g ( p ( w ) )$ ; and $c ^ { - 1 } { \cal A }$ is the stationary joint distribution over consecutive nodes $p ( w _ { j } , w _ { j + 1 } )$ . $F _ { w , f }$ can be considered a Bernoulli parameter describing the probability $p ( f | w )$ of observing a feature $f$ at a node $w$ and so $c ^ { - 1 } D F$ describes the stationary joint distribution $p ( f , w _ { j } )$ over nodes and features. Accordingly, $_ { P }$ is the matrix of conditional distributions $p ( w _ { j + 1 } | w _ { j } )$ ; and $\pmb { \cal E }$ is a diagonal matrix proportional to the probability of observing each feature at the stationary distribution $p ( f )$ (note that $p ( f )$ need not sum to 1, whereas $p ( w )$ necessarily must).
# 4.1 MULTI-SCALE CASE (MUSAE)
We know that the SGNS aspect of MUSAE (Algorithm 2, Line 17) is minimized when the learned embeddings grv , hrf satisfy grw>hrf ≈ log #(w,f )r|Dr|#(w)r#(f )r − log b ∀w ∈ V, f ∈ F. Our aim is to express this factorization in terms of known properties of the graph $\mathcal { G }$ and its features.
Lemma 1. The empirical statistics of node-feature pairs obtained from random walks give unbiased estimates of joint probabilities of observing feature $f \in \mathbb { F } r$ steps $( i )$ after; or $( i i )$ before node $v \in \mathbb { V }$ , as given by:
$$p l i m \frac { \# ( w , f ) _ { \vec { r } } } { | \mathbb { D } _ { \vec { r } } | } = c ^ { - 1 } ( D P ^ { r } F ) _ { w , f } \qquad \underbrace { p l i m \frac { \# ( w , f ) _ { \vec { r } } } { | \mathbb { D } _ { \vec { r } } | } } _ { l \to \infty } = c ^ { - 1 } ( F ^ { \top } D P ^ { r } ) _ { f , w }$$
Proof. See Appendix.
Lemma 2. Empirical statistics of node-feature pairs obtained from random walks give unbiased estimates of joint probabilities of observing feature $f \in \mathbb { F } r$ steps either side of node $v \in \mathbb { V } ,$ , given by:
$$\begin{array} { r l } & { p l i m \frac { \# ( w , f ) _ { r } } { | \mathbb { D } _ { r } | } = c ^ { - 1 } ( D P ^ { r } F ) _ { w , f } \ , } \\ & { l \infty } \end{array}$$
Proof. See Appendix.
Marginalizing gives unbiased estimates of stationary probability distributions of nodes and features:
$$\operatorname* { p l i m } _ { l \to \infty } \frac { \# ( w ) } { | \mathbb { D } _ { r } | } = \frac { d e g ( w ) } { c } = c ^ { - 1 } D _ { w , w } \qquad \mathrm { a n d } \qquad \operatorname* { p l i m } _ { l \to \infty } \frac { \# ( f ) } { | \mathbb { D } _ { r } | } = \sum _ { w | f \in \mathbb { R } _ { w } } \frac { d e g ( w ) } { c } = c ^ { - 1 } E _ { f , f }$$
Theorem 1. MUSAE embeddings approximately factorize the node-feature PMI matrix:
$$\begin{array} { r } { l o g \left( c P ^ { r } F E ^ { - 1 } \right) - \log b , \quad f o r r = 1 , \ldots , t . } \end{array}$$
Proof.
$$\begin{array} { r l } & { \frac { \# ( w , f ) _ { r } | \mathbb { D } _ { r } | } { \# ( f ) _ { r } \# ( w ) _ { r } } = \big ( \frac { \# ( w , f ) _ { r } } { | \mathbb { D } _ { r } | } \big ) / \big ( \frac { \# ( f ) _ { r } } { | \mathbb { D } _ { r } | } \frac { \# ( w ) _ { r } } { | \mathbb { D } _ { r } | } \big ) } \\ & { \xrightarrow { p } \big ( ( c D ^ { - 1 } ) ( c ^ { - 1 } D P ^ { r } F ) ( c E ^ { - 1 } ) \big ) _ { w , f } } \\ & { = c ( P ^ { r } F E ^ { - 1 } ) _ { w , f } } \end{array}$$
# 4.2 POOLED CASE (AE)
Lemma 3. The empirical statistics of node-feature pairs learned by the AE algorithm give unbiased estimates of mean joint probabilities over different path lengths as follows:
$$\underset { l \infty } { \underbrace { p l i m } } \frac { \# ( w , f ) } { | \mathbb { D } | } = \frac { c } { t } \big ( D ( \sum _ { r = 1 } ^ { t } \pmb { P } ^ { r } ) \pmb { F } \big ) _ { w , f }$$
Proof. By construction, $\begin{array} { r } { \left| \mathbb { D } \right| { = } \sum _ { r } \left| \mathbb { D } _ { r } \right| } \end{array}$ , #(w, f ) = Pr # $( w , f ) _ { r }$ , $| \mathbb { D } _ { r } | = | \mathbb { D } _ { s } | \forall r , s \in \{ 1 , \ldots , t \}$ and so $| \mathbb { D } _ { s } | = t ^ { - 1 } | \mathbb { D } |$ . Combining with Lemma 2, the result follows.
Theorem 2. AE embeddings approximately factorize the pooled node-feature matrix:
$$\log \Big ( \frac { c } { t } \big ( \sum _ { r = 1 } ^ { t } \pmb { P } ^ { r } \big ) \pmb { F } E ^ { - 1 } \Big ) - \log b .$$
Proof. The proof is analogous to the proof of Theorem 1.
Remark 1. DeepWalk is a corner case of $A E$ with $\pmb { F } \mathrm { = } \pmb { I } _ { \vert \mathbb { V } \vert }$
That is, DeepWalk is equivalent to $A E$ if each node has a single unique feature. Thus ${ \pmb { { \cal E } } } =$ $d i a g ( { \bf 1 } ^ { \top } D I ) = D$ and, by Theorem 2, DeepWalk’s embeddings factorize $\begin{array} { r } { \log \left( \frac { c } { t } ( \sum _ { r = 1 } ^ { t } \mathbf { P } ^ { r } ) \mathbf { D } ^ { - 1 } \right) - } \end{array}$ $\log b$ , as previously noted by Qiu et al. (2018).
Remark 2. Walklets is a corner case of MUSAE with ${ \pmb F } = { \pmb I } _ { | \mathbb { V } | }$
Thus, for $r = 1 , \ldots , t$ , the embeddings of Walklets factorise $\log \left( c \mathbf { P } ^ { r } \mathbf { D } ^ { - 1 } \right) - \log b$ .
Remark 3. Appending an identity matrix $\pmb { I }$ to the feature matrices $\pmb { F }$ of $A E$ and MUSAE (denoted $[ F ; I ] )$ adds a unique feature to each node. The resulting algorithms, named AE-EGO and MUSAE$E G O$ , learn embeddings that, respectively, approximately factorize the node-feature PMI matrices:
$$\partial g \left( c P ^ { r } \left[ F ; I \right] E ^ { - 1 } \right) - \log b , \forall r \in \{ 1 , . . . , t \} ; \qquad a n d \qquad \log \left( \frac { c } { t } ( \sum _ { r = 1 } ^ { t } P ^ { r } ) \left[ F ; I \right] E ^ { - 1 } \right) - \log b .$$
# 4.3 COMPLEXITY ANALYSIS
Under the assumption of a constant number of features per source node and first-order attributed random walk sampling, the corpus generation has a runtime complexity of $\mathcal { O } ( n l t x / y )$ , where $\begin{array} { r } { \boldsymbol { x } = \sum _ { v \in \mathbb { V } } \left| \mathbb { F } _ { v } \right| } \end{array}$ the total number of features across all nodes (including repetition) and $\dot { \boldsymbol y } = | \mathbb { V } |$ the number of nodes. Using negative sampling, the optimization runtime of a single asynchronous gradient descent epoch on $A E$ and the joint optimization runtime of MUSAE embeddings is described by $\mathcal { O } ( b d n l t x / y )$ . If one does $p$ truncated walks from each source node, the corpus generation complexity is $\mathcal { O } ( p y l t x )$ and the model optimization runtime is $\mathcal { O } ( b d p y l t x )$ . Our later runtime experiments in Section 5 will underpin optimization runtime complexity discussed above.
Corpus generation has a memory complexity of $\mathcal { O } ( n l t x / y )$ while the same when generating $p$ truncated walks per node has a memory complexity of $\mathcal { O } ( p y l t x )$ . Storing the parameters of an $A E$ embedding has a memory complexity of $\mathcal { O } ( y d )$ and MUSAE embeddings also use $\mathcal { O } ( y d )$ memory.
# 5 EXPERIMENTAL EVALUATION
In order to evaluate the quality of created representations we test the embeddings on supervised downstream tasks such as node classification, transfer learning across networks, regression, and link prediction. Finally, we investigate how changes in the input size affect the runtime. For doing so we utilize social networks and web graphs that we collected from Facebook, Github, Twitch and Wikipedia. The data sources, collection procedures and the datasets themselves are described with great detail in Appendix B. In addition we tested our methods on citation networks widely used for model evaluation (Shchur et al., 2018). Across all experiments we use the same hyperparameter settings of our own model, competing unsupervised methods and graph neural networks – these are respectively listed in Appendices C, E and F.
# 5.1 NODE CLASSIFICATION
We evaluate the node classification performance in two separate scenarios. In the first we do $k$ -shot learning by using the attributed embedding vectors with logistic regression to predict labels on the Facebook, Github and Twitch Portugal graphs. In the second we test the predictive performance under a fixed size train-test split to compare against various embedding methods and competitive neural network architectures.
# 5.1.1 K-SHOT LEARNING
In this experiment we take $k$ randomly selected samples per class, and use the attributed node embeddings to train a logistic regression model with $l _ { 2 }$ regularization and predict the labels on the remaining vertices. We repeated the above procedure with seeded splits 100 times to obtain robust comparable results (Shchur et al., 2018). From these we calculated the average of micro averaged $F _ { 1 }$ scores to compare our own methods with other unsupervised node embedding procedures. We varied $k$ in order to show the efficacy of the methods – what are the gains when the training set size is increased. These results are plotted in Figure 2 for Facebook, Github and Twitch Portugal networks.
Based on these plots it is evident that MUSAE and $A E$ embeddings have little gains in terms of micro $F _ { 1 }$ score when additional data points are added to the training set when $k$ is larger than 12. This implies that our method is data efficient. Moreover, $M U S A E – E G O$ and $A E / E G O$ have a slight performance advantage, which means that including the nodes in the attributed random walks helps when a small amount of labeled data is available in the downstream task.
 Figure 2: Node classification $k$ -shot learning performance as a function of training samples per class evaluated by average micro $F _ { 1 }$ scores calculated from a 100 seeded train-test splits.
# 5.1.2 FIXED RATIO TRAIN-TEST SPLITS
In this series of experiments we created a 100 seeded train test splits of nodes $80 \%$ train - $20 \%$ test) and calculated weighted, micro and macro averaged $F _ { 1 }$ scores on the test set to compare our methods to various embedding and graph neural network methods. Across procedures the same random seeds were used to obtain the train-test split this way the performances are directly comparable. We attached these results on the Facebook, Github and Twitch Portugal graphs as Table 6 of Appendix G. In each column red denotes the best performing unsupervised embedding model and blue corresponds to the strongest supervised neural model. We also attached additional supporting results using the same experimental setting with the unsupervised methods on the Cora, Citeseer, and Pubmed graphs as Table 5 of Appendix G.
In terms of micro $F _ { 1 }$ score our strongest method outperforms on the Facebook and GitHub networks the best unsupervised method by $1 . 0 1 \%$ and $0 . 4 7 \%$ respectively. On the Twitch Portugal network the relative micro $F _ { 1 }$ advantage of ASNE over our best method is $1 . 0 2 \%$ . Supervised node embedding methods outperform our and other unsupervised methods on every dataset for most metrics. In terms of micro $F _ { 1 }$ this relative advantage over our best performing model variant is the largest with $4 . 6 7 \%$ on the Facebook network, and only $0 . 1 1 \%$ on Twitch Portugal.
One can make four general observations based on our results (i) multi-scale representations can help with the classification tasks compared to pooled ones; (ii) the addition of the nodes in the ego augmented models to the feature sets does not help the performance when a large amount of labeled training data is available; (iii) based on the standard errors supervised neural models do not necessarily have a significant advantage over unsupervised methods (see the results on the Github and Twitch datasets); (iv) attributed node embedding methods that only consider first-order neighbourhoods have a poor performance.
# 5.2 TRANSFER LEARNING ON TWITCH SOCIAL NETWORKS
Neighbourhood based methods such as DeepWalk (Perozzi et al., 2014) are transductive and the function used to create the embedding cannot map nodes that are not connected to the original graph to the latent space. However, vanilla MUSAE and $A E$ are inductive and can easily map nodes to the embedding space if the attributes across the source and target graph are shared. This also means that supervised models trained on the embedding of a source graph are transferable. Importantly those attributed embedding methods such as AANE or ASNE that explicitly use the graph are unable to do this transfer.
 Figure 3: Mean micro $F _ { 1 }$ scores and standard errors calculated from 10 transfer learning runs with MUSAE and $A E$ on the Twitch graphs using Germany, England and Spain as target for the transfer. The blue reference line denotes the test performance on the target dataset in a non transfer learning scenario (standard hyperparameter settings and split ratio). The red reference line denotes the performance of random guesses.
Using the disjoint Twitch country level social networks (inter country edges are not present) we did a transfer learning experiment. First, we learn an embedding function given the social network from a country with the standard parameter settings. Second, we train regularized logistic regression on the embedding to predict whether the Twitch user streams explicit content. Third, using the embedding function we map the target graph to the embedding space. Fourth, we use the logistic model to predict the node labels on the target graph. We evaluate the performance by the micro $F _ { 1 }$ score based on 10 experimental repetitions. These averages with standard error bars are plotted for the Twitch Germany, England and Spain datasets as target graphs on Figure 3. We added additional results with France, Portugal and Russia being the target country in Appendix H as Table 5.
These results support that MUSAE and $A E$ create features that are transferable across graphs that share vertex features. For example, based on a comparison to non transfer-learning results we find that the transfer between the German and English user graphs is effective in terms of micro $F _ { 1 }$ score. Transfer from English users to German ones considerably improves performance, and the other way around there is a little gain. We also see that the upstream and downstream models that we trained on graphs with more vertices transfer well while transfer to the small ones is generally poor – most of the times worse than random guessing. There is no clear evidence that either $M U S A E$ or $A E$ gives better results on this specific problem.
# 5.3 REGRESSION ON WIKIPEDIA GRAPHS
We created embeddings of the Wikipedia webgraphs with all of our methods and the unsupervised baselines. Using a $80 \%$ train - $20 \%$ test split we predict the log of average traffic for each page using an elastic net model. The hyperparameters of the downstream model are available in Appendix D. In Table 7 of Appendix I we report average test $R ^ { 2 }$ and standard error of the predictive performance over 100 seeded train-test splits. Our key observation are: (i) that MUSAE outperforms all benchmark neighbourhood preserving and attributed node embedding methods, with the strongest MUSAE variant outperforming the best baseline between $2 . 0 5 \%$ and $1 0 . 0 3 \%$ (test $R ^ { 2 }$ ); (ii) that MUSAE significantly outperforms $A E$ by between $2 . 4 9 \%$ and $2 1 . 6 4 \%$ (test $R ^ { 2 }$ ); and (iii) the benefit of using the vertices as features (ego augmented model) can improve the performance of embeddings, but appears to be dataset specific phenomenon.
# 5.4 LINK PREDICTION ON WEB GRAPHS AND SOCIAL NETWORKS
The final series of experiments dedicated to the representation quality is about link prediction. We carried out an attenuated graph embedding trial to predict the removed edges from the graph. First, we randomly removed $50 \%$ of edges while the connectivity of the graph was not changed. Second, an embedding is created from the attenuated graph. Third, we calculate features for the removed edges and the same number of randomly selected pairs of nodes (negative candidates) with binary operators to create $d$ -dimensional edge features. We use the binary operators applied by Grover & Leskovec (2016). Specifically, we calculated the average, element-wise product, element-wise $l _ { 1 }$ norm and the element-wise $l _ { 2 }$ norm of vectors. Finally, we created a 100 seeded $80 \%$ train - $20 \%$ test splits and used logistic regression to predict whether an edge exists.
We compared to attributed and neighbourhood based embedding methods and average AUC scores are presented in Tables 8 and 9 of Appendix J. Our results show that Walklets (Perozzi et al., 2017) the multi-scale neighbourhood based embedding method materially outperforms every other method on most of the datasets and attributed embedding methods generally do poorly in terms of AUC compared to neighbourhood based ones.
# 5.5 SCALABILITY
In order to show the efficacy of our algorithms we run a series of experiments on synthetic graphs where we are able to manipulate the input size. Specifically, we look at the effect of changing the number of vertices and features per vertex. Our detailed experimental setup was as follows. Each point in Figure 4 is the mean runtime obtained from 100 experimental runs on Erdos-Renyi graphs. The base graph that we manipulated had $2 ^ { 1 1 }$ nodes, $2 ^ { 3 }$ edges and the same number of unique features per node uniformly selected from a feature set of $2 ^ { 1 1 }$ . Our experimental settings were the same as the ones described in Appendix C except for the number of epochs. We only did a single training epoch with asynchronous gradient descent on each graph. We tested the runtime with 1, 2 and 4 cores and included a dashed line as the linear runtime reference in each subfigure.
 Figure 4: Optimization time as a function of average feature count / number of vertices.
We observe that doubling the average number of features per vertex doubles the runtime of $A E$ and MUSAE. Moreover, the number of cores used during the optimization does not decrease the runtime when the number of unique features per vertex compared to the cardinality of the feature set is large. When we look at the change in the vertex set size we also see a linear behaviour. Doubling the input size simply results in a doubled optimization runtime. In addition, if one interpolates linearly from these results it comes that a network with 1 million nodes, 8 edges per node, 8 unique features per node can be embedded with MUSAE on commodity hardware in less than 5 hours. This interpolation assumes that the standard parameter settings proposed in Appendix C and 4 cores were used for optimization.
# 6 DISCUSSION AND CONCLUSION
We investigated attributed node embedding and proposes efficient pooled $( A E )$ and multi-scale (MUSAE) attributed node embedding algorithms with linear runtime. We proved that these algorithms implicitly factorize probability matrices of features appearing in the neighbourhood of nodes. Two widely used neighbourhood preserving node embedding methods Perozzi et al. (2014; 2017) are in fact simplified cases of our models. On several datasets (Wikipedia, Facebook, Github, and citation networks) we found that representations learned by our methods, in particular MUSAE, outperform neighbourhood based node embedding methods (Perozzi et al. (2014); Grover & Leskovec (2016)), multi-scale algorithms (Tang et al. (2015); Perozzi et al. (2017)) and recently proposed attributed node embedding procedures (Yang et al. (2015); Liao et al. (2018); Huang et al. (2017); Yang et al. (2018); Yang & Yang (2018)).
Our proposed embedding models are differentiated from other methods in that they encode feature information from higher order neighborhoods. The most similar previous model BANE (Yang et al., 2018) encodes node attributes from higher order neighbourhoods but has non-linear runtime complexity and the product of adjacency matrix power and feature matrix is decomposed explicitly.
# REFERENCES
Sami Abu-El-Haija, Bryan Perozzi, Rami Al-Rfou, and Alexander A Alemi. Watch your step: Learning node embeddings via graph attention. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett (eds.), Advances in Neural Information Processing Systems 31, pp. 9198–9208. 2018.
Sami Abu-El-Haija, Bryan Perozzi, Amol Kapoor, Nazanin Alipourfard, Kristina Lerman, Hrayr Harutyunyan, Greg Ver Steeg, and Aram Galstyan. MixHop: Higher-order graph convolutional architectures via sparsified neighborhood mixing. In Proceedings of the 36th International Conference on Machine Learning (ICML), pp. 21–29, 2019.
Nesreen K Ahmed, Ryan Rossi, John Boaz Lee, Xiangnan Kong, Theodore L Willke, Rong Zhou, and Hoda Eldardiry. Learning role-based graph embeddings. arXiv preprint arXiv:1802.02896, 2018.
Shaosheng Cao, Wei Lu, and Qiongkai Xu. Grarep: Learning graph representations with global structural information. In Proceedings of the 24th ACM International on Conference on Information and Knowledge Management, pp. 891–900, 2015.
Wei-Lin Chiang, Xuanqing Liu, Si Si, Yang Li, Samy Bengio, and Cho-Jui Hsieh. Cluster-gcn: An efficient algorithm for training deep and large graph convolutional networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining (KDD), pp. 257–266, 2019.
Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop on Representation Learning on Graphs and Manifolds, 2019.
Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2016.
Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In Advances in Neural Information Processing Systems (NIPS) 30, pp. 1024–1034. Curran Associates, Inc., 2017.
Xiao Huang, Jundong Li, and Xia Hu. Accelerated attributed network embedding. In Proceedings of the 2017 SIAM International Conference on Data Mining, pp. 633–641. SIAM, 2017.
George Karypis and Vipin Kumar. A fast and high quality multilevel scheme for partitioning irregular graphs. SIAM Journal on scientific Computing, 20(1):359–392, 1998.
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR), 2015.
Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In International Conference on Learning Representations (ICLR), 2017.
Johannes Klicpera, Aleksandar Bojchevski, and Stephan Gunnemann. Predict then propagate: ¨ Graph neural networks meet personalized pagerank. In International Conference on Learning Representations (ICLR), 2019.
Omer Levy and Yoav Goldberg. Neural word embedding as implicit matrix factorization. In Advances in neural information processing systems, pp. 2177–2185, 2014.
Lizi Liao, Xiangnan He, Hanwang Zhang, and Tat-Seng Chua. Attributed social network embedding. IEEE Transactions on Knowledge and Data Engineering, 30(12):2257–2270, 2018.
Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. 2013a.
Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. Distributed representations of words and phrases and their compositionality. In Advances in neural information processing systems, pp. 3111–3119, 2013b.
Vinod Nair and Geoffrey E Hinton. Rectified linear units improve restricted boltzmann machines. In Proceedings of the 27th International Conference on Machine Learning (ICML), pp. 807–814, 2010.
Fabian Pedregosa, Gael Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier ¨ Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikit-learn: Machine learning in python. Journal of machine learning research, 12(Oct):2825–2830, 2011.
Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining., 2014.
Bryan Perozzi, Vivek Kulkarni, Haochen Chen, and Steven Skiena. Don’t walk, skip!: Online learning of multi-scale network embeddings. In Proceedings of the 2017 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining 2017, pp. 258–265, 2017.
Jiezhong Qiu, Yuxiao Dong, Hao Ma, Jian Li, Kuansan Wang, and Jie Tang. Network embedding as matrix factorization: Unifying deepwalk, line, pte, and node2vec. In Proceedings of the Eleventh ACM International Conference on Web Search and Data Mining, pp. 459–467, 2018.
Leonardo F.R. Ribeiro, Pedro H.P. Saverese, and Daniel R. Figueiredo. Struc2vec: Learning node representations from structural identity. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, KDD ’17, pp. 385–394, 2017.
Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Gunnemann. Pitfalls ¨ of graph neural network evaluation. Relational Representation Learning Workshop, NeurIPS 2018, 2018.
Jian Tang, Meng Qu, Mingzhe Wang, Ming Zhang, Jun Yan, and Qiaozhu Mei. Line: Large-scale information network embedding. In Proceedings of the 24th International Conference on World Wide Web, pp. 1067–1077, 2015.
Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Li ´ o, and Yoshua \` Bengio. Graph attention networks. In International Conference on Learning Representations (ICLR), 2018.
Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In Proceedings of the 36th International Conference on Machine Learning (ICML), pp. 6861–6871, 2019.
Cheng Yang, Zhiyuan Liu, Deli Zhao, Maosong Sun, and Edward Y Chang. Network representation learning with rich text information. In IJCAI, pp. 2111–2117, 2015.
Hong Yang, Shirui Pan, Peng Zhang, Ling Chen, Defu Lian, and Chengqi Zhang. Binarized attributed network embedding. In 2018 IEEE International Conference on Data Mining (ICDM), pp. 1476–1481. IEEE, 2018.
Shuang Yang and Bo Yang. Enhanced network embedding with text information. In 2018 24th International Conference on Pattern Recognition (ICPR), pp. 326–331. IEEE, 2018.
Daokun Zhang, Jie Yin, Xingquan Zhu, and Chengqi Zhang. Sine: Scalable incomplete network embedding. In 2018 IEEE International Conference on Data Mining (ICDM), pp. 737–746. IEEE, 2018.
# A PROOFS
Lemma 1. The empirical statistics of node-feature pairs obtained from random walks give unbiased estimates of joint probabilities of observing feature $f \in \mathbb { F } r$ steps $( i )$ after; or (ii) before node $v \in \mathbb { V }$ , as given by:
$$p l i m \frac { \# ( w , f ) _ { \vec { r } } } { | \mathfrak { D } _ { \vec { r } } | } = c ^ { - 1 } ( D P ^ { r } F ) _ { w , f } \qquad \underbrace { p l i m \frac { \# ( w , f ) _ { \vec { r } } } { | \mathfrak { D } _ { \vec { r } } | } } _ { l \to \infty } = c ^ { - 1 } ( F ^ { \top } D P ^ { r } ) _ { f , w }$$
Proof. The proof is analogous to that given for Theorem 2.1 in Qiu et al. (2018). We show that the computed statistics correspond to sequences of random variables with finite expectation, bounded variance and covariances that tend to zero as the separation between variables within the sequence tends to infinity. The Weak Law of Large Numbers (S.N.Bernstein) then guarantees that the sample mean converges to the expectation of the random variable. We first consider the special case $n = 1$ , i.e. we have a single sequence $w _ { 1 } , . . . , w _ { l }$ generated by a random walk (see Algorithm 1). For a particular node-feature pair $( w , f )$ , we let $Y _ { i }$ , $i \in \{ 1 , . . . , l - t \}$ , be the indicator function for the event $w _ { i } = w$ and $f \in \mathbb { F } _ { i + r }$ . Thus, we have:
$$\begin{array} { r } { \frac { \# ( w , f ) _ { \vec { r } } } { | \mathbb { D } _ { \vec { r } } | } = \frac { 1 } { l - t } \displaystyle \sum _ { i = 1 } ^ { l - t } Y _ { i } , } \end{array}$$
the sample average of the $Y _ { i } \mathrm { s }$ . We also have:
$$\begin{array} { r } { \mathbb { E } [ Y _ { i } ] = \frac { d e g ( w ) } { c } ( P ^ { r } F ) _ { w , f } = \frac { 1 } { c } ( D P ^ { r } F ) _ { w , f } } \end{array}$$
$$\mathbb { E } [ Y _ { i } Y _ { j } ] = \operatorname { P r o b } [ w _ { i } = w , f \in \mathbb { F } _ { i + r } , w _ { j } = w , f \in \mathbb { F } _ { j + r } ]$$
$$\begin{array} { r l } & { = \underbrace { \frac { d e g \left( w \right) } { c } } _ { p \left( w _ { i } = w \right) } \underbrace { P _ { : w } ^ { r } } _ { p \left( w _ { i + r } | w _ { i } = w \right) } \underbrace { d i a g ( F _ { : f } ) } _ { p \left( f \in \mathbb { R } _ { i + r } | w _ { i + r } \right) } \underbrace { P _ { : w } ^ { j - \left( i + r \right) } } _ { p \left( w _ { j } = w | w _ { i + r } \right) } \underbrace { P _ { w : } ^ { r } F _ { : f } } _ { p \left( f \in \mathbb { R } _ { j + r } | w _ { j } = w \right) } } \\ & { \qquad p \left( w _ { j } = w , f \in \mathbb { R } _ { i + r } | w _ { i } = w \right) } \end{array}$$
for $j > i + r$ . This allows us to compute the covariance:
$$\begin{array} { r l } & { \mathrm { { C o v } } ( Y _ { i } , Y _ { j } ) = \mathbb { E } [ Y _ { i } Y _ { j } ] - \mathbb { E } [ Y _ { i } ] \mathbb { E } [ Y _ { j } ] } \\ & { \quad = \frac { d e g ( w ) } { c } P _ { w : } ^ { r } d i a g ( F _ { : f } ) \underbrace { ( P _ { : w } ^ { j - ( i + r ) } - \frac { d e g ( w ) } { c } \underline { { 1 } } ) } _ { \mathrm { t e n d s t o 0 a s } j - i \infty } P _ { w : } ^ { r } F _ { : f } , } \end{array}$$
where $\underline { { 1 } }$ is a vector of ones. The difference term (indicated) tends to zero as $j - i \infty$ since then $p ( w _ { j } \ = \ w | w _ { i + r } )$ tends to the stationary distribution $\begin{array} { r } { p ( w ) ~ = ~ \frac { d e g ( w ) } { c } } \end{array}$ , regardless of $w _ { i + r }$ . Thus, applying the Weak Law of Large Numbers, the sample average converges in probability to the expected value, i.e.:
$$\frac { \# ( w , f ) _ { \vec { r } } } { | \mathbb { D } _ { \vec { r } } | } = \frac { 1 } { l - t } \sum _ { i = 1 } ^ { l - t } Y _ { i } \overset { p } { } \frac { 1 } { l - t } \sum _ { i = 1 } ^ { l - t } \mathbb { E } [ Y _ { i } ] = \frac { 1 } { c } ( D P ^ { r } F ) _ { w , f }$$
A similar argument applies to $\frac { \# ( w , f ) _ { \overleftarrow { r } } } { | \mathbb { D } _ { \overleftarrow { r } } | }$ , with expectation term $\scriptstyle { \frac { 1 } { c } } ( F ^ { \top } D P ^ { r } ) _ { f , w }$ . In both cases, the argument readily extends to the general setting where $n > 1$ with suitably defined indicator functions for each of the $n$ random walks (see Qiu et al. (2018)). □
Lemma 2. Empirical statistics of node-feature pairs obtained from random walks give unbiased estimates of joint probabilities of observing feature $f \in \mathbb { F } r$ steps either side of node $v \in \mathbb { V } ,$ , given by:
$$\underset { l \infty } { \underbrace { p l i m } } ^ { \# ( w , f ) _ { r } } = c ^ { - 1 } ( D P ^ { r } F ) _ { w , f } \ ,$$
Proof.
$$\begin{array} { r l } & { \frac { \dot { \phi } ( w , f ) _ { \mathrm { r } } } { | \mathbb { D } _ { \mathrm { r } } | } = \frac { \dot { \mathcal { H } } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \mathrm { r } } | } + \frac { \dot { \mathcal { H } } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \mathrm { r } } | } } \\ & { \phantom { \frac { \dot { \phi } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \mathrm { r } } | } } = \frac { 1 } { 2 } \Big ( \frac { \dot { \mathcal { H } } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \frac { \pi } { \gamma } } | } + \frac { \dot { \mathcal { H } } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \frac { \pi } { \gamma } } | } \Big ) } \\ & { \phantom { \frac { \dot { \phi } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \frac { \gamma } { \gamma } } | } } \frac { 1 } { \rho } \Big ( \frac { 1 } { c } ( D P ^ { \mathrm { r } } F ) _ { w , f } + \frac { 1 } { c } ( F ^ { \top } D P ^ { \mathrm { r } } ) _ { f , w } \Big ) } \\ & { \phantom { \frac { \dot { \phi } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \mathrm { r } } | } } = \frac { 1 } { 2 c } \big ( D P ^ { \mathrm { r } } F + P ^ { \mathrm { r } \top } D F \big ) _ { w , f } } \\ & { \phantom { \frac { \dot { \phi } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \frac { \pi } { \gamma } } | } } = \frac { 1 } { 2 c } \Big ( ( D P ^ { \mathrm { r } } + ( A ^ { \top } D ^ { - 1 } ) ^ { \top } D ) F \Big ) _ { w , f } } \\ & \phantom { \frac { \dot { \Theta } ( w , f ) _ { \frac { \pi } { \gamma } } } { | \mathbb { D } _ { \frac { \pi } { \gamma } } | } } \\ & \phantom { \frac { \dot { \Theta } ( w , f ) _ { \mathcal { H } } } } = \frac { 1 } { 2 c } \big ( ( D P ^ \end{array}$$
The final step follows by symmetry of $\pmb { A }$ , indicating how the Lemma can be extended to directed graphs. □
# B DATASETS AND DESCRIPTIVE STATISTICS
Our method was evaluated on a variety of social networks and web page-page graphs that we collected from openly available API services. In Table 1 we described the graphs with widely used statistics with respect to size, diameter, and level of clustering. We also included the average number of features per vertex and unique feature count in the last columns. These datasets are available with the source code of MUSAE and $A E$ at https://github.com/iclr2020/MUSAE.
Table 1: Descriptive statistics of the networks used in our experimental evaluation.
<table><tr><td>Dataset</td><td>Nodes</td><td>Edges</td><td>Diameter</td><td>Clustering Coefficient</td><td>Density</td><td>Average Feature</td><td>Unique Features</td></tr><tr><td>Facebook Page-Page</td><td>22,470</td><td>171,002</td><td>15</td><td>0.232</td><td>0.001</td><td>14.000</td><td>4,714</td></tr><tr><td>GitHubWeb-ML</td><td>37,700</td><td>289,003</td><td>7</td><td>0.013</td><td>0.001</td><td>18.312</td><td>4,005</td></tr><tr><td>Wikipedia Chameleon</td><td>2,277</td><td>31,421</td><td>11</td><td>0.314</td><td>0.012</td><td>21.547</td><td>3,132</td></tr><tr><td>Wikipedia Crocodile</td><td>11,631</td><td>170,918</td><td>11</td><td>0.026</td><td>0.003</td><td>75.161</td><td>13,183</td></tr><tr><td>Wikipedia Squirrel</td><td>5,201</td><td>198,493</td><td>10</td><td>0.348</td><td>0.015</td><td>26.474</td><td>3,148</td></tr><tr><td>Twitch DE</td><td>9,498</td><td>153,138</td><td>7</td><td>0.047</td><td>0.003</td><td>20.397</td><td>2,545</td></tr><tr><td>Twitch EN</td><td>7,126</td><td>35,324</td><td>10</td><td>0.042</td><td>0.002</td><td>20.799</td><td>2,545</td></tr><tr><td>Twitch ES</td><td>4,648</td><td>59,382</td><td>9</td><td>0.084</td><td>0.006</td><td>19.391</td><td>2,545</td></tr><tr><td>Twitch FR</td><td>6,549</td><td>112.666</td><td>7</td><td>0.054</td><td>0.005</td><td>19.758</td><td>2,545</td></tr><tr><td>Twitch PT</td><td>1,912</td><td>31,299</td><td>7</td><td>0.131</td><td>0.017</td><td>19.944</td><td>2,545</td></tr><tr><td>Twitch RU</td><td>4,385</td><td>37,304</td><td>9</td><td>0.049</td><td>0.004</td><td>20.635</td><td>2,545</td></tr></table>
# B.1 FACEBOOK PAGE-PAGE DATASET
This webgraph is a page-page graph of verified Facebook sites. Nodes represent official Facebook pages while the links are mutual likes between sites. Node features are extracted from the site descriptions that the page owners created to summarize the purpose of the site. This graph was collected through the Facebook Graph API in November 2017 and restricted to pages from 4 categories which are defined by Facebook. These categories are: politicians, governmental organizations, television shows and companies. As one can see in Table 1 it is a highly clustered graph with a large diameter. The task related to this dataset is multi-class node classification for the 4 site categories.
# B.2 GITHUB WEB AND MACHINE LEARNING DEVELOPERS DATASET
The largest graph used for evaluation is a social network of GitHub developers which we collected from the public API in June 2019. Nodes are developers who have starred at least 10 repositories and edges are mutual follower relationships between them. The vertex features are extracted based on the location, repositories starred, employer and e-mail address. The task related to the graph is binary node classification – one has to predict whether the GitHub user is a web or a machine learning developer. This target feature was derived from the job title of each user. As the descriptive statistics show in Table 1 this is the largest graph that we use for evaluation with the highest sparsity.
# B.3 WIKIPEDIA DATASETS
The datasets that we use to perform node level regression are Wikipedia page-page networks collected on three specific topics: chameleons, crocodiles and squirrels. In these networks nodes are articles from the English Wikipedia collected in December 2018, edges are mutual links that exist between pairs of sites. Node features describe the presence of nouns appearing in the articles. For each node we also have the average monthly traffic between October 2017 and November 2018. In the regression tasks used for embedding evaluation the logarithm of average traffic is the target variable. Table 1 shows that these networks are heterogeneous in terms of size, density, and clustering.
# B.4 TWITCH DATASETS
These datasets used for node classification and transfer learning are Twitch user-user networks of gamers who stream in a certain language. Nodes are the users themselves and the links are mutual friendships between them. Vertex features are extracted based on the games played and liked, location and streaming habits. Datasets share the same set of node features, this makes transfer learning across networks possible. These social networks were collected in May 2018. The supervised task related to these networks is binary node classification – one has to predict whether a streamer uses explicit language.
# C STANDARD HYPERPARAMETER SETTINGS OF OUR EMBEDDING MODELS
In MUSAE and $A E$ models we have a set of parameters that we use for model evaluation. Our parameter settings listed in Table 2 are quite similar to the widely used general settings of random walk sampled implicit factorization machines (Perozzi et al., 2014; Grover & Leskovec, 2016; Ribeiro et al., 2017; Perozzi et al., 2017). Each of our models is augmented with a Doc2Vec (Mikolov et al., 2013a;b) embedding of node features – this is done such way that the overall dimension is still 128.
Table 2: Standard hyperparameter settings of the AE and MUSAE embeddings.
<table><tr><td>Parameter</td><td>Value</td><td>Notation</td></tr><tr><td>Dimensions</td><td>128</td><td>d</td></tr><tr><td>Walk length</td><td>80</td><td>1</td></tr><tr><td>Number of walks per node</td><td>10</td><td>p</td></tr><tr><td>Number of epochs</td><td>5</td><td>k</td></tr><tr><td>Window size</td><td>3</td><td>t</td></tr><tr><td>Initial learning rate</td><td>0.05</td><td>Qmax</td></tr><tr><td>Final learning rate</td><td>0.025</td><td>αmin</td></tr><tr><td>Negative samples</td><td>5</td><td>b</td></tr></table>
# D HYPERPARAMETER SETTINGS OF THE DOWNSTREAM MODELS
The downstream tasks uses logistic and elastic net regression from Scikit-learn (Pedregosa et al., 2011) for node level classification, regression and link prediction. For the evaluation of every embedding model we use the standard settings of the library except for the regularization and norm mixing parameters. These are described in Table 3.
# E HYPERPARAMETER SETTINGS OF COMPETING UNSUPERVISED EMBEDDING METHODS
Our purpose was a fair evaluation compared to other node embedding procedures. Because of this each we tried to use hyperparameter settings that give similar expressive power to the competing methods with respect to target matrix approximation (Perozzi et al., 2014; Grover & Leskovec, 2016; Perozzi et al., 2017) and number of dimensions.
Table 3: Standard hyperparameter settings of the downstream logistic and elastic net regression models that use the embeddings for classification, link prediction and regression.
<table><tr><td>Parameter</td><td>Value</td><td>Notation</td></tr><tr><td>Regularization coefficient</td><td>0.01</td><td>入</td></tr><tr><td>Norm mixing parameter</td><td>0.5</td><td>Y</td></tr></table>
• DeepWalk (Perozzi et al., 2014): We used the hyperparameter settings described in Table 2. While the original DeepWalk model uses hierarchical softmax to speed up calculations we used a negative sampling based implementation. This way DeepWalk can be seen as a special case of Node2Vec (Grover & Leskovec, 2016) when the second-order random walks are equivalent to the firs-order walks. • $L I N E _ { 2 }$ (Tang et al., 2015): We created 64 dimensional embeddings based on first and second order proximity and concatenated these together for the downstream tasks. Other hyperparameters are taken from the original work. • Node2Vec (Grover & Leskovec, 2016): Except for the in-out and return parameters that control the second-order random walk behavior we used the hyperparameter settings described in Table 2. These behavior control parameters were tuned with grid search from the $\{ 4 , 2 , 1 , 0 . 5 , 0 . 2 5 \}$ set using a train-validation split of $8 0 \% - 2 0 \%$ within the training set itself. • Walklets (Perozzi et al., 2017): We used the hyperparameters described in Table 2 except for window size. We set a window size of 4 with individual embedding sizes of 32. This way the overall number of dimensions of the representation remained the same. • The attributed node embedding methods AANE, ASNE, BANE, TADW, TENE all use the hyperparameters described in the respective papers except for the dimension. We parametrized these methods such way that each of the final embeddings used in the downstream tasks is 128 dimensional.
# F HYPERPARAMETER SETTINGS OF COMPETING GRAPH NEURAL NETWORKS
Each model was optimized with the Adam optimizer (Kingma & Ba, 2015) with the standard moving average parameters and the model implementations are sparsity aware modifications based on PyTorch Geometric (Fey & Lenssen, 2019). We needed these modifications in order to accommodate the large number of vertex features – see the last column in Table 1. Except for the $G A T$ model (Velickoviˇ c et al., 2018) we used ReLU intermediate activation functions (Nair & Hinton, 2010)´ with a softmax unit in the final layer for classification. The hyperparameters used for the training and regularization of the neural models are listed in Table 4.
Table 4: Hyperparameter settings used for training the graph neural network baselines.
<table><tr><td>Parameter</td><td>Value</td></tr><tr><td>Epochs</td><td>200</td></tr><tr><td>Learning rate</td><td>0.01</td></tr><tr><td>Dropout</td><td>0.5</td></tr><tr><td>l2 Weight regularization</td><td>0.001</td></tr><tr><td>Depth Filters per layer</td><td>2 32</td></tr></table>
Except for the APPNP model each baseline uses information up to 2-hop neighbourhoods. The model specific settings when we needed to deviate from the basic settings which are listed in Table 4 were as follows:
• Classical GCN (Kipf & Welling, 2017): We used the standard parameter settings described in this section.
• GraphSAGE (Hamilton et al., 2017): We utilized a graph convolutional aggregator on the sampled neighbourhoods, samples of 40 nodes per source, and standard settings. • GAT (Velickovi ˇ c et al., 2018): The negative slope parameter of the leaky ReLU function ´ was 0.2, we applied a single attention head, and used the standard hyperparameter settings. • MixHop (Abu-El-Haija et al., 2019): We took advantage of the $0 ^ { t h }$ , $1 ^ { s t }$ and $2 ^ { n d }$ powers of the normalized adjacency matrix with 32 dimensional convolutional filters for creating the first hidden representations. This was fed to a feed-forward layer to classify the nodes. • ClusterGCN (Chiang et al., 2019): Just as Chiang et al. (2019) did, we used the METIS procedure (Karypis & Kumar, 1998). We clustered the graphs into disjoint clusters, and the number of clusters was the same as the number of node classes (e.g. in case of the Facebook page-page network we created 4 clusters). For training we used the earlier described setup. • APPNP (Klicpera et al., 2019): The top level feed-forward layer had 32 hidden neurons, the teleport probability was set as 0.2 and we used 20 steps for approximate personalized pagerank calculation. • SGCONV (Wu et al., 2019): We used the $2 ^ { n d }$ power of the normalized adjacency matrix for training the classifier.
# G CLASSIFICATION PERFORMANCE
Table 5: Node classification test performance evaluated by weighted, micro and macro $F _ { 1 }$ scores calculated from 10 seeded train-test splits. We included standard errors of the scores and used $80 \%$ of nodes for training / $20 \%$ of nodes for testing. Red numbers denote the best performing node embedding method. Datasets
<table><tr><td rowspan="2"></td><td colspan="3">Cora</td><td colspan="3">Citeseer</td><td colspan="3">Pubmed</td></tr><tr><td>Weighted</td><td>Micro</td><td>Macro</td><td>Weighted</td><td>Micro</td><td>Macro</td><td>Weighted</td><td>Micro</td><td>Macro</td></tr><tr><td>DeepWalk</td><td>0.832 ±0.003</td><td>0.833 ±0.004</td><td>0.823 ±0.004</td><td>0.597 ±0.007</td><td>0.603 ±0.007</td><td>0.560 ±0.006</td><td>0.801 ±0.001</td><td>0.802 ±0.001</td><td>0.789 ±0.002</td></tr><tr><td>LINE2</td><td>0.775 ±0.004</td><td>0.777 ±0.004</td><td>0.768 ±0.005</td><td>0.529 ±0.006</td><td>0.542 ±0.006</td><td>0.486 ±0.005</td><td>0.798 ±0.001</td><td>0.799 ±0.001</td><td>0.785 ±0.001</td></tr><tr><td>Node2Vec</td><td>0.840 ±0.003</td><td>0.840 ±0.003</td><td>0.826 ±0.003</td><td>0.616 ±0.005</td><td>0.622 ±0.005</td><td>0.581 ±0.005</td><td>0.809 ±0.002</td><td>0.810 ±0.002</td><td>0.797 ±0.002</td></tr><tr><td>Walklets</td><td>0.843 ±0.003</td><td>0.843 ±0.003</td><td>0.827 ±0.003</td><td>0.624 ±0.005</td><td>0.630 ±0.006</td><td>0.590 ±0.005</td><td>0.815 ±0.001</td><td>0.815 ±0.001</td><td>0.804 ±0.002</td></tr><tr><td>TADW</td><td>0.819 ±0.004</td><td>0.819 ±0.004</td><td>0.804 ±0.005</td><td>0.725 ±0.004</td><td>0.734 ±0.004</td><td>0.685 ±0.004</td><td>0.862 ±0.002</td><td>0.862 ±0.002</td><td>0.863 ±0.002</td></tr><tr><td>AANE</td><td>0.793 ±0.006</td><td>0.793 ±0.006</td><td>0.777 ±0.006</td><td>0.728 ±0.005</td><td>0.733 ±0.004</td><td>0.693 ±0.005</td><td>0.867 ±0.001</td><td>0.867 ±0.001</td><td>0.867 ±0.002</td></tr><tr><td>ASNE</td><td>0.831 ±0.003</td><td>0.830 ±0.003</td><td>0.812 ±0.004</td><td>0.713 ±0.004</td><td>0.718 ±0.004</td><td>0.677 ±0.004</td><td>0.846 ±0.002</td><td>0.846 ±0.002</td><td>0.843 ±0.002</td></tr><tr><td>BANE</td><td>0.807 ±0.005</td><td>0.807 ±0.005</td><td>0.787 ±0.005</td><td>0.707 ±0.003</td><td>0.713 ±0.003</td><td>0.670 ±0.004</td><td>0.823 ±0.002</td><td>0.823 ±0.002</td><td>0.822 ±0.002</td></tr><tr><td>TENE</td><td>0.829 ±0.005</td><td>0.829 ±0.005</td><td>0.815 ±0.004</td><td>0.664 ±0.004</td><td>0.681 ±0.003</td><td>0.611 ±0.002</td><td>0.842 ±0.001</td><td>0.842 ±0.001</td><td>0.843 ±0.002</td></tr><tr><td>AE</td><td>0.835 ±0.005</td><td>0.835 ±0.005</td><td>0.815 ±0.006</td><td>0.730 ±0.005</td><td>0.739 ±0.005</td><td>0.688 ±0.006</td><td>0.839 ±0.002</td><td>0.839 ±0.002</td><td>0.840 ±0.002</td></tr><tr><td>AE-EGO</td><td>0.835 ±0.005</td><td>0.835 ±0.006</td><td>0.816 ±0.005</td><td>0.729 ±0.004</td><td>0.739 ±0.005</td><td>0.690 ±0.007</td><td>0.840 ±0.002</td><td>0.840 ±0.003</td><td>0.839 ±0.002</td></tr><tr><td>MUSAE</td><td>0.848 ±0.004</td><td>0.848 ±0.004</td><td>0.832 ±0.005</td><td>0.737 ±0.004</td><td>0.742 ±0.004</td><td>0.706 ±0.004</td><td>0.853 ±0.001</td><td>0.853 ±0.001</td><td>0.854 ±0.002</td></tr><tr><td>MUSAE-EGO</td><td>0.849 ±0.004</td><td>0.849 ±0.004</td><td>0.833 ±0.004</td><td>0.736 ±0.004</td><td>0.741 ±0.004</td><td>0.706 ±0.004</td><td>0.850 ±0.002</td><td>0.851 ±0.002</td><td>0.850 ±0.002</td></tr></table>
Table 6: Node classification test performance evaluated by weighted, micro and macro $F _ { 1 }$ scores calculated from 10 seeded train-test splits. We included standard errors of the scores and used $80 \%$ of nodes for training / $20 \%$ of nodes for testing. Red numbers denote the best performing node embedding method and blue ones denote the best performing supervised graph neural network.
<table><tr><td rowspan="3"></td><td colspan="9">Datasets</td></tr><tr><td colspan="3">Facebook Page-Page</td><td colspan="3">GitHubWebML</td><td colspan="3">TwitchPortugal</td></tr><tr><td>Weighted</td><td>Micro</td><td>Macro</td><td>Weighted</td><td>Micro</td><td>Macro</td><td>Weighted</td><td>Micro</td><td>Macro</td></tr><tr><td>DeepWalk</td><td>0.861 ±0.001</td><td>0.863 ±0.001</td><td>0.848 ±0.001</td><td>0.852 ±0.001</td><td>0.858 ±0.001</td><td>0.801 ±0.002</td><td>0.650 ±0.008</td><td>0.672 ±0.007</td><td>0.594 ±0.009</td></tr><tr><td>LINE2</td><td>0.874 ±0.001</td><td>0.875 ±0.001</td><td>0.862 ±0.001</td><td>0.852 ±0.001</td><td>0.858 ±0.001</td><td>0.800 ±0.002</td><td>0.636 ±0.006</td><td>0.670 ±0.005</td><td>0.571 ±0.005</td></tr><tr><td>Node2Vec</td><td>0.889 ±0.001</td><td>0.890 ±0.001</td><td>0.880 ±0.001</td><td>0.853 ±0.001</td><td>0.859 ±0.001</td><td>0.802 ±0.001</td><td>0.665 ±0.004</td><td>0.686 ±0.004</td><td>0.612 ±0.004</td></tr><tr><td>Walklets</td><td>0.886 ±0.001</td><td>0.887 ±0.001</td><td>0.875 ±0.001</td><td>0.854 ±0.001</td><td>0.860 ±0.001</td><td>0.804 ±0.002</td><td>0.652 ±0.006</td><td>0.671 ±0.006</td><td>0.599 ±0.005</td></tr><tr><td>TADW</td><td>0.760 ±0.002</td><td>0.765 ±0.002</td><td>0.740 ±0.003</td><td>0.650 ±0.001</td><td>0.748 ±0.001</td><td>0.528 ±0.007</td><td>0.459 ±0.001</td><td>0.659 ±0.005</td><td>0.406 ±0.003</td></tr><tr><td>AANE</td><td>0.793 ±0.001</td><td>0.796 ±0.001</td><td>0.775 ±0.001</td><td>0.848 ±0.001</td><td>0.856 ±0.001</td><td>0.794 ±0.002</td><td>0.636 ±0.006</td><td>0.661 ±0.006</td><td>0.577 ±0.006</td></tr><tr><td>ASNE</td><td>0.794 ±0.001</td><td>0.797 ±0.001</td><td>0.776 ±0.001</td><td>0.829 ±0.001</td><td>0.839 ±0.001</td><td>0.766 ±0.002</td><td>0.670 ±0.006</td><td>0.685 ±0.006</td><td>0.620 ±0.006</td></tr><tr><td>BANE</td><td>0.868 ±0.001</td><td>0.868 ±0.001</td><td>0.859 ±0.002</td><td>0.711 ±0.001</td><td>0.762 ±0.001</td><td>0.576 ±0.001</td><td>0.644 ±0.006</td><td>0.664 ±0.006</td><td>0.587 ±0.006</td></tr><tr><td>TENE</td><td>0.724 ±0.002</td><td>0.731 ±0.002</td><td>0.699 ±0.002</td><td>0.842 ±0.001</td><td>0.850 ±0.001</td><td>0.785 ±0.002</td><td>0.613 ±0.005</td><td>0.664 ±0.006</td><td>0.536 ±0.006</td></tr><tr><td>AE</td><td>0.887 ±0.001</td><td>0.888 ±0.001</td><td>0.879 ±0.001</td><td>0.858 ±0.001</td><td>0.863 ±0.001</td><td>0.807 ±0.001</td><td>0.653 ±0.005</td><td>0.672 ±0.004</td><td>0.598 ±0.006</td></tr><tr><td>AE-EGO</td><td>0.898 ±0.001</td><td>0.899 ±0.001</td><td>0.890 ±0.001</td><td>0.857 ±0.001</td><td>0.863 ±0.001</td><td>0.807 ±0.002</td><td>0.652 ±0.007</td><td>0.671 ±0.007</td><td>0.599 ±0.009</td></tr><tr><td>MUSAE MUSAE-EGO</td><td>0.886 ±0.001</td><td>0.887 ±0.001</td><td>0.877 ±0.001</td><td>0.859 ±0.001</td><td>0.864 ±0.001</td><td>0.810 ±0.001</td><td>0.654 ±0.006</td><td>0.672 ±0.006</td><td>0.600 ±0.007</td></tr><tr><td></td><td>0.893 ±0.001</td><td>0.894 ±0.001</td><td>0.884 ±0.001</td><td>0.859 ±0.001</td><td>0.864 ±0.001</td><td>0.810 ±0.001</td><td>0.655 ±0.003</td><td>0.671 ±0.002</td><td>0.604 ±0.003</td></tr><tr><td>GCN</td><td>0.931 ±0.001</td><td>0.932 ±0.001 0.814</td><td>0.928 ±0.001</td><td>0.859 ±0.001</td><td>0.865 ±0.001</td><td>0.809 ±0.002</td><td>0.650 ±0.013</td><td>0.695 ±0.007</td><td>0.577 ±0.02</td></tr><tr><td>GraphSAGE</td><td>0.812 ±0.002</td><td>±0.002</td><td>0.795 ±0.002</td><td>0.848 ±0.001</td><td>0.854 ±0.001</td><td>0.794 ±0.002</td><td>0.618 ±0.003</td><td>0.631 ±0.004</td><td>0.563 ±0.005</td></tr><tr><td>GAT</td><td>0.918 ±0.001</td><td>0.919 ±0.001</td><td>0.912 ±0.001</td><td>0.856 ±0.001</td><td>0.864 ±0.001</td><td>0.803 ±0.002</td><td>0.648 ±0.008</td><td>0.678 ±0.007</td><td>0.588 ±0.009</td></tr><tr><td>MixHop</td><td>0.940 ±0.001</td><td>0.941 ±0.002</td><td>0.937 ±0.001</td><td>0.847 ±0.000</td><td>0.85 ±0.001</td><td>0.800 ±0.001</td><td>0.626 ±0.003</td><td>0.630 ±0.004</td><td>0.576 ±0.003</td></tr><tr><td>ClusterGCN</td><td>0.937 ±0.001</td><td>0.937 ±0.001</td><td>0.934 ±0.001</td><td>0.855 ±0.001</td><td>0.859 ±0.001</td><td>0.807 ±0.001</td><td>0.647 ±0.004</td><td>0.654 ±0.004</td><td>0.602 ±0.005</td></tr><tr><td>APPNP</td><td>0.938 ±0.001</td><td>0.938 ±0.001</td><td>0.935 ±0.001</td><td>0.860 ±0.002</td><td>0.868 ±0.001</td><td>0.811 ±0.002</td><td>0.683 ±0.009</td><td>0.702 ±0.012</td><td>0.623 ±0.010</td></tr><tr><td>SGCONV</td><td>0.832 ±0.002</td><td>0.836 ±0.002</td><td>0.812 ±0.002</td><td>0.816 ±0.001</td><td>0.829 ±0.001</td><td>0.747 ±0.002</td><td>0.652 ±0.003</td><td>0.663 ±0.003</td><td>0.604 ±0.004</td></tr></table>
 H ADDITIONAL TRANSFER LEARNING RESULTS ON THE TWITCH GRAPHS Figure 5: Mean micro $F _ { 1 }$ scores and standard errors calculated from 10 transfer learning runs with $M U S A E$ and $A E$ on the Twitch graphs using France, Portugal and Russia as targets for the transfer. The blue reference line denotes the test performance on the target dataset in a non transfer learning scenario (standard hyperparameter settings and split ratio). The red reference line denotes the performance of random guesses.
# I REGRESSION RESULTS ON WIKIPEDIA PAGE-PAGE GRAPHS
Table 7: Average test $R ^ { 2 }$ values and standard errors on the Wikipedia traffic prediction tasks. Red numbers denote the best results on each page-page network.
Datasets
<table><tr><td rowspan="2">Method</td><td colspan="3">Datasets</td></tr><tr><td>Wikipedia Chameleons</td><td>Wikipedia Crocodiles</td><td>Wikipedia Squirrels</td></tr><tr><td>DeepWalk</td><td>0.375 ±0.004</td><td>0.553 ±0.001</td><td>0.170 ±0.002</td></tr><tr><td>LINE2</td><td>0.381 ±0.003</td><td>0.586 ±0.001</td><td>0.232 ±0.002</td></tr><tr><td>Node2Vec</td><td>0.414 ±0.003</td><td>0.574 ±0.001</td><td>0.174 ±0.002</td></tr><tr><td>Walklets</td><td>0.426 ±0.003</td><td>0.625 ±0.001</td><td>0.249 ±0.002</td></tr><tr><td>TADW</td><td>0.527 ±0.003</td><td>0.636 ±0.001</td><td>0.271</td></tr><tr><td>AANE</td><td>0.598 ±0.007</td><td>0.732</td><td>±0.002 0.287</td></tr><tr><td>ASNE</td><td>0.440 ±0.009</td><td>±0.002 0.572</td><td>±0.002 0.229</td></tr><tr><td>BANE</td><td>0.464 ±0.003</td><td>±0.003 0.617</td><td>±0.005 0.168</td></tr><tr><td>TENE</td><td>0.494</td><td>±0.001 0.701</td><td>±0.002 0.321</td></tr><tr><td>AE</td><td>±0.02 0.642</td><td>±0.003 0.743</td><td>±0.007 0.291</td></tr><tr><td>AE-EGO</td><td>±0.006 0.644</td><td>±0.003 0.732</td><td>±0.006 0.283</td></tr><tr><td>MUSAE</td><td>±0.009 0.658</td><td>±0.002 0.736</td><td>±0.006 0.338</td></tr><tr><td>MUSAE-EGO</td><td>±0.004 0.653 ±0.011</td><td>±0.003 0.747 ±0.003</td><td>±0.007 0.354 ±0.009</td></tr></table>
# J LINK PREDICTION RESULTS ON SOCIAL AND WEB NETWORKS
Table 8: Link prediction results - average AUC on the test set using attributed embeddings and logistic regression. We created 100 seeded splits $80 \%$ training - $20 \%$ test). Standard errors of AUC are included below. Red denotes the best performing embedding model considering both neighbourhood based and attributed methods. We used 4 element-wise operators to create features.
Datasets
<table><tr><td rowspan="2">Operator</td><td rowspan="2">Method</td><td rowspan="2">Facebook Page-Page</td><td rowspan="2">GitHub Web-ML</td><td rowspan="2">Twitch Spain</td><td rowspan="2">Twitch</td><td rowspan="2">Wikipedia Chameleons</td><td rowspan="2">Wikipedia Crocodiles</td></tr><tr><td>Germany</td></tr><tr><td rowspan="4">Average</td><td>DeepWalk</td><td>0.526 ±0.006</td><td>0.550 ±0.004</td><td>0.568 ±0.009</td><td>0.575 ±0.005</td><td>0.635 ±0.002</td><td>0.661 ±0.007</td></tr><tr><td>LINE2</td><td>0.517 ±0.007</td><td>0.551 ±0.003</td><td>0.540 ±0.011</td><td>0.544 ±0.004</td><td>0.627 ±0.001</td><td>0.708 ±0.004</td></tr><tr><td>Node2Vec</td><td>0.534 ±0.005</td><td>0.573 ±0.003</td><td>0.575 ±0.012</td><td>0.584 ±0.006</td><td>0.641 ±0.009</td><td>0.669 ±0.007</td></tr><tr><td>Walklets</td><td>0.518 ±0.008</td><td>0.552 ±0.003</td><td>0.541 ±0.006</td><td>0.545 ±0.004</td><td>0.635 ±0.015</td><td>0.716 ±0.003</td></tr><tr><td rowspan="4">Hadamard</td><td>DeepWalk</td><td>0.981 ±0.001</td><td>0.799 ±0.001</td><td>0.781 ±0.002</td><td>0.750 ±0.003</td><td>0.974 ±0.002</td><td>0.966 ±0.001</td></tr><tr><td>LINE2</td><td>0.979 ±0.001</td><td>0.899 ±0.001</td><td>0.843 ±0.003</td><td>0.755 ±0.001</td><td>0.939 ±0.003</td><td>0.938 ±0.001</td></tr><tr><td>Node2Vec</td><td>0.982 ±0.001</td><td>0.822 ±0.001</td><td>0.810 ±0.005</td><td>0.780 ±0.003</td><td>0.979 ±0.001</td><td>0.973</td></tr><tr><td>Walklets</td><td>0.984 ±0.001</td><td>0.925 ±0.001</td><td>0.873 ±0.003</td><td>0.819 ±0.001</td><td>0.966 ±0.004</td><td>±0.001 0.980 ±0.001</td></tr><tr><td rowspan="4">lNorm</td><td>DeepWalk</td><td>0.921 ±0.001</td><td>0.658 ±0.001</td><td>0.723 ±0.004</td><td>0.711 ±0.002</td><td>0.950 ±0.002</td><td>0.896 ±0.001</td></tr><tr><td>LINE2</td><td>0.924 ±0.001</td><td>0.913</td><td>0.882</td><td>0.855</td><td>0.922</td><td>0.930</td></tr><tr><td>Node2Vec</td><td>0.928</td><td>±0.002 0.725</td><td>±0.002 0.761</td><td>±0.001 0.745</td><td>±0.003 0.953</td><td>±0.001 0.913</td></tr><tr><td>Walklets</td><td>±0.001 0.980</td><td>±0.001 0.932</td><td>±0.004 0.898</td><td>±0.001 0.870</td><td>±0.003 0.961</td><td>±0.001 0.976</td></tr><tr><td rowspan="4">l2 Norm</td><td>DeepWalk</td><td>±0.001 0.922</td><td>±0.001 0.663</td><td>±0.002 0.731</td><td>±0.001 0.717</td><td>±0.004 0.951</td><td>±0.001 0.899</td></tr><tr><td>LINE2</td><td>±0.001 0.924</td><td>±0.001 0.910</td><td>±0.004 0.880</td><td>±0.002 0.855</td><td>±0.002 0.925</td><td>±0.002 0.936</td></tr><tr><td>Node2Vec</td><td>±0.001 0.929</td><td>±0.001 0.731</td><td>±0.002 0.768</td><td>±0.001 0.750</td><td>±0.003 0.954</td><td>±0.001 0.920</td></tr><tr><td>Walklets</td><td>±0.002 0.981 ±0.001</td><td>±0.001 0.930 ±0.001</td><td>±0.007 0.897 ±0.002</td><td>±0.001 0.870 ±0.002</td><td>±0.002 0.960 ±0.005</td><td>±0.001 0.978 ±0.001</td></tr></table>
Table 9: Link prediction results - average AUC on the test set using neighbourhood based embeddings and logistic regression. We created 100 seeded splits ( $80 \%$ training - $20 \%$ test). Standard errors of AUC are included below. Red denotes the best performing embedding model considering both neighbourhood based and attributed methods. We used 4 element-wise operators to create features.
<table><tr><td rowspan="2">Operator Method</td><td rowspan="2">GitHub</td><td colspan="5">Datasets</td></tr><tr><td>Facebook Page-Page</td><td>Web-ML</td><td>Twitch Twitch Spain Germany</td><td>Wikipedia Chameleons</td><td>Wikipedia Crocodiles</td></tr><tr><td rowspan="10">Average</td><td>TADW</td><td>0.517 ±0.004</td><td>0.553 ±0.004</td><td>0.541 ±0.007</td><td>0.556 ±0.008</td><td>0.573 ±0.012</td><td>0.625 ±0.006</td></tr><tr><td>AANE</td><td>0.523 ±0.003</td><td>0.539 ±0.003</td><td>0.536 ±0.001</td><td>0.554 ±0.004</td><td>0.552 ±0.013</td><td>0.577 ±0.005</td></tr><tr><td>ASNE</td><td>0.547 ±0.005</td><td>0.596 ±0.002</td><td>0.562 ±0.007</td><td>0.579 ±0.005</td><td>0.650 ±0.005</td><td>0.723 ±0.004</td></tr><tr><td>BANE</td><td>0.625 ±0.003</td><td>0.630</td><td>0.616</td><td>0.634</td><td>0.617</td><td>0.671 ±0.003</td></tr><tr><td>TENE</td><td>0.547 ±0.004</td><td>±0.002 0.515</td><td>±0.001 0.532</td><td>±0.003 0.555</td><td>±0.011 0.555</td><td>0.644 ±0.003</td></tr><tr><td>AE</td><td>0.572 ±0.006</td><td>±0.004 0.719</td><td>±0.011 0.679</td><td>±0.006 0.723</td><td>±0.011 0.669</td><td>0.834</td></tr><tr><td>MUSAE</td><td>0.642</td><td>±0.002 0.780</td><td>±0.006 0.733</td><td>±0.003 0.771</td><td>±0.007 0.810</td><td>±0.002 0.899</td></tr><tr><td>AE-EGO</td><td>±0.003 0.514 ±0.007</td><td>±0.001 0.546</td><td>±0.004 0.523</td><td>±0.002 0.545</td><td>±0.006 0.563</td><td>±0.001 0.660</td></tr><tr><td>MUSAE-EGO</td><td>0.511 ±0.005</td><td>±0.005 0.542 ±0.003</td><td>±0.011 0.533</td><td>±0.007 0.546</td><td>±0.011 0.622</td><td>±0.006 0.699</td></tr><tr><td>TADW</td><td>0.973</td><td>0.915</td><td>±0.005 0.886</td><td>±0.008 0.884</td><td>±0.008 0.964</td><td>±0.003 0.967</td></tr><tr><td rowspan="7">Hadamard</td><td>AANE</td><td>±0.001 0.911</td><td>±0.001 0.772</td><td>±0.003 0.833</td><td>±0.001 0.811</td><td>±0.002 0.917</td><td>±0.001 0.892</td></tr><tr><td>ASNE</td><td>±0.002 0.973</td><td>±0.002 0.912</td><td>±0.003 0.883</td><td>±0.002 0.866</td><td>±0.005 0.945</td><td>±0.005 0.940</td></tr><tr><td>BANE</td><td>±0.001 0.653</td><td>±0.001 0.664</td><td>±0.003 0.659</td><td>±0.002 0.816</td><td>±0.005 0.578</td><td>±0.001 0.738</td></tr><tr><td>TENE</td><td>±0.002 0.735</td><td>±0.003 0.878</td><td>±0.009 0.722</td><td>±0.002 0.748</td><td>±0.014 0.883</td><td>±0.002 0.872</td></tr><tr><td>AE</td><td>±0.012 0.926</td><td>±0.009 0.814</td><td>±0.007 0.743</td><td>±0.003 0.702</td><td>±0.003</td><td>±0.015</td></tr><tr><td>MUSAE</td><td>±0.001 0.945</td><td>±0.002 0.917</td><td>±0.003 0.871</td><td>±0.003 0.863</td><td>0.939 ±0.002 0.950</td><td>0.949 ±0.001 0.968</td></tr><tr><td>AE-EGO</td><td>±0.001 0.928</td><td>±0.002 0.786</td><td>±0.005 0.727</td><td>±0.002 0.687</td><td>±0.005 0.935</td><td>±0.001 0.939</td></tr><tr><td rowspan="10"></td><td>MUSAE-EGO</td><td>±0.001 0.938 ±0.001</td><td>±0.002 0.911 ±0.002</td><td>±0.006 0.881 ±0.003</td><td>±0.003 0.859</td><td>±0.002 0.952</td><td>±0.001 0.969 ±0.001</td></tr><tr><td>TADW</td><td>0.971 ±0.001</td><td>0.909</td><td>0.882</td><td>±0.001 0.881</td><td>±0.007 0.959</td><td>0.962</td></tr><tr><td>AANE</td><td>0.866 ±0.002</td><td>±0.002 0.720</td><td>±0.003 0.771</td><td>±0.001 0.768</td><td>±0.002 0.944</td><td>±0.001 0.913</td></tr><tr><td>ASNE</td><td>0.815 ±0.002</td><td>±0.001 0.866 ±0.001</td><td>±0.004 0.836 ±0.002</td><td>±0.001 0.849</td><td>±0.002 0.869</td><td>±0.001 0.874 ±0.001</td></tr><tr><td>BANE</td><td>0.653 ±0.002</td><td>0.664 ±0.003</td><td>0.658 ±0.009</td><td>±0.001 0.816</td><td>±0.001 0.578</td><td>0.74 ±0.002</td></tr><tr><td>TENE</td><td>0.940 ±0.001</td><td>0.942 ±0.001</td><td>0.857 ±0.004</td><td>±0.002 0.837 ±0.001</td><td>±0.014 0.945 ±0.003</td><td>0.927 ±0.001</td></tr><tr><td>AE</td><td>0.968 ±0.001</td><td>0.889 ±0.001</td><td>0.871 ±0.001</td><td>0.870 ±0.002</td><td>0.955 ±0.002</td><td>0.952 ±0.002</td></tr><tr><td>MUSAE</td><td>0.973 ±0.001</td><td>0.908 ±0.001</td><td>0.885 ±0.002</td><td>0.879 ±0.002</td><td>0.956 ±0.003</td><td>0.967 ±0.001</td></tr><tr><td>AE-EGO</td><td>0.973 ±0.001</td><td>0.891 ±0.001</td><td>0.872 ±0.002</td><td>0.872 ±0.002</td><td>0.953 ±0.002</td><td>0.955 ±0.001</td></tr><tr><td>MUSAE-EGO</td><td>0.977 ±0.001</td><td>0.911 ±0.001</td><td>0.891 ±0.002</td><td>0.884 ±0.002</td><td>0.955 ±0.003</td><td>0.963 ±0.001</td></tr><tr><td rowspan="8">l2 Norm</td><td>TADW</td><td>0.972 ±0.001</td><td>0.913 ±0.001</td><td>0.883 ±0.003</td><td>0.879 ±0.001</td><td>0.961 ±0.002</td><td>0.964 ±0.001</td></tr><tr><td>AANE</td><td>0.877 ±0.001</td><td>0.732 ±0.001</td><td>0.779 ±0.003</td><td>0.774 ±0.002</td><td>0.941 ±0.005</td><td>0.901 ±0.002</td></tr><tr><td>ASNE</td><td>0.806 ±0.004</td><td>0.872 ±0.001</td><td>0.839 ±0.003</td><td>0.852 ±0.002</td><td>0.875 ±0.006</td><td>0.880 ±0.001</td></tr><tr><td>BANE</td><td>0.653 ±0.002</td><td>0.664 ±0.003</td><td>0.659 ±0.009</td><td>.0.816 ±0.0002</td><td>0.578 ±0.014</td><td>0.738 ±0.002</td></tr><tr><td>TENE</td><td>0.893 ±0.001</td><td>0.884 ±0.016</td><td>0.826 ±0.009</td><td>0.797 ±0.005</td><td>0.930 ±0.003</td><td>0.863 ±0.013</td></tr><tr><td>AE</td><td>0.968 ±0.001</td><td>0.881 ±0.001</td><td>0.872 ±0.001</td><td>0.867 ±0.002</td><td>0.954 ±0.003</td><td>0.953 ±0.001</td></tr><tr><td>MUSAE</td><td>0.973 ±0.001</td><td>0.905 ±0.001</td><td>0.884 ±0.002</td><td>0.877 ±0.002</td><td>0.952 ±0.005</td><td>0.965 ±0.001</td></tr><tr><td>AE-EGO</td><td>0.973 ±0.001</td><td>0.884 ±0.001</td><td>0.873 ±0.001</td><td>0.871 ±0.002</td><td>0.952 ±0.003</td><td>0.956 ±0.001</td></tr><tr><td></td><td>MUSAE-EGO</td><td>0.977 ±0.001</td><td>0.907 ±0.001</td><td>0.891 ±0.003</td><td>0.881 ±0.002</td><td>0.951 ±0.006</td><td>0.961 ±0.001</td></tr></table>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275# Federated Reconstruction: Partially Local Federated Learning
Karan Singhal Google Research karansinghal@google.com
Hakim Sidahmed Google Research hsidahmed@google.com
Zachary Garrett Google Research zachgarrett@google.com
Shanshan Wu Google Research shanshanw@google.com
Keith Rush Google Research krush@google.com
Sushant Prakash Google Research sush@google.com
# Abstract
Personalization methods in federated learning aim to balance the benefits of federated and local training for data availability, communication cost, and robustness to client heterogeneity. Approaches that require clients to communicate all model parameters can be undesirable due to privacy and communication constraints. Other approaches require always-available or stateful clients, impractical in large-scale cross-device settings. We introduce Federated Reconstruction, the first modelagnostic framework for partially local federated learning suitable for training and inference at scale. We motivate the framework via a connection to model-agnostic meta learning, empirically demonstrate its performance over existing approaches for collaborative filtering and next word prediction, and release an open-source library for evaluating approaches in this setting. We also describe the successful deployment of this approach at scale for federated collaborative filtering in a mobile keyboard application.
# 1 Introduction
Federated learning is a machine learning setting in which distributed clients solve a learning objective on sensitive data via communication with a coordinating server [44]. Typically, clients collaborate to train a single global model under an objective that combines heterogeneous local client objectives. For example, clients may collaborate to train a next word prediction model for a mobile keyboard application without sharing sensitive typing data with other clients or a centralized server [28]. This paradigm has been scaled to production and deployed in cross-device settings [3, 28, 56] and cross-silo settings [11, 13].
However, training a fully global federated model may not always be ideal due to heterogeneity in clients’ data distributions. Yu et al. [58] show that global models can perform worse than purely local (non-federated) models for many clients (e.g., those with many training examples). Moreover, in some settings privacy constraints completely prohibit fully global federated training. For instance, for models with user-specific embeddings, such as matrix factorization models for collaborative filtering [37], naively training a global federated model involves sending updates to user embeddings on the server, directly revealing potentially sensitive individual preferences [21, 47].
To address this, we explore partially local federated learning. In this setting, models are partitioned into global $g$ and local parameters $l$ such that local parameters never leave client devices. This enables training on sensitive user-specific parameters as in the collaborative filtering setting, and we show it can also improve robustness to client data heterogeneity and communication cost for other settings, since we are effectively interpolating between local and federated training. Previous works have looked at similar settings [4, 41]. Importantly, these approaches cannot realistically be applied at scale in cross-device settings because they assume clients are stateful or always-available: in practice, clients are sampled from an enormous population with unreliable availability, so approaches that rely on repeated sampling of the same stateful clients are impractical (Kairouz et al. [34] [Table 1]). Other work has demonstrated that stateful federated algorithms in partial participation regimes can perform worse than stateless algorithms due to the state becoming "stale" [48]. Previous methods also do not enable inference on new clients unseen during training, preventing real-world deployment.
 Figure 1: Schematic of Federated Reconstruction. Model variables are partitioned into global and local variables. For every round $t$ , each participating client $i$ is sent the current global variables, uses them to reconstruct its own local variables, and then updates its copy of the global variables. The server aggregates updates to only the global variables across clients.
These limitations motivate a new method for partially local federated learning, balancing the benefits of federated aggregation and local training. This approach should be:
1. Model-agnostic: works with any model. 2. Scalable: compatible with large-scale cross-device training with partial participation. 3. Practical for inference: new clients can perform inference. 4. Fast: clients can quickly adapt local parameters to their personal data.
In this work, we propose combining federated training of global parameters with reconstruction of local parameters (see Figure 1). We show that our method relaxes the statefulness requirement of previous work and enables fast personalization for unseen clients without additional communication, even for models without user-specific embeddings.
Our contributions: We make the following key contributions:
• Introduce a model-agnostic framework for training partially local and partially global models, satisfying the above criteria. We propose a practical algorithm instantiating this framework (FEDRECON). Justify the algorithm via a connection to model-agnostic meta learning (see Section 4.2), showing that FEDRECON naturally leads to fast reconstruction at test time (see Table 1). Demonstrate FEDRECON’s empirical performance over existing approaches for applications in collaborative filtering and next word prediction, showing that our method outperforms standard centralized and federated training in performance on unseen clients (see Table 1), enables fast adaptation to clients’ personal data (see Figure 3), and matches the performance of other federated personalization techniques with less communication (see Figure 2). • Release an open-source library for evaluating algorithms across tasks in this setting. • Describe the successful deployment of this approach at scale for collaborative filtering in a real-world mobile keyboard application (see Section 7).
# 2 Related Work
Previous works have explored personalization of federated models via finetuning [52, 58], meta learning / bi-level optimization [10, 16, 18, 33], and model interpolation [14, 27, 43]. Some works aim to improve training convergence with heterogeneous client gradient updates [35, 39], while others address client resource heterogeneity [15, 49]. All of these approaches require communicating all client parameters during training, which can be unreasonable due to privacy and communication constraints for some models (discussed further in Section 3), which motivates methods that aggregate only part of a model as in our work.
Arivazhagan et al. [4] and Liang et al. [41] aggregate part of a model, but these approaches do not meet the criteria from Section 1. Similar to other works proposing local parameters [22, 31, 40], both approaches require clients to maintain local models across rounds, which is problematic when sampling clients from large populations (criterion 2). Arivazhagan et al. [4] assumes that all clients are available for training at all times and do not propose a method for performing inference on new clients (criterion 3). Liang et al. [41] requires new inference clients to be able to ensemble the outputs of all other clients’ local models to evaluate on new data, which is unrealistic in practice due to communication and privacy constraints (criterion 3). These constraints are crucial: with previous methods most clients do not have a practical way to perform inference. Previous methods were also proposed for specific model types (criterion 1): Arivazhagan et al. [4] explores personalization layers after shared base layers and Liang et al. [41] learns personal representations of local data. Finally, as we discuss in Section 4.2, our method optimizes a meta learning objective for training global parameters that lead to fast reconstruction (criterion 4).
Federated Collaborative Filtering: We evaluate our approach on collaborative filtering [37] in Section 5.1.1. Prior work has explored federated matrix factorization: Ammad-Ud-Din et al. [2] avoids sending the user matrix to the server by storing it locally, aggregating only the item matrix globally. Chai et al. [9] applies homomorphic encryption to aggregation of the item matrix. Flanagan et al. [20] studies federated collaborative filtering as a multi-view learning problem. Each approach requires clients to maintain state, unlike our method. Ammad-Ud-Din et al. [2] and Chai et al. [9] also do not address the problem of inference on unseen users.
Federated Meta Learning: Our approach is motivated by a connection to meta learning, described in Section 4.2. Other federated learning works have also established connections to meta learning: Jiang et al. [33] observed that training a global federated model that can be easily personalized via finetuning can be studied in the model-agnostic meta learning (MAML) framework [19], and FEDAVG is performing the distributed version of the REPTILE meta learning algorithm presented by Nichol et al. [46]. Chen et al. [10], Fallah et al. [18], and Lin et al. [42] apply the MAML algorithm and variants in federated settings. Khodak et al. [36] aims to improve upon these methods by learning client similarities adaptively. These methods do not address the partially local federated learning setting, where some parameters are not aggregated globally.
# 3 Partially Local Federated Learning
Typically, federated learning of a global model optimizes:
$$\operatorname* { m i n } _ { \mathbf { x } \in \mathbb { R } ^ { d } } F ( \mathbf { x } ) = \mathbb { E } _ { i \sim \mathcal { P } } [ f _ { i } ( \mathbf { x } ) ]$$
where $f _ { i } ( \mathbf { x } ) = \mathbb { E } _ { \xi \in \mathcal { D } _ { i } } [ f _ { i } ( \mathbf { x } , \boldsymbol { \xi } ) ]$ is the local objective for client $i , \textbf { x }$ is the $d$ -dimensional model parameter vector, $\mathcal { P }$ is the distribution of clients, and $\xi$ is a data sample drawn from client $i$ ’s data $\mathcal { D } _ { i }$ . In practical cross-device settings, $f _ { i } ( \mathbf { x } )$ may be highly heterogeneous for different $i$ , and the number of available clients may be large and constantly changing due to partial availability. Only a relatively small fraction of clients may be sampled for training.
To motivate partially local federated learning, we begin by considering models that can be partitioned into user-specific parameters and non-user-specific parameters. An example is matrix factorization in the collaborative filtering setting [30, 37]: in this scenario, a ratings matrix $R \in \mathbb { R } ^ { U \times I }$ representing user preferences is factorized into a user matrix $P \in \mathbb { R } ^ { U \times K }$ and an items matrix $Q \in \bar { \mathbb { R } ^ { I \times K } }$ such that $\dot { \boldsymbol { R } } \approx \boldsymbol { P } \boldsymbol { Q } ^ { \top }$ , where $U$ is the number of users and $I$ is the number of items. For each user $u$ , this approach yields a $K$ -dimensional user-specific embedding $P _ { u }$ .
To train this type of model in the federated setting, we cannot naively use the popular FEDAVG algorithm [44] or other (personalized) algorithms that involving aggregation of all model parameters. A simple application of global learning algorithms might require every client to be sent every other client’s personal parameters, which is clearly unreasonable for both privacy and communication. A more sophisticated approach might be to have each client communicate only their own personal parameters with the server. In this case, the server still has access to individual user parameters, which in this setting can be trivially used to recover sensitive user-item affinities, negating the privacy benefit of not centralizing the data (again unreasonable).
Algorithm 1 Federated Reconstruction Training
<table><tr><td colspan="2">Input: set of global parameters G,set of local parameters L,dataset split function S,reconstruction algorithm R, client update algorithm U</td></tr><tr><td>Server executes:</td><td></td></tr><tr><td>g(0)← (initialize G) for each round t do</td><td>ClientUpdate:</td></tr><tr><td>S(t) ← (randomly sample m clients)</td><td>(Di,s,Di,q) ← S(Di)</td></tr><tr><td>for each client i ∈ S(t) in parallel do</td><td>(t) ←R(Di,s,L,g(t))</td></tr><tr><td>(△,ni)←ClientUpdate(i,g(t)</td><td>(t) ←U(Di,q,l gi</td></tr><tr><td>end for</td><td>△(t) ↑gi (t) g(t)</td></tr><tr><td>n = ∑ies(t) ni</td><td>ni←|Di,ql</td></tr><tr><td>g(t+1) ←g(t)+ns∑i∈s(t) n end for</td><td>return △(t, n to the server</td></tr></table>
Thus a practical federated learning algorithm for this setting should be partially local: it should enable clients to train a subset of parameters entirely on-device. However, approaches that involve stateful clients storing their local parameters across rounds are undesirable in large-scale cross-device settings since clients are unlikely to be sampled repeatedly, causing state to be infrequently available and become stale, degrading performance (Reddi et al. [48] [Sec. 5.1]). Additionally, since only a fraction of clients participate in training, all other clients will be left without trained local parameters, preventing them from performing inference using the model. In a large population setting with hundreds of millions of clients as described in Section 7, this can mean $9 9 \% +$ of clients do not have a complete model, preventing practical deployment. Thus an algorithm for this setting ideally should not depend on stateful clients and should provide a way to perform inference on unseen clients.
Though we have motivated partially local federated learning via a setting that contains privacysensitive user-specific parameters, we will later show that this paradigm can also improve robustness to heterogeneity in $f _ { i } ( \mathbf { x } )$ and reduce communication cost, even for models without user-specific parameters. In this case, the partition between local and global parameters is determined by the use-case and communication limitations. As an example, in Section 5.1.2 we motivate a next word prediction use-case, where having a partially local model can be useful for handling diverse client inputs while reducing communication.
Achieving partially local federated learning in a practical cross-device setting with large, changing client distribution $\mathcal { P }$ and stateless clients is one of the key contributions of our work.
# 4 Federated Reconstruction
We now introduce the Federated Reconstruction framework. One of the key insights of our approach is that we can relax the requirement for clients to maintain local parameters across rounds by reconstructing local parameters whenever needed, running a reconstruction algorithm $R$ to recover them. Once a client is finished participating in a round, it can discard its reconstructed local parameters. An overview is presented in Figure 1.
Federated Reconstruction training is presented in Algorithm 1. Training proceeds as follows: for each round $t$ , the server sends the current global parameters $g ^ { ( t ) }$ to each selected client. Selected clients split their local data $\mathcal { D } _ { i }$ into a support set $\mathcal { D } _ { i , s }$ and a query set $\mathcal { D } _ { i , q }$ . Each client uses its support set $\mathcal { D } _ { i , s }$ and $g ^ { ( t ) }$ as inputs to reconstruction algorithm $R$ to produce its local parameters $l _ { i } ^ { ( t ) }$ . Then each client then uses its query set $\mathcal { D } _ { i , q }$ , its local parameters $l _ { i } ^ { ( t ) }$ , and the global parameters $g ^ { ( t ) }$ as inputs to update algorithm $U$ to produce updated global parameters $g _ { i } ^ { ( t ) }$ . Finally, the server aggregates updates to global parameters across clients. We describe key steps in further detail below.
Dataset Split Step: Clients apply a dataset split function $S$ to their datasets $\mathcal { D } _ { i }$ to produce a support set $\mathcal { D } _ { i , s }$ used for reconstruction and a query set $\mathcal { D } _ { i , q }$ used for updating global parameters. Typically these sets are disjoint to maximize the meta-generalization ability of the model (see Section 4.2), but in Appendix D we show that this assumption may be relaxed if clients don’t have sufficient data to partition.
Client Reconstruction Step: Reconstruction of local parameters is performed by algorithm $R$ . Though this algorithm can take other forms, in this work we instantiate $R$ as performing $k _ { r }$ local gradient descent steps on initialized local parameters with the global parameters frozen, using the support set $\mathcal { D } _ { i , s }$ . We show in Section 4.2 this naturally optimizes a well-motivated meta learning objective. Interestingly, this approach is related to gradient-based alternating minimization, a historically successful method for training factored models [26, 32].
A potential concern with reconstruction is that this may lead to additional client computation cost compared to storing local parameters on clients. However, since clients are unlikely to be reached repeatedly by large-scale cross-device training, in practice this cost is similar to the cost of initializing these local parameters and training them with stateful clients. Additionally, reconstruction provides a natural way for new clients unseen during training to produce their own partially local models offline (see Section 4.1)–without this step, the vast majority of clients would not be able to use the model. Finally, in Section 4.2 we argue and in Section 5.2 we empirically demonstrate that with our approach just one local gradient descent step can yield successful reconstruction because global parameters are being trained for fast reconstruction of local parameters.
Client Update Step: Client updates of global parameters are performed by update algorithm $U$ . In this work we instantiate $U$ as performing $k _ { u }$ local gradient descent steps on the global parameters, using the query set $\mathcal { D } _ { i , q }$ .
Server Update Step: We build on the generalized FEDAVG formulation proposed by Reddi et al. [48], treating aggregated global parameter updates as an "antigradient" that can be input into different server optimizers (SGD is shown in Algorithm 1). Note that the server update operates on a weighted average of client updates as in McMahan et al. [44], weighted by $n _ { i } = | \mathcal { D } _ { i , q } |$ .
We refer to the instantiation of this framework outlined here as FEDRECON below. We address frequently asked questions about FEDRECON and partially local federated learning in Appendix A.
# 4.1 Evaluation and Inference
To make predictions with global variables $g$ learned using Algorithm 1, clients can naturally reconstruct their local models just as they do during training, by using $R , g$ , and $\mathcal { D } _ { i , s }$ to produce local parameters $l$ . Then $g$ and $l$ combined make up a fully trained partially local model, which can be evaluated on $\mathcal { D } _ { i , q }$ . We refer to this evaluation approach as RECONEVAL below. Note that this can be applied to clients unseen during training (most clients in large-scale settings), enabling inference for these clients.2
Reconstruction for inference is performed offline, independently of any federated process, so clients can perform reconstruction once and store local parameters for repeated use, optionally refreshing them periodically if they have new local data.
# 4.2 Connection to Meta Learning
Our framework is naturally motivated via meta learning. Given that RECONEVAL involves clients doing (gradient-based) reconstruction using global parameters, we ask: Can we train global parameters conducive to fast reconstruction of local parameters?
We can easily formulate this question in the language of model-agnostic meta learning [19]. The heterogeneous client distribution $\mathcal { P }$ corresponds to the heterogeneous distribution of tasks; each round (episode) we sample a batch of clients in the hope of meta-generalizing to unseen clients. Each client has a support dataset for reconstruction and a query dataset for global parameter updates. Our meta-parameters are $g$ and our task-specific parameters are $l _ { i }$ for client $i$ . We want to find $g$ minimizing the objective:
$$\operatorname { \mathbb { E } } _ { i \sim \mathcal { P } } f _ { i } ( g \parallel l _ { i } ) = \operatorname { \mathbb { E } } _ { i \sim \mathcal { P } } f _ { i } ( g \parallel R ( \mathcal { D } _ { i , s } , \mathcal { L } , g ) ]$$
where ${ \boldsymbol { g } } \parallel l _ { i }$ denotes the concatenation of $g$ and $l _ { i }$ and $f _ { i } ( g \parallel l _ { i } ) = \mathbb { E } _ { \xi \in \mathcal { D } _ { i , q } } [ f _ { i } ( g \parallel l _ { i } , \xi ) ] ,$ .
In Appendix B we show that the instantiation of our framework where $R$ performs $k _ { r } \geq 1$ steps of gradient descent on initialized local parameters using $\mathcal { D } _ { i , s }$ and $U$ performs $k _ { u } = 1$ step of gradient descent using $\mathcal { D } _ { i , q }$ is already minimizing the first-order terms in this objective (i.e., this version of FEDRECON is performing first-order meta learning). Intuitively, reconstruction corresponds to the MAML “inner loop” and the global parameter update corresponds to the “outer loop”; we test the same way we train (via reconstruction), a common pattern in meta learning.
Thus FEDRECON trains global parameters $g$ for fast reconstruction of local parameters $l$ , enabling partially local federated learning without requiring clients to maintain state. In Section 5.2 we observe that our method empirically produces $g$ more conducive to fast, performant reconstruction on unseen clients than standard centralized or federated training (e.g., see SERVER $^ +$ RECONEVAL vs. FEDRECON in Table 1). We see in Figure 3 that just one reconstruction step is sufficient to recover the majority of performance.
# 5 Experimental Evaluation
# 5.1 Tasks and Methods
We next describe experiments validating FEDRECON on matrix factorization and next word prediction. We aim to determine whether reconstruction can enable practical partially local federated learning with fast personalization for new clients, including in settings without user-specific embeddings.
# 5.1.1 Matrix Factorization
We evaluate on federated matrix factorization using the popular MovieLens 1M collaborative filtering dataset [29]. We perform two kinds of evaluation:
1. STANDARDEVAL on seen users, those users who participated in at least one round of federated training. We split each user’s ratings into $80 \%$ train, $10 \%$ validation, and $10 \%$ test by timestamp. We train on all users’ train ratings, and report results on users test ratings. 2. RECONEVAL on unseen users, those users who did not participate at all during federated training. We split the users randomly into $80 \%$ train, $10 \%$ validation, and $10 \%$ test; we train with the train users and report results on test users.
The model learns $P$ and $Q$ such that $R \approx P Q ^ { \top }$ as discussed in Section 3, with embedding dimensionality $K = 5 0$ . We apply FEDRECON with local user embeddings $P _ { u }$ and global item matrix $Q$ . We report root-mean-square-error (RMSE) and rating prediction accuracy. We compare centralized training, FEDAVG, and FEDRECON in Table 1. See also Appendix C.1 for more details on the dataset, model, and hyperparameter choices.
# 5.1.2 Next Word Prediction
We also aim to determine whether Federated Reconstruction can be successfully applied in settings without user-specific embeddings to improve robustness to client heterogeneity and communication cost, since our approach is agnostic to which parameters are chosen as local/global. We apply FEDRECON to next word prediction because the task provides a natural motivation for personalization: different clients often have highly heterogeneous data, e.g., if they use different slang, but language models typically have a fixed vocabulary. We propose improving the ability of a language model to capture diverse inputs using local out-of-vocabulary (OOV) embeddings. OOV embeddings are a common application of the hashing trick [54] in deep learning; combining them with FEDRECON enables language models to effectively allow for personal input vocabularies for different clients. For example, if client $i$ frequently uses OOV token $t _ { i }$ and client $j$ uses OOV token $t _ { j }$ , each client’s corresponding local OOV embedding can learn to reflect this (even if the OOV embeddings collide). So adding local OOV embeddings with the core global vocabulary fixed can lead to improved personalization without more communication per round; we will also show that we can reduce the size of the core model (reducing communication) and get further benefits.
We perform next word prediction with the federated Stack Overflow dataset introduced in TensorFlow [51]. We use an LSTM model and process data similarly to Reddi et al. [48], comparing to their best
Table 1: Movielens matrix factorization root-mean-square-error (lower is better) and rating prediction accuracy (higher is better). STANDARDEVAL is on seen users, RECONEVAL is on held-out users. Results within $2 \%$ of best for each metric are in bold.
<table><tr><td></td><td>RMSE↓</td><td>ACCURACY↑</td></tr><tr><td>CENTRALIZED+STANDARDEVAL</td><td>.923</td><td>43.2</td></tr><tr><td>CENTRALIZED+RECONEVAL</td><td>1.36</td><td>40.8</td></tr><tr><td>FEDAVG + STANDARD EVAL</td><td>.939</td><td>41.5</td></tr><tr><td>FEDAVG +RECONEVAL</td><td>.934</td><td>40.0</td></tr><tr><td>FEDRECON(OURS)</td><td>.907</td><td>43.3</td></tr></table>
Table 2: Stack Overflow next word prediction accuracy and communication per round, per client. FEDYOGI and OOV/FULL FINETUNING require communication of all model parameters, FEDRECON does not (see Figure 2). Results within $2 \%$ of best for each vocabulary size are in bold.
<table><tr><td>VOCAB. SIZE</td><td>1K</td><td>5K</td><td>10K</td><td>COMMUNICATION</td></tr><tr><td>FEDYOGI</td><td>24.3</td><td>26.3</td><td>26.7</td><td>2|+2lg|</td></tr><tr><td>FEDRECON (100V)</td><td>24.1</td><td>26.2</td><td>26.4</td><td>2|gl</td></tr><tr><td>FEDRECON (500 OOV)</td><td>29.6</td><td>28.1</td><td>27.7</td><td>21g</td></tr><tr><td>OOV FINETUNING (500 OOV)</td><td>30.0</td><td>28.1</td><td>27.9</td><td>2|+2lgl</td></tr><tr><td>FULL FINETUNING (500 OOV)</td><td>30.8</td><td>29.2</td><td>28.8</td><td>2||+2|gl</td></tr><tr><td>FEDRECON+FINETUNE (50O OOV)</td><td>30.7</td><td>28.9</td><td>28.6</td><td>2lgl</td></tr></table>
FEDYOGI result. To demonstrate that reconstruction can be used to reduce model size, we describe experiments with vocabulary sizes [1000, 5000, 10,000]. See Appendix C.2 for details on the dataset, model, and hyperparameter choices.
# 5.2 Results and Discussion
In Tables 1 and 2 we present results for matrix factorization and next word prediction for FEDRECON and baselines. We call out several key comparisons below; more results can be found in Appendix D.
For the MovieLens task FEDRECON is able to match the performance of CENTRALIZED $^ +$ STANDARD EVAL despite performing a more difficult task: as described in Section 5.1.1, FEDRECON is using RECONEVAL to evaluate on held-out users, reconstructing user embeddings for them and then evaluating. As is typical for server-trained matrix factorization models, CENTRALIZED $^ +$ STANDARD EVAL is only being evaluated on held-out ratings for seen users. Note that we would not be able to evaluate on unseen users since they do not have trained user embeddings (randomly initializing them produces garbage results). If we reconstruct user embeddings for unseen users and then evaluate as in CENTRALIZED $^ +$ RECONEVAL (we argue this is a fairer comparison with FEDRECON), we see that performance is significantly worse than FEDRECON and server-evaluation on seen users. One interesting finding was that the results of this seemed to vary widely across different users, with some users reconstructing embeddings no better than random initialization, while most others reconstructed better embeddings.3 We see a similar result with FEDAVG for the MovieLens task, where FEDAVG with standard evaluation on seen users4 performs a bit worse than CENTRALIZED $^ +$ STANDARD EVAL, and performance for RECONEVAL on unseen users is significantly worse than FEDRECON. This indicates that FEDRECON is doing a better job of training global parameters so they can reconstruct local parameters than other approaches, as motivated in Section 4.2. Moreover, FEDRECON is doing this despite not having direct access to the data or the user-specific parameters–enabling this approach in settings where centralized training or FEDAVG is impossible.
 Figure 2: Accuracy as a function of total parameters communicated across all clients for FEDRECON and baselines for Stack Overflow next word prediction.
 Figure 3: Accuracy compared to base FEDRECON when varying the number of reconstruction steps for local parameters (left plot) and client update steps for global parameters (right plot).
In the first section of the Stack Overflow results in Table 2, we compare FEDYOGI (an adaptive variant of FEDAVG introduced by Reddi et al. [48]) with FEDRECON, showing that enabling FEDRECON with 500 local OOV embeddings significantly boosts accuracy for every vocabulary size. Interestingly, we observe that accuracy actually improves for smaller vocabulary sizes for FEDRECON $( 5 0 0 \mathrm { O O V } )$ , whereas the reverse holds for FEDYOGI and FEDRECON (1 OOV). We posit that this is because decreasing the vocabulary size effectively increases the amount of "training data" available for the local part of the model, since OOV embeddings are only used (and trained) when tokens are out-ofvocabulary; this is useful only when the local part of the model has sufficient capacity via the number of OOV embeddings. This hypothesis is consistent with vocabulary coverage: a 10K vocabulary covers $8 6 . 9 \%$ of the tokens in the dataset, a 5K vocabulary covers $8 0 . 1 \%$ , and a 1K vocabulary covers $4 9 . 2 \%$ ; we see that difference in results for FEDRECON $( 5 0 0 \mathrm { O O V } )$ is greater between 1K and 5K than between 5K and 10K. We caution that reducing vocabulary size may be undesirable in some cases: reducing the size of the vocabulary also restricts the output tokens of the model.
Comparing with Finetuning: In Table 2 we compare FEDRECON with FINETUNING [52, 58] to study whether reconstruction can provide similar benefits as global personalization methods. In our implementation we train a fully global model using FEDYOGI, perform local gradient steps to finetune part of the model using the support set, and then evaluate on the query set (same sets as used for FEDRECON). For OOV FINETUNING, the OOV parameters only are finetuned using the support set (comparable to FEDRECON), and for FULL FINETUNING all parameters are finetuned. Comparing FEDRECON $( 5 0 0 \ \mathrm { O O V } )$ and OOV FINETUNING, we see that reconstructing local embeddings performs similarly to finetuning pre-trained OOV embeddings, despite FEDRECON not communicating the local parameters $l$ to the server. FULL FINETUNING from Table 2 achieves better accuracy since all parameters are finetuned. To compare this fairly with reconstruction, we perform FEDRECON $^ +$ FINETUNE, where the support set is used first to reconstruct local parameters and then to finetune global parameters before evaluation. We also see that we can get comparable results, indicating that reconstruction can enable personalization on (potentially privacy-sensitive) local parameters while reducing communication. See Figure 2 for a comparison of different approaches by the total number of parameters communicated–we see an advantage for FEDRECON, particularly for lower total communication.
Varying Reconstruction Steps: In Section 4.2 we described a connection between our framework and MAML [19], which has been a successful paradigm for fast adaptation to tasks with few steps. In Figure 3 we perform FEDRECON for varying numbers of reconstruction steps $k _ { r } \in [ 0 , 1 , 2 , 5 , 1 0 ]$ and plot the accuracy as a fraction of accuracy across tasks from Tables 1 and 2. We see that for zero reconstruction steps (an ablation skipping reconstruction), MovieLens accuracy is 0.0, as expected (all user embeddings are randomly initialized). Relative accuracy for Stack Overflow NWP settings remains above $90 \%$ , suggesting that for this task clients can still perform inference with a FEDRECON-trained model even without any data to reconstruct. Importantly, just one reconstruction step is required to recover the majority of remaining performance across both tasks, indicating that FEDRECON learns global parameters conducive to fast reconstruction.
Varying Client Update Steps: In Section 4.2 we showed that gradient-based FEDRECON, involving $k _ { r } \geq 1$ reconstruction steps and $k _ { u } = 1$ client update steps, is minimizing a first-order meta learning objective for training global parameters that yield good reconstructions. In Figure 3 we perform FEDRECON with $k _ { u } \in [ 1 , 2 , 5 , 1 0 ]$ and compute relative accuracy as a fraction of accuracy across tasks from Tables 1 and 2. For each experiment we run for a fixed number of rounds. We see that 1 step recovers almost all of the accuracy and adding more steps gradually increases accuracy further. Interestingly, we observe that for $k _ { u } = 1$ training proceeds significantly slower than for other values such that performance is still slightly increasing after the fixed number of rounds. This is analogous to the difference between FEDAVG and FEDSGD [44]. While FEDSGD is optimizing the original learning objective, FEDAVG often achieves similar performance in significantly fewer rounds by adding multiple gradient steps on aggregated parameters.
We present further baselines and ablations in Appendix D.
# 6 Open-Source Library
We are releasing a code framework for expressing and evaluating practical partially local federated models built on the popular TensorFlow Federated library [50]. The code is released under Apache License 2.0. In addition to allowing for easy reproduction of our experiments, the framework provides a flexible, well-documented interface for researchers and modelers to run simulations in this setting with models and tasks of their choice. Users can take any existing Keras model and plug it into this framework with just a few lines of code. We provide libraries for training and evaluation for MovieLens matrix factorization and Stack Overflow next word prediction, which can be easily extended for new tasks. We hope that the release of this framework spurs further research and lowers the barrier to more practical applications.
# 7 Deployment in a Mobile Keyboard Application
A key differentiator of our method is that it scales to practical training and inference in cross-device settings with large populations. To validate this, we deployed FEDRECON to a mobile keyboard application with hundreds of millions of federated learning clients. We used a system similar to Bonawitz et al. [7] to deploy FEDRECON for training. Note that the system does not support stateful clients given the issues with large-scale stateful training described in Section 4, so a stateless approach was necessary for deployment.
Users of the mobile keyboard application often use expressions (GIFs, stickers) to communicate with others in e.g., chat applications. Different users are highly heterogeneous in the style of expressions they use, which makes the problem a natural fit for collaborative filtering to predict new expressions a user might want to share. We trained matrix factorization models as described in Section 5.1.1, where the number of items ranged from hundreds to tens of thousands depending on the type of expression.
Training in production brought challenges due to data sparsity. Depending on the task, some clients had very few examples, if e.g., they didn’t commonly share stickers via the keyboard application. To ensure clients with just one example weren’t just adding noise to the training process by participating, we oversampled clients and filtered out the contributions of clients without at least some number of examples. We reused examples between the support and query sets as described in Appendix D to ensure all examples were used for both reconstruction and global updates.
Another practical challenge we faced was orthogonal to our method and commonly faced in realworld federated learning applications: heterogeneity in client resources and availability meant that some participating clients would drop out before sending updates to the server. We found that the simple strategy of oversampling clients and neglecting updates from dropped-out clients appeared to perform well, but we believe studying the fairness implications of this is a valuable area for future work.
After successful training, the resulting model was deployed for inference in predicting potential new expressions a user might share, which led to an increase of $2 9 . 3 \%$ in click-through-rate for expression recommendations. We hope that this successful deployment of FEDRECON demonstrates the practicality of our approach and leads the way for further real-world applications.
# 8 Conclusion
We introduced Federated Reconstruction, a model-agnostic framework for fast partially local federated learning suitable for training and inference at scale. We justified FEDRECON via a connection to meta learning and empirically validated the algorithm for collaborative filtering and next message prediction, showing that it can improve performance on unseen clients and enable fast personalization with less communication. We also released an open-source library for partially local federated learning and described a successful production deployment. Future work may explore the optimal balance of local and global parameters and the application of differential privacy to global parameters (see Appendix E).
# Acknowledgments and Disclosure of Funding
We thank Brendan McMahan, Lin Ning, Zachary Charles, Warren Morningstar, Daniel Ramage, Jakub Konecnˇ ý, Blaise Agüera y Arcas, and Jay Yagnik from Google Research for their helpful comments and discussions. We also thank Wei Li, Matt Newton, and Yang Lu for their collaboration towards deployment.
# References
[1] Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. 2016. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security. 308–318. [2] Muhammad Ammad-Ud-Din, Elena Ivannikova, Suleiman A Khan, Were Oyomno, Qiang Fu, Kuan Eeik Tan, and Adrian Flanagan. 2019. Federated Collaborative Filtering for PrivacyPreserving Personalized Recommendation System. arXiv preprint arXiv:1901.09888 (2019). [3] Apple. 2019. Designing for Privacy (video and slide deck). Apple WWDC, https: //developer.apple.com/videos/play/wwdc2019/708. [4] Manoj Ghuhan Arivazhagan, Vinay Aggarwal, Aaditya Kumar Singh, and Sunav Choudhary. 2019. Federated learning with personalization layers. arXiv preprint arXiv:1912.00818 (2019). [5] Raef Bassily, Vitaly Feldman, Kunal Talwar, and Abhradeep Thakurta. 2019. Private Stochastic Convex Optimization with Optimal Rates. CoRR abs/1908.09970 (2019). arXiv:1908.09970 http://arxiv.org/abs/1908.09970 [6] Raef Bassily, Adam D. Smith, and Abhradeep Thakurta. 2014. Private Empirical Risk Minimization, Revisited. CoRR abs/1405.7085 (2014). arXiv:1405.7085 http://arxiv.org/ abs/1405.7085 [7] Keith Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex Ingerman, Vladimir Ivanov, Chloe Kiddon, Jakub Konecnˇ y, Stefano Mazzocchi, H Brendan McMahan, et al \` . 2019. Towards federated learning at scale: System design. arXiv preprint arXiv:1902.01046 (2019). [8] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. 2017. Practical secure aggregation for privacy-preserving machine learning. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. 1175–1191. [9] Di Chai, Leye Wang, Kai Chen, and Qiang Yang. 2020. Secure federated matrix factorization. IEEE Intelligent Systems (2020). [10] Fei Chen, Mi Luo, Zhenhua Dong, Zhenguo Li, and Xiuqiang He. 2018. Federated metalearning with fast convergence and efficient communication. arXiv preprint arXiv:1802.07876 (2018). [11] NVIDIA Clara. 2019. The Clara Training Framework Authors. https://developer. nvidia.com/clara [12] Creative Commons. 2002. Attribution-ShareAlike 3.0 Unported. https:// creativecommons.org/licenses/by-sa/3.0/ [13] Walter de Brouwer. 2019. The Federated Future is ready for shipping. https://doc.ai/ blog/federated-future-ready-shipping/. [14] Yuyang Deng, Mohammad Mahdi Kamani, and Mehrdad Mahdavi. 2020. Adaptive Personalized Federated Learning. arXiv preprint arXiv:2003.13461 (2020). [15] Enmao Diao, Jie Ding, and Vahid Tarokh. 2020. HeteroFL: Computation and communication efficient federated learning for heterogeneous clients. arXiv preprint arXiv:2010.01264 (2020). [16] Canh T Dinh, Nguyen H Tran, and Tuan Dung Nguyen. 2020. Personalized federated learning with Moreau envelopes. arXiv preprint arXiv:2006.08848 (2020). [17] Cynthia Dwork, Aaron Roth, et al. 2014. The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science 9, 3-4 (2014), 211–407. [18] Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar. 2020. Personalized federated learning: A meta-learning approach. arXiv preprint arXiv:2002.07948 (2020). [19] Chelsea Finn, Pieter Abbeel, and Sergey Levine. 2017. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400 (2017). [20] Adrian Flanagan, Were Oyomno, Alexander Grigorievskiy, Kuan Eeik Tan, Suleiman A Khan, and Muhammad Ammad-Ud-Din. 2020. Federated Multi-view Matrix Factorization for Personalized Recommendations. arXiv preprint arXiv:2004.04256 (2020). [21] Dashan Gao, Ben Tan, Ce Ju, Vincent W Zheng, and Qiang Yang. 2020. Privacy Threats Against Federated Matrix Factorization. arXiv preprint arXiv:2007.01587 (2020). [22] Suyu Ge, Fangzhao Wu, Chuhan Wu, Tao Qi, Yongfeng Huang, and Xing Xie. 2020. Fedner: Privacy-preserving medical named entity recognition with federated learning. arXiv preprint arXiv:2003.09288 (2020). [23] Jonas Geiping, Hartmut Bauermeister, Hannah Dröge, and Michael Moeller. 2020. Inverting Gradients–How easy is it to break privacy in federated learning? arXiv preprint arXiv:2003.14053 (2020). [24] Robin C Geyer, Tassilo Klein, and Moin Nabi. 2017. Differentially private federated learning: A client level perspective. arXiv preprint arXiv:1712.07557 (2017). [25] GroupLens. 2015. MovieLens 1M License. https://files.grouplens.org/datasets/ movielens/ml-1m-README.txt [26] Asela Gunawardana, William Byrne, and Michael I Jordan. 2005. Convergence Theorems for Generalized Alternating Minimization Procedures. Journal of machine learning research 6, 12 (2005). [27] Filip Hanzely and Peter Richtárik. 2020. Federated learning of a mixture of global and local models. arXiv preprint arXiv:2002.05516 (2020). [28] Andrew Hard, Kanishka Rao, Rajiv Mathews, Swaroop Ramaswamy, Françoise Beaufays, Sean Augenstein, Hubert Eichner, Chloé Kiddon, and Daniel Ramage. 2018. Federated learning for mobile keyboard prediction. arXiv preprint arXiv:1811.03604 (2018). [29] F Maxwell Harper and Joseph A Konstan. 2015. The movielens datasets: History and context. Acm transactions on interactive intelligent systems (tiis) 5, 4 (2015), 1–19.
[30] Yifan Hu, Yehuda Koren, and Chris Volinsky. 2008. Collaborative filtering for implicit feedback datasets. In 2008 Eighth IEEE International Conference on Data Mining. Ieee, 263–272.
[31] Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangchuan Liu, Jian Pei, and Yong Zhang. 2021. Personalized cross-silo federated learning on non-iid data. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 35. 7865–7873.
[32] Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. 2013. Low-rank matrix completion using alternating minimization. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing. 665–674.
[33] Yihan Jiang, Jakub Konecnˇ y, Keith Rush, and Sreeram Kannan. 2019. Improving federated \` learning personalization via model agnostic meta learning. arXiv preprint arXiv:1909.12488 (2019).
[34] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. 2019. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977 (2019).
[35] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. 2020. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning. PMLR, 5132–5143.
[36] Mikhail Khodak, Maria-Florina F Balcan, and Ameet S Talwalkar. 2019. Adaptive gradientbased meta-learning methods. In Advances in Neural Information Processing Systems. 5917– 5928.
[37] Yehuda Koren, Robert Bell, and Chris Volinsky. 2009. Matrix factorization techniques for recommender systems. Computer 42, 8 (2009), 30–37.
[38] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. 2020. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine 37, 3 (2020), 50–60.
[39] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. 2018. Federated optimization in heterogeneous networks. arXiv preprint arXiv:1812.06127 (2018).
[40] Xiaoxiao Li, Meirui Jiang, Xiaofei Zhang, Michael Kamp, and Qi Dou. 2021. Fedbn: Federated learning on non-iid features via local batch normalization. arXiv preprint arXiv:2102.07623 (2021).
[41] Paul Pu Liang, Terrance Liu, Liu Ziyin, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Think locally, act globally: Federated learning with local and global representations. arXiv preprint arXiv:2001.01523 (2020).
[42] Yujie Lin, Pengjie Ren, Zhumin Chen, Zhaochun Ren, Dongxiao Yu, Jun Ma, Maarten de Rijke, and Xiuzhen Cheng. 2020. Meta Matrix Factorization for Federated Rating Predictions. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval. 981–990.
[43] Yishay Mansour, Mehryar Mohri, Jae Ro, and Ananda Theertha Suresh. 2020. Three approaches for personalization with applications to federated learning. arXiv preprint arXiv:2002.10619 (2020).
[44] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. 2017. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics. PMLR, 1273–1282.
[45] H Brendan McMahan, Daniel Ramage, Kunal Talwar, and Li Zhang. 2017. Learning differentially private recurrent language models. arXiv preprint arXiv:1710.06963 (2017).
[46] Alex Nichol, Joshua Achiam, and John Schulman. 2018. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999 (2018). [47] Valeria Nikolaenko, Stratis Ioannidis, Udi Weinsberg, Marc Joye, Nina Taft, and Dan Boneh. 2013. Privacy-preserving matrix factorization. In Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security. 801–812. [48] Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\` Sanjiv Kumar, and H Brendan McMahan. 2020. Adaptive Federated Optimization. arXiv preprint arXiv:2003.00295 (2020). [49] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet Talwalkar. 2017. Federated multi-task learning. arXiv preprint arXiv:1705.10467 (2017). [50] TensorFlow. 2019. TensorFlow Federated. https://www.tensorflow.org/federated [51] TensorFlow. 2019. TensorFlow Federated Stack Overflow Dataset. https: //www.tensorflow.org/federated/api_docs/python/tff/simulation/datasets/ stackoverflow/load_data [52] Kangkang Wang, Rajiv Mathews, Chloé Kiddon, Hubert Eichner, Françoise Beaufays, and Daniel Ramage. 2019. Federated evaluation of on-device personalization. arXiv preprint arXiv:1910.10252 (2019). [53] Wenqi Wei, Ling Liu, Margaret Loper, Ka-Ho Chow, Mehmet Emre Gursoy, Stacey Truex, and Yanzhao Wu. 2020. A framework for evaluating gradient leakage attacks in federated learning. arXiv preprint arXiv:2004.10397 (2020). [54] Kilian Weinberger, Anirban Dasgupta, John Langford, Alex Smola, and Josh Attenberg. 2009. Feature hashing for large scale multitask learning. In Proceedings of the 26th annual international conference on machine learning. 1113–1120. [55] Xi Wu, Arun Kumar, Kamalika Chaudhuri, Somesh Jha, and Jeffrey F. Naughton. 2016. Differentially Private Stochastic Gradient Descent for in-RDBMS Analytics. CoRR abs/1606.04722 (2016). arXiv:1606.04722 http://arxiv.org/abs/1606.04722 [56] Timothy Yang, Galen Andrew, Hubert Eichner, Haicheng Sun, Wei Li, Nicholas Kong, Daniel Ramage, and Françoise Beaufays. 2018. Applied federated learning: Improving google keyboard query suggestions. arXiv preprint arXiv:1812.02903 (2018). [57] Hongxu Yin, Arun Mallya, Arash Vahdat, Jose M Alvarez, Jan Kautz, and Pavlo Molchanov. 2021. See through Gradients: Image Batch Recovery via GradInversion. arXiv preprint arXiv:2104.07586 (2021). [58] Tao Yu, Eugene Bagdasaryan, and Vitaly Shmatikov. 2020. Salvaging federated learning by local adaptation. arXiv preprint arXiv:2002.04758 (2020). [59] Ligeng Zhu and Song Han. 2020. Deep leakage from gradients. In Federated Learning. Springer, 17–31.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305[ { "type": "text", "text": "Federated Reconstruction: Partially Local Federated Learning ", "text_level": 1, "bbox": [ 284, 122, 712, 172 ], "page_idx": 0 }, { "type": "text", "text": "Karan Singhal Google Research karansinghal@google.com ", "bbox": [ 191, 226, 392, 268 ], "page_idx": 0 }, { "type": "text", "text": "Hakim Sidahmed Google Research hsidahmed@google.com ", "bbox": [ 415, 226, 589, 268 ], "page_idx": 0 }, { "type": "text", "text": "Zachary Garrett Google Research zachgarrett@google.com ", "bbox": [ 614, 226, 807, 268 ], "page_idx": 0 }, { "type": "text", "text": "Shanshan Wu Google Research shanshanw@google.com ", "bbox": [ 222, 290, 395, 332 ], "page_idx": 0 }, { "type": "text", "text": "Keith Rush Google Research krush@google.com ", "bbox": [ 450, 289, 591, 332 ], "page_idx": 0 }, { "type": "text", "text": "Sushant Prakash Google Research sush@google.com ", "bbox": [ 645, 290, 776, 332 ], "page_idx": 0 }, { "type": "text", "text": "Abstract ", "text_level": 1, "bbox": [ 462, 367, 535, 382 ], "page_idx": 0 }, { "type": "text", "text": "Personalization methods in federated learning aim to balance the benefits of federated and local training for data availability, communication cost, and robustness to client heterogeneity. Approaches that require clients to communicate all model parameters can be undesirable due to privacy and communication constraints. Other approaches require always-available or stateful clients, impractical in large-scale cross-device settings. We introduce Federated Reconstruction, the first modelagnostic framework for partially local federated learning suitable for training and inference at scale. We motivate the framework via a connection to model-agnostic meta learning, empirically demonstrate its performance over existing approaches for collaborative filtering and next word prediction, and release an open-source library for evaluating approaches in this setting. We also describe the successful deployment of this approach at scale for federated collaborative filtering in a mobile keyboard application. ", "bbox": [ 233, 398, 766, 579 ], "page_idx": 0 }, { "type": "text", "text": "1 Introduction ", "text_level": 1, "bbox": [ 174, 604, 310, 622 ], "page_idx": 0 }, { "type": "text", "text": "Federated learning is a machine learning setting in which distributed clients solve a learning objective on sensitive data via communication with a coordinating server [44]. Typically, clients collaborate to train a single global model under an objective that combines heterogeneous local client objectives. For example, clients may collaborate to train a next word prediction model for a mobile keyboard application without sharing sensitive typing data with other clients or a centralized server [28]. This paradigm has been scaled to production and deployed in cross-device settings [3, 28, 56] and cross-silo settings [11, 13]. ", "bbox": [ 174, 637, 825, 734 ], "page_idx": 0 }, { "type": "text", "text": "However, training a fully global federated model may not always be ideal due to heterogeneity in clients’ data distributions. Yu et al. [58] show that global models can perform worse than purely local (non-federated) models for many clients (e.g., those with many training examples). Moreover, in some settings privacy constraints completely prohibit fully global federated training. For instance, for models with user-specific embeddings, such as matrix factorization models for collaborative filtering [37], naively training a global federated model involves sending updates to user embeddings on the server, directly revealing potentially sensitive individual preferences [21, 47]. ", "bbox": [ 174, 741, 825, 838 ], "page_idx": 0 }, { "type": "text", "text": "To address this, we explore partially local federated learning. In this setting, models are partitioned into global $g$ and local parameters $l$ such that local parameters never leave client devices. This enables training on sensitive user-specific parameters as in the collaborative filtering setting, and we show it can also improve robustness to client data heterogeneity and communication cost for other settings, since we are effectively interpolating between local and federated training. Previous works have looked at similar settings [4, 41]. Importantly, these approaches cannot realistically be applied at scale in cross-device settings because they assume clients are stateful or always-available: in practice, clients are sampled from an enormous population with unreliable availability, so approaches that rely on repeated sampling of the same stateful clients are impractical (Kairouz et al. [34] [Table 1]). Other work has demonstrated that stateful federated algorithms in partial participation regimes can perform worse than stateless algorithms due to the state becoming \"stale\" [48]. Previous methods also do not enable inference on new clients unseen during training, preventing real-world deployment. ", "bbox": [ 174, 844, 825, 900 ], "page_idx": 0 }, { "type": "image", "img_path": "images/198f287e0066fe3a366e49d5054ddefa5e7b6055fb3e871faa1242b2d6d6a1c0.jpg", "image_caption": [ "Figure 1: Schematic of Federated Reconstruction. Model variables are partitioned into global and local variables. For every round $t$ , each participating client $i$ is sent the current global variables, uses them to reconstruct its own local variables, and then updates its copy of the global variables. The server aggregates updates to only the global variables across clients. " ], "image_footnote": [], "bbox": [ 334, 87, 660, 227 ], "page_idx": 1 }, { "type": "text", "text": "", "bbox": [ 174, 301, 825, 414 ], "page_idx": 1 }, { "type": "text", "text": "These limitations motivate a new method for partially local federated learning, balancing the benefits of federated aggregation and local training. This approach should be: ", "bbox": [ 173, 420, 823, 448 ], "page_idx": 1 }, { "type": "text", "text": "1. Model-agnostic: works with any model. \n2. Scalable: compatible with large-scale cross-device training with partial participation. \n3. Practical for inference: new clients can perform inference. \n4. Fast: clients can quickly adapt local parameters to their personal data. ", "bbox": [ 210, 454, 789, 511 ], "page_idx": 1 }, { "type": "text", "text": "In this work, we propose combining federated training of global parameters with reconstruction of local parameters (see Figure 1). We show that our method relaxes the statefulness requirement of previous work and enables fast personalization for unseen clients without additional communication, even for models without user-specific embeddings. ", "bbox": [ 176, 516, 826, 571 ], "page_idx": 1 }, { "type": "text", "text": "Our contributions: We make the following key contributions: ", "bbox": [ 176, 578, 584, 593 ], "page_idx": 1 }, { "type": "text", "text": "• Introduce a model-agnostic framework for training partially local and partially global models, satisfying the above criteria. We propose a practical algorithm instantiating this framework (FEDRECON). \nJustify the algorithm via a connection to model-agnostic meta learning (see Section 4.2), showing that FEDRECON naturally leads to fast reconstruction at test time (see Table 1). \nDemonstrate FEDRECON’s empirical performance over existing approaches for applications in collaborative filtering and next word prediction, showing that our method outperforms standard centralized and federated training in performance on unseen clients (see Table 1), enables fast adaptation to clients’ personal data (see Figure 3), and matches the performance of other federated personalization techniques with less communication (see Figure 2). \n• Release an open-source library for evaluating algorithms across tasks in this setting. \n• Describe the successful deployment of this approach at scale for collaborative filtering in a real-world mobile keyboard application (see Section 7). ", "bbox": [ 194, 598, 826, 790 ], "page_idx": 1 }, { "type": "text", "text": "2 Related Work ", "text_level": 1, "bbox": [ 174, 810, 321, 828 ], "page_idx": 1 }, { "type": "text", "text": "Previous works have explored personalization of federated models via finetuning [52, 58], meta learning / bi-level optimization [10, 16, 18, 33], and model interpolation [14, 27, 43]. Some works aim to improve training convergence with heterogeneous client gradient updates [35, 39], while others address client resource heterogeneity [15, 49]. All of these approaches require communicating all client parameters during training, which can be unreasonable due to privacy and communication constraints for some models (discussed further in Section 3), which motivates methods that aggregate only part of a model as in our work. ", "bbox": [ 176, 843, 825, 886 ], "page_idx": 1 }, { "type": "text", "text": "", "bbox": [ 174, 90, 825, 147 ], "page_idx": 2 }, { "type": "text", "text": "Arivazhagan et al. [4] and Liang et al. [41] aggregate part of a model, but these approaches do not meet the criteria from Section 1. Similar to other works proposing local parameters [22, 31, 40], both approaches require clients to maintain local models across rounds, which is problematic when sampling clients from large populations (criterion 2). Arivazhagan et al. [4] assumes that all clients are available for training at all times and do not propose a method for performing inference on new clients (criterion 3). Liang et al. [41] requires new inference clients to be able to ensemble the outputs of all other clients’ local models to evaluate on new data, which is unrealistic in practice due to communication and privacy constraints (criterion 3). These constraints are crucial: with previous methods most clients do not have a practical way to perform inference. Previous methods were also proposed for specific model types (criterion 1): Arivazhagan et al. [4] explores personalization layers after shared base layers and Liang et al. [41] learns personal representations of local data. Finally, as we discuss in Section 4.2, our method optimizes a meta learning objective for training global parameters that lead to fast reconstruction (criterion 4). ", "bbox": [ 174, 154, 825, 333 ], "page_idx": 2 }, { "type": "text", "text": "Federated Collaborative Filtering: We evaluate our approach on collaborative filtering [37] in Section 5.1.1. Prior work has explored federated matrix factorization: Ammad-Ud-Din et al. [2] avoids sending the user matrix to the server by storing it locally, aggregating only the item matrix globally. Chai et al. [9] applies homomorphic encryption to aggregation of the item matrix. Flanagan et al. [20] studies federated collaborative filtering as a multi-view learning problem. Each approach requires clients to maintain state, unlike our method. Ammad-Ud-Din et al. [2] and Chai et al. [9] also do not address the problem of inference on unseen users. ", "bbox": [ 174, 339, 825, 436 ], "page_idx": 2 }, { "type": "text", "text": "Federated Meta Learning: Our approach is motivated by a connection to meta learning, described in Section 4.2. Other federated learning works have also established connections to meta learning: Jiang et al. [33] observed that training a global federated model that can be easily personalized via finetuning can be studied in the model-agnostic meta learning (MAML) framework [19], and FEDAVG is performing the distributed version of the REPTILE meta learning algorithm presented by Nichol et al. [46]. Chen et al. [10], Fallah et al. [18], and Lin et al. [42] apply the MAML algorithm and variants in federated settings. Khodak et al. [36] aims to improve upon these methods by learning client similarities adaptively. These methods do not address the partially local federated learning setting, where some parameters are not aggregated globally. ", "bbox": [ 173, 443, 825, 568 ], "page_idx": 2 }, { "type": "text", "text": "3 Partially Local Federated Learning ", "text_level": 1, "bbox": [ 173, 585, 501, 603 ], "page_idx": 2 }, { "type": "text", "text": "Typically, federated learning of a global model optimizes: ", "bbox": [ 174, 616, 550, 631 ], "page_idx": 2 }, { "type": "equation", "img_path": "images/f974ff47f323a90edf73204c12f174a6320232c203ee7bf5f2fb608d4428b062.jpg", "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { x } \\in \\mathbb { R } ^ { d } } F ( \\mathbf { x } ) = \\mathbb { E } _ { i \\sim \\mathcal { P } } [ f _ { i } ( \\mathbf { x } ) ]\n$$", "text_format": "latex", "bbox": [ 408, 633, 588, 659 ], "page_idx": 2 }, { "type": "text", "text": "where $f _ { i } ( \\mathbf { x } ) = \\mathbb { E } _ { \\xi \\in \\mathcal { D } _ { i } } [ f _ { i } ( \\mathbf { x } , \\boldsymbol { \\xi } ) ]$ is the local objective for client $i , \\textbf { x }$ is the $d$ -dimensional model parameter vector, $\\mathcal { P }$ is the distribution of clients, and $\\xi$ is a data sample drawn from client $i$ ’s data $\\mathcal { D } _ { i }$ . In practical cross-device settings, $f _ { i } ( \\mathbf { x } )$ may be highly heterogeneous for different $i$ , and the number of available clients may be large and constantly changing due to partial availability. Only a relatively small fraction of clients may be sampled for training. ", "bbox": [ 174, 662, 825, 733 ], "page_idx": 2 }, { "type": "text", "text": "To motivate partially local federated learning, we begin by considering models that can be partitioned into user-specific parameters and non-user-specific parameters. An example is matrix factorization in the collaborative filtering setting [30, 37]: in this scenario, a ratings matrix $R \\in \\mathbb { R } ^ { U \\times I }$ representing user preferences is factorized into a user matrix $P \\in \\mathbb { R } ^ { U \\times K }$ and an items matrix $Q \\in \\bar { \\mathbb { R } ^ { I \\times K } }$ such that $\\dot { \\boldsymbol { R } } \\approx \\boldsymbol { P } \\boldsymbol { Q } ^ { \\top }$ , where $U$ is the number of users and $I$ is the number of items. For each user $u$ , this approach yields a $K$ -dimensional user-specific embedding $P _ { u }$ . ", "bbox": [ 173, 738, 825, 821 ], "page_idx": 2 }, { "type": "text", "text": "To train this type of model in the federated setting, we cannot naively use the popular FEDAVG algorithm [44] or other (personalized) algorithms that involving aggregation of all model parameters. A simple application of global learning algorithms might require every client to be sent every other client’s personal parameters, which is clearly unreasonable for both privacy and communication. A more sophisticated approach might be to have each client communicate only their own personal parameters with the server. In this case, the server still has access to individual user parameters, which in this setting can be trivially used to recover sensitive user-item affinities, negating the privacy benefit of not centralizing the data (again unreasonable). ", "bbox": [ 174, 828, 825, 911 ], "page_idx": 2 }, { "type": "table", "img_path": "images/1c18a15b847b494664f7f156b38689ec66a47806db8fc853bd1122d4e3766984.jpg", "table_caption": [ "Algorithm 1 Federated Reconstruction Training " ], "table_footnote": [], "table_body": "<table><tr><td colspan=\"2\">Input: set of global parameters G,set of local parameters L,dataset split function S,reconstruction algorithm R, client update algorithm U</td></tr><tr><td>Server executes:</td><td></td></tr><tr><td>g(0)← (initialize G) for each round t do</td><td>ClientUpdate:</td></tr><tr><td>S(t) ← (randomly sample m clients)</td><td>(Di,s,Di,q) ← S(Di)</td></tr><tr><td>for each client i ∈ S(t) in parallel do</td><td>(t) ←R(Di,s,L,g(t))</td></tr><tr><td>(△,ni)←ClientUpdate(i,g(t)</td><td>(t) ←U(Di,q,l gi</td></tr><tr><td>end for</td><td>△(t) ↑gi (t) g(t)</td></tr><tr><td>n = ∑ies(t) ni</td><td>ni←|Di,ql</td></tr><tr><td>g(t+1) ←g(t)+ns∑i∈s(t) n end for</td><td>return △(t, n to the server</td></tr></table>", "bbox": [ 184, 107, 826, 284 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 174, 313, 821, 340 ], "page_idx": 3 }, { "type": "text", "text": "Thus a practical federated learning algorithm for this setting should be partially local: it should enable clients to train a subset of parameters entirely on-device. However, approaches that involve stateful clients storing their local parameters across rounds are undesirable in large-scale cross-device settings since clients are unlikely to be sampled repeatedly, causing state to be infrequently available and become stale, degrading performance (Reddi et al. [48] [Sec. 5.1]). Additionally, since only a fraction of clients participate in training, all other clients will be left without trained local parameters, preventing them from performing inference using the model. In a large population setting with hundreds of millions of clients as described in Section 7, this can mean $9 9 \\% +$ of clients do not have a complete model, preventing practical deployment. Thus an algorithm for this setting ideally should not depend on stateful clients and should provide a way to perform inference on unseen clients. ", "bbox": [ 174, 347, 825, 486 ], "page_idx": 3 }, { "type": "text", "text": "Though we have motivated partially local federated learning via a setting that contains privacysensitive user-specific parameters, we will later show that this paradigm can also improve robustness to heterogeneity in $f _ { i } ( \\mathbf { x } )$ and reduce communication cost, even for models without user-specific parameters. In this case, the partition between local and global parameters is determined by the use-case and communication limitations. As an example, in Section 5.1.2 we motivate a next word prediction use-case, where having a partially local model can be useful for handling diverse client inputs while reducing communication. ", "bbox": [ 174, 492, 825, 589 ], "page_idx": 3 }, { "type": "text", "text": "Achieving partially local federated learning in a practical cross-device setting with large, changing client distribution $\\mathcal { P }$ and stateless clients is one of the key contributions of our work. ", "bbox": [ 176, 594, 821, 623 ], "page_idx": 3 }, { "type": "text", "text": "4 Federated Reconstruction ", "text_level": 1, "bbox": [ 176, 643, 421, 661 ], "page_idx": 3 }, { "type": "text", "text": "We now introduce the Federated Reconstruction framework. One of the key insights of our approach is that we can relax the requirement for clients to maintain local parameters across rounds by reconstructing local parameters whenever needed, running a reconstruction algorithm $R$ to recover them. Once a client is finished participating in a round, it can discard its reconstructed local parameters. An overview is presented in Figure 1. ", "bbox": [ 174, 675, 825, 746 ], "page_idx": 3 }, { "type": "text", "text": "Federated Reconstruction training is presented in Algorithm 1. Training proceeds as follows: for each round $t$ , the server sends the current global parameters $g ^ { ( t ) }$ to each selected client. Selected clients split their local data $\\mathcal { D } _ { i }$ into a support set $\\mathcal { D } _ { i , s }$ and a query set $\\mathcal { D } _ { i , q }$ . Each client uses its support set $\\mathcal { D } _ { i , s }$ and $g ^ { ( t ) }$ as inputs to reconstruction algorithm $R$ to produce its local parameters $l _ { i } ^ { ( t ) }$ . Then each client then uses its query set $\\mathcal { D } _ { i , q }$ , its local parameters $l _ { i } ^ { ( t ) }$ , and the global parameters $g ^ { ( t ) }$ as inputs to update algorithm $U$ to produce updated global parameters $g _ { i } ^ { ( t ) }$ . Finally, the server aggregates updates to global parameters across clients. We describe key steps in further detail below. ", "bbox": [ 173, 751, 825, 863 ], "page_idx": 3 }, { "type": "text", "text": "Dataset Split Step: Clients apply a dataset split function $S$ to their datasets $\\mathcal { D } _ { i }$ to produce a support set $\\mathcal { D } _ { i , s }$ used for reconstruction and a query set $\\mathcal { D } _ { i , q }$ used for updating global parameters. Typically these sets are disjoint to maximize the meta-generalization ability of the model (see Section 4.2), but in Appendix D we show that this assumption may be relaxed if clients don’t have sufficient data to partition. ", "bbox": [ 174, 869, 825, 911 ], "page_idx": 3 }, { "type": "text", "text": "", "bbox": [ 173, 90, 823, 119 ], "page_idx": 4 }, { "type": "text", "text": "Client Reconstruction Step: Reconstruction of local parameters is performed by algorithm $R$ . Though this algorithm can take other forms, in this work we instantiate $R$ as performing $k _ { r }$ local gradient descent steps on initialized local parameters with the global parameters frozen, using the support set $\\mathcal { D } _ { i , s }$ . We show in Section 4.2 this naturally optimizes a well-motivated meta learning objective. Interestingly, this approach is related to gradient-based alternating minimization, a historically successful method for training factored models [26, 32]. ", "bbox": [ 173, 126, 825, 209 ], "page_idx": 4 }, { "type": "text", "text": "A potential concern with reconstruction is that this may lead to additional client computation cost compared to storing local parameters on clients. However, since clients are unlikely to be reached repeatedly by large-scale cross-device training, in practice this cost is similar to the cost of initializing these local parameters and training them with stateful clients. Additionally, reconstruction provides a natural way for new clients unseen during training to produce their own partially local models offline (see Section 4.1)–without this step, the vast majority of clients would not be able to use the model. Finally, in Section 4.2 we argue and in Section 5.2 we empirically demonstrate that with our approach just one local gradient descent step can yield successful reconstruction because global parameters are being trained for fast reconstruction of local parameters. ", "bbox": [ 173, 215, 825, 340 ], "page_idx": 4 }, { "type": "text", "text": "Client Update Step: Client updates of global parameters are performed by update algorithm $U$ . In this work we instantiate $U$ as performing $k _ { u }$ local gradient descent steps on the global parameters, using the query set $\\mathcal { D } _ { i , q }$ . ", "bbox": [ 174, 345, 825, 388 ], "page_idx": 4 }, { "type": "text", "text": "Server Update Step: We build on the generalized FEDAVG formulation proposed by Reddi et al. [48], treating aggregated global parameter updates as an \"antigradient\" that can be input into different server optimizers (SGD is shown in Algorithm 1). Note that the server update operates on a weighted average of client updates as in McMahan et al. [44], weighted by $n _ { i } = | \\mathcal { D } _ { i , q } |$ . ", "bbox": [ 174, 395, 825, 450 ], "page_idx": 4 }, { "type": "text", "text": "We refer to the instantiation of this framework outlined here as FEDRECON below. We address frequently asked questions about FEDRECON and partially local federated learning in Appendix A. ", "bbox": [ 171, 457, 823, 484 ], "page_idx": 4 }, { "type": "text", "text": "4.1 Evaluation and Inference ", "text_level": 1, "bbox": [ 174, 502, 388, 517 ], "page_idx": 4 }, { "type": "text", "text": "To make predictions with global variables $g$ learned using Algorithm 1, clients can naturally reconstruct their local models just as they do during training, by using $R , g$ , and $\\mathcal { D } _ { i , s }$ to produce local parameters $l$ . Then $g$ and $l$ combined make up a fully trained partially local model, which can be evaluated on $\\mathcal { D } _ { i , q }$ . We refer to this evaluation approach as RECONEVAL below. Note that this can be applied to clients unseen during training (most clients in large-scale settings), enabling inference for these clients.2 ", "bbox": [ 174, 527, 825, 611 ], "page_idx": 4 }, { "type": "text", "text": "Reconstruction for inference is performed offline, independently of any federated process, so clients can perform reconstruction once and store local parameters for repeated use, optionally refreshing them periodically if they have new local data. ", "bbox": [ 176, 617, 823, 660 ], "page_idx": 4 }, { "type": "text", "text": "4.2 Connection to Meta Learning ", "text_level": 1, "bbox": [ 176, 676, 419, 693 ], "page_idx": 4 }, { "type": "text", "text": "Our framework is naturally motivated via meta learning. Given that RECONEVAL involves clients doing (gradient-based) reconstruction using global parameters, we ask: Can we train global parameters conducive to fast reconstruction of local parameters? ", "bbox": [ 176, 703, 823, 744 ], "page_idx": 4 }, { "type": "text", "text": "We can easily formulate this question in the language of model-agnostic meta learning [19]. The heterogeneous client distribution $\\mathcal { P }$ corresponds to the heterogeneous distribution of tasks; each round (episode) we sample a batch of clients in the hope of meta-generalizing to unseen clients. Each client has a support dataset for reconstruction and a query dataset for global parameter updates. Our meta-parameters are $g$ and our task-specific parameters are $l _ { i }$ for client $i$ . We want to find $g$ minimizing the objective: ", "bbox": [ 173, 751, 825, 835 ], "page_idx": 4 }, { "type": "equation", "img_path": "images/1728eb230a7817ce5c483a898860eb7b942df8c108fa96db4119dd0305c6c002.jpg", "text": "$$\n\\operatorname { \\mathbb { E } } _ { i \\sim \\mathcal { P } } f _ { i } ( g \\parallel l _ { i } ) = \\operatorname { \\mathbb { E } } _ { i \\sim \\mathcal { P } } f _ { i } ( g \\parallel R ( \\mathcal { D } _ { i , s } , \\mathcal { L } , g ) ]\n$$", "text_format": "latex", "bbox": [ 348, 843, 648, 861 ], "page_idx": 4 }, { "type": "text", "text": "where ${ \\boldsymbol { g } } \\parallel l _ { i }$ denotes the concatenation of $g$ and $l _ { i }$ and $f _ { i } ( g \\parallel l _ { i } ) = \\mathbb { E } _ { \\xi \\in \\mathcal { D } _ { i , q } } [ f _ { i } ( g \\parallel l _ { i } , \\xi ) ] ,$ . ", "bbox": [ 171, 90, 751, 107 ], "page_idx": 5 }, { "type": "text", "text": "In Appendix B we show that the instantiation of our framework where $R$ performs $k _ { r } \\geq 1$ steps of gradient descent on initialized local parameters using $\\mathcal { D } _ { i , s }$ and $U$ performs $k _ { u } = 1$ step of gradient descent using $\\mathcal { D } _ { i , q }$ is already minimizing the first-order terms in this objective (i.e., this version of FEDRECON is performing first-order meta learning). Intuitively, reconstruction corresponds to the MAML “inner loop” and the global parameter update corresponds to the “outer loop”; we test the same way we train (via reconstruction), a common pattern in meta learning. ", "bbox": [ 174, 112, 825, 195 ], "page_idx": 5 }, { "type": "text", "text": "Thus FEDRECON trains global parameters $g$ for fast reconstruction of local parameters $l$ , enabling partially local federated learning without requiring clients to maintain state. In Section 5.2 we observe that our method empirically produces $g$ more conducive to fast, performant reconstruction on unseen clients than standard centralized or federated training (e.g., see SERVER $^ +$ RECONEVAL vs. FEDRECON in Table 1). We see in Figure 3 that just one reconstruction step is sufficient to recover the majority of performance. ", "bbox": [ 174, 202, 825, 285 ], "page_idx": 5 }, { "type": "text", "text": "5 Experimental Evaluation ", "text_level": 1, "bbox": [ 176, 303, 415, 320 ], "page_idx": 5 }, { "type": "text", "text": "5.1 Tasks and Methods ", "text_level": 1, "bbox": [ 174, 333, 348, 348 ], "page_idx": 5 }, { "type": "text", "text": "We next describe experiments validating FEDRECON on matrix factorization and next word prediction. We aim to determine whether reconstruction can enable practical partially local federated learning with fast personalization for new clients, including in settings without user-specific embeddings. ", "bbox": [ 174, 359, 825, 401 ], "page_idx": 5 }, { "type": "text", "text": "5.1.1 Matrix Factorization ", "text_level": 1, "bbox": [ 174, 415, 370, 430 ], "page_idx": 5 }, { "type": "text", "text": "We evaluate on federated matrix factorization using the popular MovieLens 1M collaborative filtering dataset [29]. We perform two kinds of evaluation: ", "bbox": [ 176, 439, 825, 467 ], "page_idx": 5 }, { "type": "text", "text": "1. STANDARDEVAL on seen users, those users who participated in at least one round of federated training. We split each user’s ratings into $80 \\%$ train, $10 \\%$ validation, and $10 \\%$ test by timestamp. We train on all users’ train ratings, and report results on users test ratings. \n2. RECONEVAL on unseen users, those users who did not participate at all during federated training. We split the users randomly into $80 \\%$ train, $10 \\%$ validation, and $10 \\%$ test; we train with the train users and report results on test users. ", "bbox": [ 210, 478, 825, 565 ], "page_idx": 5 }, { "type": "text", "text": "The model learns $P$ and $Q$ such that $R \\approx P Q ^ { \\top }$ as discussed in Section 3, with embedding dimensionality $K = 5 0$ . We apply FEDRECON with local user embeddings $P _ { u }$ and global item matrix $Q$ . We report root-mean-square-error (RMSE) and rating prediction accuracy. We compare centralized training, FEDAVG, and FEDRECON in Table 1. See also Appendix C.1 for more details on the dataset, model, and hyperparameter choices. ", "bbox": [ 174, 575, 825, 646 ], "page_idx": 5 }, { "type": "text", "text": "5.1.2 Next Word Prediction ", "text_level": 1, "bbox": [ 174, 659, 379, 674 ], "page_idx": 5 }, { "type": "text", "text": "We also aim to determine whether Federated Reconstruction can be successfully applied in settings without user-specific embeddings to improve robustness to client heterogeneity and communication cost, since our approach is agnostic to which parameters are chosen as local/global. We apply FEDRECON to next word prediction because the task provides a natural motivation for personalization: different clients often have highly heterogeneous data, e.g., if they use different slang, but language models typically have a fixed vocabulary. We propose improving the ability of a language model to capture diverse inputs using local out-of-vocabulary (OOV) embeddings. OOV embeddings are a common application of the hashing trick [54] in deep learning; combining them with FEDRECON enables language models to effectively allow for personal input vocabularies for different clients. For example, if client $i$ frequently uses OOV token $t _ { i }$ and client $j$ uses OOV token $t _ { j }$ , each client’s corresponding local OOV embedding can learn to reflect this (even if the OOV embeddings collide). So adding local OOV embeddings with the core global vocabulary fixed can lead to improved personalization without more communication per round; we will also show that we can reduce the size of the core model (reducing communication) and get further benefits. ", "bbox": [ 174, 683, 825, 876 ], "page_idx": 5 }, { "type": "text", "text": "We perform next word prediction with the federated Stack Overflow dataset introduced in TensorFlow [51]. We use an LSTM model and process data similarly to Reddi et al. [48], comparing to their best ", "bbox": [ 174, 882, 821, 911 ], "page_idx": 5 }, { "type": "table", "img_path": "images/814b021dbc1023bf937858a6a1dbc1e301a44a043a292d6f0862c6d8e776bf81.jpg", "table_caption": [ "Table 1: Movielens matrix factorization root-mean-square-error (lower is better) and rating prediction accuracy (higher is better). STANDARDEVAL is on seen users, RECONEVAL is on held-out users. Results within $2 \\%$ of best for each metric are in bold. " ], "table_footnote": [], "table_body": "<table><tr><td></td><td>RMSE↓</td><td>ACCURACY↑</td></tr><tr><td>CENTRALIZED+STANDARDEVAL</td><td>.923</td><td>43.2</td></tr><tr><td>CENTRALIZED+RECONEVAL</td><td>1.36</td><td>40.8</td></tr><tr><td>FEDAVG + STANDARD EVAL</td><td>.939</td><td>41.5</td></tr><tr><td>FEDAVG +RECONEVAL</td><td>.934</td><td>40.0</td></tr><tr><td>FEDRECON(OURS)</td><td>.907</td><td>43.3</td></tr></table>", "bbox": [ 289, 147, 705, 241 ], "page_idx": 6 }, { "type": "table", "img_path": "images/5bdfa76120d8de367a39a786febb1e934399fbeb230f2f36f45d7f71e2df6d4d.jpg", "table_caption": [ "Table 2: Stack Overflow next word prediction accuracy and communication per round, per client. FEDYOGI and OOV/FULL FINETUNING require communication of all model parameters, FEDRECON does not (see Figure 2). Results within $2 \\%$ of best for each vocabulary size are in bold. " ], "table_footnote": [], "table_body": "<table><tr><td>VOCAB. SIZE</td><td>1K</td><td>5K</td><td>10K</td><td>COMMUNICATION</td></tr><tr><td>FEDYOGI</td><td>24.3</td><td>26.3</td><td>26.7</td><td>2|+2lg|</td></tr><tr><td>FEDRECON (100V)</td><td>24.1</td><td>26.2</td><td>26.4</td><td>2|gl</td></tr><tr><td>FEDRECON (500 OOV)</td><td>29.6</td><td>28.1</td><td>27.7</td><td>21g</td></tr><tr><td>OOV FINETUNING (500 OOV)</td><td>30.0</td><td>28.1</td><td>27.9</td><td>2|+2lgl</td></tr><tr><td>FULL FINETUNING (500 OOV)</td><td>30.8</td><td>29.2</td><td>28.8</td><td>2||+2|gl</td></tr><tr><td>FEDRECON+FINETUNE (50O OOV)</td><td>30.7</td><td>28.9</td><td>28.6</td><td>2lgl</td></tr></table>", "bbox": [ 235, 310, 758, 421 ], "page_idx": 6 }, { "type": "text", "text": "FEDYOGI result. To demonstrate that reconstruction can be used to reduce model size, we describe experiments with vocabulary sizes [1000, 5000, 10,000]. See Appendix C.2 for details on the dataset, model, and hyperparameter choices. ", "bbox": [ 176, 440, 825, 481 ], "page_idx": 6 }, { "type": "text", "text": "5.2 Results and Discussion ", "text_level": 1, "bbox": [ 174, 502, 370, 517 ], "page_idx": 6 }, { "type": "text", "text": "In Tables 1 and 2 we present results for matrix factorization and next word prediction for FEDRECON and baselines. We call out several key comparisons below; more results can be found in Appendix D. ", "bbox": [ 171, 530, 823, 559 ], "page_idx": 6 }, { "type": "text", "text": "For the MovieLens task FEDRECON is able to match the performance of CENTRALIZED $^ +$ STANDARD EVAL despite performing a more difficult task: as described in Section 5.1.1, FEDRECON is using RECONEVAL to evaluate on held-out users, reconstructing user embeddings for them and then evaluating. As is typical for server-trained matrix factorization models, CENTRALIZED $^ +$ STANDARD EVAL is only being evaluated on held-out ratings for seen users. Note that we would not be able to evaluate on unseen users since they do not have trained user embeddings (randomly initializing them produces garbage results). If we reconstruct user embeddings for unseen users and then evaluate as in CENTRALIZED $^ +$ RECONEVAL (we argue this is a fairer comparison with FEDRECON), we see that performance is significantly worse than FEDRECON and server-evaluation on seen users. One interesting finding was that the results of this seemed to vary widely across different users, with some users reconstructing embeddings no better than random initialization, while most others reconstructed better embeddings.3 We see a similar result with FEDAVG for the MovieLens task, where FEDAVG with standard evaluation on seen users4 performs a bit worse than CENTRALIZED $^ +$ STANDARD EVAL, and performance for RECONEVAL on unseen users is significantly worse than FEDRECON. This indicates that FEDRECON is doing a better job of training global parameters so they can reconstruct local parameters than other approaches, as motivated in Section 4.2. Moreover, FEDRECON is doing this despite not having direct access to the data or the user-specific parameters–enabling this approach in settings where centralized training or FEDAVG is impossible. ", "bbox": [ 174, 564, 825, 813 ], "page_idx": 6 }, { "type": "image", "img_path": "images/b19182c05c8df5addd5db9b1ac7dcee1ce46b13bd43fdb0e428aec068a457fed.jpg", "image_caption": [ "Figure 2: Accuracy as a function of total parameters communicated across all clients for FEDRECON and baselines for Stack Overflow next word prediction. " ], "image_footnote": [], "bbox": [ 339, 92, 658, 220 ], "page_idx": 7 }, { "type": "image", "img_path": "images/a4fdd7a9d62f3174f7d48dfb6dac275bfe3b9e0619ab1ff8919635a024bd7164.jpg", "image_caption": [ "Figure 3: Accuracy compared to base FEDRECON when varying the number of reconstruction steps for local parameters (left plot) and client update steps for global parameters (right plot). " ], "image_footnote": [], "bbox": [ 212, 272, 787, 388 ], "page_idx": 7 }, { "type": "text", "text": "In the first section of the Stack Overflow results in Table 2, we compare FEDYOGI (an adaptive variant of FEDAVG introduced by Reddi et al. [48]) with FEDRECON, showing that enabling FEDRECON with 500 local OOV embeddings significantly boosts accuracy for every vocabulary size. Interestingly, we observe that accuracy actually improves for smaller vocabulary sizes for FEDRECON $( 5 0 0 \\mathrm { O O V } )$ , whereas the reverse holds for FEDYOGI and FEDRECON (1 OOV). We posit that this is because decreasing the vocabulary size effectively increases the amount of \"training data\" available for the local part of the model, since OOV embeddings are only used (and trained) when tokens are out-ofvocabulary; this is useful only when the local part of the model has sufficient capacity via the number of OOV embeddings. This hypothesis is consistent with vocabulary coverage: a 10K vocabulary covers $8 6 . 9 \\%$ of the tokens in the dataset, a 5K vocabulary covers $8 0 . 1 \\%$ , and a 1K vocabulary covers $4 9 . 2 \\%$ ; we see that difference in results for FEDRECON $( 5 0 0 \\mathrm { O O V } )$ is greater between 1K and 5K than between 5K and 10K. We caution that reducing vocabulary size may be undesirable in some cases: reducing the size of the vocabulary also restricts the output tokens of the model. ", "bbox": [ 174, 441, 826, 621 ], "page_idx": 7 }, { "type": "text", "text": "Comparing with Finetuning: In Table 2 we compare FEDRECON with FINETUNING [52, 58] to study whether reconstruction can provide similar benefits as global personalization methods. In our implementation we train a fully global model using FEDYOGI, perform local gradient steps to finetune part of the model using the support set, and then evaluate on the query set (same sets as used for FEDRECON). For OOV FINETUNING, the OOV parameters only are finetuned using the support set (comparable to FEDRECON), and for FULL FINETUNING all parameters are finetuned. Comparing FEDRECON $( 5 0 0 \\ \\mathrm { O O V } )$ and OOV FINETUNING, we see that reconstructing local embeddings performs similarly to finetuning pre-trained OOV embeddings, despite FEDRECON not communicating the local parameters $l$ to the server. FULL FINETUNING from Table 2 achieves better accuracy since all parameters are finetuned. To compare this fairly with reconstruction, we perform FEDRECON $^ +$ FINETUNE, where the support set is used first to reconstruct local parameters and then to finetune global parameters before evaluation. We also see that we can get comparable results, indicating that reconstruction can enable personalization on (potentially privacy-sensitive) local parameters while reducing communication. See Figure 2 for a comparison of different approaches by the total number of parameters communicated–we see an advantage for FEDRECON, particularly for lower total communication. ", "bbox": [ 174, 628, 825, 849 ], "page_idx": 7 }, { "type": "text", "text": "Varying Reconstruction Steps: In Section 4.2 we described a connection between our framework and MAML [19], which has been a successful paradigm for fast adaptation to tasks with few steps. In Figure 3 we perform FEDRECON for varying numbers of reconstruction steps $k _ { r } \\in [ 0 , 1 , 2 , 5 , 1 0 ]$ and plot the accuracy as a fraction of accuracy across tasks from Tables 1 and 2. We see that for zero reconstruction steps (an ablation skipping reconstruction), MovieLens accuracy is 0.0, as expected (all user embeddings are randomly initialized). Relative accuracy for Stack Overflow NWP settings remains above $90 \\%$ , suggesting that for this task clients can still perform inference with a FEDRECON-trained model even without any data to reconstruct. Importantly, just one reconstruction step is required to recover the majority of remaining performance across both tasks, indicating that FEDRECON learns global parameters conducive to fast reconstruction. ", "bbox": [ 174, 856, 825, 911 ], "page_idx": 7 }, { "type": "text", "text": "", "bbox": [ 174, 92, 825, 174 ], "page_idx": 8 }, { "type": "text", "text": "Varying Client Update Steps: In Section 4.2 we showed that gradient-based FEDRECON, involving $k _ { r } \\geq 1$ reconstruction steps and $k _ { u } = 1$ client update steps, is minimizing a first-order meta learning objective for training global parameters that yield good reconstructions. In Figure 3 we perform FEDRECON with $k _ { u } \\in [ 1 , 2 , 5 , 1 0 ]$ and compute relative accuracy as a fraction of accuracy across tasks from Tables 1 and 2. For each experiment we run for a fixed number of rounds. We see that 1 step recovers almost all of the accuracy and adding more steps gradually increases accuracy further. Interestingly, we observe that for $k _ { u } = 1$ training proceeds significantly slower than for other values such that performance is still slightly increasing after the fixed number of rounds. This is analogous to the difference between FEDAVG and FEDSGD [44]. While FEDSGD is optimizing the original learning objective, FEDAVG often achieves similar performance in significantly fewer rounds by adding multiple gradient steps on aggregated parameters. ", "bbox": [ 174, 181, 825, 333 ], "page_idx": 8 }, { "type": "text", "text": "We present further baselines and ablations in Appendix D. ", "bbox": [ 174, 339, 553, 353 ], "page_idx": 8 }, { "type": "text", "text": "6 Open-Source Library ", "text_level": 1, "bbox": [ 174, 378, 385, 397 ], "page_idx": 8 }, { "type": "text", "text": "We are releasing a code framework for expressing and evaluating practical partially local federated models built on the popular TensorFlow Federated library [50]. The code is released under Apache License 2.0. In addition to allowing for easy reproduction of our experiments, the framework provides a flexible, well-documented interface for researchers and modelers to run simulations in this setting with models and tasks of their choice. Users can take any existing Keras model and plug it into this framework with just a few lines of code. We provide libraries for training and evaluation for MovieLens matrix factorization and Stack Overflow next word prediction, which can be easily extended for new tasks. We hope that the release of this framework spurs further research and lowers the barrier to more practical applications. ", "bbox": [ 173, 415, 825, 540 ], "page_idx": 8 }, { "type": "text", "text": "7 Deployment in a Mobile Keyboard Application ", "text_level": 1, "bbox": [ 173, 564, 596, 583 ], "page_idx": 8 }, { "type": "text", "text": "A key differentiator of our method is that it scales to practical training and inference in cross-device settings with large populations. To validate this, we deployed FEDRECON to a mobile keyboard application with hundreds of millions of federated learning clients. We used a system similar to Bonawitz et al. [7] to deploy FEDRECON for training. Note that the system does not support stateful clients given the issues with large-scale stateful training described in Section 4, so a stateless approach was necessary for deployment. ", "bbox": [ 174, 599, 825, 684 ], "page_idx": 8 }, { "type": "text", "text": "Users of the mobile keyboard application often use expressions (GIFs, stickers) to communicate with others in e.g., chat applications. Different users are highly heterogeneous in the style of expressions they use, which makes the problem a natural fit for collaborative filtering to predict new expressions a user might want to share. We trained matrix factorization models as described in Section 5.1.1, where the number of items ranged from hundreds to tens of thousands depending on the type of expression. ", "bbox": [ 174, 690, 825, 760 ], "page_idx": 8 }, { "type": "text", "text": "Training in production brought challenges due to data sparsity. Depending on the task, some clients had very few examples, if e.g., they didn’t commonly share stickers via the keyboard application. To ensure clients with just one example weren’t just adding noise to the training process by participating, we oversampled clients and filtered out the contributions of clients without at least some number of examples. We reused examples between the support and query sets as described in Appendix D to ensure all examples were used for both reconstruction and global updates. ", "bbox": [ 174, 765, 825, 849 ], "page_idx": 8 }, { "type": "text", "text": "Another practical challenge we faced was orthogonal to our method and commonly faced in realworld federated learning applications: heterogeneity in client resources and availability meant that some participating clients would drop out before sending updates to the server. We found that the simple strategy of oversampling clients and neglecting updates from dropped-out clients appeared to perform well, but we believe studying the fairness implications of this is a valuable area for future work. ", "bbox": [ 176, 856, 825, 911 ], "page_idx": 8 }, { "type": "text", "text": "", "bbox": [ 174, 92, 823, 119 ], "page_idx": 9 }, { "type": "text", "text": "After successful training, the resulting model was deployed for inference in predicting potential new expressions a user might share, which led to an increase of $2 9 . 3 \\%$ in click-through-rate for expression recommendations. We hope that this successful deployment of FEDRECON demonstrates the practicality of our approach and leads the way for further real-world applications. ", "bbox": [ 174, 126, 825, 181 ], "page_idx": 9 }, { "type": "text", "text": "8 Conclusion ", "text_level": 1, "bbox": [ 174, 200, 297, 217 ], "page_idx": 9 }, { "type": "text", "text": "We introduced Federated Reconstruction, a model-agnostic framework for fast partially local federated learning suitable for training and inference at scale. We justified FEDRECON via a connection to meta learning and empirically validated the algorithm for collaborative filtering and next message prediction, showing that it can improve performance on unseen clients and enable fast personalization with less communication. We also released an open-source library for partially local federated learning and described a successful production deployment. Future work may explore the optimal balance of local and global parameters and the application of differential privacy to global parameters (see Appendix E). ", "bbox": [ 174, 231, 825, 342 ], "page_idx": 9 }, { "type": "text", "text": "Acknowledgments and Disclosure of Funding ", "text_level": 1, "bbox": [ 174, 361, 553, 378 ], "page_idx": 9 }, { "type": "text", "text": "We thank Brendan McMahan, Lin Ning, Zachary Charles, Warren Morningstar, Daniel Ramage, Jakub Konecnˇ ý, Blaise Agüera y Arcas, and Jay Yagnik from Google Research for their helpful comments and discussions. We also thank Wei Li, Matt Newton, and Yang Lu for their collaboration towards deployment. ", "bbox": [ 174, 392, 825, 448 ], "page_idx": 9 }, { "type": "text", "text": "References ", "text_level": 1, "bbox": [ 174, 468, 266, 483 ], "page_idx": 9 }, { "type": "text", "text": "[1] Martin Abadi, Andy Chu, Ian Goodfellow, H Brendan McMahan, Ilya Mironov, Kunal Talwar, and Li Zhang. 2016. Deep learning with differential privacy. In Proceedings of the 2016 ACM SIGSAC Conference on Computer and Communications Security. 308–318. \n[2] Muhammad Ammad-Ud-Din, Elena Ivannikova, Suleiman A Khan, Were Oyomno, Qiang Fu, Kuan Eeik Tan, and Adrian Flanagan. 2019. Federated Collaborative Filtering for PrivacyPreserving Personalized Recommendation System. arXiv preprint arXiv:1901.09888 (2019). \n[3] Apple. 2019. Designing for Privacy (video and slide deck). Apple WWDC, https: //developer.apple.com/videos/play/wwdc2019/708. \n[4] Manoj Ghuhan Arivazhagan, Vinay Aggarwal, Aaditya Kumar Singh, and Sunav Choudhary. 2019. Federated learning with personalization layers. arXiv preprint arXiv:1912.00818 (2019). \n[5] Raef Bassily, Vitaly Feldman, Kunal Talwar, and Abhradeep Thakurta. 2019. Private Stochastic Convex Optimization with Optimal Rates. CoRR abs/1908.09970 (2019). arXiv:1908.09970 http://arxiv.org/abs/1908.09970 \n[6] Raef Bassily, Adam D. Smith, and Abhradeep Thakurta. 2014. Private Empirical Risk Minimization, Revisited. CoRR abs/1405.7085 (2014). arXiv:1405.7085 http://arxiv.org/ abs/1405.7085 \n[7] Keith Bonawitz, Hubert Eichner, Wolfgang Grieskamp, Dzmitry Huba, Alex Ingerman, Vladimir Ivanov, Chloe Kiddon, Jakub Konecnˇ y, Stefano Mazzocchi, H Brendan McMahan, et al \\` . 2019. Towards federated learning at scale: System design. arXiv preprint arXiv:1902.01046 (2019). \n[8] Keith Bonawitz, Vladimir Ivanov, Ben Kreuter, Antonio Marcedone, H Brendan McMahan, Sarvar Patel, Daniel Ramage, Aaron Segal, and Karn Seth. 2017. Practical secure aggregation for privacy-preserving machine learning. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security. 1175–1191. \n[9] Di Chai, Leye Wang, Kai Chen, and Qiang Yang. 2020. Secure federated matrix factorization. IEEE Intelligent Systems (2020). \n[10] Fei Chen, Mi Luo, Zhenhua Dong, Zhenguo Li, and Xiuqiang He. 2018. Federated metalearning with fast convergence and efficient communication. arXiv preprint arXiv:1802.07876 (2018). \n[11] NVIDIA Clara. 2019. The Clara Training Framework Authors. https://developer. nvidia.com/clara \n[12] Creative Commons. 2002. Attribution-ShareAlike 3.0 Unported. https:// creativecommons.org/licenses/by-sa/3.0/ \n[13] Walter de Brouwer. 2019. The Federated Future is ready for shipping. https://doc.ai/ blog/federated-future-ready-shipping/. \n[14] Yuyang Deng, Mohammad Mahdi Kamani, and Mehrdad Mahdavi. 2020. Adaptive Personalized Federated Learning. arXiv preprint arXiv:2003.13461 (2020). \n[15] Enmao Diao, Jie Ding, and Vahid Tarokh. 2020. HeteroFL: Computation and communication efficient federated learning for heterogeneous clients. arXiv preprint arXiv:2010.01264 (2020). \n[16] Canh T Dinh, Nguyen H Tran, and Tuan Dung Nguyen. 2020. Personalized federated learning with Moreau envelopes. arXiv preprint arXiv:2006.08848 (2020). \n[17] Cynthia Dwork, Aaron Roth, et al. 2014. The algorithmic foundations of differential privacy. Foundations and Trends in Theoretical Computer Science 9, 3-4 (2014), 211–407. \n[18] Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar. 2020. Personalized federated learning: A meta-learning approach. arXiv preprint arXiv:2002.07948 (2020). \n[19] Chelsea Finn, Pieter Abbeel, and Sergey Levine. 2017. Model-agnostic meta-learning for fast adaptation of deep networks. arXiv preprint arXiv:1703.03400 (2017). \n[20] Adrian Flanagan, Were Oyomno, Alexander Grigorievskiy, Kuan Eeik Tan, Suleiman A Khan, and Muhammad Ammad-Ud-Din. 2020. Federated Multi-view Matrix Factorization for Personalized Recommendations. arXiv preprint arXiv:2004.04256 (2020). \n[21] Dashan Gao, Ben Tan, Ce Ju, Vincent W Zheng, and Qiang Yang. 2020. Privacy Threats Against Federated Matrix Factorization. arXiv preprint arXiv:2007.01587 (2020). \n[22] Suyu Ge, Fangzhao Wu, Chuhan Wu, Tao Qi, Yongfeng Huang, and Xing Xie. 2020. Fedner: Privacy-preserving medical named entity recognition with federated learning. arXiv preprint arXiv:2003.09288 (2020). \n[23] Jonas Geiping, Hartmut Bauermeister, Hannah Dröge, and Michael Moeller. 2020. Inverting Gradients–How easy is it to break privacy in federated learning? arXiv preprint arXiv:2003.14053 (2020). \n[24] Robin C Geyer, Tassilo Klein, and Moin Nabi. 2017. Differentially private federated learning: A client level perspective. arXiv preprint arXiv:1712.07557 (2017). \n[25] GroupLens. 2015. MovieLens 1M License. https://files.grouplens.org/datasets/ movielens/ml-1m-README.txt \n[26] Asela Gunawardana, William Byrne, and Michael I Jordan. 2005. Convergence Theorems for Generalized Alternating Minimization Procedures. Journal of machine learning research 6, 12 (2005). \n[27] Filip Hanzely and Peter Richtárik. 2020. Federated learning of a mixture of global and local models. arXiv preprint arXiv:2002.05516 (2020). \n[28] Andrew Hard, Kanishka Rao, Rajiv Mathews, Swaroop Ramaswamy, Françoise Beaufays, Sean Augenstein, Hubert Eichner, Chloé Kiddon, and Daniel Ramage. 2018. Federated learning for mobile keyboard prediction. arXiv preprint arXiv:1811.03604 (2018). \n[29] F Maxwell Harper and Joseph A Konstan. 2015. The movielens datasets: History and context. Acm transactions on interactive intelligent systems (tiis) 5, 4 (2015), 1–19. ", "bbox": [ 179, 491, 828, 912 ], "page_idx": 9 }, { "type": "text", "text": "", "bbox": [ 171, 66, 828, 919 ], "page_idx": 10 }, { "type": "text", "text": "[30] Yifan Hu, Yehuda Koren, and Chris Volinsky. 2008. Collaborative filtering for implicit feedback datasets. In 2008 Eighth IEEE International Conference on Data Mining. Ieee, 263–272. ", "bbox": [ 169, 90, 825, 121 ], "page_idx": 11 }, { "type": "text", "text": "[31] Yutao Huang, Lingyang Chu, Zirui Zhou, Lanjun Wang, Jiangchuan Liu, Jian Pei, and Yong Zhang. 2021. Personalized cross-silo federated learning on non-iid data. In Proceedings of the AAAI Conference on Artificial Intelligence, Vol. 35. 7865–7873. ", "bbox": [ 174, 130, 820, 172 ], "page_idx": 11 }, { "type": "text", "text": "[32] Prateek Jain, Praneeth Netrapalli, and Sujay Sanghavi. 2013. Low-rank matrix completion using alternating minimization. In Proceedings of the forty-fifth annual ACM symposium on Theory of computing. 665–674. ", "bbox": [ 174, 183, 826, 226 ], "page_idx": 11 }, { "type": "text", "text": "[33] Yihan Jiang, Jakub Konecnˇ y, Keith Rush, and Sreeram Kannan. 2019. Improving federated \\` learning personalization via model agnostic meta learning. arXiv preprint arXiv:1909.12488 (2019). ", "bbox": [ 174, 236, 826, 277 ], "page_idx": 11 }, { "type": "text", "text": "[34] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. 2019. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977 (2019). ", "bbox": [ 174, 287, 826, 344 ], "page_idx": 11 }, { "type": "text", "text": "[35] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. 2020. Scaffold: Stochastic controlled averaging for federated learning. In International Conference on Machine Learning. PMLR, 5132–5143. ", "bbox": [ 174, 354, 823, 398 ], "page_idx": 11 }, { "type": "text", "text": "[36] Mikhail Khodak, Maria-Florina F Balcan, and Ameet S Talwalkar. 2019. Adaptive gradientbased meta-learning methods. In Advances in Neural Information Processing Systems. 5917– 5928. ", "bbox": [ 174, 406, 826, 450 ], "page_idx": 11 }, { "type": "text", "text": "[37] Yehuda Koren, Robert Bell, and Chris Volinsky. 2009. Matrix factorization techniques for recommender systems. Computer 42, 8 (2009), 30–37. ", "bbox": [ 171, 460, 825, 489 ], "page_idx": 11 }, { "type": "text", "text": "[38] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. 2020. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine 37, 3 (2020), 50–60. ", "bbox": [ 173, 500, 828, 541 ], "page_idx": 11 }, { "type": "text", "text": "[39] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. 2018. Federated optimization in heterogeneous networks. arXiv preprint arXiv:1812.06127 (2018). ", "bbox": [ 171, 551, 825, 594 ], "page_idx": 11 }, { "type": "text", "text": "[40] Xiaoxiao Li, Meirui Jiang, Xiaofei Zhang, Michael Kamp, and Qi Dou. 2021. Fedbn: Federated learning on non-iid features via local batch normalization. arXiv preprint arXiv:2102.07623 (2021). ", "bbox": [ 173, 604, 825, 647 ], "page_idx": 11 }, { "type": "text", "text": "[41] Paul Pu Liang, Terrance Liu, Liu Ziyin, Ruslan Salakhutdinov, and Louis-Philippe Morency. 2020. Think locally, act globally: Federated learning with local and global representations. arXiv preprint arXiv:2001.01523 (2020). ", "bbox": [ 174, 657, 826, 700 ], "page_idx": 11 }, { "type": "text", "text": "[42] Yujie Lin, Pengjie Ren, Zhumin Chen, Zhaochun Ren, Dongxiao Yu, Jun Ma, Maarten de Rijke, and Xiuzhen Cheng. 2020. Meta Matrix Factorization for Federated Rating Predictions. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval. 981–990. ", "bbox": [ 174, 710, 826, 767 ], "page_idx": 11 }, { "type": "text", "text": "[43] Yishay Mansour, Mehryar Mohri, Jae Ro, and Ananda Theertha Suresh. 2020. Three approaches for personalization with applications to federated learning. arXiv preprint arXiv:2002.10619 (2020). ", "bbox": [ 171, 776, 825, 819 ], "page_idx": 11 }, { "type": "text", "text": "[44] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. 2017. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics. PMLR, 1273–1282. ", "bbox": [ 173, 830, 823, 872 ], "page_idx": 11 }, { "type": "text", "text": "[45] H Brendan McMahan, Daniel Ramage, Kunal Talwar, and Li Zhang. 2017. Learning differentially private recurrent language models. arXiv preprint arXiv:1710.06963 (2017). ", "bbox": [ 171, 882, 821, 911 ], "page_idx": 11 }, { "type": "text", "text": "[46] Alex Nichol, Joshua Achiam, and John Schulman. 2018. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999 (2018). \n[47] Valeria Nikolaenko, Stratis Ioannidis, Udi Weinsberg, Marc Joye, Nina Taft, and Dan Boneh. 2013. Privacy-preserving matrix factorization. In Proceedings of the 2013 ACM SIGSAC conference on Computer & communications security. 801–812. \n[48] Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\\` Sanjiv Kumar, and H Brendan McMahan. 2020. Adaptive Federated Optimization. arXiv preprint arXiv:2003.00295 (2020). \n[49] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet Talwalkar. 2017. Federated multi-task learning. arXiv preprint arXiv:1705.10467 (2017). \n[50] TensorFlow. 2019. TensorFlow Federated. https://www.tensorflow.org/federated \n[51] TensorFlow. 2019. TensorFlow Federated Stack Overflow Dataset. https: //www.tensorflow.org/federated/api_docs/python/tff/simulation/datasets/ stackoverflow/load_data \n[52] Kangkang Wang, Rajiv Mathews, Chloé Kiddon, Hubert Eichner, Françoise Beaufays, and Daniel Ramage. 2019. Federated evaluation of on-device personalization. arXiv preprint arXiv:1910.10252 (2019). \n[53] Wenqi Wei, Ling Liu, Margaret Loper, Ka-Ho Chow, Mehmet Emre Gursoy, Stacey Truex, and Yanzhao Wu. 2020. A framework for evaluating gradient leakage attacks in federated learning. arXiv preprint arXiv:2004.10397 (2020). \n[54] Kilian Weinberger, Anirban Dasgupta, John Langford, Alex Smola, and Josh Attenberg. 2009. Feature hashing for large scale multitask learning. In Proceedings of the 26th annual international conference on machine learning. 1113–1120. \n[55] Xi Wu, Arun Kumar, Kamalika Chaudhuri, Somesh Jha, and Jeffrey F. Naughton. 2016. Differentially Private Stochastic Gradient Descent for in-RDBMS Analytics. CoRR abs/1606.04722 (2016). arXiv:1606.04722 http://arxiv.org/abs/1606.04722 \n[56] Timothy Yang, Galen Andrew, Hubert Eichner, Haicheng Sun, Wei Li, Nicholas Kong, Daniel Ramage, and Françoise Beaufays. 2018. Applied federated learning: Improving google keyboard query suggestions. arXiv preprint arXiv:1812.02903 (2018). \n[57] Hongxu Yin, Arun Mallya, Arash Vahdat, Jose M Alvarez, Jan Kautz, and Pavlo Molchanov. 2021. See through Gradients: Image Batch Recovery via GradInversion. arXiv preprint arXiv:2104.07586 (2021). \n[58] Tao Yu, Eugene Bagdasaryan, and Vitaly Shmatikov. 2020. Salvaging federated learning by local adaptation. arXiv preprint arXiv:2002.04758 (2020). \n[59] Ligeng Zhu and Song Han. 2020. Deep leakage from gradients. In Federated Learning. Springer, 17–31. ", "bbox": [ 169, 90, 828, 719 ], "page_idx": 12 }]123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537# RANDOM FEATURE ATTENTION
Hao Peng♠∗ Nikolaos Pappas♠ Dani Yogatama♣ Roy Schwartz♥ Noah A. Smith♠♦ Lingpeng $\mathbf { K o n g } ^ { \bullet \ast }$
♠Paul G. Allen School of Computer Science & Engineering, University of Washington ♣DeepMind ♦Allen Institute for Artificial Intelligence ♥School of Computer Science & Engineering, Hebrew University of Jerusalem ♦Department of Computer Science , The University of Hong Kong {hapeng,npappas,nasmith}@cs.washington.edu dyogatama@google.com, roys@cs.huji.ac.il, lpk@cs.hku.hk
# ABSTRACT
Transformers are state-of-the-art models for a variety of sequence modeling tasks. At their core is an attention function which models pairwise interactions between the inputs at every timestep. While attention is powerful, it does not scale efficiently to long sequences due to its quadratic time and space complexity in the sequence length. We propose RFA, a linear time and space attention that uses random feature methods to approximate the softmax function, and explore its application in transformers. RFA can be used as a drop-in replacement for conventional softmax attention and offers a straightforward way of learning with recency bias through an optional gating mechanism. Experiments on language modeling and machine translation demonstrate that RFA achieves similar or better performance compared to strong transformer baselines. In the machine translation experiment, RFA decodes twice as fast as a vanilla transformer. Compared to existing efficient transformer variants, RFA is competitive in terms of both accuracy and efficiency on three long text classification datasets. Our analysis shows that RFA’s efficiency gains are especially notable on long sequences, suggesting that RFA will be particularly useful in tasks that require working with large inputs, fast decoding speed, or low memory footprints.
# 1 INTRODUCTION
Transformer architectures (Vaswani et al., 2017) have achieved tremendous success on a variety of sequence modeling tasks (Ott et al., 2018; Radford et al., 2018; Parmar et al., 2018; Devlin et al., 2019; Parisotto et al., 2020, inter alia). Under the hood, the key component is attention (Bahdanau et al., 2015), which models pairwise interactions of the inputs, regardless of their distances from each other. This comes with quadratic time and memory costs, making the transformers computationally expensive, especially for long sequences. A large body of research has been devoted to improving their time and memory efficiency (Tay et al., 2020c). Although better asymptotic complexity and prominent gains for long sequences have been achieved (Lee et al., 2019; Child et al., 2019; Beltagy et al., 2020, inter alia), in practice, many existing approaches are less well-suited for moderatelength ones: the additional computation steps required by some approaches can overshadow the time and memory they save (Kitaev et al., 2020; Wang et al., 2020; Roy et al., 2020, inter alia).
This work proposes random feature attention (RFA), an efficient attention variant that scales linearly in sequence length in terms of time and space, and achieves practical gains for both long and moderate length sequences. RFA builds on a kernel perspective of softmax (Rawat et al., 2019). Using the well-established random feature maps (Rahimi & Recht, 2007; Avron et al., 2016; $\ S 2$ ), RFA approximates the dot-then-exponentiate function with a kernel trick (Hofmann et al., 2008): $\exp ( \mathbf { x } \cdot \mathbf { y } ) \approx \phi ( \mathbf { x } ) \cdot \phi ( \mathbf { y } )$ . Inspired by its connections to gated recurrent neural networks (Hochreiter & Schmidhuber, 1997; Cho et al., 2014) and fast weights (Schmidhuber, 1992), we further augment RFA with an optional gating mechanism, offering a straightforward way of learning with recency bias when locality is desired.
RFA and its gated variant (§3) can be used as a drop-in substitute for the canonical softmax attention, and increase the number of parameters by less than $0 . 1 \%$ . We explore its applications in transformers on language modeling, machine translation, and long text classification $( \ S 4 )$ . Our experiments show that RFA achieves comparable performance to vanilla transformer baselines in all tasks, while outperforming a recent related approach (Katharopoulos et al., 2020). The gating mechanism proves particularly useful in language modeling: the gated variant of RFA outperforms the transformer baseline on WikiText-103. RFA shines in decoding, even for shorter sequences. In our head-to-head comparison on machine translation benchmarks, RFA decodes around $2 \times$ faster than a transformer baseline, without accuracy loss. Comparisons to several recent efficient transformer variants on three long text classification datasets show that RFA is competitive in terms of both accuracy and efficiency. Our analysis (§5) shows that more significant time and memory efficiency improvements can be achieved for longer sequences: $1 2 \times$ decoding speedup with less than $10 \%$ of the memory for 2,048-length outputs.
# 2 BACKGROUND
# 2.1 ATTENTION IN SEQUENCE MODELING
The attention mechanism (Bahdanau et al., 2015) has been widely used in many sequence modeling tasks. Its dot-product variant is the key building block for the state-of-the-art transformer architectures (Vaswani et al., 2017). Let $\{ \mathbf { q } _ { t } \} _ { t = 1 } ^ { N }$ denote a sequence of $N$ query vectors, that attend to sequences of $M$ key and value vectors. At each timestep, the attention linearly combines the values weighted by the outputs of a softmax:
$$\mathrm { a t t n } \left( \mathbf { q } _ { t } , \{ \mathbf { k } _ { i } \} , \{ \mathbf { v } _ { i } \} \right) = \sum _ { i } \frac { \exp \left( \mathbf { q } _ { t } \cdot \mathbf { k } _ { i } / \tau \right) } { \sum _ { j } \exp \left( \mathbf { q } _ { t } \cdot \mathbf { k } _ { j } / \tau \right) } \mathbf { v } _ { i } ^ { \top } .$$
$\tau$ is the temperature hyperparameter determining how “flat” the softmax is (Hinton et al., 2015).1
Calculating attention for a single query takes $\mathcal { O } ( M )$ time and space. For the full sequence of $N$ queries the space amounts to $\mathcal { O } ( M N )$ . When the computation cannot be parallelized across the queries, e.g., in autoregressive decoding, the time complexity is quadratic in the sequence length.
# 2.2 RANDOM FEATURE METHODS
The theoretical backbone of this work is the unbiased estimation of the Gaussian kernel by Rahimi & Recht (2007). Based on Bochner’s theorem (Bochner, 1955), Rahimi & Recht (2007) proposed random Fourier features to approximate a desired shift-invariant kernel. The method nonlinearly transforms a pair of vectors $\mathbf { x }$ and $\mathbf { y }$ using a random feature map $\phi$ ; the inner product between $\phi ( \mathbf { x } )$ and $\phi ( \mathbf { y } )$ approximates the kernel evaluation on $\mathbf { x }$ and $\mathbf { y }$ . More precisely:
Theorem 1 (Rahimi & Recht, 2007). Let $\phi : \mathbb { R } ^ { d } \mathbb { R } ^ { 2 D }$ be a nonlinear transformation:
$$\phi \left( \mathbf { x } \right) = \sqrt { 1 / D } \left[ \sin \left( \mathbf { w } _ { 1 } \cdot \mathbf { x } \right) , \ldots , \sin \left( \mathbf { w } _ { D } \cdot \mathbf { x } \right) , \cos \left( \mathbf { w } _ { 1 } \cdot \mathbf { x } \right) , \ldots , \cos \left( \mathbf { w } _ { D } \cdot \mathbf { x } \right) \right] ^ { \top } .$$
When $d$ -dimensional random vectors $\mathbf { w } _ { i }$ are independently sampled from ${ \mathcal { N } } ( \mathbf { 0 } , \sigma ^ { 2 } \mathbf { I } _ { d } )$ ,
$$\begin{array} { r } { \mathbb { E } _ { \mathbf { w } _ { i } } \left[ \boldsymbol { \phi } \left( \mathbf { x } \right) \cdot \boldsymbol { \phi } \left( \mathbf { y } \right) \right] = \exp \left( - \left. \mathbf { x } - \mathbf { y } \right. ^ { 2 } / 2 \sigma ^ { 2 } \right) . } \end{array}$$
Variance of the estimation is inversely proportional to $D$ (Appendix A.2; Yu et al., 2016).
Random feature methods proved successful in speeding up kernel methods (Oliva et al., 2015; Avron et al., 2017; Sun, 2019, inter alia), and more recently are used to efficiently approximate softmax (Rawat et al., 2019). In $\ S 3 . 1$ , we use it to derive an unbiased estimate to $\exp ( \langle \cdot , \cdot \rangle )$ and then an efficient approximation to softmax attention.
# 3 MODEL
This section presents RFA (§3.1) and its gated variant (§3.2). In $\ S 3 . 3$ we lay out several design choices and relate RFA to prior works. We close by practically analyzing RFA’s complexity (§3.4).
 Figure 1: Computation graphs for softmax attention (left) and random feature attention (right). Here, we assume cross attention with source length $M$ and target length $N$ .
# 3.1 RANDOM FEATURE ATTENTION
RFA builds on an unbiased estimate to $\exp ( \langle \cdot , \cdot \rangle )$ from Theorem 1, which we begin with:
$$\begin{array} { r l } & { \exp \left( \mathbf { x } \cdot \mathbf { y } / \sigma ^ { 2 } \right) = \exp \left( \left\| \mathbf { x } \right\| ^ { 2 } / 2 \sigma ^ { 2 } + \left\| \mathbf { y } \right\| ^ { 2 } / 2 \sigma ^ { 2 } \right) \exp \left( - \left\| \mathbf { x } - \mathbf { y } \right\| ^ { 2 } / 2 \sigma ^ { 2 } \right) } \\ & { \qquad \approx \exp \left( \left\| \mathbf { x } \right\| ^ { 2 } / 2 \sigma ^ { 2 } + \left\| \mathbf { y } \right\| ^ { 2 } / 2 \sigma ^ { 2 } \right) \phi \left( \mathbf { x } \right) \cdot \phi \left( \mathbf { y } \right) . } \end{array}$$
The last line does not have any nonlinear interaction between $\phi ( \mathbf { x } )$ and $\phi ( \mathbf { y } )$ , allowing for a linear time/space approximation to attention. For clarity we assume the query and keys are unit vectors.2
$$\begin{array} { l } { { \displaystyle \mathrm { a t t n } \left( { \bf q } _ { t } , \left\{ { \bf k } _ { i } \right\} , \left\{ { \bf v } _ { i } \right\} \right) = \sum _ { i } \frac { \exp \left( { \bf q } _ { t } \cdot { \bf k } _ { i } / \sigma ^ { 2 } \right) } { \sum _ { j } \exp \left( { \bf q } _ { t } \cdot { \bf k } _ { j } / \sigma ^ { 2 } \right) } { \bf v } _ { i } ^ { \top } } \ ~ } \\ { \displaystyle ~ \approx \sum _ { i } \frac { \phi \left( { \bf q } _ { t } \right) ^ { \top } \phi \left( { \bf k } _ { i } \right) { \bf v } _ { i } ^ { \top } } { \sum _ { j } \phi \left( { \bf q } _ { t } \right) \cdot \phi \left( { \bf k } _ { j } \right) } \ ~ } \\ { \displaystyle ~ = \frac { \phi \left( { \bf q } _ { t } \right) ^ { \top } \sum _ { i } \phi \left( { \bf k } _ { i } \right) \otimes { \bf v } _ { i } } { \phi \left( { \bf q } _ { t } \right) \cdot \sum _ { j } \phi \left( { \bf k } _ { j } \right) } = { \bf R F A } \left( { \bf q } _ { t } , \left\{ { \bf k } _ { i } \right\} , \left\{ { \bf v } _ { i } \right\} \right) . } \end{array}$$
$\otimes$ denotes the outer product between vectors, and $\sigma ^ { 2 }$ corresponds to the temperature term $\tau$ in Eq. 1.
RFA can be used as a drop-in-replacement for softmax-attention.
(a) The input is revealed in full to cross attention and encoder self-attention. Here RFA calculates attention using Eq. 5. (b) In causal attention RFA attends only to the prefix.3 This allows for a recurrent computation. Tuple $( \mathbf { S } _ { t } \in \mathbb { R } ^ { 2 D \times d } , \mathbf { z } _ { t } \in \dot { \mathbb { R } } ^ { 2 D } )$ is used as the “hidden state” at time step $t$ to keep track of the history, similar to those in RNNs. Then $\mathrm { R F A } ( \mathbf { q } _ { t } , \{ \mathbf { k } _ { i } \} _ { i \leq t } , \{ \mathbf { v } _ { i } \} _ { i \leq t } ) =$ $\phi ( \mathbf { q } _ { t } ) ^ { \top } \mathbf { S } _ { t } / ( \phi ( \mathbf { q } _ { t } ) \cdot \mathbf { z } _ { t } )$ , where
$$\mathbf { S } _ { t } = \mathbf { S } _ { t - 1 } + \phi \left( \mathbf { k } _ { t } \right) \otimes \mathbf { v } _ { t } , \quad \mathbf { z } _ { t } = \mathbf { z } _ { t - 1 } + \phi \left( \mathbf { k } _ { t } \right) .$$
$2 D$ denotes the size of $\phi ( \cdot )$ . Appendix A.1 summarizes the computation procedure of RFA, and Figure 1 compares it against the softmax attention. Appendix A.3 derives causal RFA in detail.
Analogously to the softmax attention, RFA has its multiheaded variant (Vaswani et al., 2017). In our experiments we use causal RFA in a transformer language model (§4.1), and both cross and causal RFA in the decoder of a sequence-to-sequence machine translation model.
# 3.2 RFA-GATE: LEARNING WITH RECENCY BIAS
The canonical softmax attention does not have any explicit modeling of distance or locality. In learning problems where such inductive bias is crucial (Ba et al., 2016; Parmar et al., 2018; Miconi et al., 2018; Li et al., 2019, inter alia), transformers heavily rely on positional encodings. Answering to this, many approaches have been proposed, e.g., learning the attention spans (Sukhbaatar et al.,
2019; Wu et al., 2020), and enhancing the attention computation with recurrent (Hao et al., 2019; Chen et al., 2019) or convolutional (Wu et al., 2019; Mohamed et al., 2019) components.
RFA faces the same issue, but its causal attention variant (Eq. 6) offers a straightforward way of learning with recency bias. We draw inspiration from its connections to RNNs, and augment RFA with a learned gating mechanism (Hochreiter & Schmidhuber, 1997; Cho et al., 2014; Peng et al., 2018, inter alia):
$$\begin{array} { r l } & { g _ { t } = \mathrm { s i g m o i d } ( \mathbf { w } _ { g } \cdot \mathbf { x } _ { t } + b _ { g } ) , } \\ & { \mathbf { S } _ { t } = g _ { t } \mathbf { S } _ { t - 1 } + \left( 1 - g _ { t } \right) \phi \left( \mathbf { k } _ { t } \right) \otimes \mathbf { v } _ { t } , } \\ & { \mathbf { z } _ { t } = g _ { t } \mathbf { z } _ { t - 1 } + \left( 1 - g _ { t } \right) \phi \left( \mathbf { k } _ { t } \right) . } \end{array}$$
${ \bf w } _ { g }$ and $b _ { g }$ are learned parameters, and $\mathbf { x } _ { t }$ is the input representation at timestep $t$ .4 By multiplying the learned scalar gates $0 ~ < ~ g _ { t } ~ < ~ 1$ against the hidden state $( \mathbf { S } _ { t } , \mathbf { z } _ { t } )$ , history is exponentially decayed, favoring more recent context.
The gating mechanism shows another benefit of RFA: it would be otherwise more difficult to build similar techniques into the softmax attention, where there is no clear sense of “recurrence” (Appendix A.5). It proves useful in our language modeling experiments $( \ S 4 . 1 )$ .
# 3.3 DISCUSSION
On query and key norms, and learned random feature variance. Eq. 5 assumes both the query and keys are of norm-1. It therefore approximates a softmax attention that normalizes the queries and keys before multiplying them, and then scales the logits by dividing them by $\sigma ^ { 2 }$ . Empirically, this normalization step scales down the logits (Vaswani et al., 2017) and enforces that $- 1 \overset { \cdot } { \leq } \mathbf { q } ^ { \intercal } \dot { \mathbf { k } } \leq 1$ . In consequence, the softmax outputs would be “flattened” if not for $\sigma$ , which can be set a priori as a hyperparameter (Yu et al., 2016; Avron et al., 2017; Sun, 2019, inter alia). Here we instead learn it from data with the reparameterization trick (Kingma & Welling, 2014):
$$\widetilde { \mathbf { w } } _ { i } \sim { \mathcal { N } } ( \mathbf { 0 } , \mathbf { I } _ { d } ) , \quad \mathbf { w } _ { i } = \pmb { \sigma } \circ \widetilde { \mathbf { w } } _ { i } .$$
$\mathbf { I } _ { d }$ is the $d \times d$ identity matrix, and $\circ$ denotes elementwise product between vectors. $d$ -dimensional vector $\sigma$ is learned, but random vectors $\widetilde { \mathbf { w } } _ { i }$ are not.5
This norm-1 constraint is never mandatory. Rather, we employ it for notation clarity and easier implementation. In preliminary experiments we find it has little impact on the performance when $\sigma$ is set properly or learned from data. Eq. 12 in Appendix A presents RFA without imposing it.
Going beyond the Gaussian kernel. More broadly, random feature methods can be applied to a family of shift-invariant kernels, with the Gaussian kernel being one of them. In the same family, the order-1 arc-cosine kernel (Cho & Saul, 2009) can be approximated with feature map: $\phi _ { \mathrm { a r c c o s } } ( \mathbf { x } ) = \sqrt { 1 / D } [ \mathrm { R e L U } ( \mathbf { w } _ { 1 } \cdot \mathbf { x } ) , \dots , \mathrm { R e L U } ( \mathbf { w } _ { D } \cdot \mathbf { x } ) ] ^ { \top }$ (Alber et al., 2017).6 In our experiments, the Gaussian and arc-cosine variants achieve similar performance. This supplements the exploration of alternatives to softmax in attention (Tsai et al., 2019; Gao et al., 2019).
Relations to prior work. Katharopoulos et al. (2020) inspire the causal attention variant of RFA. They use a feature map based on the exponential linear unit activation (Clevert et al., 2016): $\mathrm { e l u } ( \cdot ) + 1$ . It significantly underperforms both the baseline and RFA in our controlled experiments, showing the importance of a properly-chosen feature map. Random feature approximation of attention is also explored by a concurrent work (Choromanski et al., 2021), with applications in masked language modeling for proteins. They propose positive random features to approximate softmax, aiming for a lower variance in critical regions. RFA instead normalizes the queries and keys before random projection to reduce variance. Going beyond both, RFA establishes the benefits of random feature methods as a more universal substitute for softmax across all attention variants, facilitating its applications in, e.g., sequence-to-sequence learning.
There are interesting connections between gated RFA and fast weights (Schmidhuber, 1992; 1993; Ba et al., 2016; Miconi et al., 2018, inter alia). Emphasizing recent patterns, they learn a temporal memory to store history similarly to Eqs. 7. The main difference is that RFA additionally normalizes the output using $\phi ( { \bf q } _ { t } ) \cdot { \bf z }$ as in Eq. 6, a by-product of approximating softmax’s partition function. It is intriguing to study the role of this normalization term, which we leave to future work.
# 3.4 COMPLEXITY ANALYSIS
Time. Scaling linearly in the sequence lengths, RFA needs less computation (in terms of number of operations) for long sequences. This implies speedup wherever the quadratic-time softmax attention cannot be fully-parallelized across time steps. More specifically:
• Significant speedup can be expected in autoregressive decoding, both conditional (e.g., machine translation) and unconditional (e.g., sampling from a language model). For example, $1 . 9 \times$ speedup is achieved in our machine translation experiments (§4.2); and more for longer sequences (e.g., $1 2 \times$ for 2,048-length ones; §5). Some applications (e.g., language modeling, text classification) reveal inputs to the model in full.7 When there are enough threads to parallelize softmax attention across time steps, hardly any speedup from RFA can be achieved; when there are not, typically for very long sequences $( > 1 , 0 0 0 )$ , substantial speed gain is possible. For example, RFA does not achieve any speedup when working with 512-length context $( \ S 4 . 1 )$ , but achieves a $5 . 3 \times$ speedup with 4,000-length context $( \ S 4 . 2 )$ .
Memory. Asymptotically, RFA has a better memory efficiency than its softmax counterpart (linear vs. quadratic). To reach a more practical conclusion, we include in our analysis the cost of the feature maps. $\phi$ ’s memory overhead largely depends on its size $D$ . For example, let’s consider the cross attention of a decoder. RFA uses $\mathcal { O } ( 4 D + 2 D d )$ space to store ${ \big . } \phi ( \mathbf { q } _ { t } ) , \sum _ { i } ^ { \cdot } \phi ( \mathbf { k } _ { i } ) \otimes \mathbf { v } _ { i }$ , and $\textstyle \sum _ { i } \phi ( \mathbf { k } _ { i } )$ (Eq. 5; line 12 of Algo. 2).8 In contrast, softmax cross attention stores the encoder outputs with $\mathcal O ( M d )$ memory, with $M$ being the source length. In this case RFA has a lower memory overhead when $2 D \ll M$ . Typically $D$ should be no less than $d$ in order for reasonable approximation (Yu et al., 2016); In a transformer model, $d$ is the size of an attention head, which is usually around 64 or 128 (Vaswani et al., 2017; Ott et al., 2018). This suggests that RFA can achieve significant memory saving with longer sequences, which is supported by our empirical analysis in $\ S 5$ . Further, using moderate sized feature maps is also desirable, so that its overhead does not overshadow the time and memory RFA saves. We experiment with $D$ at $d$ and $2 d$ ; the benefit of using $D > 2 d$ is marginal.
Appendix A.6 discusses the time and space complexity in more detail, and Appendix C.2 studies the effect of random feature size on performance.
# 4 EXPERIMENTS
We evaluate RFA on language modeling, machine translation, and long text classification.
# 4.1 LANGUAGE MODELING
Setting. We experiment with WikiText-103 (Merity et al., 2017). It is based on English Wikipedia. Table 5 in Appendix B summarizes some of its statistics. We compare the following models:
• BASE is our implementation of the strong transformer-based language model by Baevski & Auli (2019). RFA builds on BASE, but replaces the softmax attention with random feature attention. We experiment with both Gaussian and arc-cosine kernel variants. • RFA-GATE additionally learns a sigmoid gate on top of RFA (§3.2). It also has a Gaussian kernel variant and a arc-cosine kernel one.9 $\phi _ { \mathrm { e l u } }$ is a baseline to RFA. Instead of the random feature methods it uses the $\mathrm { e l u } ( \cdot ) + 1$ feature map, as in Katharopoulos et al. (2020).
To ensure fair comparisons, we use comparable implementations, tuning, and training procedure. All models use a 512 block size during both training and evaluation, i.e., they read as input a segment of 512 consecutive tokens, without access to the context from previous mini-batches. RFA variants use 64-dimensional random feature maps. We experiment with two model size settings, small (around 38M parameters) and big (around 242M parameters); they are described in Appendix B.1 along with other implementation details.
Table 1: Language model perplexity (lower is better) on the WikiText-103 development and test sets. Bolded numbers outperform BASE.
<table><tr><td></td><td colspan="2">Small</td><td colspan="2">Big</td></tr><tr><td>Model</td><td>Dev.</td><td>Test</td><td>Dev.</td><td>Test</td></tr><tr><td>BASE</td><td>33.0</td><td>34.5</td><td>24.5</td><td>26.2</td></tr><tr><td>Φelu (Katharopoulos et al., 2020)</td><td>38.4</td><td>40.1</td><td>28.7</td><td>30.2</td></tr><tr><td>RFA-Gaussian</td><td>33.6</td><td>35.7</td><td>25.8</td><td>27.5</td></tr><tr><td>RFA-arccos</td><td>36.0</td><td>37.7</td><td>26.4</td><td>28.1</td></tr><tr><td>RFA-GATE-Gaussian</td><td>31.3</td><td>32.7</td><td>23.2</td><td>25.0</td></tr><tr><td>RFA-GATE-arCCOS</td><td>32.8</td><td>34.0</td><td>24.8</td><td>26.3</td></tr><tr><td>RFA-GATE-Gaussian-Stateful</td><td>29.4</td><td>30.5</td><td>22.0</td><td>23.5</td></tr></table>
Results. Table 1 compares the models’ performance in perplexity on WikiText-103 development and test data. Both kernel variants of RFA, without gating, outperform $\phi _ { \mathrm { e l u } }$ by more than 2.4 and 2.1 test perplexity for the small and big model respectively, confirming the benefits from using random feature approximation.10 Yet both underperform BASE, with RFA-Gaussian having a smaller gap. Comparing RFA against its gated variants, a more than 1.8 perplexity improvement can be attributed to the gating mechanism; and the gap is larger for small models. Notably, RFA-GATE-Gaussian outperforms BASE under both size settings by at least 1.2 perplexity. In general, RFA models with Gaussian feature maps outperform their arc-cosine counterparts.11 From the analysis in $\ S 3 . 4$ we would not expect speedup by RFA models, nor do we see any in the experiments.12
Closing this section, we explore a “stateful” variant of RFA-GATE-Gaussian. It passes the last hidden state $( \mathbf { S } _ { t } , \mathbf { z } _ { t } )$ to the next mini-batch during both training and evaluation, a technique commonly used in RNN language models (Merity et al., 2018). This is a consequence of RFA’s RNN-style computation, and is less straightforward to be applicable in the vanilla transformer models.13 From the last row of Table 1 we see that this brings a more than 1.5 test perplexity improvement.
# 4.2 MACHINE TRANSLATION
Datasets. We experiment with three standard machine translation datasets.
• WMT14 EN-DE and EN-FR (Bojar et al., 2014). Our data split and preprocessing follow those of Vaswani et al. (2017). We share the source and target vocabularies within each language pair, with 32,768 byte pair encoding types (BPE; Sennrich et al., 2016). • IWSLT14 DE-EN (Cettolo et al., 2014) is based on TED talks. The preprocessing follows Edunov et al. (2018). Separate vocabularies of 9K/7K BPE types are used for the source and target.
Table 5 in Appendix B summarizes some statistics of the datasets.
Setting. We compare the RFA variants described in $\ S 4 . 1$ . They build on a BASE model that is our implementation of the base-sized transformer (Vaswani et al., 2017). All RFA models apply random feature attention in decoder cross and causal attention, but use softmax attention in encoders. This setting yields the greatest decoding time and memory savings (§3.4). We use 128/64 for $D$ in cross/causal attention. RFA-GATE learns sigmoid gates in the decoder causal attention. The $\phi _ { \mathrm { e l u } }$ baseline uses the same setting and applies feature map in both decoder cross and causal attention, but not in the encoders. Further details are described in Appendix B.2.
<table><tr><td></td><td colspan="2">WMT14</td><td>IWSLT14</td><td></td></tr><tr><td>Model</td><td>EN-DE</td><td>EN-FR</td><td>DE-EN</td><td>Speed</td></tr><tr><td>BASE</td><td>28.1</td><td>39.0</td><td>34.6</td><td>1.0×</td></tr><tr><td>Φelu (Katharopoulos et al., 2020)</td><td>21.3</td><td>34.0</td><td>29.9</td><td>2.0×</td></tr><tr><td>RFA-Gaussian</td><td>28.0</td><td>39.2</td><td>34.5</td><td>1.8×</td></tr><tr><td>RFA-arccos</td><td>28.1</td><td>38.9</td><td>34.4</td><td>1.9×</td></tr><tr><td>RFA-GATE-Gaussian</td><td>28.1</td><td>39.0</td><td>34.6</td><td>1.8×</td></tr><tr><td>RFA-GATE-arccOS</td><td>28.2</td><td>39.2</td><td>34.4</td><td>1.9×</td></tr></table>
Table 2: Machine translation test set BLEU. The decoding speed (last column) is relative to BASE. All models are tested on a single TPU v2 accelerator, with batch size 32.
Results. Table 2 compares the models’ test set BLEU on three machine translation datasets. Overall both Gaussian and arc-cosine variants of RFA achieve similar performance to BASE on all three datasets, significantly outperforming Katharopoulos et al. (2020). Differently from the trends in the language modeling experiments, here the gating mechanism does not lead to substantial gains. Notably, all RFA variants decode more than $1 . 8 \times$ faster than BASE.
# 4.3 LONG TEXT CLASSIFICATION
We further evaluate RFA’s accuracy and efficiency when used as text encoders on three NLP tasks from the recently proposed Long Range Arena benchmark (Tay et al., 2021), designed to evaluate efficient Transformer variants on tasks that require processing long sequences.14
Experimental setting and datasets. We compare RFA against baselines on the following datasets:
• ListOps (LO; Nangia & Bowman, 2018) aims to diagnose the capability of modelling hierarchically structured data. Given a sequence of operations on single-digit integers, the model predicts the solution, also a single-digit integer. It is formulated as a 10-way classification. We follow Tay et al. (2021) and consider sequences with 500–2,000 symbols. Character-level text classification with the IMDb movie review dataset (Maas et al., 2011). This is a binary sentiment classification task. Character-level document retrieval with the ACL Anthology Network (AAN; Radev et al., 2009) dataset. The model classifies whether there is a citation between a pair of papers.
To ensure fair comparisons, we implement RFA on top of the transformer baseline by Tay et al. (2021), and closely follow their preprocessing, data split, model size, and training procedure. Speed and memory are evaluated on the IMDb dataset. For our RFA model, we use $D = 6 4$ for the IMDb dataset, and $D = 1 2 8$ for others. We refer the readers to Tay et al. (2021) for further details.
Results. From Table 3 we can see that RFA outperforms the transformer baseline on two out of the three datasets, achieving the best performance on IMDb with $66 \%$ accuracy. Averaging across three datasets, RFA outperforms the transformer by $0 . 3 \%$ accuracy, second only to Zaheer et al. (2020) with a $0 . 1 \%$ accuracy gap. In terms of time and memory efficiency, RFA is among the strongest. RFA speeds up over the transformer by $1 . 1 \mathrm { - } 5 . 3 \times$ , varying by sequence length. Importantly, compared to the only two baselines that perform comparably to the baseline transformer model (Tay et al., 2020a; Zaheer et al., 2020), RFA has a clear advantage in both speed and memory efficiency, and is the only model that is competitive in both accuracy and efficiency.
<table><tr><td></td><td colspan="4"> Accuracy</td><td colspan="4">Speed</td><td colspan="4">Memory</td></tr><tr><td>Model</td><td>LO</td><td>IMDb</td><td>AAN</td><td>Avg.</td><td>1K</td><td>2K</td><td>3K</td><td>4K</td><td>1K</td><td>2K</td><td>3K</td><td>4K</td></tr><tr><td>Transformer</td><td>36.4</td><td>64.3</td><td>57.5</td><td>52.7</td><td>1.0</td><td>1.0</td><td>1.0</td><td>1.0</td><td>1.00</td><td>1.00</td><td>1.00</td><td>1.00</td></tr><tr><td>Wang et al. (2020)</td><td>35.7</td><td>53.9</td><td>52.3</td><td>47.3</td><td>1.2</td><td>1.9</td><td>3.7</td><td>5.5</td><td>0.44</td><td>0.21</td><td>0.18</td><td>0.10</td></tr><tr><td>Kitaev et al. (2020)</td><td>37.3</td><td>56.1</td><td>53.4</td><td>48.9</td><td>0.5</td><td>0.4</td><td>0.7</td><td>0.8</td><td>0.56</td><td>0.37</td><td>0.28</td><td>0.24</td></tr><tr><td>Tay et al. (2020b)</td><td>17.1</td><td>63.6</td><td>59.6</td><td>46.8</td><td>1.1</td><td>1.6</td><td>2.9</td><td>3.8</td><td>0.55</td><td>0.31</td><td>0.20</td><td>0.16</td></tr><tr><td>Tay et al. (2020a)</td><td>37.0</td><td>61.7</td><td>54.7</td><td>51.1</td><td>1.1</td><td>1.2</td><td>2.9</td><td>1.4</td><td>0.76</td><td>0.75</td><td>0.74</td><td>0.74</td></tr><tr><td>Zaheer et al. (2020)</td><td>36.0</td><td>64.0</td><td>59.3</td><td>53.1</td><td>0.9</td><td>0.8</td><td>1.2</td><td>1.1</td><td>0.90</td><td>0.56</td><td>0.40</td><td>0.30</td></tr><tr><td>Katharopoulos et al. (2020)</td><td>16.1</td><td>65.9</td><td>53.1</td><td>45.0</td><td>1.1</td><td>1.9</td><td>3.7</td><td>5.6</td><td>0.44</td><td>0.22</td><td>0.14</td><td>0.11</td></tr><tr><td>Choromanski et al. (2021)</td><td>18.0</td><td>65.4</td><td>53.8</td><td>45.7</td><td>1.2</td><td>1.9</td><td>3.8</td><td>5.7</td><td>0.44</td><td>0.22</td><td>0.15</td><td>0.11</td></tr><tr><td>RFA-Gaussian (This work)</td><td>36.8</td><td>66.0</td><td>56.1</td><td>53.0</td><td>1.1</td><td>1.7</td><td>3.4</td><td>5.3</td><td>0.53</td><td>0.30</td><td>0.21</td><td>0.16</td></tr></table>
Table 3: Accuracy (higher is better) of different models on LO, IMDb, and AAN, along with their speed (higher is better) and peak memory consumption (lower is better) varying sequence lengths (1–4K). Speed and memory are evaluated on the IMDb dataset and relative to the transformer’s. Bold font indicates the best performance in each column, and underlined numbers outperform the transformer in accuracy. Transformer’s and previous works’ numbers are due to Tay et al. (2021).
 Figure 2: Conditional decoding speed (left) and memory overhead (right) varying the output lengths. All models are tested on a single TPU v2 accelerator, with greedy decoding and batch size 16.
# 5 ANALYSIS
Decoding time and memory varying by sequence length. $\ S 3 . 4$ shows that RFA can potentially achieve more significant speedup and memory saving for longer sequences, which we now explore.
We use a simulation conditional generation experiment on to compare RFA’s sequence-to-sequence decoding speed and memory overhead against the baseline’s. Here we assume the input and output sequences are of the same length. The compared models are of the same size as those described in $\ S 4 . 2$ , with 6-layer encoders and decoders. Other hyperparameters are summarized in Appendix B.2. All models are tested using greedy decoding with the same batch size of 16, on a TPU v2 accelerator.
From Figures 2 (a) and (b) we observe clear trends. Varying the lengths, both RFA variants achieve consistent decoding speed with nearly-constant memory overhead. In contrast, the baseline decodes slower for longer sequences, taking an increasing amount of memory. Notably, for 2,048-length sequences, RFA decodes around $1 2 \times$ faster than the baseline while using less than $10 \%$ of the memory. RFA-arccos slightly outperforms RFA-Gaussian in terms of speed and memory efficiency. This is because when using the same $D$ (as we do here), the $\phi _ { \mathrm { a r c c o s } }$ is half the size of $\phi _ { \mathrm { G a u s s i a n } }$ . These results suggest that RFA can be particularly useful in sequence-to-sequence tasks with longer sequences, e.g., document-level machine translation (Miculicich et al., 2018).
Figure 3 in Appendix C.1 compares the speed and memory consumption in unconditional decoding (e.g., sampling from a language model). The overall trends are similar to those in Figure 2.
Notes on decoding speed. With a lower memory overhead, RFA can use a larger batch size than the baseline. As noted by Katharopoulos et al. (2020) and Kasai et al. (2021), if we had used minibatches as large as the hardware allows, RFA could have achieved a more significant speed gain. Nonetheless, we control for batch size even though it is not the most favorable setting for RFA, since the conclusion translates better to common applications where one generates a single sequence at a time (e.g., instantaneous machine translation). For the softmax attention baseline, we follow Ott et al. (2018) and cache previously computed query/key/value representations, which significantly improves its decoding speed (over not caching).
Further analysis results. RFA achieves comparable performance to softmax attention. Appendix C.3 empirically shows that this cannot be attributed to RFA learning a good approximation to softmax: when we train with one attention but evaluate with the other, the performance is hardly better than randomly-initialized untrained models. Yet, an RFA model initialized from a pretrained softmax transformer achieves decent training loss after a moderate amount of finetuning steps (Appendix C.4). This suggests some potential applications, e.g., transferring knowledge from a pretrained transformer (e.g., GPT-3; Brown et al., 2020) to an RFA model that is more efficient to sample from.
# 6 RELATED WORK
One common motivation across the following studies, that is shared by this work and the research we have already discussed, is to scale transformers to long sequences. Note that there are plenty orthogonal choices for improving efficiency such as weight sharing (Dehghani et al., 2019), quantization (Shen et al., 2020), knowledge distillation (Sanh et al., 2020), and adapters (Houlsby et al., 2019). For a detailed overview we refer the reader to Tay et al. (2020c).
Sparse attention patterns. The idea behind these methods is to limit the reception field of attention computation. It motivates earlier attempts in improving attention’s efficiency, and still receives lots of interest. The sparse patterns can be set a priori (Liu et al., 2018; Qiu et al., 2020; Ho et al., 2020; You et al., 2020, inter alia) or learned from data (Sukhbaatar et al., 2019; Roy et al., 2020, inter alia). For most of these approaches, it is yet to be empirically verified that they are suitable for large-scale sequence-to-sequence learning; few of them have recorded decoding speed benefits.
Compressed context. Wang et al. (2020) compress the context along the timesteps so that the effective sequence length for attention computation is reduced. Another line of work aims to store past context into a memory module with limited size (Lee et al., 2019; Ainslie et al., 2020; Rae et al., 2020, inter alia), so that accessing longer history only moderately increases the overhead. Reminiscent of RNN language models, RFA attends beyond a fixed context window through a stateful computation, without increasing time or memory overhead.
# 7 CONCLUSION
We presented random feature attention (RFA). It views the softmax attention through the lens of kernel methods, and approximates it with random feature methods. With an optional gating mechanism, RFA provides a straightforward way of learning with recency bias. RFA’s time and space complexity is linear in the sequence length. We use RFA as a drop-in substitute for softmax attention in transformer models. On language modeling, machine translation, and long text classification benchmarks, RFA achieves comparable or better performance than strong baselines. In the machine translation experiment, RFA decodes twice as fast. Further time and memory efficiency improvements can be achieved for longer sequences.
# ACKNOWLEDGMENTS
We would like to thank Phil Blunsom, Chris Dyer, Nando de Freitas, Jungo Kasai, Adhiguna Kuncoro, Dianqi Li, Ofir Press, Lianhui Qin, Swabha Swayamdipta, Sam Thomson, the language team at DeepMind and the ARK group at the University of Washington for their helpful feedback. We also thank Tay Yi for helping run the Long Range Arena experiments, Richard Tanburn for the advice on implementations, and the anonymous reviewers for their thoughtful comments. This work was supported in part by NSF grant 1562364 and a Google Fellowship. Nikolaos Pappas was supported by the Swiss National Science Foundation under grant number P400P2 183911 “UNISON.”
# REFERENCES
Joshua Ainslie, Santiago Ontanon, Chris Alberti, Vaclav Cvicek, Zachary Fisher, Philip Pham, Anirudh Ravula, Sumit Sanghai, Qifan Wang, and Li Yang. ETC: Encoding long and structured inputs in transformers. In Proc. of EMNLP, 2020.
Maximilian Alber, Pieter-Jan Kindermans, Kristof Schutt, Klaus-Robert M ¨ uller, and Fei Sha. An ¨ empirical study on the properties of random bases for kernel methods. In Proc. of NeurIPS, 2017.
Haim Avron, Vikas Sindhwani, Jiyan Yang, and Michael W. Mahoney. Quasi-Monte Carlo feature maps for shift-invariant kernels. Journal of Machine Learning Research, 17(120):1–38, 2016.
Haim Avron, L. Kenneth Clarkson, and P. David and Woodruff. Faster kernel ridge regression using sketching and preconditioning. SIAM J. Matrix Analysis Applications, 2017.
Jimmy Ba, Geoffrey E Hinton, Volodymyr Mnih, Joel Z Leibo, and Catalin Ionescu. Using fast weights to attend to the recent past. In Proc. of NeurIPS, 2016.
Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. In Proc. of ICLR, 2019.
Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In Proc. of ICLR, 2015.
Iz Beltagy, Matthew E. Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv: 2004.05150, 2020.
S. Bochner. Harmonic Analysis and the Theory of Probability. University of California Press, 1955.
Ondˇrej Bojar, Christian Buck, Christian Federmann, Barry Haddow, Philipp Koehn, Johannes Leveling, Christof Monz, Pavel Pecina, Matt Post, Herve Saint-Amand, Radu Soricut, Lucia Specia, and Ales Tamchyna. Findings of the 2014 workshop on statistical machine translation. In ˇ Proc. of WMT, 2014.
Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. arXiv: 2005.14165, 2020.
Mauro Cettolo, Jan Niehues, Sebastian Stuker, Luisa Bentivogli, and Marcello Federico. Report on ¨ the 11th IWSLT evaluation campaign. In Proc. of IWSLT, 2014.
Kehai Chen, Rui Wang, Masao Utiyama, and Eiichiro Sumita. Recurrent positional embedding for neural machine translation. In Proc. of EMNLP, 2019.
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv: 1904.10509, 2019.
Kyunghyun Cho, Bart van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using RNN encoder–decoder for statistical machine translation. In Proc. of EMNLP, 2014.
Youngmin Cho and Lawrence K. Saul. Kernel methods for deep learning. In Proc. of NeurIPS, 2009.
Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, David Benjamin Belanger, Lucy J Colwell, and Adrian Weller. Rethinking attention with performers. In Proc. of ICLR, 2021.
Djork-Arne Clevert, Thomas Unterthiner, and Sepp Hochreiter. Fast and accurate deep network´ learning by exponential linear units (ELUs). In Proc. of ICLR, 2016.
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proc. of ACL, 2019.
Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Lukasz Kaiser. Universal transformers. In Proc. of ICLR, 2019.
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proc. of NAACL, 2019.
Sergey Edunov, Myle Ott, Michael Auli, David Grangier, and Marc’Aurelio Ranzato. Classical structured prediction losses for sequence to sequence learning. In Proc. of NAACL, 2018.
Yingbo Gao, Christian Herold, Weiyue Wang, and Hermann Ney. Exploring kernel functions in the softmax layer for contextual word classification. In International Workshop on Spoken Language Translation, 2019.
Jie Hao, Xing Wang, Baosong Yang, Longyue Wang, Jinfeng Zhang, and Zhaopeng Tu. Modeling recurrence for transformer. In Proc. of NAACL, 2019.
Geoffrey Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. In NeurIPs Deep Learning and Representation Learning Workshop, 2015.
Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv: 1912.12180, 2020.
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural Computation, 9(8): 1735–1780, 1997.
Thomas Hofmann, Bernhard Scholkopf, and Alexander J. Smola. Kernel methods in machine learn- ¨ ing. Annals of Statistics, 36(3):1171–1220, 2008.
Neil Houlsby, Andrei Giurgiu, Stanislaw Jastrzebski, Bruna Morrone, Quentin De Laroussilhe, Andrea Gesmundo, Mona Attariyan, and Sylvain Gelly. Parameter-efficient transfer learning for NLP. In Proc. of ICML, 2019.
Jungo Kasai, Nikolaos Pappas, Hao Peng, James Cross, and Noah A. Smith. Deep encoder, shallow decoder: Reevaluating the speed-quality tradeoff in machine translation. In Proc. of ICLR, 2021.
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Francois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In Proc. of ICML, 2020.
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Proc. of ICLR, 2015.
Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In Proc. of ICLR, 2014.
Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In Proc. of ICLR, 2020.
Juho Lee, Yoonho Lee, Jungtaek Kim, Adam Kosiorek, Seungjin Choi, and Yee Whye Teh. Set transformer: A framework for attention-based permutation-invariant neural networks. In Proc. of ICML, 2019.
Shiyang Li, Xiaoyong Jin, Yao Xuan, Xiyou Zhou, Wenhu Chen, Yu-Xiang Wang, and Xifeng Yan. Enhancing the locality and breaking the memory bottleneck of transformer on time series forecasting. In Proc. of NeurIPS, 2019.
Peter J. Liu, Mohammad Saleh, Etienne Pot, Ben Goodrich, Ryan Sepassi, Lukasz Kaiser, and Noam Shazeer. Generating wikipedia by summarizing long sequences. In Proc. of ICLR, 2018.
Andrew L. Maas, Raymond E. Daly, Peter T. Pham, Dan Huang, Andrew Y. Ng, and Christopher Potts. Learning word vectors for sentiment analysis. In Proc. of ACL, 2011.
Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. Pointer sentinel mixture models. In Proc. of ICLR, 2017.
Stephen Merity, Nitish Shirish Keskar, and Richard Socher. Regularizing and Optimizing LSTM Language Models. In Proc. of ICLR, 2018.
Thomas Miconi, Kenneth Stanley, and Jeff Clune. Differentiable plasticity: training plastic neural networks with backpropagation. In Proc. of ICML, 2018.
Lesly Miculicich, Dhananjay Ram, Nikolaos Pappas, and James Henderson. Document-level neural machine translation with hierarchical attention networks. In Proc. of EMNLP, 2018.
Abdelrahman Mohamed, Dmytro Okhonko, and Luke Zettlemoyer. Transformers with convolutional context for ASR. arXiv: 1904.11660, 2019.
Nikita Nangia and Samuel Bowman. ListOps: A diagnostic dataset for latent tree learning. In Proc. of NAACL Student Research Workshop, 2018.
Junier Oliva, William Neiswanger, Barnabas Poczos, Eric Xing, Hy Trac, Shirley Ho, and Jeff Schneider. Fast function to function regression. In Proc. of AISTATS, 2015.
Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. Scaling neural machine translation. In Proc. of WMT, 2018.
Emilio Parisotto, H. Francis Song, Jack W. Rae, Razvan Pascanu, Caglar Gulcehre, Siddhant M. Jayakumar, Max Jaderberg, Raphael Lopez Kaufman, Aidan Clark, Seb Noury, Matthew M. Botvinick, Nicolas Heess, and Raia Hadsell. Stabilizing transformers for reinforcement learning. In Proc. of ICML, 2020.
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander $\mathrm { K u }$ , and Dustin Tran. Image transformer. In Proc. of ICML, 2018.
Hao Peng, Roy Schwartz, Sam Thomson, and Noah A. Smith. Rational recurrences. In Proc. of EMNLP, 2018.
Hao Peng, Roy Schwartz, Dianqi Li, and Noah A. Smith. A mixture of $h - 1$ heads is better than $h$ heads. In Proc. of ACL, 2020.
Matt Post. A call for clarity in reporting BLEU scores. In Proc. of WMT, 2018.
Jiezhong Qiu, Hao Ma, Omer Levy, Wen-tau Yih, Sinong Wang, and Jie Tang. Blockwise selfattention for long document understanding. In Findings of EMNLP, 2020.
Dragomir R. Radev, Pradeep Muthukrishnan, and Vahed Qazvinian. The ACL Anthology network. In Proc. of the Workshop on Text and Citation Analysis for Scholarly Digital Libraries, 2009.
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners, 2018.
Jack W. Rae, Anna Potapenko, Siddhant M. Jayakumar, Chloe Hillier, and Timothy P. Lillicrap. Compressive transformers for long-range sequence modelling. In Proc. of ICLR, 2020.
Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Proc. of NeurIPS, 2007.
Ankit Singh Rawat, Jiecao Chen, Felix Xinnan X Yu, Ananda Theertha Suresh, and Sanjiv Kumar. Sampled softmax with random Fourier features. In Proc. of NeurIPS, 2019.
Aurko Roy, Mohammad Taghi Saffar, David Grangier, and Ashish Vaswani. Efficient content-based sparse attention with routing transformers. arXiv: 2003.05997, 2020.
Victor Sanh, Lysandre Debut, Julien Chaumond, and Thomas Wolf. DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter. arXiv: 1910.01108, 2020.
J. Schmidhuber. Learning to control fast-weight memories: An alternative to dynamic recurrent networks. Neural Computation, 4(1):131–139, 1992. J. Schmidhuber. Reducing the ratio between learning complexity and number of time varying variables in fully recurrent nets. In Proc. of ICANN, 1993. Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proc. of ACL, 2016. Sheng Shen, Zhen Dong, Jiayu Ye, Linjian Ma, Zhewei Yao, Amir Gholami, Michael W. Mahoney, and Kurt Keutzer. Q-BERT: Hessian based ultra low precision quantization of BERT. In Proc. of AAAI, 2020. Sainbayar Sukhbaatar, Edouard Grave, Piotr Bojanowski, and Armand Joulin. Adaptive attention span in transformers. In Proc. of ACL, 2019. Yitong Sun. Random Features Methods in Supervised Learning. PhD thesis, The University of Michigan, 2019. Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan, Zhe Zhao, and Che Zheng. Synthesizer: Rethinking self-attention in transformer models. arXiv: 2005.00743, 2020a. Yi Tay, Dara Bahri, Liu Yang, Don Metzler, and Da-Cheng Juan. Sparse sinkhorn attention. In Proc. of ICML, 2020b. Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv: 2009.06732, 2020c. Yi Tay, Mostafa Dehghani, Samira Abnar, Yikang Shen, Dara Bahri, Philip Pham, Jinfeng Rao, Liu Yang, Sebastian Ruder, and Donald Metzler. Long range arena: A benchmark for efficient transformers. In Proc. of ICLR, 2021. Yao-Hung Hubert Tsai, Shaojie Bai, Makoto Yamada, Louis-Philippe Morency, and Ruslan Salakhutdinov. Transformer dissection: An unified understanding for transformer’s attention via the lens of kernel. In Proc. of EMNLP, 2019. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proc. of NeurIPS, 2017. Sinong Wang, Belinda Z. Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv: 2006.04768, 2020. Ronald J. Williams and David Zipser. A learning algorithm for continually running fully recurrent neural networks. Neural Computation, 1:270–280, 1989. Felix Wu, Angela Fan, Alexei Baevski, Yann Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. In Proc. of ICLR, 2019. Zhanghao Wu, Zhijian Liu, Ji Lin, Yujun Lin, and Song Han. Lite transformer with long-short range attention. In Proc. of ICLR, 2020. Weiqiu You, Simeng Sun, and Mohit Iyyer. Hard-coded Gaussian attention for neural machine translation. In Proc. of ACL, 2020. Felix Xinnan X Yu, Ananda Theertha Suresh, Krzysztof M Choromanski, Daniel N Holtmann-Rice, and Sanjiv Kumar. Orthogonal random features. In Proc. of NeurIPS, 2016. Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, and Amr Ahmed. Big bird: Transformers for longer sequences. arXiv: 2007.14062, 2020.
# Appendices
A RANDOM FEATURE ATTENTION IN MORE DETAIL
A.1 DETAILED COMPUTATION PROCEDURE
Algorithms 1 and 2 describe causal and cross random feature attention’s computation procedures.
# Algorithm 1 Causal random feature attention.
1: procedure RFA-CAUSAL( $\{ \mathbf { q } _ { i } \} _ { i = 1 } ^ { N }$ , {ki}Ni=1, {vi}Ni=1) 2: $\vartriangleright \mathbf { S }$ is a $D \times d$ matrix 3: $\vartriangleright$ is a $D$ -dimensional vector 4: S, $\mathbf { z } \gets \mathbf { 0 }$ , 0 5: for $i = 1$ to $N$ do 6: $\widetilde { \mathbf { q } } _ { i }$ , $\bar { \mathbf { k } } _ { i } \phi ( \mathbf { q } _ { i } )$ , $\phi ( \mathbf { k } _ { i } )$ . Random feature maps 7: S ← S + ki ⊗ vi 8: z z + ki 9: h>i ← q>i S/(qi · z) 10: 11: end foreturn $\{ { \bf h } _ { i } \} _ { i = 1 } ^ { N }$ 12: end procedure
# Algorithm 2 Cross random feature attention.
1: procedure RFA-CROSS( $\{ \mathbf { q } _ { i } \} _ { i = 1 } ^ { N }$ , {ki}Mi=1, {vi}Mi=1) 2: $\vartriangleright \mathbf { S }$ is a $D \times d$ matrix 3: $\vartriangleright$ is a $D$ -dimensional vector 4: S, $\mathbf z \gets \mathbf 0$ , 0 5: for $i = 1$ to $M$ do 6: $\begin{array} { r l } & { \widetilde { \mathbf { k } } _ { i } \gets \phi ( \mathbf { k } _ { i } ) \quad \mathrm { ~ \ u ~ { ~ p ~ R ~ } ~ } } \\ & { \mathbf { S } \gets \mathbf { S } + \widetilde { \mathbf { k } } _ { i } \otimes \mathbf { v } _ { i } ^ { \top } } \\ & { \mathbf { z } \gets \mathbf { z } + \widetilde { \mathbf { k } } _ { i } } \end{array}$ andom feature map 7: 8: 9: end for 10: for $i = 1$ to $N$ do 11: qi ← φ(qi) . Random feature map 12: $\mathbf { h } _ { i } ^ { \top } \widetilde { \mathbf { q } } _ { i } ^ { \top } \mathbf { S } / ( \widetilde { \mathbf { q } } _ { i } \cdot \mathbf { z } )$ 13: 14: return end for $\{ { \bf h } _ { i } \} _ { i = 1 } ^ { N }$ 15: end procedure
# A.2 VARIANCE OF RANDOM FOURIER FEATURES
The following result is due to $\mathrm { Y u }$ et al. (2016). Using the same notation as in $\ S 2 . 2$
$$\mathrm { V a r } ( \phi \left( \mathbf { x } \right) \cdot \phi \left( \mathbf { y } \right) ) = \frac { 1 } { 2 D } \left( 1 - e ^ { - z ^ { 2 } } \right) ^ { 2 } ,$$
where $z = \| \mathbf x - \mathbf y \| / \sigma$ .
# A.3 DERIVATION OF CAUSAL RFA
This section presents a detailed derivation of causal RFA as in $\ S 3 . 1$ . Following Eq. 5 but changing the attended keys and values to the prefix:
$$\operatorname { R F A } ( \mathbf { q } _ { t } , \{ \mathbf { k } _ { i } \} _ { i \leq t } , \{ \mathbf { v } _ { i } \} _ { i \leq t } ) = \frac { \phi \left( \mathbf { q } _ { t } \right) ^ { \top } \sum _ { i \leq t } \phi \left( \mathbf { k } _ { i } \right) \otimes \mathbf { v } _ { i } } { \phi \left( \mathbf { q } _ { t } \right) \cdot \sum _ { j \leq t } \phi \left( \mathbf { k } _ { j } \right) }$$
Let $\begin{array} { r } { \mathbf { S } _ { t } \triangleq \sum _ { i \leq t } \phi ( \mathbf { k } _ { i } ) \otimes \mathbf { v } _ { i } } \end{array}$ , and $\begin{array} { r } { \mathbf { z } _ { t } \triangleq \sum _ { i \leq t } \phi ( \mathbf { k } _ { i } ) } \end{array}$ ; both can be calculated recurrently. Assuming $\mathbf { S } _ { 0 } = \mathbf { 0 }$ and ${ \bf z } _ { 0 } = { \bf 0 }$ :
$$\mathbf { S } _ { t } = \mathbf { S } _ { t - 1 } + \phi \left( \mathbf { k } _ { t } \right) \otimes \mathbf { v } _ { t } , \quad \mathbf { z } _ { t } = \mathbf { z } _ { t - 1 } + \phi \left( \mathbf { k } _ { t } \right) , \quad t \geq 1 .$$
This completes the derivation of causal RFA as in $\ S 3 . 1$ .
# A.4 RFA WITHOUT NORM-1 CONSTRAINTS
$\ S 3 . 1$ assumes that the queries and keys are unit vectors. This norm-1 constraint is not a must. Here we present a RFA without imposing this constraint. Let $C ( \mathbf { x } ) = \exp ( \left\| \mathbf { x } \right\| ^ { 2 } / 2 \sigma ^ { 2 } )$ . From Eq. 4 we have attn $\left( \mathbf { q } _ { t } , \{ \mathbf { k } _ { i } \} , \{ \mathbf { v } _ { i } \} \right) =$
$$\begin{array} { r l r } & { } & { \sum _ { i } \frac { \exp \big ( \mathbf { q } _ { t } \cdot \mathbf { k } _ { i } / \sigma ^ { 2 } \big ) } { \sum _ { j } \exp \big ( \mathbf { q } _ { t } \cdot \mathbf { k } _ { j } / \sigma ^ { 2 } \big ) } \mathbf { v } _ { i } ^ { \top } \approx \displaystyle \sum _ { i } \frac { C \left( \mathbf { q } _ { t } \right) C \left( \mathbf { k } _ { i } \right) \phi \left( \mathbf { q } _ { t } \right) ^ { \top } \phi \left( \mathbf { k } _ { i } \right) \mathbf { v } _ { i } ^ { \top } } { \sum _ { j } C \left( \mathbf { q } _ { t } \right) C \left( \mathbf { k } _ { j } \right) \phi \left( \mathbf { q } _ { t } \right) \cdot \phi \left( \mathbf { k } _ { j } \right) } } \\ & { } & { \qquad = \frac { \phi \left( \mathbf { q } _ { t } \right) ^ { \top } \sum _ { i } C \left( \mathbf { k } _ { i } \right) \phi \left( \mathbf { k } _ { i } \right) \otimes \mathbf { v } _ { i } } { \phi \left( \mathbf { q } _ { t } \right) \cdot \sum _ { j } C \left( \mathbf { k } _ { j } \right) \phi \left( \mathbf { k } _ { j } \right) } . } \end{array}$$
The specific attention computation is similar to those in $\ S 3 . 1$ . In sum, lifting the norm-1 constraint brings an additional scalar term $C ( \cdot )$ .
# A.5 RELATING RFA-GATE TO SOFTMAX ATTENTION
Drawing inspiration from gated RNNs, $\ S 3 . 2$ introduces a gated variant of RFA. Now we study its “softmax counterpart.”
$$\begin{array} { l } { { \displaystyle { \widetilde { \bf { k } } } _ { i } = { \bf { k } } _ { i } { \bf { \Gamma } } ( 1 - g _ { i } ) \prod _ { j = i + 1 } ^ { t } g _ { j } , \quad { \widetilde { \bf { v } } } _ { i } = { \bf { v } } _ { i } { \bf { \Gamma } } ( 1 - g _ { i } ) \prod _ { j = i + 1 } ^ { t } g _ { j } , \quad i = 1 , \dots , t } } \\ { { \displaystyle { \bf { h } } _ { t } = \mathrm { a t t n } ( { \bf { q } } _ { t } , \{ { \widetilde { \bf { k } } } _ { i } \} _ { i \le t } , \{ { \widetilde { \bf { v } } } _ { i } \} _ { i \le t } ) } . } \end{array}$$
$\mathbf { h } _ { t }$ is the output at timestep $t$ and is used for onward computation.
At each step, all prefix keys and values are decayed by a gate value before calculating the attention. This implies that the attention computation for $\mathbf { q } _ { t + 1 }$ cannot start until that of $\mathbf { q } _ { t }$ is finished. Combined with the linear complexity of softmax normalization, this amounts to quadratic time in sequence length, even for language modeling training.
The above model is less intuitive and more expensive in practice, without the RFA perspective. This shows that RFA brings some benefits in developing new attention models.
# A.6 DETAILED COMPLEXITY ANALYSIS
Table 4 considers a sequence-to-sequence model, and breaks down the comparisons to training (with teacher forcing; Williams & Zipser, 1989) and autoregressive decoding. Here we assume enough threads to fully parallelize softmax attention across timesteps when the inputs are revealed to the model in full. RFA has a lower space complexity, since it never explicitly populates the attention matrices. As for time, RFA trains in linear time, and so does the softmax attention: in teacher-forcing training a standard transformer decoder parallelizes the attention computation across time steps. The trend of the time comparison differs during decoding: when only one output token is produced at a time, RFA decodes linearly in the output length, while softmax attention decodes quadratically.
<table><tr><td></td><td></td><td colspan="3">Time Complexity</td><td colspan="3"> Space Complexity</td></tr><tr><td>Setting</td><td>Model</td><td>Encoder</td><td>Cross</td><td>Causal</td><td>Encoder</td><td>Cross</td><td>Causal</td></tr><tr><td>Training w/</td><td>softmax</td><td>O(M)</td><td>O(M)</td><td>O(N)</td><td>O(M2)</td><td>O(MN)</td><td>O(N2)</td></tr><tr><td>teacher forcing</td><td>RFA</td><td>(M)</td><td>O(M)</td><td>O(N)</td><td>O(M)</td><td>O(M + N)</td><td>O(N)</td></tr><tr><td>Decoding</td><td>softmax RFA</td><td>O(M) O(M)</td><td>O(MN) O(M + N)</td><td>O(N2) O(N)</td><td>O(M2) O(M)</td><td>O(MN) O(M + N)</td><td>O(N2) O(N)</td></tr></table>
Table 4: Time and space complexity comparisons between RFA and its softmax counterpart in a sequence-to-sequence attentive model, assuming an infinite amount of available threads. $M$ and $N$ denote the lengths of the source and target sequences respectively. Teacher forcing training (Williams & Zipser, 1989) and autoregressive decoding are assumed. Blue color indicates the cases where RFA asymptotically outperforms softmax attention.
<table><tr><td>Data</td><td>Train</td><td>Dev.</td><td>Test</td><td>Vocab.</td></tr><tr><td>WikiText-103</td><td>103M</td><td>218K</td><td>246K</td><td>268K</td></tr><tr><td>WMT14 EN-DE</td><td>4.5M</td><td>3K</td><td>3K</td><td>32K</td></tr><tr><td>WMT14EN-FR</td><td>4.5M</td><td>3K</td><td>3K</td><td>32K</td></tr><tr><td>IWSLT14 DE-EN</td><td>160K</td><td>7K</td><td>7K</td><td>9K/7K</td></tr></table>
Table 5: Some statistics for the datasets. WikiText-103 split sizes are in number of tokens, while others are in number of instances.
# B EXPERIMENTAL DETAILS
Table 5 summarizes some statistics of the datasets used in our experiments. Our implementation is based on JAX.15 Table 6: WMT14 EN-DE development set performance varying the number of random matrices to sample from during training. No beam search or checkpoint averaging is used.
<table><tr><td># Random Matrices</td><td>1</td><td>50</td><td>100</td><td>200</td></tr><tr><td>BLEU</td><td>24.0</td><td>25.7</td><td>25.8</td><td>25.8</td></tr></table>
During training, we sample a different random projection matrix for each attention head. Preliminary experiments suggest this performs better than using the same random projection throughout training (Table 6). Our conjecture is that this helps keep the attention heads from “over committing” to any particular random projection (Peng et al., 2020). To avoid the overhead of sampling from Gaussian during training, we do this in an offline manner. I.e., before training we construct a pool of random matrices (typically 200), at each training step we draw from the pool. At test time each attention head uses the same random projection, since no accuracy benefit is observed by using different ones for different test instances.
# B.1 LANGUAGE MODELING
We compare the models using two model size settings, summarized in Table 7. We use the fixed sinusoidal position embeddings by Vaswani et al. (2017). All models are trained for up to 150K gradient steps using the Adam optimizer (Kingma & Ba, 2015). No $\ell _ { 2 }$ -regularization is used. We apply early stopping based on development set perplexity. All models are trained using 16 TPU v3 accelerators, and tested using a single TPU v2 accelerator.
Table 7: Hyperparameters used in the language modeling experiments.
<table><tr><td>Hyperprams.</td><td>Small</td><td>Big</td></tr><tr><td>#Layers</td><td>6</td><td>16</td></tr><tr><td>#Heads</td><td>8</td><td>16</td></tr><tr><td>Embedding Size</td><td>512</td><td>1024</td></tr><tr><td>Head Size</td><td>64</td><td>64</td></tr><tr><td>FFN Size</td><td>2048</td><td>4096</td></tr><tr><td>Batch Size</td><td>64</td><td>64</td></tr><tr><td>Learning Rate</td><td>[1 × 10-4,2.5 × 10-4,5 × 10-4]</td><td></td></tr><tr><td>Warmup Steps</td><td>6000</td><td>6000</td></tr><tr><td>Gradient Clipping Norm</td><td>0.25</td><td>0.25</td></tr><tr><td>Dropout</td><td>[0.05, 0.1]</td><td>[0.2, 0.25, 0.3]</td></tr><tr><td>Random Feature Map Size</td><td>64</td><td>64</td></tr></table>
# B.2 MACHINE TRANSLATION
WMT14. We use the fixed sinusoidal position embeddings by Vaswani et al. (2017). For both EN-DE and EN-FR experiments, we train the models using the Adam (with $\beta _ { 1 } = 0 . 1$ , $\beta _ { 2 } = 0 . 9 8$ , and $\epsilon = 1 0 ^ { - 9 }$ ) optimizer for up to 350K gradient steps. We use a batch size of 1,024 instances for EN-DE, while 4,096 for the much larger EN-FR dataset. The learning rate follows that by Vaswani et al. (2017). Early stopping is applied based on development set BLEU. No $\ell _ { 2 }$ regularization or gradient clipping is used. All models are trained using 16 TPU v3 accelerators, and tested using a single TPU v2 accelerator. Following standard practice, we average 10 most recent checkpoints at test time. We evaluate the models using SacreBLEU (Post, 2018).16 A beam search with beam size 4 and length penalty 0.6 is used. Other hyperparameters are summarized in Table 8.
Table 8: Hyperparameters used in the machine translation experiments.
<table><tr><td>Hyperprams.</td><td>WMT14</td><td>IWSLT14</td></tr><tr><td>#Layers</td><td>6</td><td>6</td></tr><tr><td>#Heads</td><td>8</td><td>8</td></tr><tr><td>Embedding Size</td><td>512</td><td>512</td></tr><tr><td>Head Size</td><td>64</td><td>64</td></tr><tr><td>FFN Size</td><td>2048</td><td>2048</td></tr><tr><td>Warmup Steps</td><td>6000</td><td>4000</td></tr><tr><td>Dropout</td><td>0.1</td><td>0.3</td></tr><tr><td>Cross Attention Feature Map</td><td>128</td><td>128</td></tr><tr><td>Causal Attention Feature Map</td><td>64</td><td>64</td></tr></table>
# C MORE ANALYSIS RESULTS
C.1 MORE RESULTS ON DECODING SPEED AND MEMORY OVERHEAD
Figure 3 compares the RFA’s unconditional decoding speed and memory against the softmax attention. The setting is the same as that in $\ S 5$ except that here the models do not have an encoder. This experiment aims to simulate the applications such as sampling from a language model.
# C.2 EFFECT OF RANDOM FEATURE SIZE
This section studies how the size of $\phi ( \cdot )$ affects the performance. Table 9 summarize RFAGaussian’s performance on WMT14 EN-DE development set. The model and training are the same as that used in $\ S 4 . 2$ except random feature size. Recall from $\ S 2 . 2$ that the size of $\bar { \phi } ( \cdot )$ is $2 D$ for
 Figure 3: Unconditional decoding speed (left) and memory overhead (right) varying the output lengths. All models are tested on a single TPU v2 accelerator, with greedy decoding and batch size 16.
RFA-Gaussian. When the size of $\phi ( \cdot )$ is too small (32 or 64 for cross attention, 32 for causal attention), training does not converge. We observe accuracy improvements by using random features sufficiently large (256 for cross attention and 128 for causal attention); going beyond that, the benefit is marginal.
<table><tr><td>Size</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td>BLEU</td><td>N/A</td><td>N/A</td><td>24.9</td><td>25.8</td><td>26.0</td></tr></table>
<table><tr><td> Size</td><td>32</td><td>64</td><td>128</td><td>256</td><td>512</td></tr><tr><td>BLEU</td><td>N/A</td><td>25.3</td><td>25.8</td><td>25.8</td><td>25.6</td></tr></table>
(a) Varying cross attention $\phi$ sizes while fixing that of causal attention to be 128.
(b) Varying causal attention $\phi$ sizes while fixing that of cross attention to be 256.
Table 9: WMT14 EN-DE development set performance of RFA-Gaussian (the size of $\phi$ is $2 D$ ; $\ S 2 . 2 )$ varying the random feature sizes. N/A indicates training does not converge. No beam search or checkpoint averaging is used.
# C.3 TRAIN AND EVALUATE WITH DIFFERENT ATTENTION FUNCTIONS
RFA achieves comparable performance to its softmax counterpart. Does this imply that it learns a good approximation to the softmax attention? To answer this question, we consider:
(i) an RFA-Gaussian model initialized from a pretrained softmax-transformer; (ii) a softmax-transformer initialized from a pretrained an RFA-Gaussian model.
If RFA’s good performance can be attributed to learning a good approximation to softmax, both, without finetunining, should perform similarly to the pretrained models. However, this is not the case on IWSLT14 DE-EN. Both pretrained models achieve more than 35.2 development set BLEU. In contrast, (i) and (ii) respectively get 2.3 and 1.1 BLEU without finetuning, hardly beating a randomly-initialized untrained model. This result aligns with the observation by Choromanski et al. (2021), and suggests that it is not the case that RFA performs well because it learns to imitate softmax attention’s outputs.
# C.4 KNOWLEDGE TRANSFER FROM SOFTMAX ATTENTION TO RFA
We first supplement the observation in Appendix C.3 by finetuning (i) on the same pretraining data. Figure 4 plots the learning curves. It takes RFA roughly 1,500 steps to reach similar training loss to the pretrained model. As a baseline, “RFA Reset” resets the multihead attention parameters (i.e., those for query, key, value, and output projections) to randomly initialized ones. Its learning curve is similar to that of (i), suggesting that the pretrained multihead attention parameters are no more useful to RFA than randomly initialized ones. To further confirm this observation, “softmax Reset”
 Figure 4: Finetuning an RFA-Gaussian model with its parameters initialized from a pretrained softmax-transformer. “Reset” indicates resetting the multihead attention parameters to randomlyinitialized ones. The dashed line indicates the training loss of the pretrained model.
resets the multihead attention parameters without changing the attention functions. It converges to the pretraining loss in less than 200 steps.
Takeaway. From the above results on IWSLT14, pretrained knowledge in a softmax transformer cannot be directly transferred to an RFA model. However, from Figure 4 and a much larger-scale experiment by Choromanski et al. (2021), we do observe that RFA can recover the pretraining loss, and the computation cost of finetuning is much less than training a model from scratch. This suggests some potential applications. For example, one might be able to initialize an RFA language model from a softmax transformer pretrained on large-scale data (e.g., GPT-3; Brown et al., 2020), and finetune it at a low cost. The outcome would be an RFA model retaining most of the pretraining knowledge, but is much faster and more memory-friendly to sample from. We leave such exploration to future work..gitattributes+256
parse/train/0migj5lyUZl/0migj5lyUZl.mdAdded+360
parse/train/0migj5lyUZl/0migj5lyUZl_content_list.jsonAdded+1769
parse/train/0migj5lyUZl/0migj5lyUZl_middle.jsonAdded
parse/train/0migj5lyUZl/0migj5lyUZl_model.jsonAdded
parse/train/AY8zfZm0tDd/AY8zfZm0tDd.mdAdded+578
parse/train/AY8zfZm0tDd/AY8zfZm0tDd_content_list.jsonAdded
parse/train/AY8zfZm0tDd/AY8zfZm0tDd_middle.jsonAdded
parse/train/AY8zfZm0tDd/AY8zfZm0tDd_model.jsonAdded
parse/train/BJlgNh0qKQ/BJlgNh0qKQ.mdAdded+532
parse/train/BJlgNh0qKQ/BJlgNh0qKQ_content_list.jsonAdded
parse/train/BJlgNh0qKQ/BJlgNh0qKQ_middle.jsonAdded
parse/train/BJlgNh0qKQ/BJlgNh0qKQ_model.jsonAdded
parse/train/Bkl086VYvH/Bkl086VYvH.mdAdded+193
parse/train/Bkl086VYvH/Bkl086VYvH_content_list.jsonAdded+1057
parse/train/Bkl086VYvH/Bkl086VYvH_middle.jsonAdded
parse/train/Bkl086VYvH/Bkl086VYvH_model.jsonAdded
parse/train/Goz-qsH1F14/Goz-qsH1F14.mdAdded+288
parse/train/Goz-qsH1F14/Goz-qsH1F14_content_list.jsonAdded+1543
parse/train/Goz-qsH1F14/Goz-qsH1F14_middle.jsonAdded
parse/train/Goz-qsH1F14/Goz-qsH1F14_model.jsonAdded
parse/train/H1lVvgHKDr/H1lVvgHKDr.mdAdded+243
parse/train/H1lVvgHKDr/H1lVvgHKDr_content_list.jsonAdded+1293
parse/train/H1lVvgHKDr/H1lVvgHKDr_middle.jsonAdded
parse/train/H1lVvgHKDr/H1lVvgHKDr_model.jsonAdded
parse/train/HJxiMAVtPH/HJxiMAVtPH.mdAdded+444
parse/train/HJxiMAVtPH/HJxiMAVtPH_content_list.jsonAdded
parse/train/HJxiMAVtPH/HJxiMAVtPH_middle.jsonAdded
parse/train/HJxiMAVtPH/HJxiMAVtPH_model.jsonAdded
parse/train/Hk0olMdZOIU/Hk0olMdZOIU.mdAdded+275
parse/train/Hk0olMdZOIU/Hk0olMdZOIU_content_list.jsonAdded+1305
parse/train/Hk0olMdZOIU/Hk0olMdZOIU_middle.jsonAdded
parse/train/Hk0olMdZOIU/Hk0olMdZOIU_model.jsonAdded
parse/train/QtTKTdVrFBB/QtTKTdVrFBB.mdAdded+537
parse/train/QtTKTdVrFBB/QtTKTdVrFBB_content_list.jsonAdded
parse/train/QtTKTdVrFBB/QtTKTdVrFBB_middle.jsonAdded
parse/train/QtTKTdVrFBB/QtTKTdVrFBB_model.jsonAdded
parse/train/RovX-uQ1Hua/RovX-uQ1Hua.mdAdded
parse/train/RovX-uQ1Hua/RovX-uQ1Hua_content_list.jsonAdded
parse/train/RovX-uQ1Hua/RovX-uQ1Hua_middle.jsonAdded
parse/train/RovX-uQ1Hua/RovX-uQ1Hua_model.jsonAdded
parse/train/SUyxNGzUsH/SUyxNGzUsH_model.jsonAdded
parse/train/SkeXehR9t7/SkeXehR9t7_content_list.jsonAdded
parse/train/SkeXehR9t7/SkeXehR9t7_middle.jsonAdded
parse/train/cu7IUiOhujH/cu7IUiOhujH.mdAdded
parse/train/cu7IUiOhujH/cu7IUiOhujH_content_list.jsonAdded
parse/train/cu7IUiOhujH/cu7IUiOhujH_middle.jsonAdded
parse/train/cu7IUiOhujH/cu7IUiOhujH_model.jsonAdded
parse/train/ryH20GbRW/ryH20GbRW.mdAdded
parse/train/ryH20GbRW/ryH20GbRW_content_list.jsonAdded