Supplementary Material for “Semi-supervised Learning for Large Scale Image Cosegmentation” Zhengxiang Wang Rujie Liu Fujitsu Research & Development Center Co., Ltd, Beijing, China {wangzhengxiang,rjliu}@cn.fujitsu.com
Abstract This supplementary material provides the detailed derivation of the three terms in the energy function to the binary quadratic programming (QP) problem, as well as its decomposition to sub-problems. The plots of the cosegmentation accuracy affected by the different values of parameters are also attached, showing that the proposed method is not sensitive to the choice of parameters within a range.
1. Detailed Equation Derivation We firstly show how the inter-image distance, intra-image distance and balance term of the energy function (Equation M1, M2 and M5 respectively, M stands for the equation label from the main manuscript, to distinguish the equation label in this supplementary material) are converted to form the binary QP problem (Equation M8, M13 and M16 respectively).
1.1. Inter-image distance The inter-image distance is converted from Equation M1 to Equation M8 by direct expansion: Einter
=
Nu X Ns X
k Hi · yi − Hjtr · yjtr k2 +
=
k Hi · yi − Hj · yj k2
i=1 j=i+1
i=1 j=1 Nu X Ns X
Nu X Nu X
[yiT · HiT · Hi · yi − 2 · yiT · HiT · Hjtr · yjtr + (yjtr )T · (Hjtr )T · Hjtr · yjtr ]
i=1 j=1
+
Nu Nu X X
(yiT · HiT · Hi · yi − 2 · yiT · HiT · Hj · yj + yjT · HjT · Hj · yj )
i=1 j=i+1
=
Nu X
yiT · (Ns · HiT · Hi ) · yi +
+
yiT · [(Nu − 1) · HiT · Hi ] · yi +
=
=
i=1
Hjtr · yjtr ) + Nu ·
Ns X
j=1 Nu X
Nu X
yiT · [(Ns + Nu − 1) · HiT · Hi ] · yi +
i=1 Nu X
Ns X
(yitr )T · (Hitr )T · Hitr · yitr
i=1
yiT · (−2HiT · Hj ) · yj
i=1 j=i+1
i=1 Nu X
yiT · (−2HiT ·
i=1
i=1 Nu X
Nu X
Nu X
yiT · Vi + C +
i=1
yiT · Miiinter · yi +
Nu X Nu X
inter yiT · Mij · yj +
i=1 j=i+1
Nu X Nu X
inter yiT · Mij · yj
i=1 j=i+1 Nu X
yiT · Vi + C
i=1
inter where Miiinter , Mij , Vi and C are defined in Equation M9, M10, M11 and M12 respectively.
1
(1)
1.2. Intra-image distance The intra-image distance is converted from Equation M2 to Equation M13 according to the fact that yi is a binary vector, we have: |yi (j) − yi (k)| = [yi (j) − yi (k)]2 (2) Therefore Equation M2 can be reformulated as: Eintra
=
si Nu X X
Wi (j, k) · [yi (j) − yi (k)]2
i=1 j=1,k=1
=
si Nu X X X
[Wi (j, k) · yi (j)2 + Wi (j, k) · yi (k)2 − 2Wi (j, k) · yi (j) · yi (k)]
i=1 j=1 k∈N (j)
=
Nu X si si X si X X X { yi (j)2 · [ Wi (j, k) + Wi (k, j)] − yi (j) · [Wi (j, k) + Wi (k, j)] · yi (k)} i=1 j=1
(3)
j=1 k=1
k∈N (j)
We can reformulate the above equation in the matrix form by constructing a matrix Miintra with the definition provided in Equation M14 and M15, so that the above equation can be converted to Equation M13: Eintra
=
Nu X si si X si X X X { yi (j)2 · [ Wi (j, k) + Wi (k, j)] − yi (j) · [Wi (j, k) + Wi (k, j)] · yi (k)} i=1 j=1
=
Nu X
j=1 k=1
k∈N (j)
yiT · Miintra · yi
(4)
i=1
1.3. Balance term The balance term is converted from Equation M5 to Equation M16 through Taylor expansion, we firstly rewrite Equation M5 as: Nu Nu X X Ebal = [Pif log Pif + (1 − Pif ) log(1 − Pif )] = f (Pif ) (5) i=1
i=1
where f (x) = x log x + (1 − x) log(1 − x)
(6)
Since x = Pif ∈ [0, 1] is continually derivative, we can use Taylor expansion to approximate f (x) at x = 21 : f 00 ( 12 ) 1 1 1 1 (x − )2 f (x) ≈ f ( ) + f 0 ( )(x − ) + 2 2 2 2 2 1 = −1 + 2(x − )2 2 1 2 = 2x − 2x − 2
(7)
Therefore Ebal
=
Nu X
f (Pif )
i=1
= =
Nu X
1 [2(Pif )2 − 2Pif − ] 2 i=1
Nu X i=1
(2
yiT · ei yiT · ei · eTi · yi 1 − 2 − ) 2 si si 2 2
(8)
1.4. The whole energy function By summing all these three terms, the whole energy function E of Equation M17 can be derived by: E
= Einter + λ1 · Eintra + λ2 · Ebal Nu Nu Nu X Nu X X X inter = yiT · Miiinter · yi + yiT · Mij · yj + yiT · Vi + C i=1
+ λ1
i=1 j=i+1
Nu X
yiT · Miintra · yi + λ2
i=1
=
Nu X
Nu X
(9)
i=1
(2
yiT
·
i=1
yiT · (Miiinter + λ1 Miintra + 2λ2
i=1
ei · eTi s2i
· yi
−2
yiT · ei 1 − ) si 2
Nu X Nu Nu X X 1 ei · eTi ei T inter ) · y + y · M · y + yiT · (Vi − 2λ2 ) + C − i j i ij 2 si si 2 i=1 j=i+1 i=1
Removing constant terms we can get Equation M17.
1.5. Decomposition to sub-problems The decomposition of the whole energy function (Equation M17) to sub-problems (Equation M20 is straightforward: Ei
=
Nu X
yiT · (Miiinter + λ1 Miintra + λ2
i=1
=
Nu X
Nu X
yiT · Mi0 · yi + yiT ·
i=1
Nu X Nu Nu X X ei · eTi ei T inter ) · y + y · M · y + yiT · (Vi − λ2 ) i j i ij 2 si si i=1 j=i+1 i=1
inter Mij · yj +
= yiT · Mi0 · yi + yiT ·
inter Mij · yj + yiT · (Vi − λ2
j=1,j6=i
+
Nu X
[yjT
·
Mj0
· yj +
yjT
Nu X
·
= yiT · Mi0 · yi + yiT · (
Nu X
j=1,j6=i
=
·
Mi0
· yi +
yiT
Nu X i=1
yiT · (Vi − λ2
ei ) si
ei ) si
inter Mjk · yk + yjT · (Vj − λ2
inter Mij · yj + Vi − λ2
inter Mjk · yk +
k=j+1,k6=i
k=j+1,k6=i
j=1,j6=i
yiT
Nu X
yjT ·
j=1,j6=i
j=1,j6=i Nu X
Nu X
ej )] sj
ei ) + Ci0 si
· Vi0 + Ci0
(10)
where Mi0 and Vi0 are defined in Equation M21 and M22 respectively and Ci0 is the constant term for sub-problem Ei .
2. Experiment We also show in Figure 1 the plots of the cosegmentation accuracy affected by the choice of parameters (λ1 and λ2 ), using “Baseball” class in iCoseg dataset as example. We can see that the accuracy would be stable when λ1 is within a range of its best choice. For λ2 , increasing its value will increase the accuracy until reaching the best result, and further increasing it after the best choice would be slightly lower than the best accuracy but still stable. This results validate that the proposed method is not sensitive to the choice of parameters within a range.
3
Figure 1. Accuracy under different parameter values for “Baseball” class in iCoseg dataset. Top: λ1 ; Bottom: λ2 .
4