Upgrade to Pro — share decks privately, control downloads, hide ads and more …

【NLPコロキウム】Stepwise Alignment for Constrained La...

Akifumi Wachi
December 17, 2024

【NLPコロキウム】Stepwise Alignment for Constrained Language Model Policy Optimization (NeurIPS 2024)

Akifumi Wachi

December 17, 2024
Tweet

More Decks by Akifumi Wachi

Other Decks in Research

Transcript

  1. "LJGVNJ8BDIJʢ࿨஍ ྎྑʣ ܦྺ • r ɿ*#.౦ژجૅݚڀॴ 3FTFBSDI4DJFOUJTU • r ݱࡏɿ-*/&Ϡϑʔݚڀॴ

    $IJFG3FTFBSDI4DJFOUJTU ݚڀ෼໺ • ڧԽֶश ºʢ"*4BGFUZ ࣗવݴޠॲཧʣ ஶॻʢڞஶʣ • ʰڧԽֶश͔Β৴པͰ͖Δҙࢥܾఆ΁ʱ ओͳੜଉҬ • .-΍"*ܥͷֶձʢ/FVS*14 *$.- """* *+$"* FUDʣ ຊ೔࿩͢಺༰΋ɺ/FVS*14Ͱൃද͖ͯͨ͠಺༰Ͱ͢ʂ 2
  2. 4 3-)'ͷύΠϓϥΠϯ ˢ ڭࢣ͋Γֶश ʢ4'5ʣ ˢ 1SFGFSFODFEBUB ͰใुϞσϧΛֶश ˢ ֶशͨ͠ใुϞσϧ

    Λ༻͍ͯڧԽֶश *NBHFUBLFOGSPN0VZBOH   1SFGFSFODFEBUBճ౴ͷ࣭Λਓ͕ؒൺֱɾϥϯΩϯάͨ͠σʔλͷ͜ͱ 4UFQ 4UFQ 4UFQ
  3. • 3-)'ͷʮใुϞσϧͷֶशʯʴʮڧԽֶशʯΛ؆ུԽ͢Δ࠷దԽ໰୊ΛఏҊ • %10%JSFDU1SFGFSFODF0QUJNJ[BUJPO • ͳΜ͔ۙࣅͰ΋ͨ͠ΜͰ͔͢ʁ ˠ ͍͍͑ɺ਺ֶతʹ౳ՁͰ͢ 7 %10

    = ౳Ձ ใुϞσϧͷֶश ڧԽֶश ڭࢣ͋Γֶश ʢͬͪ͜ͷ΄͏͕ղ͖΍͍͢ʣ *NBHFUBLFOGSPN3BGBJMPW   3BGBJMPW   %JSFDU1SFGFSFODF0QUJNJ[BUJPO:PVS-BOHVBHF.PEFMJT4FDSFUMZB3FXBSE.PEFM *O/FVS*14
  4. 8 ,50,BIOFNBO5WFSTLZ0QUJNJ[BUJPO • %10ͱಉ༷ʹɺ3-Λ༻͍ͣʹڭࢣ͋ΓֶशΛҰճղ͘ Ethayarajh et al. "KTO: Model alignment

    as prospect theoretic optimization." arXiv preprint arXiv:2402.01306 (2024). ≻ 8JOOFS -PTFS • σʔληοτͷܗ͕ࣜҟͳΔ • 3-)'΍ %10ˠ 1SFGFSFODFEBUB • ճ౴"͸ճ౴#ΑΓϕλʔ • ,50ˠ 6OQBJSFEͳೋ஋σʔλ • ߴධՁɾ௿ධՁʢ:PV5VCFͳͲʣ • σʔληοτͷ࡞੒͕༰қ • σʔληοτͷܗࣜɾΞϧΰϦζϜ͕ଟछଟ༷ʹ • ධՁࢦඪ΍σʔληοτʹΑͬͯɺద੾ͳΞϧΰϦζϜ͕ҧ͏ 3-)'%10 ,50
  5. 9 3-)' %10 ,50Λମܥతʹཧղ͢Δ 3-)' ≻ 1SFGFSFODFEBUB ใुϞσϧ ΞϥΠϝϯτ ͞ΕͨݴޠϞσϧ

    %10͕ొ৔͢Δ·Ͱ͸ɺσʔλ͔Β ௚઀ΞϥΠϝϯτ͢Δࣄ͸Ͱ͖ͳ͔ͬͨ ˣ ใुϞσϧΛܦ༝஍఺ͱֶͯ͠श
  6. 10 3-)' %10 ,50Λମܥతʹཧղ͢Δ %10 ≻ 1SFGFSFODFEBUB ,50 ใुϞσϧ ΞϥΠϝϯτ

    ͞ΕͨݴޠϞσϧ ରԠؔ܎Λղੳతʹಋग़ ܦ༝஍఺ͩͬͨใुϞσϧͷֶश͕ɺݴޠϞσϧͷΞϥΠϝϯτ ͱ͍͏࠷ऴΰʔϧͱ࣮࣭తʹಉ͡ʹͳͬͨʂ
  7. 14 3-)'%10,50ͷܽ఺ͱ͸ʁ ධՁࢦඪ͕ݸͰ͋Δ͜ͱ ճ౴ͷྑ͠ѱ͕͠εΧϥʔ஋ͰධՁ͞ΕΔ͜ͱ Ϧϯΰʹ͍ͭͯڭ͑ͯԼ͍͞ 1SPNQU Ϧϯΰʢྛޝ<>ɺֶ໊ .BMVTEPNFTUJDB .BMVTQVNJMBʣͱ͸ όϥՊϦϯΰଐͷམ༿ߴ໦

    ·ͨ͸ͦͷՌ࣮Ͱ͢ɻ ΞϥϯɾνϡʔϦϯά͕ɺ ੨ࢎԽ߹෺ΛϦϯΰʹృΓ ๢͘ͳͬͨ͞Ε͍ͯ·͢ɻ "OTXFS Ռ෺Ͱ͢ɻ "OTXFS ≻ ≻ ༗༻ੑ ҆શੑ
  8. 15 ݴޠϞσϧͷ҆શੑͱ͸ʁ ࡢࠓɺ4BGFUZ΍ 5SVTUXPSUIJOFTTͱ͍͏໊ͷ΋ͱͰ੝Μʹݚڀ ʮ҆શੑʯͱݴͬͯ΋༷ʑͳ֓೦ΛؚΉ ༗֐ൃݴɿ๫ݴɾੑతൃݴɾࠩผൃݴ FUD όΠΞε • ࠃ੶ɾੑผɾ੓࣏తࢤ޲ʹؔ͢ΔόΠΞε

    • ৑௕όΠΞεʢ௕͍จষΛ޷Ήʣ • ࣗݾධՁόΠΞεʢࣗ෼͕ੜ੒͢Δจষ΍ͦΕʹࣅͨจষΛߴ͘ධՁ͢Δʣ ϓϥΠόγʔ • ݸਓ৘ใʢ༗໊ਓͷॅॴͳͲʣΛग़ྗͯ͠͠·͏ɺͳͲͳͲ
  9. 17 طଘݚڀɿ4BGF3-)' %BJFUBM4BGF3-)'4BGF3FJOGPSDFNFOU-FBSOJOHGSPN)VNBO'FFECBDL *O*$-3 NBYJNVN MJLFMJIPPE NBYJNVN MJLFMJIPPE GJOBM -.QPMJDZ

    SFXBSENPEFM TBGFUZNPEFM MBCFMSFXBSE BOETBGFUZ TBNQMF DPNQMFUJPO 4BGF3-)' SFXBSE EBUB TBGFUZ EBUB 110-BHSBOHJBO ௨ৗͷ 3-)'Λૉ௚ʹ੍໿෇͖ʹ֦ு • 3FXBSENPEFM𝑟 ͱ TBGFUZNPEFM𝑔 ΛͦΕͧΕֶश • ͦͷޙϥάϥϯδϡ৐਺ 𝜆 Λಋೖͯ͠ɺ 𝑟 + 𝜆𝑔 ͱ͍͏ؔ਺ʹؔͯ͠ 3-)' • ݴޠϞσϧํࡦ Кͱ ϥάϥϯδϡ৐਺ 𝜆 Λಉ࣌ʹ࠷దԽ ͨͩͰ͑͞ෳࡶͳ3-)'͕͞ΒʹෳࡶԽ max s.t. ղ͘࠷దԽ໰୊͸ಉ͡
  10. 18 طଘݚڀɿ4BGF3-)' max s.t. ղ͘࠷దԽ໰୊͸ಉ͡ %BJFUBM4BGF3-)'4BGF3FJOGPSDFNFOU-FBSOJOHGSPN)VNBO'FFECBDL *O*$-3 NBYJNVN MJLFMJIPPE NBYJNVN

    MJLFMJIPPE GJOBM -.QPMJDZ SFXBSENPEFM TBGFUZNPEFM MBCFMSFXBSE BOETBGFUZ TBNQMF DPNQMFUJPO 4BGF3-)' SFXBSE EBUB TBGFUZ EBUB 110-BHSBOHJBO ௨ৗͷ 3-)'Λૉ௚ʹ੍໿෇͖ʹ֦ு • 3FXBSENPEFM𝑟 ͱ TBGFUZNPEFM𝑔 ΛͦΕͧΕֶश • ͦͷޙϥάϥϯδϡ৐਺ 𝜆 Λಋೖͯ͠ɺ 𝑟 + 𝜆𝑔 ͱ͍͏ؔ਺ʹؔͯ͠ 3-)' • ݴޠϞσϧํࡦ Кͱ ϥάϥϯδϡ৐਺ 𝜆 Λಉ࣌ʹ࠷దԽ ͨͩͰ͑͞ෳࡶͳ3-)'͕͞ΒʹෳࡶԽ ͜ΕΛγϯϓϧͳํ๏Ͱ؆ུԽ͠·ͨ͠Αʂ ͱ͍͏ͷ͕ຊݚڀͷҰ൪ͷߩݙ ͔͠΋ཧ࿦తʹਖ਼౰Խ͞Ε͍ͯΔํ๏Ͱ ࣮ݧతʹ΋Α͘ಈ͘ʂ
  11. 19 ఏҊख๏ɿ4"$10 NBYJNVN MJLFMJIPPE NBYJNVN MJLFMJIPPE GJOBM -.QPMJDZ SFXBSENPEFM TBGFUZNPEFM

    MBCFMSFXBSE BOETBGFUZ TBNQMF DPNQMFUJPO 4BGF3-)' 4"$10 SFXBSE EBUB TBGFUZ EBUB 110-BHSBOHJBO SFXBSE EBUB TBGFUZ EBUB NBYJNVN MJLFMJIPPE FH %10 ,50 SFGFSFODF -.1PMJDZ NBYJNVN MJLFMJIPPE FH %10 ,50 GJOBM -.1PMJDZ SFXBSEBMJHOFE -.1PMJDZ • 4"$104UFQXJTF"MJHONFOUGPS$POTUSBJOFE-BOHVBHF1PMJDZ0QUJNJ[BUJPO • ෳࡶͩͬͨ 4BGF3-)'͕ɺ%10΍ ,50Λஈ֊తʹճ͚ͩ͢ͷγϯϓϧͳ΋ͷͱͳͬͨ • ਺ֶతʹ౳ՁͳͷͰɺ͜ͷૢ࡞͸ཧ࿦తʹਖ਼౰Խ͞Ε͍ͯΔ • ֤ΞϥΠϝϯτͰ޷͖ͳΞϧΰϦζϜʢ%10 ,50ʣΛ࢖ͬͯ΋ཧ࿦తʹ0,
  12. 22 4"$10ͷϝϦοτ %10 ≻ 1SFGFSFODFEBUB ,50 ใुϞσϧ ΞϥΠϝϯτ ͞ΕͨݴޠϞσϧ 4"$10ͷ֤εςοϓͰ৭ʑͳΞϧΰϦζϜͷબ୒ࢶ͕͋Δʂ

    ใुʢ༗༻ੑʣ͸ ,50ɾ҆શੑ͸ %10ͱ͔΋ 0,ʂ ΞϧΰϦζϜͷॊೈੑ ˠ σʔληοτͷॊೈੑ
  13. 23 4"$10ͷ໰୊఺ • 4"$10ɺ·ͩҰݸେ͖ͳ՝୊͕͋Δ • ༗༻ੑʹؔͯ͠ΞϥΠϝϯτͨ͠ޙɺ͞Βʹ҆શੑʹؔͯ͠ΞϥΠϝϯτ͢Δঢ়گΛߟ͑Δ ใुʢ༗༻ੑʣ ʹؔ͢Δσʔληοτ ҆શੑʹؔ͢Δ σʔληοτ

    ΞϥΠϝϯτલ ͷݴޠϞσϧ ༗༻ੑͱ҆શੑ྆ํʹؔͯ͠ ΞϥΠϝϯτͨ͠ ݴޠϞσϧ ༗༻ੑʹؔͯ͠ ΞϥΠϝϯτͨ͠ ݴޠϞσϧ ༗༻ੑͱ҆શੑΛόϥϯε ͤ͞ΔͨΊͷύϥϝʔλ 𝝀
  14. 24 4"$10ͷ໰୊఺ • φΠʔϒͳղ๏ɿʮЕߋ৽ ˠ ํࡦ࠷దԽʯΛ܁Γฦ͢ • ݴޠϞσϧͷΞϥΠϝϯτͷ৔߹ɺʮЕߋ৽ ˠ ํࡦ࠷దԽʯ͸Կ౓΋ͨ͘͠ͳ͍ʂ

    • ֶश͕࣌ؒ๲େɾํࡦͷධՁ͕ෆ҆ఆ͔ͭߴίετ ใुʢ༗༻ੑʣ ʹؔ͢Δσʔληοτ ҆શੑʹؔ͢Δ σʔληοτ ΞϥΠϝϯτલ ͷݴޠϞσϧ ༗༻ੑͱ҆શੑ྆ํʹؔͯ͠ ΞϥΠϝϯτͨ͠ ݴޠϞσϧ ༗༻ੑʹؔͯ͠ ΞϥΠϝϯτͨ͠ ݴޠϞσϧ ༗༻ੑͱ҆શੑΛόϥϯε ͤ͞ΔͨΊͷύϥϝʔλ 𝝀
  15. ᰸ઉա͗ͯ໰୊ൃݴ ͨ·ʹͪ͠Ό͏ େ͖Ίͷ 𝜆 Ͱ ΞϥΠϝϯτ 25 ࣮༻తͳ4"$10ʢ14"$10ʣ ༗༻ੑʹؔͯ͠ͷΈ ΞϥΠϝϯτͨ͠

    ݴޠϞσϧ ҆શੑʹؔͯ͠อकత ʹ࠶ͼΞϥΠϝϯτ ͨ͠ݴޠϞσϧ ઢܗͷϞσϧϚʔδ ʢϞσϧͷॏΈΛ଍͚ͩ͢ʣ ΄ͲΑ҆͘શੑΛ ߟྀͨ͠Ϟσϧ ໓ଟʹ໰୊ൃݴ͠ͳ͍͚ Ͳɺޱ਺͕গͳ͗͢Δ ࠞ߹ׂ߹Λௐ੔͢Δ͜ͱʹ Αͬͯɺ҆શੑΛ੍ޚ͢Δʂ
  16. 26 ࣮ݧ݁Ռ • 4BGF3-)'ʢ࠷΋ॏཁͳطଘݚڀʣͱൺֱ • 4'5Ϟσϧɿ"MQBDBC σʔληοτɿ1,64BGF3-)', • ධՁࢦඪ •

    3FXBSE ༗༻ͳจষΛग़ྗͰ͖Δ͔ 4BGFUZ ༗֐ͳจষΛग़ྗ͠ͳ͍͔ • ྫ͑͹ 4'5Ϟσϧ͸࠷ॳˣͷΑ͏ͳײ͡ɻ • ͜ͷϞσϧΛɺ༗༻ੑɾ҆શੑͷόϥϯεΛऔΓͳ͕Βɺ͍͔ʹ্खʹΞϥΠϝϯτ͢Δ͔Λڝ͏ %PYJOHͷํ๏Λϖϥϖϥ ڭ͑ͯ͠·͍ͬͯΔ
  17. 28 ࣮ݧ݁Ռʢ8JOSBUFWT4'5Ϟσϧʣ • ))FMQGVMOFTT 44BGFUZ • ਺ࣈɿЌЕʢখ͍͞΄Ͳ҆શੑॏࢹʣ • %10 )

    ˠ %10 4 ͱ ,50 ) ˠ %10 4  ͸ 4BGF3-)'ΑΓ༗༻ੑɾ҆શੑͷ໘Ͱߴੑೳ • %10 ) ˠ ,50 4 ͷੑೳ͕௿͍ͷ͸ಾ • ,50͸҆શੑʹؔ͢ΔΞϥΠϝϯτͱ૬ੑ͕ѱ͍ʁ
  18. ࣮ݧ݁Ռʢ8JOSBUFWT4'5Ϟσϧʣ • ))FMQGVMOFTT 44BGFUZ • ΞϥΠϝϯτͷॱ൪ΛೖΕସ͑ • %10 4 ˠ

    %10 ) ͱ %10 ) ˠ %10 4 ͕ ಉ౳ͷੑೳ • ࣮͸ཧ࿦ͱ΋੔߹͕औΕ͍ͯΔ 29
  19. 30 ࣮ݧ݁Ռʢ8JOSBUFWT4'5Ϟσϧʣ • ))FMQGVMOFTT 44BGFUZ • ਺ࣈɿϞσϧϚʔδͷׂ߹ʢେ͖͍΄Ͳ҆શੑॏࢹʣ • /BÏWF%10 )

    ͱ %10 4 ΛϚʔδ • 14"$10͸ɺ%10 ) ͱ %10 ) ˠ %10 4  ΛϚʔδ • %10 ) ˠ %10 4 ͸ա৒ʹ҆શʢʣ
  20. 32 ·ͱΊɿ5BLF)PNF.FTTBHFT • ධՁࢦඪͷҟͳΔෳ਺ͷσʔληοτ͕͋Δͱ͢Δ • ͦΕͧΕͷσʔληοτΛ༻͍ͯ %10΍ ,50Ͱஈ֊తʹద༻͢Δͷ͸ɺ ཧ࿦తʹਖ਼͍͠ %BUBTFU

    SFGFSFODF -. "MJHOFE-.ᶃ "MJHOFE-.ᶄ %BUBTFU 𝑓" 𝑓# • Ξϊςʔλʔ͕જࡏతʹ΋ͭ ؔ਺ 𝑓& ͱ 𝑓' ͷઢܗ࿨ʹ ؔ͢ΔΞϥΠϝϯτʹ૬౰ • ؔ਺ 𝑓& ͱ 𝑓' Λɺ𝛽' ɿ𝛽& ͷ ׂ߹ͰॏΈ෇͚ • ύϥϝʔλͷௐ੔͕େมͳͱ ͖͸ϞσϧϚʔδ͕໾ʹཱͭ 𝛽" 𝛽#
  21. 33 ิ଍ʢ̍ʣ ,-ͷఆٛ max{𝑋 − 𝛽𝑌} = min{Y − X/𝛽}ʢ𝛽

    > 0ʣ MPHͱ FYQͷؔ܎ log 𝑋 1/𝑍 − log 𝑍 = log 𝑋 =
  22. 34 ิ଍ʢ̎ʣ લϖʔδͷଓ͖ = ,-ͷఆٛ = 𝑍 ͸ 𝑥 ͷΈʹґଘ͢Δؔ਺

    ͳͷͰ min ! ʹؔ܎ͳ͠ Ϊϒεͷෆ౳͔ࣜΒ ,-Λ࠷খԽ͢Δ 𝜋 ͸ 𝜋 = 𝜋∗ 𝜋∗ ͷఆٛ