上个月京吹新剧场版上映,宇治各种宣发力度挺足的。正好读研时的同学来京都玩,一起去逛了宇治,顺便品抹茶赏樱花。上图就是在宇治市观光中心拍的(#^.^#)。
关于自己的科研进展,目前是读博期间第一份工作已经基本结束,之前先参加了个AISTATS 2026在摩洛哥办的首届workshop并进行了poster发表(论文链接:Multi-Class Classification with absention Based on Crammer–Singer Surrogate with Linear Growth Rate [1] ),然后在摩洛哥的卡萨布兰卡机场完成了往NeurIPS的正式论文提交。这份工作的贡献主要在于基于Crammer-Singer损失为多分类弃权学习给出了凸的代理损失函数族,并在一定的函数配置下可以达到 O ( t ) " role="presentation">O ( t ) O ( t ) 的excess risk rate,好于目前Mao et al.[2] 那份工作的O ( max { t , t } ) " role="presentation">O ( max { t , √ t } ) O ( max { t , t } ) 的结果(PS: excess risk rate考虑的是t → 0 " role="presentation">t → 0 t → 0 的渐进结果)。关于弃权学习和Mao et al.那份工作的介绍可参见我往期的博客《学习理论:预测器-拒绝器多分类弃权学习 》[3] ,后续如果我的那份工作被正式录用了的话也计划写一篇博客进行分享(包括一些在其中用到的证明技巧)。目前的话导师那边已经让我开始构思下一份工作了,于是我接着调研了一下在线弃权学习[4] 的领域情况,本篇博客也就拟对这些领域进行一个大致的介绍。
1 在线弃权学习问题定义
设X " role="presentation">X X 为输入空间(例如R d " role="presentation">R d R d 的有界子集),H " role="presentation">H H 为预测器h : X → Y " role="presentation">h : X → Y h : X → Y 的函数类,并假设h ∈ H " role="presentation">h ∈ H h ∈ H 在有标签样本对( x , y ) ∈ X × Y " role="presentation">( x , y ) ∈ X × Y ( x , y ) ∈ X × Y 所计算的损失l ( y , h ( x ) ) " role="presentation">l ( y , h ( x ) ) l ( y , h ( x ) ) 可以定义为0/1损失I h ( x ) ≠ y " role="presentation">I h ( x ) ≠ y I h ( x ) ≠ y 或一些其它满足Lipschitz性质的变体。 在在线弃权学习中,有K " role="presentation">K K 个专家(expert) 对应不同的预测器h 1 ( ⋅ ) , ⋯ , h K ( ⋅ ) " role="presentation">h 1 ( ⋅ ) , ⋯ , h K ( ⋅ ) h 1 ( ⋅ ) , ⋯ , h K ( ⋅ ) (可能还会有拒绝器),分别对应K " role="presentation">K K 个不同的动作(类似bandit中arm)。依赖于设置,K " role="presentation">K K 可以为有限或(不可数)无限的。假设可供选择的专家集合对学习算法是事先已知的。
大致地说,在线弃权学习的一般流程如下:
在第t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] 轮时,在线算法接收输入x t ∈ X " role="presentation">x t ∈ X x t ∈ X ,并根据专家1 , 2 , ⋯ , K " role="presentation">1 , 2 , ⋯ , K 1 , 2 , ⋯ , K 的输出结果来判定是做预测还是弃权(可能是随机抽取一个专家I t " role="presentation">I t I t ,也可能是多个专家的加权平均):
若选择弃权,则算法弃权并产生一个大小为弃权代价c ( x t ) ∈ [ 0 , 1 ] " role="presentation">c ( x t ) ∈ [ 0 , 1 ] c ( x t ) ∈ [ 0 , 1 ] 的损失;
否则,根据专家1 , ⋯ , K " role="presentation">1 , ⋯ , K 1 , ⋯ , K 的输出h 1 ( x t ) , ⋯ , h K ( x t ) " role="presentation">h 1 ( x t ) , ⋯ , h K ( x t ) h 1 ( x t ) , ⋯ , h K ( x t ) 的来进行预测(可能是随机抽取一个专家I t " role="presentation">I t I t ,也可能是多个专家的加权平均)。
然后,各个专家计算各自的损失L t , i " role="presentation">L t , i L t , i ,并根据损失更新各个专家的加权参数(如果有的话)。
专家i " role="presentation">i i 在有标签样本对z = ( x , y ) ∈ X × Y " role="presentation">z = ( x , y ) ∈ X × Y z = ( x , y ) ∈ X × Y 上的弃权损失(absention loss) 的典型定义方式为:
L ( h i , z ) = l ( y , h i ( x ) ) I 选择预测 + c I 选择弃权 " role="presentation">L ( h i , z ) = l ( y , h i ( x ) ) I 选 择 预 测 + c I 选 择 弃 权 L ( h i , z ) = l ( y , h i ( x ) ) I 选择预测 + c I 选择弃权
(出于简洁,我们假设弃权代价c ( x ) " role="presentation">c ( x ) c ( x ) 为一个独立于x " role="presentation">x x 的已知常数c ∈ [ 0 , 1 ] " role="presentation">c ∈ [ 0 , 1 ] c ∈ [ 0 , 1 ] )
这个弃权损失与我们在博客《学习理论:预测器-拒绝器多分类弃权学习》 [3] 中所介绍的类似,不过这里需要注意的是,标签y " role="presentation">y y 不一定对所有专家都是可知的:标签y " role="presentation">y y 可能仅当不弃权时可知[4] ,也可能仅当弃权的时候可知[8] ,也可能无论弃权与否都可知[9] 。而这也就导致了如上式所示的弃权损失函数并不一定对所有专家都是可观测的。对于前两种情况,仅有部分专家可以观测到如上式所示的损失函数,我们称其为是部分信息(partial information) 的 ,而最后一种情况所有专家都可以观测到如上式所示的损失函数,我们称其是 完全信息(full information) 的。
注 所谓部分信息设置可以视为介于完全信息和传统bandit 之间的一种设置[5][7] 。此三者的对比如下:
完全信息 : 每一轮t " role="presentation">t t 中,学习器可以观测到完整的损失函数L t ( ⋅ ) " role="presentation">L t ( ⋅ ) L t ( ⋅ ) ,因此可以利用函数的信息(比如梯度)更新模型。
bandit : 每一轮t " role="presentation">t t 中,学习器通常只能观测到损失函数在所选决策ξ I t " role="presentation">ξ I t ξ I t 上的值L t ( ξ I t ) " role="presentation">L t ( ξ I t ) L t ( ξ I t ) ,不能观测到损失函数在其它决策上的值。
部分信息 : 每一轮t " role="presentation">t t 中,学习器可以观测到损失函数在一个决策集合{ ξ i } " role="presentation">{ ξ i } { ξ i } (包括所选决策ξ I t " role="presentation">ξ I t ξ I t 在内)上的值{ L t ( ξ i ) } i " role="presentation">{ L t ( ξ i ) } i { L t ( ξ i ) } i 。
部分信息设置的在线学习有时也被称为附加信息的bandit(bandit with side-information) 。
和传统bandit问题相似,在线弃权学习也会考虑对抗(adversarial) 和随机(stochastic) 两种设置[5][7] 。
注 传统bandit问题中的对抗和随机设置如下:
对抗设置 每一轮t " role="presentation">t t 中,学习器选择arm ξ I t " role="presentation">ξ I t ξ I t 后,一个对手(adversary)对其行动赋予代价L t ( ξ I t ) " role="presentation">L t ( ξ I t ) L t ( ξ I t ) 。学习器可以观察到行动ξ I t " role="presentation">ξ I t ξ I t 的代价,除此之外什么也得不到。学习器的目标是最小化它的regret。
随机设置 每一轮t " role="presentation">t t 中,学习器选择arm ξ I t " role="presentation">ξ I t ξ I t 后,根据从一个分布中i.i.d采样的损失函数L t ( ⋅ ) " role="presentation">L t ( ⋅ ) L t ( ⋅ ) 来计算其代价L t ( ξ I t ) " role="presentation">L t ( ξ I t ) L t ( ξ I t ) 。学习器可以观察到行动ξ I t " role="presentation">ξ I t ξ I t 的代价,除此之外什么也得不到。学习器的目标是最小化它的regret。
具体在在线弃权学习中,它们的区别在于:对抗设置不会对序列z t = ( x t , y t ) , t ∈ [ T ] " role="presentation">z t = ( x t , y t ) , t ∈ [ T ] z t = ( x t , y t ) , t ∈ [ T ] 做出分布假设,而随机设置则会假设z t " role="presentation">z t z t i.i.d.地采自某个在X × Y " role="presentation">X × Y X × Y 上的分布D " role="presentation">D D 。在这两种设置中,都可以通过算法A " role="presentation">A A 的(伪)regret R T ( A ) " role="presentation">R T ( A ) R T ( A ) 来度量算法A " role="presentation">A A 的表现,如果在第t " role="presentation">t t 轮随机抽取了专家I t " role="presentation">I t I t ,那么它可以采用如下的方式来定义:
R T ( A ) = E [ ∑ t = 1 T L ( h I t , z t ) − inf i ∈ [ K ] ∑ t = 1 T L ( h i , z t ) ] " role="presentation">R T ( A ) = E [ T ∑ t = 1 L ( h I t , z t ) − inf i ∈ [ K ] T ∑ t = 1 L ( h i , z t ) ] R T ( A ) = E [ ∑ t = 1 T L ( h I t , z t ) − inf i ∈ [ K ] ∑ t = 1 T L ( h i , z t ) ]
其中期望所对应的随机性一是来源于算法所选择的{ I t } t = 1 T " role="presentation">{ I t } T t = 1 { I t } t = 1 T ,二是来源于在随机情形下所采样的{ z t } t = 1 T " role="presentation">{ z t } T t = 1 { z t } t = 1 T 。对于专门设置拒绝器的情况,式子中的h I t " role="presentation">h I t h I t 和h " role="presentation">h h 可以分别替换为( h I t , r I t ) " role="presentation">( h I t , r I t ) ( h I t , r I t ) 和( h , r ) " role="presentation">( h , r ) ( h , r ) 。
在随机设置下,考虑专家集合有限的情况,设此时有K " role="presentation">K K 个专家,则可以将专家 i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] 的期望损失和最优专家的期望损失分别表示为:
μ i = E z ∼ D [ L ( h i , z ) ] , μ ∗ = min i ∈ [ K ] μ i " role="presentation">μ i = E z ∼ D [ L ( h i , z ) ] , μ ∗ = min i ∈ [ K ] μ i μ i = E z ∼ D [ L ( h i , z ) ] , μ ∗ = min i ∈ [ K ] μ i
其中对于有拒绝器的情况h i " role="presentation">h i h i 可以替换为h " role="presentation">h h 。然后,可以Δ i " role="presentation">Δ i Δ i 表示μ i " role="presentation">μ i μ i 和μ ∗ " role="presentation">μ ∗ μ ∗ 之间的差距:
Δ i = μ i − μ ∗ " role="presentation">Δ i = μ i − μ ∗ Δ i = μ i − μ ∗
这一项经常出现在随机设置相关的regret界中。
2 仅当不弃权时反馈可知
现考虑仅当不弃权时反馈可知的情况,其代表性论文为《Online learning with absention》[4] 。该论文考虑在线二分类场景,设此时的预测器为h : X → R " role="presentation">h : X → R h : X → R (根据其正负号判断0/1类别),于是0/1损失可以写为I y h ( x ) ⩽ 0 " role="presentation">I y h ( x ) ⩽ 0 I y h ( x ) ⩽ 0 。此外,论文还另外设置有拒绝器r : X → R " role="presentation">r : X → R r : X → R 。设R " role="presentation">R R 为弃权函数r : X → R " role="presentation">r : X → R r : X → R 的函数类,r ⩽ 0 " role="presentation">r ⩽ 0 r ⩽ 0 表示对x ∈ X " role="presentation">x ∈ X x ∈ X 进行弃权(或者说拒绝),r > 0 " role="presentation">r > 0 r > 0 表示对x " role="presentation">x x 进行预测(或者说接受)。给定h i " role="presentation">h i h i ,一个与之相关的弃权函数r i " role="presentation">r i r i 的自然选择是形如 r i ( x ) = | h i ( x ) | − θ " role="presentation">r i ( x ) = | h i ( x ) | − θ r i ( x ) = | h i ( x ) | − θ 的基于置信度的弃权函数,其中θ " role="presentation">θ θ 为某个阈值。除此之外,也可以考虑更多一般形式的r i " role="presentation">r i r i 。
论文算法的基本流程大致如下:在第t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] 轮时,在线算法接收输入x t ∈ X " role="presentation">x t ∈ X x t ∈ X 并选择(可能是随机地)一个专家I t " role="presentation">I t I t 。
若r I t ( x t ) ⩽ 0 " role="presentation">r I t ( x t ) ⩽ 0 r I t ( x t ) ⩽ 0 ,则算法弃权并产生一个大小为弃权代价c ∈ [ 0 , 1 ] " role="presentation">c ∈ [ 0 , 1 ] c ∈ [ 0 , 1 ] 的损失。
否则,根据h I t ( x t ) " role="presentation">h I t ( x t ) h I t ( x t ) 的符号来进行预测,并接收真实标签y t ∈ { ± 1 } " role="presentation">y t ∈ { ± 1 } y t ∈ { ± 1 } 来计算损失l ( y t , h I t ( x t ) ) " role="presentation">l ( y t , h I t ( x t ) ) l ( y t , h I t ( x t ) ) 。
因此,( h , r ) " role="presentation">( h , r ) ( h , r ) 在标签对z = ( x , y ) " role="presentation">z = ( x , y ) z = ( x , y ) 上整个弃权损失L " role="presentation">L L 定义为:
L ( h , r ) = l ( y , h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0 " role="presentation">L ( h , r ) = l ( y , h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0 L ( h , r ) = l ( y , h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0
这里需要注意的是,如果学习器在第t " role="presentation">t t 轮选择预测(也即当r I t ( x ) > 0 " role="presentation">r I t ( x ) > 0 r I t ( x ) > 0 时),由于标签y t " role="presentation">y t y t 已经暴露给了它,它可以观察到每个专家 i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] 的损失L ( h i , r i , z t ) " role="presentation">L ( h i , r i , z t ) L ( h i , r i , z t ) 。然而,如果它在第t " role="presentation">t t 轮选择弃权(也即r I t ( x ) ⩽ 0 " role="presentation">r I t ( x ) ⩽ 0 r I t ( x ) ⩽ 0 ),则它将只观测到与在该轮中选择弃权的专家j " role="presentation">j j 相关的损失 L ( h j , r j , z t ) = c " role="presentation">L ( h j , r j , z t ) = c L ( h j , r j , z t ) = c ,其中j " role="presentation">j j 取自满足r j ( x t ) ⩽ 0 " role="presentation">r j ( x t ) ⩽ 0 r j ( x t ) ⩽ 0 的j " role="presentation">j j 集合。这是因为此时对所有这样的j " role="presentation">j j ,我们都有L ( h j , r j , z t ) = c " role="presentation">L ( h j , r j , z t ) = c L ( h j , r j , z t ) = c 。这里需要注意的是,在这两种情况中学习器都可以观测它自己动作I t " role="presentation">I t I t 的损失。
这种部分信息的在线学习设置可以用反馈图(feedback graph) 来描述。带反馈图的在线学习是一个囊括了多种在线学习设置的一般性框架,在完全信息设置下图是全连接的,而在传统bandit设置下顶点通常是只有自环且分离的。设依赖于x t " role="presentation">x t x t 的有向图G t abs = ( V , E t ) " role="presentation">G abs t = ( V , E t ) G t abs = ( V , E t ) 。这里,V = { ξ 1 , ⋯ , ξ K } " role="presentation">V = { ξ 1 , ⋯ , ξ K } V = { ξ 1 , ⋯ , ξ K } 表示图的有限顶点集,对应专家组成的有限集。E t " role="presentation">E t E t 表示第t " role="presentation">t t 轮时的有向边集合。如果当t " role="presentation">t t 轮时算法选择专家i " role="presentation">i i 时,专家j ∈ [ K ] " role="presentation">j ∈ [ K ] j ∈ [ K ] 的损失被观测到,则E t " role="presentation">E t E t 中将会存在边ξ i → ξ j " role="presentation">ξ i → ξ j ξ i → ξ j 。
因此,在仅当不弃权时反馈可知的设置下,反馈图是一个带自环的接近全连接的图,不过在预测顶点和弃权顶点之间,只有从预测顶点到弃权顶点的单向边(下图展示了一个当专家数K " role="presentation">K K 为5时的一个例子)。
从上图中可以看到反馈图G t abs " role="presentation">G abs t G t abs 完全由x t " role="presentation">x t x t 确定,这是由于x t " role="presentation">x t x t 确定后则可根据{ r i ( x t ) } " role="presentation">{ r i ( x t ) } { r i ( x t ) } 决定每个专家i " role="presentation">i i 的弃权情况,从而确定反馈图。
依据《Online learning with absention》[4] 这篇论文的作者的观点,对于这种设置下的弃权损失L ( h i , r i , z ) " role="presentation">L ( h i , r i , z ) L ( h i , r i , z ) ,难以找到其代理凸上界来使用在线凸优化方法。事实上,论文作者更多地是采用离散的视角,使用bandit中的许多技术来设计的算法。论文作者讨论了对抗和随机两种设置,我们下面以对抗设置为例进行介绍。而对抗设置又可以具体分为有限和无限个专家的场景。
我们先讨论有限多个专家的对抗设置。论文作者同时结合了诸如EXP3的标准有限arm的bandit算法和反馈图G t abs " role="presentation">G abs t G t abs 来为弃权场景设计在线算法,并将其称为EXP3-ABS(EXP3 with absention)[4] 。该算法为EXP3的变种,其中为了达到对L t ( h i , r i , z t ) " role="presentation">L t ( h i , r i , z t ) L t ( h i , r i , z t ) 无偏损失估计的重要性采样参数是根据被观测到的专家的损失来计算的,而不是根据被选中的专家的损失来计算的。EXP3-ABS算法的大致流程如下:
对每一轮迭代t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] :
I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ] " role="presentation">I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ] I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ]
如果r I t ( x t ) > 0 " role="presentation">r I t ( x t ) > 0 r I t ( x t ) > 0 则获得标签y t " role="presentation">y t y t 。
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] ,计算
L ^ t ( h i , r i , z t ) = L t ( h i , r i , z t ) P t , i ( I r I t ( x t ) ⩽ 0 I r i ( x t ) ⩽ 0 + I r I t ( x t ) > 0 ) " role="presentation">ˆ L t ( h i , r i , z t ) = L t ( h i , r i , z t ) P t , i ( I r I t ( x t ) ⩽ 0 I r i ( x t ) ⩽ 0 + I r I t ( x t ) > 0 ) L ^ t ( h i , r i , z t ) = L t ( h i , r i , z t ) P t , i ( I r I t ( x t ) ⩽ 0 I r i ( x t ) ⩽ 0 + I r I t ( x t ) > 0 )
其中
P t , i = { 1 if r i ( x t ) ⩽ 0 ∑ i : r i ( x t ) > 0 p t , i if r i ( x t ) > 0 " role="presentation">P t , i = ⎧ ⎪ ⎨ ⎪ ⎩ 1 if r i ( x t ) ⩽ 0 ∑ i : r i ( x t ) > 0 p t , i if r i ( x t ) > 0 P t , i = { 1 if r i ( x t ) ⩽ 0 ∑ i : r i ( x t ) > 0 p t , i if r i ( x t ) > 0
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] ,做如下更新:
w t + 1 , i = w t , i exp ( − η L ^ t ( h i , r i , z t ) ) " role="presentation">w t + 1 , i = w t , i exp ( − η ˆ L t ( h i , r i , z t ) ) w t + 1 , i = w t , i exp ( − η L ^ t ( h i , r i , z t ) )
该算法满足下列bound:
定理 1 设EXP3-ABS在K " role="presentation">K K 个专家上以学习率η " role="presentation">η η 运行,于是该算法在T " role="presentation">T T 轮后满足下列regret保证:
R T ( EXP3-ABS ) ⩽ ( log K ) / η + η T ( c 2 + 1 ) / 2 " role="presentation">R T ( EXP3-ABS ) ⩽ ( log K ) / η + η T ( c 2 + 1 ) / 2 R T ( EXP3-ABS ) ⩽ ( log K ) / η + η T ( c 2 + 1 ) / 2
特别地,如果EXP3-ABS以η = 2 log K ( c 2 + 1 ) T " role="presentation">η = √ 2 log K ( c 2 + 1 ) T η = 2 log K ( c 2 + 1 ) T 运行,则有R T ( EXP3-ABS ) ⩽ 2 ( c 2 + 1 ) T log K " role="presentation">R T ( EXP3-ABS ) ⩽ √ 2 ( c 2 + 1 ) T log K R T ( EXP3-ABS ) ⩽ 2 ( c 2 + 1 ) T log K 。
这个界对专家个数K " role="presentation">K K 的依赖相比标准的EXP3更有优势(为log K " role="presentation">√ log K log K 而不是K " role="presentation">√ K K )。可以由此联系到使用上下文bandit算法(contextual bandit algorithm) EXP4达到的界。
接下来考虑不可数无限的专家的情况。为了建模这个更一般的框架,读者可能想要尝试关注函数h " role="presentation">h h 和r " role="presentation">r r 的参数化类,也即下列线性函数的类E " role="presentation">E E :
{ ( h , r ) : h ( x ) = w ⊤ x , r ( x ) = | w ⊤ x | − θ , w ∈ R d , θ > 0 } " role="presentation">{ ( h , r ) : h ( x ) = w ⊤ x , r ( x ) = | w ⊤ x | − θ , w ∈ R d , θ > 0 } { ( h , r ) : h ( x ) = w ⊤ x , r ( x ) = | w ⊤ x | − θ , w ∈ R d , θ > 0 }
并引入一些前文提到的弃权损失L ( h , r , z ) " role="presentation">L ( h , r , z ) L ( h , r , z ) 的凸代理并在( w , θ ) " role="presentation">( w , θ ) ( w , θ ) 的参数空间中运行在线凸优化算法[3] 。不过论文作者认为这并不容易,因为这里的代理损失不仅需要确保凸性以及某种形式的校准,也需要确保算法能够观测其自身动作的的损失(也即反馈图G t abs " role="presentation">G abs t G t abs 中的自环)。
论文作者没有通过仅仅求助于凸代理损失来解决这个问题。取而代之地,论文作者引入了满足Lipschitz性质而非凸的代理弃权损失。设每轮迭代的专家( h , r ) " role="presentation">( h , r ) ( h , r ) 从值域为E = [ − 1 , 1 ] × [ − 1 , 1 ] " role="presentation">E = [ − 1 , 1 ] × [ − 1 , 1 ] E = [ − 1 , 1 ] × [ − 1 , 1 ] 的连续函数类中采样得到,且假设函数h " role="presentation">h h 和r " role="presentation">r r 关于某个R d " role="presentation">R d R d 上的合适度量是L E " role="presentation">L E L E -Lipschitz的(这里常数L E " role="presentation">L E L E 决定了函数类E " role="presentation">E E 的大小)。考虑l ( y , h ( x ) ) = f γ ( − y h ( x ) ) " role="presentation">l ( y , h ( x ) ) = f γ ( − y h ( x ) ) l ( y , h ( x ) ) = f γ ( − y h ( x ) ) 的弃权损失L ( h , r , z ) " role="presentation">L ( h , r , z ) L ( h , r , z ) :
L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c ( x ) I r ( x ) ⩽ 0 " role="presentation">L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c ( x ) I r ( x ) ⩽ 0 L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c ( x ) I r ( x ) ⩽ 0
其中f γ " role="presentation">f γ f γ 是一个做为0-1损失函数的变体的分段函数,它在原点斜率为1 / 2 γ " role="presentation">1 / 2 γ 1 / 2 γ ,其定义如下:
f γ ( a ) = ( γ + a 2 γ ) I | a | ⩽ γ + I a ⩾ 0 I | a | > γ " role="presentation">f γ ( a ) = ( γ + a 2 γ ) I | a | ⩽ γ + I a ⩾ 0 I | a | > γ f γ ( a ) = ( γ + a 2 γ ) I | a | ⩽ γ + I a ⩾ 0 I | a | > γ
其图像如下:
对于这种不可数无限的情况,使用Cesa-Bianchi等人论文[5] 的idea,作者提出一个在使用弃权设置结构的同时通过有限覆盖来近似动作空间的算法,其中用到了经典的“ϵ " role="presentation">ϵ ϵ -网”[10][11] ,在假设原集合有界的情况下尝试用半径为ϵ " role="presentation">ϵ ϵ 的球去覆盖原集合。这里假设除了E " role="presentation">E E 之外,输出空间X " role="presentation">X X 亦有界,则存在常数C X > 0 " role="presentation">C X > 0 C X > 0 使得对所有0 < ϵ ⩽ 1 " role="presentation">0 < ϵ ⩽ 1 0 < ϵ ⩽ 1 ,X " role="presentation">X X 都能被至多C X ϵ − d " role="presentation">C X ϵ − d C X ϵ − d 个半径为ϵ " role="presentation">ϵ ϵ 的球覆盖。类似地,存在常数C E > 0 " role="presentation">C E > 0 C E > 0 使得对所有0 < ϵ ⩽ 1 " role="presentation">0 < ϵ ⩽ 1 0 < ϵ ⩽ 1 ,E " role="presentation">E E 都能至多被C E ϵ − 2 " role="presentation">C E ϵ − 2 C E ϵ − 2 个半径为ϵ " role="presentation">ϵ ϵ 的球覆盖。记专家集合E " role="presentation">E E 关于常数C ϵ " role="presentation">C ϵ C ϵ 的覆盖为C ϵ " role="presentation">C ϵ C ϵ 。此外,作者在保持反馈假设(即反馈图G t abs ) " role="presentation">G abs t ) G t abs ) 不变的条件下,定义了做为弃权损失上界的Lipschitz函数L ~ " role="presentation">~ L L ~ 。其中一个能够精确解决问题的Lipschitz函数如下:
L ~ ( h , r , z ) = { c if r ( x ) ⩽ − γ 1 + ( 1 − c γ ) r ( x ) if r ( x ) ∈ ( − γ , 0 ) 1 − ( 1 − f γ ( − y h ( x ) ) γ ) r ( x ) if r ( x ) ∈ [ 0 , γ ) f γ ( − y h ( x ) ) if r ( x ) ⩾ γ " role="presentation">~ L ( h , r , z ) = ⎧ ⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪ ⎨ ⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪
⎪ ⎩ c if r ( x ) ⩽ − γ 1 + ( 1 − c γ ) r ( x ) if r ( x ) ∈ ( − γ , 0 ) 1 − ( 1 − f γ ( − y h ( x ) ) γ ) r ( x ) if r ( x ) ∈ [ 0 , γ ) f γ ( − y h ( x ) ) if r ( x ) ⩾ γ L ~ ( h , r , z ) = { c if r ( x ) ⩽ − γ 1 + ( 1 − c γ ) r ( x ) if r ( x ) ∈ ( − γ , 0 ) 1 − ( 1 − f γ ( − y h ( x ) ) γ ) r ( x ) if r ( x ) ∈ [ 0 , γ ) f γ ( − y h ( x ) ) if r ( x ) ⩾ γ
其中γ ∈ ( 0 , 1 ) " role="presentation">γ ∈ ( 0 , 1 ) γ ∈ ( 0 , 1 ) 。L ~ ( h , r , z ) " role="presentation">~ L ( h , r , z ) L ~ ( h , r , z ) 的图像如下图所示:
该图的解释:给定x " role="presentation">x x 和间隔a = − y h ( x ) " role="presentation">a = − y h ( x ) a = − y h ( x ) 的值(间隔确定后则函数值f γ ( a ) ∈ [ 0 , 1 ] " role="presentation">f γ ( a ) ∈ [ 0 , 1 ] f γ ( a ) ∈ [ 0 , 1 ] 亦确定),描绘目标弃权损失函数L ( a , r ) " role="presentation">L ( a , r ) L ( a , r ) (蓝色虚线)和代理弃权损失函数L ~ ( a , r ) " role="presentation">~ L ( a , r ) L ~ ( a , r ) (红色实线)随r = r ( x ) ∈ [ − 1 , 1 ] " role="presentation">r = r ( x ) ∈ [ − 1 , 1 ] r = r ( x ) ∈ [ − 1 , 1 ] 的变化。
注意该函数满足反馈假设的要求:若r I t ( x ) ⩽ 0 " role="presentation">r I t ( x ) ⩽ 0 r I t ( x ) ⩽ 0 ,则对使得r ( x t ) ⩽ 0 " role="presentation">r ( x t ) ⩽ 0 r ( x t ) ⩽ 0 的( h , r ) ∈ E " role="presentation">( h , r ) ∈ E ( h , r ) ∈ E ,算法可以得知L ~ ( ( h ( x t ) , r ( x t ) ) , z t ) " role="presentation">~ L ( ( h ( x t ) , r ( x t ) ) , z t ) L ~ ( ( h ( x t ) , r ( x t ) ) , z t ) 的值(独立于y t " role="presentation">y t y t );若r I t ( x ) > 0 " role="presentation">r I t ( x ) > 0 r I t ( x ) > 0 ,则由于y t " role="presentation">y t y t 被观测到,算法可以得到L ~ ( ( h ( x t ) , r ( x t ) ) , z t ) " role="presentation">~ L ( ( h ( x t ) , r ( x t ) ) , z t ) L ~ ( ( h ( x t ) , r ( x t ) ) , z t ) 关于所有( h , r ) ∈ E " role="presentation">( h , r ) ∈ E ( h , r ) ∈ E 的完全知识。
论文作者设计了EXP3-ABS的上下文版本以应用于代理损失序列L ~ ( ξ , z t ) , t ∈ [ T ] " role="presentation">~ L ( ξ , z t ) , t ∈ [ T ] L ~ ( ξ , z t ) , t ∈ [ T ] 。该算法用固定半径ϵ " role="presentation">ϵ ϵ 的球来自适应地覆盖X " role="presentation">X X ,每个球对应一个可以运行EXP3-ABS算法的实例。论文作者称这个算法为CONTEXP3-ABS。CONTEXP3-ABS的大致流程如下:
对每一轮迭代t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] :
定理 2 考虑弃权损失L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0 " role="presentation">L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0 L ( h , r , z ) = f γ ( − y h ( x ) ) I r ( x ) > 0 + c I r ( x ) ⩽ 0 并设( h ∗ , r ∗ ) = a r g m i n ( h , r ) ∈ E ∑ t = 1 T L ( h , r , z t ) " role="presentation">( h ∗ , r ∗ ) = a r g m i n ( h , r ) ∈ E ∑ T t = 1 L ( h , r , z t ) ( h ∗ , r ∗ ) = a r g m i n ( h , r ) ∈ E ∑ t = 1 T L ( h , r , z t ) ,其中E = { ( h , r ) } " role="presentation">E = { ( h , r ) } E = { ( h , r ) } 由之前提到过的满足Lipschitz性质的函数对组成。如果CONTEXP3-ABS以参数ϵ ≃ T − 1 2 + d γ 2 2 + d " role="presentation">ϵ ≃ T − 1 2 + d γ 2 2 + d ϵ ≃ T − 1 2 + d γ 2 2 + d 和一个合适的学习率运行,则它满足以下的regret保证:
R T ( CONTEXP3-ABS ) ⩽ O ~ ( T d + 1 d + 2 γ − d d + 2 ) + M T ∗ ( γ ) " role="presentation">R T ( CONTEXP3-ABS ) ⩽ ˜ O ( T d + 1 d + 2 γ − d d + 2 ) + M ∗ T ( γ ) R T ( CONTEXP3-ABS ) ⩽ O ~ ( T d + 1 d + 2 γ − d d + 2 ) + M T ∗ ( γ )
其中M T ∗ ( γ ) " role="presentation">M ∗ T ( γ ) M T ∗ ( γ ) 是使得| r ∗ ( x t ) | ⩽ γ " role="presentation">| r ∗ ( x t ) | ⩽ γ | r ∗ ( x t ) | ⩽ γ 的x t " role="presentation">x t x t 的数量。在上面的叙述中,O ~ " role="presentation">˜ O O ~ 隐藏了常量与ln ( T ) " role="presentation">ln ( T ) ln ( T ) 因子,而≃ " role="presentation">≃ ≃ 则忽视了诸如L E " role="presentation">L E L E 的常量与各类log因子。
3 仅当弃权时反馈可知
也有论文假设当学习器选择弃权时反馈可知的,比如《Online Selective Classification with Limited Feedback》[6] 这篇文章。接下来假设不设置拒绝器,而是将标签空间增广为Y ∪ { ⊥ } " role="presentation">Y ∪ { ⊥ } Y ∪ { ⊥ } 。设H " role="presentation">H H 为在增广标签空间上定义的预测器h ( x ) : X → Y ∪ { ⊥ } " role="presentation">h ( x ) : X → Y ∪ { ⊥ } h ( x ) : X → Y ∪ { ⊥ } 组成的函数类。
与之前提到的那篇论文类似,该论文也讨论了对抗和随机两种设置。我们下面以随机设置为例进行介绍。专家 h " role="presentation">h h 在有标签样本对z = ( x , y ) ∈ X × { ± 1 } " role="presentation">z = ( x , y ) ∈ X × { ± 1 } z = ( x , y ) ∈ X × { ± 1 } 上的弃权损失可以定义为:
L ( h , x , y ) = C t l ( y , h ( x ) ) I h ( x t ) ≠ ⊥ + c I h ( x t ) = ⊥ " role="presentation">L ( h , x , y ) = C t l ( y , h ( x ) ) I h ( x t ) ≠ ⊥ + c I h ( x t ) = ⊥ L ( h , x , y ) = C t l ( y , h ( x ) ) I h ( x t ) ≠ ⊥ + c I h ( x t ) = ⊥
在此基础上,论文提出的Mixed-Loss-Prod算法大致流程如下:
对每一轮迭代t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] :
采样专家索引
I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ] " role="presentation">I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ] I t ∼ p t = w t , i ∑ w t , j , i ∈ [ K ]
采样伯努利变量 C t ∼ B e r n ( p ) " role="presentation">C t ∼ B e r n ( p ) C t ∼ B e r n ( p ) ;
如果C t = 1 " role="presentation">C t = 1 C t = 1 则直接返回y ^ t = ⊥ " role="presentation">^ y t = ⊥ y ^ t = ⊥ 并获得标签y t " role="presentation">y t y t ,反之返回y ^ t = h i ( x t ) ∈ Y ∪ { ⊥ } " role="presentation">^ y t = h i ( x t ) ∈ Y ∪ { ⊥ } y ^ t = h i ( x t ) ∈ Y ∪ { ⊥ } 。
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] , 计算
L t , i = { l ( y t , y ^ t i ) I y ^ t i ≠ ⊥ + c I y ^ t i = ⊥ if C t = 1 c I y ^ t i = ⊥ if Otherwise " role="presentation">L t , i = { l ( y t , ^ y i t ) I ^ y i t ≠ ⊥ + c I ^ y i t = ⊥ if C t = 1 c I ^ y i t = ⊥ if Otherwise L t , i = { l ( y t , y ^ t i ) I y ^ t i ≠ ⊥ + c I y ^ t i = ⊥ if C t = 1 c I y ^ t i = ⊥ if Otherwise
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] , 做如下更新:
w t + 1 , i = w t , i ( 1 − η L ( h i , z t ) ) " role="presentation">w t + 1 , i = w t , i ( 1 − η L ( h i , z t ) ) w t + 1 , i = w t , i ( 1 − η L ( h i , z t ) )
论文定义了以下两个指标做为算法性能的度量,分别是学习器的犯错数和弃权次数:
M T := ∑ t ⩽ T I y ^ ∉ { ⊥ , y t } , A T = ∑ t ⩽ T I y ^ t = ⊥ " role="presentation">M T := ∑ t ⩽ T I ^ y ∉ { ⊥ , y t } , A T = ∑ t ⩽ T I ^ y t = ⊥ M T := ∑ t ⩽ T I y ^ ∉ { ⊥ , y t } , A T = ∑ t ⩽ T I y ^ t = ⊥
此外,论文还定义了最佳事后分类器(best-in-hindsight)的概念,也即需要在不犯错的情况下尽量少弃权:
f ∗ ∈ a r g m i n f ∈ F ∑ t ⩽ T I y ^ t = ⊥ , s . t . ∑ t ⩽ T I y ^ ∉ { ⊥ , y t } = 0 " role="presentation">f ∗ ∈ a r g m i n f ∈ F ∑ t ⩽ T I ^ y t = ⊥ , s . t . ∑ t ⩽ T I ^ y ∉ { ⊥ , y t } = 0 f ∗ ∈ a r g m i n f ∈ F ∑ t ⩽ T I y ^ t = ⊥ , s . t . ∑ t ⩽ T I y ^ ∉ { ⊥ , y t } = 0
对于Mixed-Loss-Prod算法,有如下定理成立:
定理 3 若Mixed-Loss-Prod算法以η = 1 / 2 " role="presentation">η = 1 / 2 η = 1 / 2 ,λ ⩽ c " role="presentation">λ ⩽ c λ ⩽ c 运行,则满足:
E [ M T ] ⩽ 2 log K p + 2 λ p E [ A T ∗ ] , E [ A T − A T ∗ ] ⩽ p T + 2 log K λ " role="presentation">E [ M T ] ⩽ 2 log K p + 2 λ p E [ A ∗ T ] , E [ A T − A ∗ T ] ⩽ p T + 2 log K λ E [ M T ] ⩽ 2 log K p + 2 λ p E [ A T ∗ ] , E [ A T − A T ∗ ] ⩽ p T + 2 log K λ
4 无论弃权与否反馈都可知
也有论文假设无论学习器是否弃权与否反馈都可知的。比如《Fast Rates for Online Prediction with Abstention》[9] 这篇文章。现考虑预测器h ( x ) : X → Y " role="presentation">h ( x ) : X → Y h ( x ) : X → Y 组成的函数类。论文提出的算法大致流程如下:
对每一轮迭代t ∈ [ T ] " role="presentation">t ∈ [ T ] t ∈ [ T ] :
对所有专家i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] ,计算预测标签y ^ t , i = h i ( x t ) ∈ Y " role="presentation">^ y t , i = h i ( x t ) ∈ Y y ^ t , i = h i ( x t ) ∈ Y ;
对所有专家的预测标签进行加权平均,得到一个软概率:
p t = ∑ i ∈ [ K ] w t , i y t , i ∑ j ∈ [ K ] w t , j " role="presentation">p t = ∑ i ∈ [ K ] w t , i y t , i ∑ j ∈ [ K ] w t , j p t = ∑ i ∈ [ K ] w t , i y t , i ∑ j ∈ [ K ] w t , j
计算置信度参数p t ∗ = max { p t , 1 − p t } " role="presentation">p ∗ t = max { p t , 1 − p t } p t ∗ = max { p t , 1 − p t } (用于决定是否弃权);
设弃权概率α t = 2 ( 1 − p t ∗ ) " role="presentation">α t = 2 ( 1 − p ∗ t ) α t = 2 ( 1 − p t ∗ ) ,
y ^ t = { ⊥ with probability α t I p t ⩾ 1 2 with probability 1 − α t " role="presentation">^ y t = { ⊥ with probability α t I p t ⩾ 1 2 with probability 1 − α t y ^ t = { ⊥ with probability α t I p t ⩾ 1 2 with probability 1 − α t
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] , 计算
L t , i = l ( y t , y ^ t , i ) " role="presentation">L t , i = l ( y t , ^ y t , i ) L t , i = l ( y t , y ^ t , i )
对所有i ∈ [ K ] " role="presentation">i ∈ [ K ] i ∈ [ K ] , 做如下更新:
w t + 1 , i = w t , i exp ( − η L t , i ) " role="presentation">w t + 1 , i = w t , i exp ( − η L t , i ) w t + 1 , i = w t , i exp ( − η L t , i )
注意由于p t ∗ ⩾ 1 2 " role="presentation">p ∗ t ⩾ 1 2 p t ∗ ⩾ 1 2 ,弃权概率α ∈ [ 0 , 1 ] " role="presentation">α ∈ [ 0 , 1 ] α ∈ [ 0 , 1 ] 。为了从直觉上理解这个规则,可以发现当分配给弃权操作一个数值⊥ = 1 2 " role="presentation">⊥ = 1 2 ⊥ = 1 2 时,预测结果的期望
E [ p t ] = 1 2 α t + ( 1 − α t ) I p t ⩾ 1 2 = ( 1 − p t ∗ ) + ( 2 p t ∗ − 1 ) I p t ⩾ 1 2 = { ( 1 − p t ) + ( 2 p t − 1 ) if p t ⩾ 1 2 p t if p t < 1 2 = p t " role="presentation">E [ p t ] = 1 2 α t + ( 1 − α t ) I p t ⩾ 1 2 = ( 1 − p ∗ t ) + ( 2 p ∗ t − 1 ) I p t ⩾ 1 2 = ⎧ ⎪
⎪ ⎨ ⎪
⎪ ⎩ ( 1 − p t ) + ( 2 p t − 1 ) if p t ⩾ 1 2 p t if p t < 1 2 = p t E [ p t ] = 1 2 α t + ( 1 − α t ) I p t ⩾ 1 2 = ( 1 − p t ∗ ) + ( 2 p t ∗ − 1 ) I p t ⩾ 1 2 = { ( 1 − p t ) + ( 2 p t − 1 ) if p t ⩾ 1 2 p t if p t < 1 2 = p t
该算法对应的regret可定义如下:
R T = E [ ∑ t = 1 T L ^ t − inf i ∈ [ K ] ∑ t = 1 T L t , i ] " role="presentation">R T = E [ T ∑ t = 1 ˆ L t − inf i ∈ [ K ] T ∑ t = 1 L t , i ] R T = E [ ∑ t = 1 T L ^ t − inf i ∈ [ K ] ∑ t = 1 T L t , i ]
其中
L ^ t = { l ( y t , y ^ t ) if y ^ t ∈ { 0 , 1 } c if y ^ t = ⊥ " role="presentation">ˆ L t = { l ( y t , ^ y t ) if ^ y t ∈ { 0 , 1 } c if ^ y t = ⊥ L ^ t = { l ( y t , y ^ t ) if y ^ t ∈ { 0 , 1 } c if y ^ t = ⊥
关于该算法的表现有下列结果:
定理 4 假设c < 1 2 " role="presentation">c < 1 2 c < 1 2 ,η ⩽ 2 ( 1 − 2 c ) " role="presentation">η ⩽ 2 ( 1 − 2 c ) η ⩽ 2 ( 1 − 2 c ) 。则上述算法的regret满足
R T ⩽ log K η " role="presentation">R T ⩽ log K η R T ⩽ log K η
特别地,该定理只要弃权损失c " role="presentation">c c 远离1 / 2 " role="presentation">1 / 2 1 / 2 ,我们都可以设置η = 2 ( 1 − 2 c ) " role="presentation">η = 2 ( 1 − 2 c ) η = 2 ( 1 − 2 c ) 且算法可以达到独立于迭代轮数T " role="presentation">T T 的regret界。然而,当c " role="presentation">c c 很接近1 / 2 " role="presentation">1 / 2 1 / 2 时,可能会退回到regret保证为T log K " role="presentation">√ T log K T log K 阶的标准最坏情形。在这种不利情形下,这个阶可以通过选择一个保守的η " role="presentation">η η 值而轻易达到。下面这个关于定理4的推论总结了算法在不同情况下所能达到的率。
推论 1 设η = max { 2 ( 1 − 2 c ) , 8 log K T } " role="presentation">η = max { 2 ( 1 − 2 c ) , √ 8 log K T } η = max { 2 ( 1 − 2 c ) , 8 log K T } ,算法的regret满足
R T ⩽ min { log K 2 ( 1 − 2 c ) , T log K 2 } " role="presentation">R T ⩽ min { log K 2 ( 1 − 2 c ) , √ T log K 2 } R T ⩽ min { log K 2 ( 1 − 2 c ) , T log K 2 }
参考
[1] Zhang, Hongyu, Han Bao, and Junya Honda. "Multi-Class Classification with Abstention Based on Crammer–Singer Surrogate with Linear Growth Rate." Towards Trustworthy Predictions: Theory and Applications of Calibration for Modern AI.
[2] Mao, Anqi, Mehryar Mohri, and Yutao Zhong. "Predictor-rejector multi-class abstention: Theoretical analysis and algorithms." International Conference on Algorithmic Learning Theory. PMLR, 2024.
[3] 《学习理论:预测器-拒绝器多分类弃权学习》
[4] Cortes, Corinna, et al. "Online learning with absention." International Conference on Machine Learning. PMLR, 2018.
[5] Hazan, Elad. "Introduction to online convex optimization." Foundations and Trends in Optimization 2.3-4 (2016): 157-325.
[6] Cesa-Bianchi, Nicolò, et al. "Algorithmic chaining and the role of partial feedback in online nonparametric learning." Conference on Learning Theory. PMLR, 2017.
[7] 周志华, 王魏, 高尉, 张利军. 机器学习理论导引[M]. 机械工业出版社, 2020.
[8] Gangrade, Aditya, et al. "Online selective classification with limited feedback." Advances in Neural Information Processing Systems 34 (2021): 14529-14541.
[9] Neu, Gergely, and Nikita Zhivotovskiy. "Fast rates for online prediction with abstention." Conference on Learning Theory. PMLR, 2020.
[10] Zhou, Quan, Mark Kozdoba, and Shie Mannor. "Representative Action Selection for Large Action Space Meta-Bandits." arXiv preprint arXiv:2505.18269 (2025).
[11] 《学习理论:凸代理、代理与估计误差界》
__EOF__
-
本文作者: 猎户座 本文链接: https://www.cnblogs.com/orion-orion/p/20086331 关于博主: PhD在读学生一枚,目前主要方向是学习理论和在线优化。 版权声明: 欢迎您对我的文章进行转载,但请务必保留原始出处哦(*^▽^*)。 声援博主: 如果您觉得文章对您有帮助,可以点击文章右下角【推荐 】 一下。