CMTの論文を丁寧に読む
Traditional mean teacher can be seriously affected by the in- accurate predictions of unlabeled data. Therefore, we propose the confident mean teacher (CMT) method to address the pseudo-label accuracy problem. The core idea of CMT is to correct inaccurate predictions from the teacher by post- processing operations and train the student with high confidence labels. The structure of CMT is shown in Fig 2.
擬似ラベルの正確性を検討
教師モデルの出力に閾値を設定し,信頼できる出力だけをラベルとして使用
https://gyazo.com/bbbd0cbba80b17cfdb20940c21d4c45d
The structure of confident mean teacher.$ \~y_w and $ \~y_s denote the clip-wise and frame-wise prediction of teacher. $ f_{\theta ^s} (x)_w and $ f_{\theta ^s} (x)_s denote the prediction of student. $ \hat{y}_w and $ \hat{y}_s denote the corrected pseudo-labels. $ L_{w,con} and $ L_{s,con} denote the clip-wise and frame-wise consistency loss. $ c_w and $ c_s denote the confidence weight .
~や^は識別のため使用
記号を整理
wがクリップ,sがフレーム
$ \~y_w,$ \~y_s
教師モデルの予測
0,1の間か,0,1のどちらかか
何のこと? 確率か二値か?
$ f_{\theta ^s} (x)_w , $ f_{\theta ^s} (x)_s
生徒モデルのクリップ/フレーム予測
$ \hat{y}_w, $ \hat{y}_s
理想の疑似ラベル?
予測値かな
$ L_{w,con} , $ L_{s,con}
一貫性損失
$ c_w , $ c_s
信頼度重み
$ T
フレームの数
$ K
イベントのクラス数
$ \phi_{clip}, $ \phi_{frame}
クリップとフレーム,それぞれの予測に対する閾値
数学記号
Iは指示関数,要はif
条件を満たすと1,満たさないと0を返す
[]
閉区間
下の例だと,0から1の実数のk次元ベクトルということ?
In particular, we first obtain the clip-wise prediction$ \hat{y}_w \in [0,1]^K and frame-wise prediction $ \hat{y}_s \in [0,1]^{T\times K} from the teacher model. $ T and $ K denote the frame number and sound event class number. Then we set a clip-wise threshold $ \phi_{clip}. If $ \hat{y}_w > \phi_{clip}, \hat{y}_w is assigned to 1. Otherwise,$ \hat{y}_w is assigned to 0. If $ \hat{y}_s < \phi_{clip}, \hat{y}_s is assigned to 0. In addition to weak threshold, we also set the frame-wise threshold $ \phi_{frame}. If $ \hat{y}_s > \phi_{frame}, \hat{y}_s is assigned to 1. Otherwise, $ \hat{y}_s is assigned to 0. After strong threshold, we smooth the frame-wise pre- diction$ \hat{y}_s with event-specific median filters. These steps can be denoted as follows:
code: latex
\~y_w(k) = I(\hat{y}_{w}(k) > \phi_{clip}) \tag{3}
code: latex
\~y_s(t,k) = MF(I(\hat{y}_{w}(k) > \phi_{clip}) I(\hat{y}_{s}(k) > \phi_{frame})) \tag{4}
具体的には、まずTeacherモデルからクリップ単位の予測$ \hat{y}_w \in [0,1]^K とフレーム単位の予測$ \hat{y}_s \in [0,1]^{T\times K} を取得します。$ Tと$ Kは、フレーム数と音響イベントのクラス数を(それぞれ)示します。次に、クリップ単位の閾値$ \phi_{clip}を設定します。もし$ \hat{y}_w > \phi_{clip} ならば、$ \hat{y}_wは1に割り当てられます。そうでなければ、$ \hat{y}_wは0に割り当てられます。もし$ \hat{y}_s < \phi_{clip} ならば、$ \hat{y}_sは0に割り当てられます。弱い閾値(weak threshold)に加えて、フレーム単位の閾値$ \phi_{frame}も設定します。もし$ \hat{y}_s > \phi_{frame} ならば、$ \hat{y}_sは1に割り当てられます。そうでなければ、$ \hat{y}_sは0に割り当てられます。強い閾値(strong threshold)処理の後、フレーム単位の予測$ \hat{y}_sをイベント固有の中央値フィルター(median filters)で平滑化します。これらのステップは、以下のように表すことができます:
閾値を超えると1,越えないと0
where $ \tilde{y}_w and $ \tilde{y}_s denote the clip-wise pseudo-label and framewise pseudo-label respectively; $ I(\cdot) is the indicator function. MF denotes the median filters.
Compared to the initial prediction, the pseudo-label is more reliable and the student model is more difficult to overfit the pseudo-label. Furthermore, we apply confidence weight to the consistency loss according to the prediction probabilities. The consistency loss consists of clip-wise consistency loss $ \ell{w,con} and framewise consistency loss $ \ell{s,con} . They can be defined as follows:
code: latex
\ell{w,con} =\frac{1}{|K|} \Sigma_{k \in K} c_w(k) \ell(\hat{y}_w(k), f_{\theta^s} (x)_w (k)) \tag{5}
code: latex
\ell{s,con} =\frac{1}{|\Omega|} \Sigma_{k \in \Omega} c_s(t,k) \ell(\hat{y}_s(t,k), f_{\theta^s} (x)_s (t,k)) \tag{6}
ここで、$ \tilde{y}_w と $ \tilde{y}_s は、それぞれクリップ単位の疑似ラベルとフレーム単位の疑似ラベルを示します。$ I(\cdot) は指示関数です。MFは中央値フィルター(median filters)を示します。
> 当初の予測と比較して、疑似ラベルはより信頼性が高く、スチューデントモデルは疑似ラベルに過適合しにくくなります。さらに、予測確率に応じて信頼性の重みを一貫性損失に適用します。一貫性損失は、クリップ単位の一貫性損失 $ \ell{w,con} とフレーム単位の一貫性損失 $ \ell{s,con} から構成されます。これらは以下のように定義できます:
(5),(6)式は信頼度重みを含んだ損失の話
where $ K is the sound event class number and $ \Omega is the framewise probability map of size $ T \times K . $ \ell(\cdot) denotes the BCE loss between pseudo-label and student prediction. $ \tilde{y}_w(k) and $ \tilde{y}s(t, k) denote the clip-wise pseudo-label at class $ k and frame-wise pseudo-label at the specific frame and class $ (t, k) ; $ f{\theta_s} (x)w(k) and $ f{\theta_s} (x)_s(t, k) denote the clip-wise prediction at $ k and frame-wise prediction at $ (t, k) from the student model $ \theta_s ; $ c_w(k) and $ c_s(t, k) denote the clip-wise prediction confidence at $ k and the frame-wise prediction confidence at $ (t, k) from the teacher model $ \theta_t . The confidence weight is computed as:
code: latex
c_w(k) = \hat{y}_{w}(k)I(\tilde{y_w}(k) = 1) \tag{7}
code: latex
c_s(t,k) = \hat{y_s}(t,k)\hat{y_w}(k) I(\hat{y_s}(t,k)=1) \tag{8}
$ Kは音響イベントのクラス数であり、$ \Omegaはサイズ $ T \times K のフレーム単位の確率マップです。 $ \ell(\cdot)は、疑似ラベルとスチューデントモデルの予測との間のBCE(バイナリクロスエントロピー)損失を示します。 $ \tilde{y}_w(k) と $ \tilde{y}s(t, k) は、それぞれクラス $ k におけるクリップ単位の疑似ラベルと、特定のフレームおよびクラス $ (t, k) におけるフレーム単位の疑似ラベルを示します。 $ f{\theta_s} (x)w(k) と $ f{\theta_s} (x)_s(t, k) は、スチューデントモデル $ \theta_s からの、$ k におけるクリップ単位の予測と $ (t, k) におけるフレーム単位の予測をそれぞれ示します。 $ c_w(k) と $ c_s(t, k) は、$ k におけるクリップ単位の予測信頼度を示します。
擬似ラベルが信頼できれば,生徒モデルの出力する確率値を重みとする
提案はMFの前に閾値(確信度)を設定し,教師モデルの予測を絞る点
ここのMFは単なるノイズ処理
システムの後処理とは何の関連もない