Add files using upload-large-folder tool
Browse files- 1603.00286v5.txt +227 -0
- 1706.07845v2.txt +630 -0
- 1707.01217v4.txt +483 -0
- 1707.01310v5.txt +85 -0
- 1707.01461v3.txt +378 -0
- 1707.01476v6.txt +525 -0
- 1707.01917v2.txt +107 -0
- 1707.01922v5.txt +53 -0
- 1707.03631v2.txt +529 -0
- 1707.03986v1.txt +119 -0
- 1707.04873v2.txt +282 -0
- 1707.05128v3.txt +229 -0
- 1707.05495v3.txt +284 -0
- 1707.06261v2.txt +633 -0
- 1707.06320v2.txt +105 -0
- 1707.06422v3.txt +71 -0
- 1707.06618v3.txt +91 -0
- 1707.08325v1.txt +85 -0
- 1707.08608v3.txt +81 -0
- 1707.09627v5.txt +71 -0
- 1707.09870v2.txt +115 -0
- 1708.00999v2.txt +294 -0
- 1708.01425v4.txt +125 -0
- 1708.01785v3.txt +819 -0
- 1708.02072v4.txt +632 -0
- 1708.02153v2.txt +100 -0
- 1708.03797v1.txt +91 -0
- 1708.04106v3.txt +459 -0
- 1708.04728v2.txt +468 -0
- 1708.05239v3.txt +67 -0
- 1708.06510v2.txt +77 -0
- 1708.06551v2.txt +121 -0
- 1708.06578v2.txt +280 -0
- 1708.06832v3.txt +57 -0
- 1708.07089v2.txt +429 -0
- 1708.08611v2.txt +151 -0
- 1709.00139v4.txt +79 -0
- 1709.00155v1.txt +351 -0
- 1709.02087v1.txt +117 -0
- 1709.02418v2.txt +51 -0
- 1709.02564v7.txt +0 -0
- 1709.03528v5.txt +97 -0
- 1709.03654v2.txt +399 -0
- 1709.03688v1.txt +246 -0
- 1709.03698v2.txt +93 -0
- 1709.03842v2.txt +316 -0
- 1709.03851v2.txt +339 -0
- 1709.04005v2.txt +67 -0
- 1709.04071v5.txt +103 -0
- 1709.04093v2.txt +365 -0
1603.00286v5.txt
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Most theoretical works on fair resource allocation consider a one-shot division: the resource is divided once and for all, like a cake that is divided and eaten soon after it comes out of the oven. But in practice, it is often required to re-divide an already-divided resource(see subsection 7.1). One example is a cloud-computing environment, where new agents come and require resources held by other agents. A second example is fair allocation of radio spectrum among several broadcasting agencies: it may be required to re-divide the frequencies to accommodate new broadcasters. A third example is land-reform: large land-estates are held by a small number of landlords, and the government may want to re-divide them to landless citizens.
|
| 2 |
+
|
| 3 |
+
In the classic one-shot division setting, there are n𝑛n agents with equal rights, and the goal is to give each agent a fair share of the cake. A common definition of a “fair share” is a piece worth at least 1/n1𝑛1/n of the total cake value, according to the agent’s personal valuation function. This fairness requirement is usually termed proportionality. When proportionality cannot be attained, it is often (see subsection 7.2) relaxed to r𝑟r-proportionality, where r∈(0,1)𝑟01r\in(0,1) is a constant independent of n𝑛n, which means that each agent receives at least a fraction r/n𝑟𝑛r/n of the total.
|
| 4 |
+
|
| 5 |
+
In contrast, in the re-division setting, there is an existing allocation of the cake among the n𝑛n agents. This allocation is not necessarily fair; in particular, there may be some agents who do not have any cake. When the cake is re-divided, it may be required to give extra rights to current holders. In particular, it may be required to give each agent the opportunity to keep a substantial fraction of their current value. This may be due either to efficiency reasons (in the cloud computing scenario) or economic reasons (in the radio spectrum scenario) or political reasons (in the land-reform scenario).This requirement will be called ownership. Given a constant w∈(0,1)𝑤01w\in(0,1),w𝑤w-ownership means that each agent receives at least w𝑤w times their old value.What levels of proportionality and ownership can be attained simultaneously?
|
| 6 |
+
|
| 7 |
+
The first two results (in Section 3) provide a tight answer to this question.
|
| 8 |
+
|
| 9 |
+
As an example, taking r=w=1/2𝑟𝑤12r=w=1/2, it is possible to re-divide the cake, giving each agent at least half their previous value, while simultaneously giving each agent at least 1/(2n)12𝑛1/(2n) of the total cake value.
|
| 10 |
+
|
| 11 |
+
The parameters r,w𝑟𝑤r,w represent the level of balance between two principles: large r𝑟r means more emphasis on fairness while large w𝑤w means more emphasis on ownership rights.The above theorems imply that the re-dividers (e.g. the government)may choose any level offairness and ownership-rights that fit their ideological, political or economic goals, as long as the sum of these fractions is at most 1.
|
| 12 |
+
|
| 13 |
+
The balance parameters can also be given probabilistic interpretation. Suppose the government wants to do a land reform and needs the agreement of the current landowners. Naturally, the current landowners do not want to give away their lands. However, they may fear that, without land-reform, the landless citizens might revolt and they might lose all their lands. If the landowners believe that the probability of a successful revolt is 1−w1𝑤1-w, then they may agree to a land-reform that guarantees w𝑤w-ownership. Theorem 1.1 implies that, in this case, it is possible to carry out a land-reform that guarantees (1−w)1𝑤(1-w)-proportionality.
|
| 14 |
+
|
| 15 |
+
While Theorem 1.1 is encouraging, it ignores an important aspect of practical division problems: geometry. The division it guarantees may be highly fractioned, giving each agent a large number of disconnected pieces. In many practical division problems, e.g. when the resource to divide is time, the agents may need to receive a single connected piece rather than a large number of disconnected ones. Can partial-proportionality and partial-ownership be attained simultaneously with a connectivity constraint? The following proposition (proved in Section 4) answers this question negatively.
|
| 16 |
+
|
| 17 |
+
The latter part of the proposition involves a fairness property much weaker than proportionality, that can be termedpositivity—guaranteeing each agent a piece with a positive value.With the connectivity constraint, even this weak fairness requirement is incompatible with w𝑤w-ownership for every constant w>0𝑤0w>0: a positive division might require to give one agent at most 1/n1𝑛1/n of their previous value, give two agents at most 2/n2𝑛2/n of their previous value, give n/3𝑛3n/3 agents at most 1/3131/3 of their previous value, etc.
|
| 18 |
+
|
| 19 |
+
Proposition 2 motivates the following weaker ownership requirement: for every d𝑑d, at least n−d𝑛𝑑n-d agents receive at least a fraction 1/⌊nd⌋1𝑛𝑑1/\lfloor{n\over d}\rfloor of their old value. For example (taking d=n/3𝑑𝑛3d=n/3 and assuming all quotients are integers), at least 2n/32𝑛32n/3 agents should receive at least 1/3131/3 of their old value.This criterion is inspired by the “90th percentile” criterion common in Service-Level-Agreements and Quality-of-Service analysis, e.g. (Zhang et al., 2014; Delimitrou andKozyrakis, 2014). It can also be justified by political reasoning: in a democratic country, it may be sufficient to win the support of a sufficiently large majority.
|
| 20 |
+
|
| 21 |
+
The following results almost match this relaxed ownership criterion. Formally, let us define the democratic ownership property as follows: for every integer d∈{1,…,n−1}𝑑1…𝑛1d\in\{1,\dots,n-1\}, at least n−d𝑛𝑑n-d agents receive more than a fraction 1/⌈nd⌉1𝑛𝑑1/\lceil{n\over d}\rceil of their previous value.Democratic-ownership corresponds to the best guarantee one could hope for given Proposition 2; the only difference is thatin the upper bound the fraction is rounded down (1/⌊nd⌋1𝑛𝑑1/\lfloor{n\over d}\rfloor) while in democratic-ownership the fraction is rounded up.
|
| 22 |
+
|
| 23 |
+
It is an open question whether democratic-ownership is compatible with r𝑟r-proportionality for some constant r>1/2𝑟12r>1/2.
|
| 24 |
+
|
| 25 |
+
Theorem 1.2, like most works in cake-cutting, assumes that the cake is 1-dimensional. In realistic division scenarios, the cake is often 2-dimensional and the pieces should have a pre-specified geometric shape, such as a rectangle or a convex polygon. Rectangularity and convexity requirements are sensible when dividing land, exhibition space in museums, advertisement space in newspapers and even virtual space in web-pages. Moreover, in the frequency-range allocation problem, it is possible to allocate frequency ranges for a limited time-period; the frequency-time space is two-dimensional and it makes sense to require that the “pieces” are rectangles in this space (Iyer and Huhns, 2009).
|
| 26 |
+
|
| 27 |
+
2-dimensional cake-cutting introduces new challenges over the traditional 1-dimensional setting. As an example, in one dimension, it can be assumed that the initial allocation is a partition of the entire cake; this is without loss of generality, since any “blank” (unallocated part) can be attached to a neighboring allocated interval without harming its shape or value. However, in two dimensions, the initial allocation might contain blanks that cannot be attached to any allocated piece due to the rectangularity or convexity constraints. For example,suppose the cake is the large rectangle in Figure 1.
|
| 28 |
+
|
| 29 |
+
There are 4 agents and each agent i𝑖i has positive value-density only inside the rectangle Zisubscript𝑍𝑖Z_{i}. The most reasonable division (e.g. the only Pareto-efficient division) is to give each Zisubscript𝑍𝑖Z_{i} entirely to agent i𝑖i. But, this allocation leaves a blank in the center of the cake, and this blank cannot be attached to any allocated piece due to the rectangularity constraint.This counter-intuitive scenario cannot happen in a one-dimensional cake. Handling such cases requires new geometry-based tools. With such tools, the redivision problem can be solved in two common 2-dimensional settings (Section 5):
|
| 30 |
+
|
| 31 |
+
Most land-estates are not exact rectangles, but they can be approximated by arectilinear polygon—a polygon in which all angles are 90∘superscript9090^{\circ} or 270∘superscript270270^{\circ}.The next result generalizes Theorem 1.3 to a rectilinear polygonal cake.The complexity of a rectilinear polygon is characterized by the number of its reflex vertices—vertices with a 270∘superscript270270^{\circ} angle. Denote this number by T𝑇T. A rectangle—the simplest rectilinear polygon—has T=0𝑇0T=0. The cake in Figure 2 has T=4𝑇4T=4.
|
| 32 |
+
|
| 33 |
+
The dependence on T𝑇T is necessary: even without ownership requirements, there are instances in which it is impossible to guarantee a fraction of more than 1/(n+T)1𝑛𝑇1/(n+T) to all n𝑛n agents (Segal-Halevi, 2021).
|
| 34 |
+
|
| 35 |
+
Redivision algorithms can be used not only to compromise between old and new agents, but also to compromise between fairness and efficiency. Often, the most economically-efficient allocation is not fair, while a fair allocation is not economically-efficient. The trade-off between fairness and efficiency is quantified by the price-of-fairness (Bertsimas et al., 2011, 2012; Caragiannis et al., 2012; Aumann and Dombb, 2015). It is defined as the worst-case ratio of the maximum attainable social-welfare to the maximum attainable social-welfare of a fair allocation. The social welfare is usually defined as the arithmetic mean of the agents’ values (also called utilitarian welfare) or their geometric mean (also called Nash welfare; see Moulin (2004)).
|
| 36 |
+
|
| 37 |
+
A redivision algorithm can be used to calculate an upper bound on the price of fairness in the following way. Take a welfare-maximizing allocation as the initial allocation; use a redivision algorithm to produce a partially-proportional allocation in which the utility of each agent is close to their initial utility; conclude that the new welfare is close to the initial (maximal) welfare.
|
| 38 |
+
|
| 39 |
+
Without geometric constraints, the following is an upper bound on the price-of-fairness w.r.t. utilitarian welfare.222The price-of-fairness of r𝑟r-proportionality w.r.t. the Nash welfare is 111 for all r≤1𝑟1r\leq 1, since any Nash-optimal cake allocation is proportional (Sziklai andSegal-Halevi, 2019).
|
| 40 |
+
|
| 41 |
+
When r=1𝑟1r=1 the above bound is infinite, and indeed, the price of 1-proportionality in this setting is Θ(n)Θ𝑛\Theta(\sqrt{n}), which is not bounded by any constant(Caragiannis et al., 2012). Theorem 1.6 shows that a small compromise on the level of proportionality allows a constant (independent of n𝑛n) bound on the utilitarian-price. The parameter r𝑟r sets the level of trade-off between fairness and efficiency.
|
| 42 |
+
|
| 43 |
+
With geometric constraints, the following upper bounds are proved:
|
| 44 |
+
|
| 45 |
+
Note that the first claim in Theorem 1.7 is subsumed by Aumann and Dombb (2015), who prove that the utilitarian-price of 1-proportionality in this setting is Θ(n)Θ𝑛\Theta(\sqrt{n}). It is brought here only for completeness. The second claim in that theorem, as well as the following theorems regarding two-dimensional constraints, are not implied by previous results.
|
| 46 |
+
|
| 47 |
+
Appendix A partially complements the above results by showing some lower bounds on the price of fairness with interval cake and interval pieces:•With two agents, for all r∈[0,1]𝑟01r\in[0,1], the utilitarian price of r𝑟r-proportionality is 1+r/21𝑟21+r/2 and the Nash price of r𝑟r-proportionalityis max(1,2r)12𝑟\max(1,\sqrt{2r}).•With n𝑛n agents, there is a lower bound on the Nash price of proportionality, which approaches 222 as n→∞→𝑛n\to\infty.Computing the exact utilitarian price and Nash price of r𝑟r-proportionality for any n≥2𝑛2n\geq 2 and r≤1𝑟1r\leq 1 in this setting remains an open question.
|
| 48 |
+
|
| 49 |
+
The cake C𝐶C is a polytope in the d𝑑d-dimensional Euclidean plane ℝdsuperscriptℝ𝑑\mathbb{R}^{d}. This paper focuses on the common cases in which d=1𝑑1d=1 and C𝐶C is an interval, or d=2𝑑2d=2 and C𝐶C is a polygon. A piece is a Borel subset of C𝐶C; usually an interval or a polygon.
|
| 50 |
+
|
| 51 |
+
C𝐶C has to be divided among n≥1𝑛1n\geq 1 agents.We denote by [n]delimited-[]𝑛[n] the set of integers {1,…,n}1…𝑛\{1,\ldots,n\}.Each agent i∈[n]𝑖delimited-[]𝑛i\in[n] has a value-density function visubscript𝑣𝑖v_{i}, which is an integrable, non-negative and bounded function on C𝐶C. The value of a piece Xisubscript𝑋𝑖X_{i} to agent i𝑖i is marked by Vi(Xi)subscript𝑉𝑖subscript𝑋𝑖V_{i}(X_{i}) and it is the integral of its value-density:Vi(Xi)=∫x∈Xivi(x)𝑑xsubscript𝑉𝑖subscript𝑋𝑖subscript𝑥subscript𝑋𝑖subscript𝑣𝑖𝑥differential-d𝑥V_{i}(X_{i})=\int_{x\in X_{i}}v_{i}(x)dx.The definition implies that the Visubscript𝑉𝑖V_{i} are finite measures and are absolutely-continuous with respect to the Lebesgue measure, i.e., any piece with zero area has zero value to all agents.
|
| 52 |
+
|
| 53 |
+
Division algorithms access the value measures via queries (Robertson andWebb, 1998; Woeginger andSgall, 2007): an eval query asks an agent to report the value of a specified piece of cake; a mark query asks an agent to mark a piece of cake with a specified value.333It is often called a cut query, but the term mark query better differentiates query answers from actual cuts through the cake.The present paper ignores strategic considerations and assumes that agents answer truthfully. Indeed, in general it may be impossible to build a cake-cutting algorithm that is both fair and strategy-proof (Brânzei andMiltersen, 2015).
|
| 54 |
+
|
| 55 |
+
The geometric constraints, if any, are represented by a pre-specified family S𝑆S of usable pieces. In this paper, S𝑆S will either be the set of all pieces (which means that there are no geometric constraints), or the set of all intervals, or the set of all rectangles, or the set of all convex pieces. It is assumed that each agent can use only a single piece from the family S𝑆S.
|
| 56 |
+
|
| 57 |
+
An allocation is a vector of n𝑛n pieces, 𝐗=(X1,…,Xn)𝐗subscript𝑋1…subscript𝑋𝑛\mathbf{X}=(X_{1},\dots,X_{n}), one piece per agent, such that the Xisubscript𝑋𝑖X_{i} are pairwise-disjoint andX1⊔⋯⊔Xn⊆Csquare-unionsubscript𝑋1⋯subscript𝑋𝑛𝐶X_{1}\sqcup\cdots\sqcup X_{n}\subseteq C.444The symbol ⊔square-union\sqcup denotes disjoint union—it emphasizes that the pieces X1,…,Xnsubscript𝑋1…subscript𝑋𝑛X_{1},\ldots,X_{n} are pairwise-disjoint.Note that some cake may remain unallocated, i.e, free disposal is assumed. As illustrated in the introduction, free disposal may be necessary when there are geometric constraints. An S𝑆S-allocation is an allocation in which all pieces are usable, i.e, Xi∈Ssubscript𝑋𝑖𝑆X_{i}\in S for each agent i𝑖i.
|
| 58 |
+
|
| 59 |
+
For every constant r∈[0,1]𝑟01r\in[0,1], an allocation 𝐗𝐗\mathbf{X} is called r𝑟r-proportional if every agent receives at least r/n𝑟𝑛r/n of the total cake value:For all i∈[n]::For all 𝑖delimited-[]𝑛absent\displaystyle\text{For all~{}}i\in[n]:Vi��(Xi)≥(r/n)⋅Vi(C)subscript𝑉𝑖subscript𝑋𝑖⋅𝑟𝑛subscript𝑉𝑖𝐶\displaystyle V_{i}(X_{i})\geq{(r/n)}\cdot V_{i}(C)A 1-proportional division is also known as proportional.
|
| 60 |
+
|
| 61 |
+
There is an existing S𝑆S-allocation of the cake, Z1⊔⋯⊔Zn⊆Csquare-unionsubscript𝑍1⋯subscript𝑍𝑛𝐶Z_{1}\sqcup\dots\sqcup Z_{n}\subseteq C. It is assumed that the old pieces Zjsubscript𝑍𝑗Z_{j} are pairwise-disjoint and that Zj∈Ssubscript𝑍𝑗𝑆Z_{j}\in S for all j𝑗j, but nothing else is assumed on the division. In particular, the initial division is not necessarily proportional, and some of C𝐶C may be unallocated.
|
| 62 |
+
|
| 63 |
+
It is required to construct a new S𝑆S-allocationX1⊔⋯⊔Xn⊆Csquare-unionsubscript𝑋1⋯subscript𝑋𝑛𝐶X_{1}\sqcup\cdots\sqcup X_{n}\subseteq C.The re-allocation satisfies the w𝑤w-ownership property, for some constant w∈(0,1)𝑤01w\in(0,1), if every agent receivesat least a fraction w𝑤w of their old value:
|
| 64 |
+
|
| 65 |
+
For all j∈[n]::For all 𝑗delimited-[]𝑛absent\displaystyle\text{For all~{}}j\in[n]:Vj(Xj)≥w⋅Vj(Zj)subscript𝑉𝑗subscript𝑋𝑗⋅𝑤subscript𝑉𝑗subscript𝑍𝑗\displaystyle V_{j}(X_{j})\geq w\cdot V_{j}(Z_{j})Since w𝑤w-ownership is not always compatible with r𝑟r-proportionality for any constant r>0𝑟0r>0, the following weaker property is defined. A re-allocation 𝐗𝐗\mathbf{X} satisfies the democratic-ownership property if, for every d∈{1,…,n−1}𝑑1…𝑛1d\in\{1,\dots,n-1\}, there are at least n−d𝑛𝑑n-d agents j∈[n]𝑗delimited-[]𝑛j\in[n] for whom
|
| 66 |
+
|
| 67 |
+
Vj(Xj)>1⌈n/d⌉⋅Vj(Zj).subscript𝑉𝑗subscript𝑋𝑗⋅1𝑛𝑑subscript𝑉𝑗subscript𝑍𝑗\displaystyle V_{j}(X_{j})>\frac{1}{\lceil n/d\rceil}\cdot V_{j}(Z_{j}).
|
| 68 |
+
|
| 69 |
+
In addition to fairness, it is often required that a division has a high social welfare. The social welfare of an allocation is a certain aggregate function of the normalized values of the agents (the normalized value is the piece value divided by the total cake value).Common social welfare functions aresum (utilitarian) and product (Nash), see Moulin (2004).When calculating the welfare, it is convenient to normalize the values such thatthe proportional share of an agent corresponds to a value of 111(so receiving the entire cake corresponds to a value of n𝑛n). This way, when all agents receive exactly their proportional share, the welfare is 111.•Utilitarian welfare—the arithmetic mean of the agents’ normalized valuesWutil(𝐗)=1n∑i=1nVi(Xi)Vi(C)/nsubscript𝑊𝑢𝑡𝑖𝑙𝐗1𝑛superscriptsubscript𝑖1𝑛subscript𝑉𝑖subscript𝑋𝑖subscript𝑉𝑖𝐶𝑛\displaystyle W_{util}(\mathbf{X})=\frac{1}{n}\sum_{i=1}^{n}\frac{V_{i}(X_{i})}{V_{i}(C)/n}•Nash welfare—the geometric mean of the agents’ normalized values:WNash(𝐗)=(∏i=1nVi(Xi)Vi(C)/n)1/nsubscript𝑊𝑁𝑎𝑠ℎ𝐗superscriptsuperscriptsubscriptproduct𝑖1𝑛subscript𝑉𝑖subscript𝑋𝑖subscript𝑉𝑖𝐶𝑛1𝑛\displaystyle W_{Nash}(\mathbf{X})=\left(\prod_{i=1}^{n}\frac{V_{i}(X_{i})}{V_{i}(C)/n}\right)^{1/n}The goal of maximizing the social welfare is not always compatible with the goal of guaranteeing a fair share to every agent. For example, Caragiannis et al. (2012) describe a simple example in which the maximum utilitarian welfare of a proportional allocation is in 111 while the maximum utilitarian welfare of an arbitrary (unfair) allocation is in Ω(n)Ω𝑛\Omega(\sqrt{n}). This means that society has to pay a price, in terms of social-welfare, for insisting on fairness. This is called the price of fairness. Formally, given a social welfare function W𝑊W and a fairness criterion F𝐹F, the price-of-fairness relative to W𝑊W and F𝐹F (also called: “the W𝑊W-price-of-F𝐹F”) is the ratio:
|
| 70 |
+
|
| 71 |
+
sup𝐗W(𝐗)sup𝐘∈FW(𝐘)subscriptsupremum𝐗𝑊𝐗subscriptsupremum𝐘𝐹𝑊𝐘\displaystyle\frac{\sup_{\mathbf{X}}W(\mathbf{X})}{\sup_{\mathbf{Y}\in F}W(\mathbf{Y})}(*)where the supremum at the numerator is over all allocations 𝐗𝐗\mathbf{X} and the supremum at the denominator is over all allocations 𝐘𝐘\mathbf{Y} that also satisfy the fairness criterion F𝐹F. The cited example shows that the utilitarian/price/of/proportionality is in Ω(n)Ω𝑛\Omega(\sqrt{n}).
|
| 72 |
+
|
| 73 |
+
When there are geometric constraints, they affect both the numerator and the denominator of (*), i.e, the suprema are taken only on S𝑆S-allocations. Therefore, it is not a-priori clear whether the price-of-fairness with constraints is higher or lower than without constraints.
|
| 74 |
+
|
| 75 |
+
In this section there are no geometric constraints on the cake or its pieces.Consider the negative result first.
|
| 76 |
+
|
| 77 |
+
The proof of the matching positive result requires a lemma.
|
| 78 |
+
|
| 79 |
+
In this section the cake is an interval and each piece must be an interval.Consider the negative result first.
|
| 80 |
+
|
| 81 |
+
The corresponding positive result (Theorem 1.2) uses an algorithm for a different problem: fair multicake cutting.In this problem,there is a multicake C𝐶C, which is a union of m𝑚m pairwise-disjoint subcakes, C=Z1⊔⋯⊔Zm𝐶square-unionsubscript𝑍1⋯subscript𝑍𝑚C=Z_{1}\sqcup\cdots\sqcup Z_{m}.The goal is to give each agenta piece contained in a single subcake.It is easy to see that a proportional allocation might not exist even for a single agent.However, there always exists an allocation (X1,…,Xn)subscript𝑋1…subscript𝑋𝑛(X_{1},\ldots,X_{n}) such that
|
| 82 |
+
|
| 83 |
+
Vi(Xi)≥1m+n−1⋅Vi(C),subscript𝑉𝑖subscript𝑋𝑖⋅1𝑚𝑛1subscript𝑉𝑖𝐶\displaystyle V_{i}(X_{i})\geq\frac{1}{m+n-1}\cdot V_{i}(C),(1)and this is the largest fraction that can be guaranteed (Segal-Halevi, 2021).555Consider m𝑚m subcakes and n𝑛n agents with the same valuation, who value the entire multicake at m+n−1𝑚𝑛1m+n-1.Suppose the value of each subcake j𝑗j (for all agents) is some integer uj≥1subscript𝑢𝑗1u_{j}\geq 1.If some subcake is not allocated to any agent, then the multicake can be reduced to a smaller one with m′:=m−1assignsuperscript𝑚′𝑚1m^{\prime}:=m-1 subcakes, which all agents value at most m′+n−1superscript𝑚′𝑛1m^{\prime}+n-1. So suppose each subcake is allocated to at least one agent.Define the surplus of each subcake as ujsubscript𝑢𝑗u_{j} minus the number of agents who are allocated a piece in that subcake. The total surplus is (m+n−1)−n=m−1𝑚𝑛1𝑛𝑚1(m+n-1)-n=m-1, so at least one subcake j0subscript𝑗0j_{0} must have a surplus of at most 00. At least one of the uj0subscript𝑢subscript𝑗0u_{j_{0}} agents allocated a piece in subcake j0subscript𝑗0j_{0} has a value of at most 111.Below, a different algorithm is presented, that attains the same value guarantee (1), and simultaneously guarantees democratic ownership.
|
| 84 |
+
|
| 85 |
+
The algorithm uses as a subroutine Algorithm 2, which is called an “auction”.It accepts as input a subcake Z0subscript𝑍0Z_{0} and a set N𝑁N of agents.Each agent i𝑖i “bids” by evaluating Z0subscript𝑍0Z_{0}.The auction then chooses a subset W⊆N𝑊𝑁W\subseteq N of “winners”.The criterion for selecting the set of winners is specified by the following lemma.
|
| 86 |
+
|
| 87 |
+
Note that Lemma 2 allows the set of winners W𝑊W to be empty, if all agents in N𝑁N value Z0subscript𝑍0Z_{0} at less than 111.
|
| 88 |
+
|
| 89 |
+
Before proving Theorem 1.2, let us consider a simpler warm-up algorithm that attains only the partial-proportionality guarantee (1).It uses Algorithm 3. Its input is a multicake and a set of n𝑛n agents. By repeatedly applying the auction algorithm, it assigns the agents to the subcakessuch that all agents assigned to a subcake value it sufficiently high, as formalized below.
|
| 90 |
+
|
| 91 |
+
Once the agents are partitioned using Algorithm 3, for each j∈[m]𝑗delimited-[]𝑚j\in[m], Zjsubscript𝑍𝑗Z_{j} can be divided among the agents in Wjsubscript𝑊𝑗W_{j} using any proportional cake-cutting algorithm. Since all these agents value Zjsubscript𝑍𝑗Z_{j} at least |Wj|subscript𝑊𝑗|W_{j}|, each agent gets a piece valued at least 111, which is at least 1m+n−1⋅Vi(C)⋅1𝑚𝑛1subscript𝑉𝑖𝐶\frac{1}{m+n-1}\cdot V_{i}(C) as in condition (1).
|
| 92 |
+
|
| 93 |
+
To prove Theorem 1.2, it is required to guarantee, in addition to (1), also the democratic ownership condition. To this end, Algorithm 3 is replaced with a modified assignment algorithm, presented as Algorithm 4.The main difference is that Algorithm 4 allows each agent j𝑗j to participate in the auction on the subcake with the same index Zjsubscript𝑍𝑗Z_{j}, even if j𝑗j was already assigned to a previous subcake Zj′subscript𝑍superscript𝑗′Z_{j^{\prime}} for some j′<jsuperscript𝑗′𝑗j^{\prime}<j.If j𝑗j is one of the winners for Zjsubscript𝑍𝑗Z_{j} (that is, j∈Wj𝑗subscript𝑊𝑗j\in W_{j}), then j𝑗j is removed from the previous assignment Wj′subscript𝑊superscript𝑗′W_{j^{\prime}}.This creates a “vacancy” in Wj′subscript𝑊superscript𝑗′W_{j^{\prime}};this vacancy is filled by running a single step of the auction on Zj′subscript𝑍superscript𝑗′Z_{j^{\prime}}.Let i′superscript𝑖′i^{\prime} be the first unassigned agent who did not win the first auction on Zj′subscript𝑍superscript𝑗′Z_{j^{\prime}} (“first” by the σ𝜎\sigma ordering in that auction). Recall that, by condition (b) of the auction algorithm,Vi′(Zj′)<|Wj′|+1subscript𝑉superscript𝑖′subscript𝑍superscript𝑗′subscript𝑊superscript𝑗′1V_{i^{\prime}}(Z_{j^{\prime}})<|W_{j^{\prime}}|+1 held before j𝑗j was removed from Wj′subscript𝑊superscript𝑗′W_{j^{\prime}}.If the condition does not hold after j𝑗j is removed (that is: if Vi′(Zj′)≥|Wj′|+1subscript𝑉superscript𝑖′subscript𝑍superscript𝑗′subscript𝑊superscript𝑗′1V_{i^{\prime}}(Z_{j^{\prime}})\geq|W_{j^{\prime}}|+1 after the removal), then i′superscript𝑖′i^{\prime} is added to Wj′subscript𝑊superscript𝑗′W_{j^{\prime}}.This step guarantees that both conditions (a) and (b) still hold for Wj′subscript𝑊superscript𝑗′W_{j^{\prime}}, that is: Vi′(Zj′)≥|Wj′|subscript𝑉superscript𝑖′subscript𝑍superscript𝑗′subscript𝑊superscript𝑗′V_{i^{\prime}}(Z_{j^{\prime}})\geq|W_{j^{\prime}}| for all i′∈Wj′superscript𝑖′subscript𝑊superscript𝑗′i^{\prime}\in W_{j^{\prime}}, and Vi′′(Zj′)<|Wj′|+1subscript𝑉superscript𝑖′′subscript𝑍superscript𝑗′subscript𝑊superscript𝑗′1V_{i^{\prime\prime}}(Z_{j^{\prime}})<|W_{j^{\prime}}|+1 for all i′′superscript𝑖′′i^{\prime\prime} who are not assigned yet.
|
| 94 |
+
|
| 95 |
+
This new winner i′superscript𝑖′i^{\prime}, who is added to Wj′subscript𝑊superscript𝑗′W_{j^{\prime}}, might be the agent j′superscript𝑗′j^{\prime} itself, who is already assigned to another set Wj′′subscript𝑊superscript𝑗′′W_{j^{\prime\prime}}.In this case, moving the agent j′superscript𝑗′j^{\prime} from Wj′′subscript𝑊superscript𝑗′′W_{j^{\prime\prime}} to Wj′subscript𝑊superscript𝑗′W_{j^{\prime}} creates a vacancy in Wj′′subscript𝑊superscript𝑗′′W_{j^{\prime\prime}}, which has to be filled in the same way. This chain reaction must eventually end, since whenever a vacancy is created, the number of agents j𝑗j who are assigned to the subset with the same index Zjsubscript𝑍𝑗Z_{j} increases by one, and this number never decreases as no agent j𝑗j is ever removed from Wjsubscript𝑊𝑗W_{j}.
|
| 96 |
+
|
| 97 |
+
The correctness of Algorithm 4 is proved formally below.
|
| 98 |
+
|
| 99 |
+
The above lemmas and algorithms are used to prove the following theorem.
|
| 100 |
+
|
| 101 |
+
Each subcake Zj′subscriptsuperscript𝑍′𝑗Z^{\prime}_{j} is divided proportionally among the agents in Wjsubscript𝑊𝑗W_{j}.By Lemma 4(a), all these agents value Zj′subscriptsuperscript𝑍′𝑗Z^{\prime}_{j} at least |Wj|subscript𝑊𝑗|W_{j}|. Hence, their piece has a value of at least 111. By the normalization step (with m=n𝑚𝑛m=n), 1≥12n−1Vi(C)>Vi(C)/(2n)112𝑛1subscript𝑉𝑖𝐶subscript𝑉𝑖𝐶2𝑛1\geq\frac{1}{2n-1}V_{i}(C)>V_{i}(C)/(2n).
|
| 102 |
+
|
| 103 |
+
Applying the pigeonhole principle to the partition yielded by Algorithm 4implies that, for every integer d∈{1,…,n−1}𝑑1…𝑛1d\in\{1,\dots,n-1\}, at most d𝑑d of the subsets Wjsubscript𝑊𝑗W_{j}, for j∈[n]𝑗delimited-[]𝑛j\in[n], are populated by at least ⌈nd⌉𝑛𝑑\lceil{n\over d}\rceil agents. Hence, at least n−d𝑛𝑑n-d such subsets are populated by at most ⌈nd⌉−1𝑛𝑑1\lceil{n\over d}\rceil-1 agents, that is, they satisfy |Wj|≤⌈nd⌉−1subscript𝑊𝑗𝑛𝑑1|W_{j}|\leq\lceil{n\over d}\rceil-1.For each j∈[n]𝑗delimited-[]𝑛j\in[n], consider two cases:Case #1: j∈Wj𝑗subscript𝑊𝑗j\in W_{j}.Then agent j𝑗j receives a piece of the subcake Zj′subscriptsuperscript𝑍′𝑗Z^{\prime}_{j}.By the proportionality of the subcake division(Algorithm 5, step 4):Vj(Xj)≥Vj(Zj′)|Wj|≥Vj(Zj′)⌈nd⌉−1>Vj(Zj′)⌈nd⌉.subscript𝑉𝑗subscript𝑋𝑗subscript𝑉𝑗subscriptsuperscript𝑍′𝑗subscript𝑊𝑗subscript𝑉𝑗subscriptsuperscript𝑍′𝑗𝑛𝑑1subscript𝑉𝑗subscriptsuperscript𝑍′𝑗𝑛𝑑\displaystyle V_{j}(X_{j})\geq\frac{V_{j}(Z^{\prime}_{j})}{|W_{j}|}\geq\frac{V_{j}(Z^{\prime}_{j})}{\lceil{n\over d}\rceil-1}>\frac{V_{j}(Z^{\prime}_{j})}{\lceil{n\over d}\rceil}.Case #2: j∉Wj𝑗subscript𝑊𝑗j\not\in W_{j}. Then,by Lemma 4(b),Vj(Zj′)<|Wj|+1≤⌈nd⌉subscript𝑉𝑗subscriptsuperscript𝑍′𝑗subscript𝑊𝑗1𝑛𝑑V_{j}(Z^{\prime}_{j})<|W_{j}|+1\leq\lceil{n\over d}\rceil.Therefore,Vj(Zj′)/⌈nd⌉<1subscript𝑉𝑗subscriptsuperscript𝑍′𝑗𝑛𝑑1V_{j}(Z^{\prime}_{j})/\lceil{n\over d}\rceil<1.As explained in the proof of 1/2121/2 proportionality, the value of each agent is at least 111:Vj(Xj)≥1>Vj(Zj′)⌈nd⌉.subscript𝑉𝑗subscript𝑋𝑗1subscript𝑉𝑗subscriptsuperscript𝑍′𝑗𝑛𝑑\displaystyle V_{j}(X_{j})\geq 1>\frac{V_{j}(Z^{\prime}_{j})}{\lceil{n\over d}\rceil}.
|
| 104 |
+
|
| 105 |
+
In both cases, agent j𝑗j receives a value greater than Vj(Zj′)/⌈nd⌉subscript𝑉𝑗subscriptsuperscript𝑍′𝑗𝑛𝑑V_{j}(Z^{\prime}_{j})/\lceil{n\over d}\rceil.The latter ratio is at least Vj(Zj)/⌈nd⌉subscript𝑉𝑗subscript𝑍𝑗𝑛𝑑V_{j}(Z_{j})/\lceil{n\over d}\rceil since Zj′⊇Zjsubscript𝑍𝑗subscriptsuperscript𝑍′𝑗Z^{\prime}_{j}\supseteq Z_{j}.
|
| 106 |
+
|
| 107 |
+
The auction in Algorithm 2 requires O(nlogn)𝑂𝑛𝑛O(n\log n) queries.Algorithm 4performs m𝑚m auctions.Each auction might lead to a sequence of at most n𝑛n vacancies which require one query each to be filled.Algorithm Even–Paz requires O(nlogn)𝑂𝑛𝑛O(n\log{n}) queries, and it is done m𝑚m times—once for each subcake.All in all, the run-time is in O(mnlogn)=O(n2logn)𝑂𝑚𝑛𝑛𝑂superscript𝑛2𝑛O(mn\log{n})=O(n^{2}\log{n}), since m=n𝑚𝑛m=n.∎
|
| 108 |
+
|
| 109 |
+
Algorithm 5treats each existing piece Zjsubscript𝑍𝑗Z_{j} as an isolated subcake, and insists that each new piece be entirely contained in an existing piece, i.e, it does not cross the existing division lines. This may be desirable in the context of land division, since it respects the Uti possidetis juris(Lalonde, 2002)—an international law principle saying that newly-formed sovereign states should retain the internal borders that their preceding dependent area had before their independence.However, it also implies that the resulting division can only be 1/2121/2-proportional and never fully proportional,as the fraction 1n+m−11𝑛𝑚1\frac{1}{n+m-1} in (1) is tight.
|
| 110 |
+
|
| 111 |
+
Theoretically, it may be possible to improve the proportionality guarantee by devising a different redivision procedure that crosses the existing division lines.This raises the following open question: what is the highest level of proportionality that is compatible with democratic-ownership?
|
| 112 |
+
|
| 113 |
+
Theorem 1.1 allows an unlimited number of pieces per agent,666In fact, 4n−34𝑛34n-3 pieces per agent are sufficient. It is known that, for every pair of agents, an allocation with different entitlements can be attained with two cuts, e.g. (Segal-Halevi, 2019). So each agent receives at most 222 pieces. In Algorithm 1, each agent participates in 2⋅(n−1)⋅2𝑛12\cdot(n-1) such allocation instances, and gets one additional piece.while Theorem 1.2 allows only a single piece per agent. What happens between these extremes?In particular, if each agent can get k𝑘k intervals, for some fixed k≥1𝑘1k\geq 1, thenthere is an algorithm for dividing a multicake with m𝑚m subcakes among n𝑛n agents such that each agent gets at leastmin(1n,km+n−1)1𝑛𝑘𝑚𝑛1\min\left(\frac{1}{n},\frac{k}{m+n-1}\right) of the total cake value(Segal-Halevi, 2021).However, the algorithm does not guarantee democratic ownership.If a similar proportionality guarantee could be attained together with democratic ownership, it could be used in Section 4 with m=k⋅n𝑚⋅𝑘𝑛m=k\cdot n subcakes (since for each agent there could be up to k𝑘k subcakes in the original division), to get a bound of kkn+n−1𝑘𝑘𝑛𝑛1\frac{k}{kn+n-1}, which implies kk+1𝑘𝑘1\frac{k}{k+1}-proportionality for any k≥1𝑘1k\geq 1.
|
| 114 |
+
|
| 115 |
+
In this section the cake is a polygon in ℝ2superscriptℝ2\mathbb{R}^{2}.There is a set S𝑆S of usable pieces (e.g. rectangles), the initial allocation Z1,…,Znsubscript𝑍1…subscript𝑍𝑛Z_{1},\ldots,Z_{n} is an S𝑆S-allocation, and the output should be an S𝑆S-allocation too.
|
| 116 |
+
|
| 117 |
+
The main obstacle in applying Algorithm 5 to such a cake is step 2—extending the initial partial allocation to a complete partition of the entire cake.It is not possible to simply attach each unallocated part of C𝐶C to an allocated S𝑆S-piece, since the result might not be an S𝑆S-piece.The initial partial allocation Z1⊔⋯⊔Zn⊆Csquare-unionsubscript𝑍1⋯subscript𝑍𝑛𝐶Z_{1}\sqcup\cdots\sqcup Z_{n}\subseteq C still must be expanded to a complete partition of C𝐶C, since Algorithm 5 uses Algorithm 4, which requires a complete partition.But the number of pieces in the complete partition might be larger than n𝑛n, since there might be unattached “blanks” (holes).
|
| 118 |
+
|
| 119 |
+
The goal, then, is to find a partition of C𝐶C into S𝑆S-pieces, Z1′⊔⋯⊔Zn+b′=Csquare-unionsuperscriptsubscript𝑍1′⋯superscriptsubscript𝑍𝑛𝑏′𝐶Z_{1}^{\prime}\sqcup\cdots\sqcup Z_{n+b}^{\prime}=C, with b≥0𝑏0b\geq 0, such that every input S𝑆S-piece is contained in a unique output S𝑆S-piece: ∀j∈[n]:Zj⊆Zj′:for-all𝑗delimited-[]𝑛subscript𝑍𝑗superscriptsubscript𝑍𝑗′\forall j\in[n]:Z_{j}\subseteq Z_{j}^{\prime}. The additional b𝑏b S𝑆S-pieces are called blanks. In Step 3, the multicake will contain m=n+b𝑚𝑛𝑏m=n+b subcakes.Hence, the fraction guaranteed to each agent will be 1/(n+m−1)=1/(2n+b−1)1𝑛𝑚112𝑛𝑏11/(n+m-1)=1/(2n+b-1). A smaller value of b𝑏b translates to a better proportionality guarantee.
|
| 120 |
+
|
| 121 |
+
An example of the input and output of the allocation-completion step,when S𝑆S is the set of rectangles, is shown in Figure 4.In the partial allocation there are n=4𝑛4n=4 rectangles;in the complete partition there are m=5𝑚5m=5 rectangles.
|
| 122 |
+
|
| 123 |
+
This raises the question of what is the minimum number of blanks required for a complete partition?This geometric question has been studied in a different paper (Akopyan andSegal-Halevi, 2018).The answers are summarized inTable 1.777The expressions in Table 1 are tight in the worst case: there are partial allocations that require exactly this number of blanks.Moreover, it is proved there that the worst-case optimal number of blanks is attained in any arrangement in which all pieces are maximal, that is, cannot be expanded without overlapping another piece. Formally:
|
| 124 |
+
|
| 125 |
+
Complete expansions are used to proveTheorems 1.3, 1.4 and 1.5 below.
|
| 126 |
+
|
| 127 |
+
The results in this section raise several future work questions, which may be of interest to researchers in computational geometry.
|
| 128 |
+
|
| 129 |
+
While the bounds in Table 1 are worst-case optimal, in specific instances there may be a maximal expansion with fewer blanks.What is an efficient algorithm for finding a maximal expansion of a given allocation, which has the smallest number of blanks possible in the given instance?
|
| 130 |
+
|
| 131 |
+
When the cake and the pieces are general polygons, or hole-free (simply-connected) polygons, but not necessarily convex,there exists a maximal expansion with no blanks at all (Table 1).Using such an expansion, one could expect tofind an allocation satisfying democratic ownership and 1/2121/2-proportionality.However, this requires to apply the Even–Paz algorithm to a non-convex polygon such that the pieces remain connected (or simply-connected);cutting along the y axis (as in the rectangle and convex cases) might yield disconnected pieces.One way to partition a polygon into connected pieces is to map each point p𝑝p of the polygon to the point nearest to p𝑝p on the polygon perimeter, as in Figure 5.
|
| 132 |
+
|
| 133 |
+
Then, the perimeter can be partitioned like a 1-dimensional interval.Har-Peled (2021) and Yagami (2021) present sketches of how this can be done, but again, they were not formally published so I do not claim any result for the cases in which S𝑆S is the family of connected polygons, or of simply-connected polygons.
|
| 134 |
+
|
| 135 |
+
When the cake and pieces are three-dimensional (e.g. axes-parallel boxes), what is an upper bound on the number of blanks in a maximal expansion of a partial allocation?
|
| 136 |
+
|
| 137 |
+
This section uses the redivision theorems of previous sections to prove upper bounds on the price of partial/proportionality.
|
| 138 |
+
|
| 139 |
+
The proofs of Theorems 1.7, 1.8 and 1.9 are similar; only the constants are different.The proof of Theorem 1.8 is presented below; to get the proofs of the other theorems, replace the constant “3” with “2” or “4” respectively.
|
| 140 |
+
|
| 141 |
+
Theorems 1.6–1.9invoke the question of whether the upper bounds proved in them are tight.
|
| 142 |
+
|
| 143 |
+
There is a lower bound of Ω(n)Ω𝑛\Omega(\sqrt{n}) on the utilitarian price of proportionalityfor a cake with no geometric constraints(Caragiannis et al., 2012),as well as for an interval cake and interval pieces (Aumann and Dombb, 2015).However, these lower bounds do not imply similar lower bounds for partial proportionality.In fact, without geometric constraints, our Theorem 1.6 shows that the price of partial-proportionality is O(1)𝑂1O(1).Therefore, it is interesting to know which of the following two options is correct for a cake with geometric constraints (e.g. interval cake and interval pieces):1.There is a lower bound of Ω(n)Ω𝑛\Omega(\sqrt{n}) matching Theorems 1.7–1.9, or —2.The actual price of partial/proportionality is o(n)𝑜𝑛o(\sqrt{n}), maybe even O(1)𝑂1O(1).The latter option is particularly attractive, since it may lead to a feasible and practical compromise between fairness and social welfare.
|
| 144 |
+
|
| 145 |
+
It is knownthat without geometric constraints, every Nash-optimal allocation is envy-free; see e.g. Sziklai andSegal-Halevi (2019).Hence, such allocation is proportional, so the Nash price of r𝑟r-proportionality is 1 for any r∈[0,1]𝑟01r\in[0,1]. However, this is not true when the pieces must be connected (or rectangular, or convex).Appendix A shows several lower bounds on the Nash price of r𝑟r-proportionality with connectivity constraints. However, there is a substantial gap between these lower bounds and the upper bounds proved above.
|
| 146 |
+
|
| 147 |
+
The cake redivision problem differs from several division problems studied recently.
|
| 148 |
+
|
| 149 |
+
1. Dynamic resource allocation (Kash et al., 2014; Friedman et al., 2015, 2017; Huo et al., 2020) is a common problem in cloud-computing environments. The server has several resources, such as memory and disk-space. Agents (processes) come and depart. The server has to allocate the resources fairly among agents. When new agents come, the server may have to take some resources from existing agents. The goal is to do the re-allocation with minimal disruption to existing agents. In these problems, the resources are homogeneous, which means that the only thing that matters is what quantity of each resource is given to each agent. In contrast, the present paper considers a heterogeneous cake, so the algorithms must decide which parts of the cake should be given to which agent.
|
| 150 |
+
|
| 151 |
+
2. Population monotonicity (Thomson, 1983; Moulin, 1990, 2004; Thomson, 2011; Sziklai andSegal-Halevi, 2018, 2019) is an axiom that describes a desired property of allocation rules. When new agents arrive and the same division rule is re-activated, the value of all old agents should be weakly smaller than in the initial allocation. This axiom represents the virtue of solidarity: if sacrifices have to be made to support an additional agent, then everybody should contribute.
|
| 152 |
+
|
| 153 |
+
Population monotonicity is related to a special case of the redivision model, in which the new agents have no share at all in the initial allocation. However, the redivision model differs in two important aspects.First, even in the special case of new agents with no initial share, there is no upper bound on the value allocated to the incumbent agents. On the contrary, the ownership requirements puts a lower bound on their value in the new allocation.Second, the redivision model is more general, and relates to settings in which all agents already have a (possibly unfair) share in the initial allocation.
|
| 154 |
+
|
| 155 |
+
3. Private endowment in economics resource allocation problems means that each agent is endowed with an initial bundle of resources. Then, agents exchange resources using a market mechanism. The classic problem in economics involves homogeneous resources, but it has also been studied in the cake-cutting framework (Berliant andDunz, 2004; Aziz and Ye, 2014). A basic requirement in these works is individual rationality, which means that the final value allocated to each agent must be weakly larger than the value of the initial endowment (note the contrast with the population monotonicity axiom).This requirement is not made in the redivision problem as it is incompatible with fairness: since some agents may initially own no land, individual rationality would mean that they might not receive anything in the exchange.
|
| 156 |
+
|
| 157 |
+
4. Online divisionis a setting in which either the agents or the divided resources are not all available at the time of the division, but rather arrive at different times.Walsh (2011) studies the online division of a divisible resource. The motivation is a birthday party in an office, in which some agents come or leave early while others come or leave late. It is required to give some cake to agents who come early while keeping a fair share to those who come late.Aleksandrov et al. (2015) and Benade et al. (2018) study the online division of indivisible items. The motivationis the food-bank problem, where a charity organization receives food donations and must decide on-line to whom each donation should be allocated.In these papers, in contrast to the present paper, it is impossible to re-divide allocated resources, since they are consumed by their receivers.
|
| 158 |
+
|
| 159 |
+
5. Land reform is the re-division of land among citizens. It has been attempted in numerous countries around the globe and in many periods throughout history. Some books on land reform are Powelson (1988); Bernstein (2002); Rosset et al. (2006); Lipton (2009).The earliest recorded land-reform was done in ancient Egypt in the times of King Bakenranef, 8th century BC. The most recent land-reform act has been legislated in Scotland in 2016 AD.Balancing fairness and ownership rights is a major concern in such reforms (Sellar, 2006; Hoffman, 2013; Wightman, 2015; MacInnes and Shields, 2015).
|
| 160 |
+
|
| 161 |
+
While proportionality is the most common criterion of fair cake-cutting, it is often relaxed to partial/proportionality in order to achieve additional goals:
|
| 162 |
+
|
| 163 |
+
1. Speed:finding a proportional division takes Θ(nlogn)Θ𝑛𝑛\Theta(n\log{n}) queries, but finding an r𝑟r-proportional division takes only Θ(n)Θ𝑛\Theta(n) queries, for some sufficiently small r≤0.1𝑟0.1r\leq 0.1(Edmonds and Pruhs, 2006; Edmonds et al., 2008).
|
| 164 |
+
|
| 165 |
+
2. Improving social welfare:proportional allocations may be socially inefficient; efficiency can be improved by decreasing the value-guarantee per agent (Zivan, 2011; Arzi, 2012).
|
| 166 |
+
|
| 167 |
+
3. Minimum-size constraint:In some 1-dimensional settings, each agent may get several intervals but the length of each interval should be above a threshold. It is impossible to guarantee an r𝑟r-proportional allocation for any r>0𝑟0r>0, but additive approximations exist (Caragiannis et al., 2011).
|
| 168 |
+
|
| 169 |
+
4. Geometric constraints: For example, when the cake is square and the pieces must be square, it is impossible to guarantee an r𝑟r-proportional allocation for any r>1/2𝑟12r>1/2, but there is an algorithm that guarantees a 1/4141/4-proportional allocation(Segal-Halevi et al., 2017, 2020).When the cake is a connected graph, and the pieces must be connected, there is an algorithm that guarantees each agent at least 1/(2n−1)12𝑛11/(2n-1) of the total value, and it is impossible to guarantee more than that (Bei and Suksompong, 2021).
|
| 170 |
+
|
| 171 |
+
While most works on fair division aim to guarantee unanimous fairness, this is not always compatible with other requirements. Hence, some works explore the possibility of guaranteeing fairness to a subset of the agents, which should—ideally—be as large as possible. Some examples are:
|
| 172 |
+
|
| 173 |
+
1. Envy-free allocation of multiple cakes (where each agent should receive a piece in each cake) to (n+1)/2𝑛12(n+1)/2 agents(Nyman et al., 2020).
|
| 174 |
+
|
| 175 |
+
2. Maximin-share fair allocation of indivisible objects to n−1𝑛1n-1 or 2n/32𝑛32n/3 agents(Searns, 2020; Hosseini and Searns, 2020).
|
| 176 |
+
|
| 177 |
+
3. Stable matching rules that guarantee resource-monotonicity to n/2𝑛2n/2 agents(Ortega, 2018).
|
| 178 |
+
|
| 179 |
+
4. Pricing rules that are envy-free to a pre-selected subset of the buyers (Bilò et al., 2018).
|
| 180 |
+
|
| 181 |
+
The most prominent cake-model is a one-dimensional interval, in which case the pieces are often required to be contiguous sub-intervals. Some exceptions are:
|
| 182 |
+
|
| 183 |
+
1. The cake is a 1-dimensional circle (“pie”) and the pieces are contiguous arcs(Thomson, 2007; Brams et al., 2008; Barbanel et al., 2009; Elkind et al., 2021).
|
| 184 |
+
|
| 185 |
+
2. The cake is the union of edges of a connected graph, and the pieces are contiguous sub-graphs(Bei and Suksompong, 2021).
|
| 186 |
+
|
| 187 |
+
3. The cake is a 2-dimensional territory that lies among several countries. Each country should receive a piece adjacent to its border (Hill, 1983; Beck, 1987).
|
| 188 |
+
|
| 189 |
+
4. The cake is 2-dimensional and the pieces are rectangles determined by the agents (Iyer and Huhns, 2009).
|
| 190 |
+
|
| 191 |
+
5. The cake is 2-dimensional and the pieces must be squares or fat polygons (Segal-Halevi et al., 2017, 2020).
|
| 192 |
+
|
| 193 |
+
6. The cake is 2-dimensional; the geometric constraints are connectivity or convexity (Devulapalli, 2014).
|
| 194 |
+
|
| 195 |
+
7. The cake is multi-dimensional and the pieces are simplices or polytopes(Berliant et al., 1992; Ichiishi andIdzik, 1999; Dall’Aglio andMaccheroni, 2009).
|
| 196 |
+
|
| 197 |
+
Very recently, geometric fair division problems have been studied based on real two-dimensional land-value data (Aleskerov andShvydun, 2019; Shtechman et al., 2021).
|
| 198 |
+
|
| 199 |
+
Many natural 2-dimensional settings have not been studied yet. For example, the setting studied in Section 5,where the cake is a rectilinear polygon and the pieces should be rectangles, has not been studied.As shown by Figure 1, there is a qualitative (not only quantitative) difference between 2-D and 1-D division.2-D division introduces interesting paradoxes, that might be missed by the habit of assuming a one-dimensional cake.
|
| 200 |
+
|
| 201 |
+
It is important to distinguish geometric cake-cutting from the geometric knapsack problem (Arkin et al., 1993; Adamaszek andWiese, 2015).In the latter there is a single value-function that should be optimized. In cake-cutting, there are n𝑛n agents with different value-functions, and the goal is to guarantee each agent a value higher than some threshold.
|
| 202 |
+
|
| 203 |
+
The price-of-fairness in cake-cutting has been studied in two settings:•The cake is a one-dimensional interval and the pieces must be intervals Aumann and Dombb (2015). The utilitarian-price-of-proportionality in this case is Θ(n)Θ𝑛\Theta(\sqrt{n}).•The cake is arbitrary and the pieces may be arbitrary Caragiannis et al. (2012). The utilitarian-price-of-proportionality in this case is Θ(n)Θ𝑛\Theta(\sqrt{n}) too.Both papers study the price of other fairness criteria such as envy-freeness and equitability, but do not study the price in Nash-welfare, and do not handle two-dimensional geometric constraints such as rectangularity or convexity.
|
| 204 |
+
|
| 205 |
+
The price of fairness was also studied in the context of allocating homogeneous resources (Bertsimas et al., 2011, 2012), fair subset sum (Nicosia et al., 2017), kidney exchange (Dickerson et al., 2014),connected chore cutting (Heydrich and vanStee, 2015),indivisible object allocation (Caragiannis et al., 2012; Kurz, 2016; Bei et al., 2019b; Suksompong, 2019; Barman et al., 2020),budget division (Michorzewski et al., 2020; Tang et al., 2020)and machine scheduling (Agnetis et al., 2019; Zhang et al., 2020).
|
| 206 |
+
|
| 207 |
+
A related notion—the price of connectivity—was studied both for cake-cutting (Arunachaleswaran andGopalakrishnan, 2018) and for indivisible objects (Bei et al., 2019a).
|
| 208 |
+
|
| 209 |
+
The Nash-price of fairness is related to results about approximating the maximum Nash welfare with indivisible goods. The approximation factors range from 2.892.892.89 (Cole andGkatzelis, 2015) to e𝑒e (Anari et al., 2017) to 222 (Cole et al., 2017; McGlaughlin andGarg, 2020; Caragiannis et al., 2019) to 1.451.451.45 (Barman et al., 2018).
|
| 210 |
+
|
| 211 |
+
Several authors study the algorithmic problem of finding a welfare/maximizing cake-allocation in various settings:
|
| 212 |
+
|
| 213 |
+
1. The cake is an interval and the pieces must be connected (Aumann et al., 2013);
|
| 214 |
+
|
| 215 |
+
2. The cake is an interval and the pieces must be connected, and additionally, the division must be proportional (Bei et al., 2012);
|
| 216 |
+
|
| 217 |
+
3. The cake and pieces are arbitrary, and the division must be envy-free (Cohler et al., 2011).
|
| 218 |
+
|
| 219 |
+
4. The cake and pieces are arbitrary, and the division must be equitable (Brams et al., 2012).
|
| 220 |
+
|
| 221 |
+
Besides the open questions mentioned in subsections 4.1, 5.1 and 6.1,it may be interesting to study the redivision problem with other requirements besides proportionality.
|
| 222 |
+
|
| 223 |
+
Envy-freeness means that each agent values their piece at least as much as each of the other pieces. Similarly, r𝑟r-envy-freeness means that each agent values their piece as at least r𝑟r times the value of each of the other pieces. For what pairs r,w𝑟𝑤r,w is r𝑟r-envy-freeness compatible with w𝑤w-ownership? With democratic-ownership?
|
| 224 |
+
|
| 225 |
+
One issue with envy-freeness is that the redivision problem is inherently asymmetric: agents whose initial piece is valuable are entitled to a higher final value than agents whose initial piece is empty.A potentially useful notion here is justified envy, which has been recently studied in the literature on two-sided matching (Abdulkadiroğlu et al., 2020).In two-sided matching (for example, between doctors and hospitals), “justified envy” means that doctor d1subscript𝑑1d_{1}, who is matched to hospital h1subscriptℎ1h_{1}, envies doctor d2subscript𝑑2d_{2}, who is matched to hospital h2subscriptℎ2h_{2}, and at the same time, h2subscriptℎ2h_{2} prefers d1subscript𝑑1d_{1} to d2subscript𝑑2d_{2}.Analogously, one can defined “justified envy” in our setting as some agent i𝑖i envying another agent j𝑗j in the final allocation, while i𝑖i’s initial piece was more valuable than j𝑗j’s.
|
| 226 |
+
|
| 227 |
+
From an existential point of view, Pareto-efficiency does not add much difficulty. Both r𝑟r-proportionality and w𝑤w-ownership are preserved by Pareto-improvements. Therefore, if there exists a division satisfying r𝑟r-proportionality and w𝑤w-ownership (or democratic-ownership), then there also exists a Pareto-optimal division satisfying these properties. However, it may not be easy to find such a division algorithmically.
|
1706.07845v2.txt
ADDED
|
@@ -0,0 +1,630 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
%
|
| 3 |
+
|
| 4 |
+
\label{Introduction}
|
| 5 |
+
\begin{figure}[!t]
|
| 6 |
+
\centering
|
| 7 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 8 |
+
\includegraphics[width=\linewidth]{figures/can_187_gd.png}
|
| 9 |
+
\caption{Can\_187}
|
| 10 |
+
\label{fig:can_187_sfdp}
|
| 11 |
+
\end{subfigure}
|
| 12 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 13 |
+
\includegraphics[width=\linewidth]{figures/can_187_baseline.png}
|
| 14 |
+
\caption{LINE}
|
| 15 |
+
\label{fig:can_187_line}
|
| 16 |
+
\end{subfigure}
|
| 17 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 18 |
+
\includegraphics[width=\linewidth]{figures/can_187_gc_6.png}
|
| 19 |
+
\caption{\ouralgorithm}
|
| 20 |
+
\label{fig:can_187_line_gc}
|
| 21 |
+
\end{subfigure}
|
| 22 |
+
|
| 23 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 24 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gd.png}
|
| 25 |
+
\caption{Poisson 2D}\label{fig:poisson_2d_sfdp}
|
| 26 |
+
\end{subfigure}
|
| 27 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 28 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_baseline.png}
|
| 29 |
+
\caption{LINE}\label{fig:poisson_2d_line}
|
| 30 |
+
\end{subfigure}
|
| 31 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 32 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_1.png}
|
| 33 |
+
\caption{\ouralgorithm}\label{fig:poisson_2d_line_gc}
|
| 34 |
+
\end{subfigure}
|
| 35 |
+
\caption{Comparison of two-dimensional embeddings from LINE and our proposed method,
|
| 36 |
+
for two distinct graphs.
|
| 37 |
+
Observe how \ouralgorithm's embedding better preserves the higher order structure of a ring and a plane.}
|
| 38 |
+
~\label{fig:graph_drawing_comp}
|
| 39 |
+
\end{figure}
|
| 40 |
+
|
| 41 |
+
\noindent
|
| 42 |
+
From social networks to the World Wide Web, graphs are a ubiquitous way to organize a diverse set of real-world information.
|
| 43 |
+
Given a network's structure, it is often desirable to predict missing information (frequently called \textit{attributes} or \textit{labels}) associated with each node in the graph.
|
| 44 |
+
This missing information can represent a variety of aspects of the data -- for example, on a social network they could represent the communities a person belongs to, or the categories of a document's content on the web.
|
| 45 |
+
|
| 46 |
+
Because many information networks can contain billions of nodes and edges, it can be intractable to perform complex inference procedures on the entire network.
|
| 47 |
+
One technique which has been proposed to address this problem is \textit{dimensionality reduction}.
|
| 48 |
+
The central idea is to find a mapping function which converts each node in the graph to a low-dimensional latent representation.
|
| 49 |
+
These representations can then be used as features for common tasks on graphs such as multi-label classification, clustering, and link prediction.
|
| 50 |
+
|
| 51 |
+
Traditional methods for graph dimensionality reduction \cite{belkin2001laplacian,roweis2000nonlinear,tenenbaum2000global} perform well on small graphs.
|
| 52 |
+
However, the time complexity of these methods are at least quadratic in the number of graph nodes, makes them impossible to run on large-scale networks.
|
| 53 |
+
|
| 54 |
+
A recent advancement in graph representation learning, DeepWalk \cite{perozzi2014deepwalk} proposed online learning methods using neural networks to address this scalability limitation.
|
| 55 |
+
Much work has since followed \cite{cao2015grarep,node2vec-kdd2016,walklets,tang2015line}.
|
| 56 |
+
These neural network-based methods have proven both highly scalable and performant, achieving strong results on classification and link prediction tasks in large networks.
|
| 57 |
+
|
| 58 |
+
Despite their success, all these methods have several shared weaknesses.
|
| 59 |
+
Firstly, they are all local approaches -- limited to the structure immediately around a node.
|
| 60 |
+
DeepWalk \cite{perozzi2014deepwalk} and Node2vec \cite{node2vec-kdd2016} adopt short random walks to explore the local neighborhoods of nodes,
|
| 61 |
+
while LINE \cite{tang2015line} is concerned with even closer relationships (nodes at most two hops away).
|
| 62 |
+
This focus on local structure implicitly ignores long-distance global relationships, and the learned representations can fail to uncover important global structural patterns.
|
| 63 |
+
Secondly, they all rely on a non-convex optimization goal solved using stochastic gradient descent \cite{goldberg2014word2vec,mikolov2013distributed} which can become stuck in a local minima (e.g.\ perhaps as a result of a poor initialization).
|
| 64 |
+
In other words, all previously proposed techniques for graph representation learning can accidentally learn embedding configurations which disregard important structural features of their input graph.
|
| 65 |
+
|
| 66 |
+
In this work, we propose \emph{\ouralgorithm}, a meta strategy for embedding graph datasets which preserves higher-order structural features.
|
| 67 |
+
\emph{\ouralgorithm} recursively coalesces the nodes and edges in the original graph to get a series of successively smaller graphs with similar structure.
|
| 68 |
+
These coalesced graphs, each with a different granularity, provide us a view of the original graph's global structure.
|
| 69 |
+
Starting from the most simplified form,
|
| 70 |
+
each graph is used to learn a set of initial representations which serve as good initializations for embedding the next, more detailed graph.
|
| 71 |
+
This process is repeated until we get an embedding for each node in the original graph.
|
| 72 |
+
|
| 73 |
+
We illustrate the effectiveness of this multilevel paradigm in Figure \ref{fig:graph_drawing_comp}, by visualizing the two-dimension embeddings from an existing method (\emph{LINE}~\cite{tang2015line}) and our improvement to it, \emph{\ourline}.
|
| 74 |
+
Each of the small graphs we consider has an obvious global structure (that of a ring (\ref{fig:can_187_sfdp}) and a grid (\ref{fig:poisson_2d_sfdp})) which is easily exposed by a force direced layout~\cite{hu2005efficient}.
|
| 75 |
+
The center figures represent the two-dimensional embedding obtained by LINE for the ring (\ref{fig:can_187_line}) and grid (\ref{fig:poisson_2d_line}). In these embeddings, the global structure is lost (i.e.\ that is, the ring and plane are unidentifiable).
|
| 76 |
+
However, the embeddings produced by using our meta-strategy to improve LINE (right) clearly capture both the local and global structure of the given graphs (\ref{fig:can_187_line_gc}, \ref{fig:poisson_2d_line_gc}).
|
| 77 |
+
|
| 78 |
+
Our contributions are the following:
|
| 79 |
+
\begin{itemize}
|
| 80 |
+
\item \textbf{New Representation Learning Paradigm.}
|
| 81 |
+
We propose \emph{\ouralgorithm}, a novel multilevel paradigm for graph representation which seamlessly blends ideas from the graph drawing \cite{fruchterman1991graph} and graph representation learning \cite{perozzi2014deepwalk,tang2015line,node2vec-kdd2016} communities to build substantially better graph embeddings.
|
| 82 |
+
|
| 83 |
+
\item \textbf{Improved Optimization Primitives.}
|
| 84 |
+
We demonstrate that our approach leads to improved implementations of \textbf{all} state-of-the-art graph representation learning methods, namely \emph{DeepWalk} (DW), \emph{LINE} and \emph{Node2vec} (N2V).
|
| 85 |
+
Our improvements on these popular methods for learning latent representations illustrate the broad applicability of our hierarchical approach.
|
| 86 |
+
|
| 87 |
+
\item \textbf{Better Embeddings for Downstream Tasks.}
|
| 88 |
+
We demonstrate that \emph{\ourdw}, \emph{\ourline} and \emph{\ourntv} embeddings
|
| 89 |
+
consistently outperform the originals on classification tasks on several real-world networks, with improvements as large as 14\% Macro $F_1$.
|
| 90 |
+
\end{itemize}
|
| 91 |
+
\section{Problem Formulation}
|
| 92 |
+
We desire to learn latent representations of nodes in a graph.
|
| 93 |
+
Formally, let $G = (V, E)$ be a graph, where $V$ is the set of nodes and $E$ is the set of edges.
|
| 94 |
+
The goal of graph representation learning is to develop a mapping function $\Phi: V \mapsto \mathbb{R}^{|V| \times d}, d \ll |V|$.
|
| 95 |
+
This mapping $\Phi$ defines the latent representation (or \emph{embedding}) of each node $v \in V$.
|
| 96 |
+
Popular methods for learning the parameters of $\Phi$~\cite{perozzi2014deepwalk,tang2015line,node2vec-kdd2016} suffer from two main disadvantages:
|
| 97 |
+
(1) higher-order graph structural information is not modeled, and
|
| 98 |
+
(2) their stochastic optimization can fall victim to poor initialization.
|
| 99 |
+
|
| 100 |
+
In light of these difficulties, we introduce the \emph{hierarchical representation learning} problem for graphs.
|
| 101 |
+
At its core, we seek to find a graph, $G_s = (V_s, E_s)$ which captures the essential structure of $G$, but is smaller than our original (i.e.\ $|V_s| << |V|$, $|E_s| << |E|$).
|
| 102 |
+
It is likely that $G_s$ will be easier to embed for two reasons.
|
| 103 |
+
First, there are many less pairwise relationships ($|V_s|^2$ versus $|V|^2$) which can be expressed in the space.
|
| 104 |
+
As the sample space shrinks, there is less variation in training examples -- this can yield a smoother objective function which is easier to optimize.
|
| 105 |
+
Second, the diameter of $G_s$ may be smaller than $G$, so algorithms with a local focus can exploit the graph's global structure.
|
| 106 |
+
|
| 107 |
+
In summary, we define the hierarchical representation learning problem in graphs as follows:
|
| 108 |
+
\noindent
|
| 109 |
+
\begin{itemize}
|
| 110 |
+
\setlength{\itemsep}{-1.0\itemsep}
|
| 111 |
+
\item[]\hspace{-0.25in}{\bf Given} a large graph $G(V,E)$ and a function $f$, which embeds $G$ using initialization $\theta$, $f: G \times \theta \mapsto \Phi_G$,
|
| 112 |
+
|
| 113 |
+
\item[]\hspace{-0.25in}{\bf Simplify} $G$ to a series of successively smaller graphs $G_{0} \hdots G_{L}$,
|
| 114 |
+
|
| 115 |
+
\item[]\hspace{-0.25in}{\bf Learn} a coarse embedding $\Phi_{G_L} = f(G_L, \emptyset)$,
|
| 116 |
+
|
| 117 |
+
\item[]\hspace{-0.25in}{\bf Refine} the coarse embedding into $\Phi_{G}$ by iteratively applying $\Phi_{G_i} = f(G_i, \Phi_{G_{i+1}}), 0 \leq i < L$.
|
| 118 |
+
\end{itemize}
|
| 119 |
+
\section{Method}
|
| 120 |
+
\label{HARP}
|
| 121 |
+
|
| 122 |
+
Here we present our hierarchical paradigm for graph representation learning.
|
| 123 |
+
After discussing the method in general, we present a structure-preserving algorithm for its most crucial step, graph coarsening.
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
\begin{figure*}[t]
|
| 127 |
+
\centering
|
| 128 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 129 |
+
\centering
|
| 130 |
+
\includegraphics[width=0.9\linewidth]{figures/edge_collapsing.png}
|
| 131 |
+
\caption{Edge Collapsing.}
|
| 132 |
+
\label{fig:edge-collapsing}
|
| 133 |
+
\end{subfigure}
|
| 134 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 135 |
+
\centering
|
| 136 |
+
\includegraphics[width=0.85\linewidth]{figures/edge_collapsing_fail.png}
|
| 137 |
+
\caption{Edge Collapsing fails to collapse stars.}
|
| 138 |
+
\label{fig:edge-collapsing-fail}
|
| 139 |
+
\end{subfigure}
|
| 140 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 141 |
+
\centering
|
| 142 |
+
\includegraphics[width=0.85\linewidth]{figures/star_collapsing.png}
|
| 143 |
+
\caption{Star Collapsing.}
|
| 144 |
+
\label{fig:star-collapsing}
|
| 145 |
+
\end{subfigure}
|
| 146 |
+
\caption{Illustration of graph coarsening algorithms.
|
| 147 |
+
\ref{fig:edge-collapsing}: Edge collapsing on a graph snippet.
|
| 148 |
+
\ref{fig:edge-collapsing-fail}: How edge collapsing fails to coalesce star-like structures.
|
| 149 |
+
\ref{fig:star-collapsing}: How star collapsing scheme coalesces the same graph snippet efficiently.}
|
| 150 |
+
\label{fig:viz-hierarchical-softmax}
|
| 151 |
+
\end{figure*}
|
| 152 |
+
\subsection{Algorithm: \texttt{\ouralgorithm}}
|
| 153 |
+
Our method for multi-level graph representation learning, \ouralgorithm, is presented in Algorithm \ref{alg:multilevel}.
|
| 154 |
+
It consists of three parts - graph coarsening, graph embedding, and representation refinement - which we detail below:
|
| 155 |
+
|
| 156 |
+
\begin{enumerate}
|
| 157 |
+
\item \emph{Graph Coarsening} (line 1):
|
| 158 |
+
Given a graph $G$, graph coarsening algorithms create a hierarchy of successively smaller graphs $G_0, G_1, \cdots, G_L$,
|
| 159 |
+
where $G_0 = G$.
|
| 160 |
+
The coarser (smaller) graphs preserve the global structure of the original graph, yet have significantly fewer nodes and edges.
|
| 161 |
+
Algorithms for generating this hierarchy of graphs will be discussed in detail below.
|
| 162 |
+
|
| 163 |
+
\item \emph{Graph Embedding on the Coarsest Graph} (line 2-3):
|
| 164 |
+
The graph embedding is obtained on the coarsest graph $G_L$ with the provided graph embedding algorithm.
|
| 165 |
+
As the size of $G_L$ is usually very small, it is much easier to get a high-quality graph representation.
|
| 166 |
+
|
| 167 |
+
\item \emph{Graph Representation Prolongation and Refinement} (line 4-7):
|
| 168 |
+
We prolong and refine the graph representation from the coarsest to the finest graph.
|
| 169 |
+
For each graph $G_i$, we prolong the graph representation of $G_{i + 1}$ as its initial embedding $\Phi_{G_i}^\prime$.
|
| 170 |
+
Then, the embedding algorithm $Embed()$ is applied to $(G_i, \Phi_{G_i}^\prime)$ to further refine $\Phi_{G_i}^\prime$, resulting in the refined embedding $\Phi_{G_i}$.
|
| 171 |
+
We discuss this step in the embedding prolongation section below.
|
| 172 |
+
|
| 173 |
+
\item \emph{Graph Embedding of the Original Graph} (line 8):
|
| 174 |
+
We return $\Phi_{G_0}$, which is the graph embedding of the original graph.
|
| 175 |
+
\end{enumerate}
|
| 176 |
+
|
| 177 |
+
\begin{algorithm}[t]
|
| 178 |
+
\begin{algorithmic}[1]
|
| 179 |
+
\Require
|
| 180 |
+
\Statex graph $G(V,E)$
|
| 181 |
+
\Statex arbitrary graph embedding algorithm $\Call{Embed}$
|
| 182 |
+
\Ensure matrix of vertex representations $\Phi \in \mathbb{R}^{|V| \times d}$
|
| 183 |
+
\State $G_0, G_1, \cdots, G_L \leftarrow \Call{GraphCoarsening}{G}$
|
| 184 |
+
\State Initialize $\Phi_{G_L}^\prime$ by assigning zeros
|
| 185 |
+
\State $\Phi_{G_L} \leftarrow \Call{Embed}{G_L, \Phi_{G_L}^\prime}$
|
| 186 |
+
\For{$i=L-1$ to $0$}
|
| 187 |
+
\State $\Phi_{G_i}^\prime \leftarrow \Call{Prolongate}{\Phi_{G_{i+1}}, G_{i+1}, G_i}$
|
| 188 |
+
\State $\Phi_{G_i} \leftarrow \Call{Embed}{G_i, \Phi_{G_i}^\prime}$
|
| 189 |
+
\EndFor
|
| 190 |
+
\State \Return $\Phi_{G_0}$
|
| 191 |
+
\end{algorithmic}
|
| 192 |
+
\caption{\ouralgorithm($G, Embed()$)}
|
| 193 |
+
\label{alg:multilevel}
|
| 194 |
+
\end{algorithm}
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
We can easily see that this paradigm is algorithm independent, relying only on the provided functions $Embed()$.
|
| 198 |
+
Thus, with minimum effort, this paradigm can be incorporated into any existing graph representation learning methods, yielding a multilevel version of that method.
|
| 199 |
+
\subsection{Graph Coarsening}
|
| 200 |
+
\label{sec:coarsening}
|
| 201 |
+
|
| 202 |
+
\begin{algorithm}[t]
|
| 203 |
+
\begin{algorithmic}[1]
|
| 204 |
+
\Require graph $G(V,E)$
|
| 205 |
+
\Ensure Series of Coarsened Graphs $G_0, G_1, \cdots, G_L$
|
| 206 |
+
\State $L \leftarrow 0$
|
| 207 |
+
\State $G_0 \leftarrow G$
|
| 208 |
+
\While{$|V_{L}| \geq threshold$}
|
| 209 |
+
\State $L \leftarrow L + 1$
|
| 210 |
+
\State $G_{L} \leftarrow \Call{EdgeCollapse}{\Call{StarCollapse}{G} } $
|
| 211 |
+
\EndWhile
|
| 212 |
+
\State \Return $G_0, G_1, \cdots, G_{L}$
|
| 213 |
+
\label{alg:hybrid-collapsing}
|
| 214 |
+
\end{algorithmic}
|
| 215 |
+
|
| 216 |
+
\caption{GraphCoarsening($G$)}
|
| 217 |
+
\label{alg:graph-coarsening}
|
| 218 |
+
\end{algorithm}
|
| 219 |
+
|
| 220 |
+
In Algorithm \ref{alg:graph-coarsening}, we develop a hybrid graph coarsening scheme which preserves global graph structural information at different scales.
|
| 221 |
+
Its two key parts, namely edge collapsing and star collapsing, preserve \emph{first-order proximity} and \emph{second-order proximity} \cite{tang2015line} respectively.
|
| 222 |
+
First-order proximity is concerned with preserving the observed edges in the input graph,
|
| 223 |
+
while second-order proximity is based on the shared neighborhood structure of the nodes.
|
| 224 |
+
|
| 225 |
+
\textbf{Edge Collapsing.}
|
| 226 |
+
Edge collapsing \cite{hu2005efficient} is an efficient algorithm for preserving first-order proximity.
|
| 227 |
+
It selects $E^\prime \subseteq E$, such that no two edges in $E^\prime$ are incident to the same vertex.
|
| 228 |
+
Then, for each $(u_i, v_i) \in E^\prime$, it merges $(u_i, v_i)$ into a single node $w_i$, and merge the edges incident to $u_i$ and $v_i$.
|
| 229 |
+
The number of nodes in the coarser graph is therefore at least half of that in the original graph.
|
| 230 |
+
As illustrated in Figure \ref{fig:edge-collapsing},
|
| 231 |
+
the edge collapsing algorithm merges node pairs $(v_1, v_2)$ and $(v_3, v_4)$ into supernodes $v_{1, 2}$ and $v_{3, 4}$ respectively,
|
| 232 |
+
resulting in a coarser graph with 2 nodes and 1 edge.
|
| 233 |
+
The order of merging is arbitrary; we find different merging orders result in very similar node embeddings in practice.
|
| 234 |
+
|
| 235 |
+
\textbf{Star Collapsing.}
|
| 236 |
+
\label{sec:star-collapsing}
|
| 237 |
+
Real world graphs are often scale-free, which means they contain a large number of star-like structures.
|
| 238 |
+
A star consists of a popular central node (sometimes referred to as \textit{hubs}) connected to many peripheral nodes.
|
| 239 |
+
Although the edge collapsing algorithm is simple and efficient, it cannot sufficiently compress the star-like structures in a graph.
|
| 240 |
+
Consider the graph snippet in Figure \ref{fig:edge-collapsing-fail}, where the only central node $v_7$ connects to all the other nodes.
|
| 241 |
+
Assume the degree of the central node is $k$,
|
| 242 |
+
it is clear that the edge collapsing scheme can only compress this graph into a coarsened graph with $k - 1$ nodes.
|
| 243 |
+
Therefore when $k$ is large, the coarsening process could be arbitrarily slow, takes $O(k)$ steps instead of $O(\log k)$ steps.
|
| 244 |
+
|
| 245 |
+
One observation on the star structure is that
|
| 246 |
+
there are strong second-order similarities between the peripheral nodes since they share the same neighborhood.
|
| 247 |
+
This leads to our star collapsing scheme,
|
| 248 |
+
which merges nodes with the same neighbors into supernodes since they are similar to each other.
|
| 249 |
+
As shown in Figure \ref{fig:star-collapsing}, $(v_1, v_2)$, $(v_3, v_4)$ and $(v_5, v_6)$
|
| 250 |
+
are merged into supernodes as they share the same neighbors ($v_7$),
|
| 251 |
+
generating a coarsened graph with only $k / 2$ nodes.
|
| 252 |
+
|
| 253 |
+
\textbf{Hybrid Coarsening Scheme.}
|
| 254 |
+
By combining edge collapsing and star collapsing,
|
| 255 |
+
we present a hybrid scheme for graph coarsening in Algorithm \ref{alg:graph-coarsening}, which is adopted on all test graphs.
|
| 256 |
+
In each coarsening step, the hybrid coarsening scheme first decomposes the input graph with star collapsing,
|
| 257 |
+
then adopts the edge collapsing scheme to generate the coalesced graph.
|
| 258 |
+
We repeat this process until a small enough graph (with less than 100 vertices) is obtained.
|
| 259 |
+
\subsection{Embedding Prolongation}
|
| 260 |
+
\label{sec:prolongation}
|
| 261 |
+
After the graph representation for $G_{i+1}$ is learned, we prolong it into the initial representation for $G_{i}$.
|
| 262 |
+
We observe that each node $v \in G_{i+1}$ is either a member of the finer representation ($v \in G_{i}$), or the result of a merger, $(v_1, v_2, \cdots, v_k) \in G_{i}$.
|
| 263 |
+
In both cases, we can simply reuse the representation of the parent node $v \in G_i$ - the children are quickly separated by gradient updates.
|
| 264 |
+
\subsection{Complexity Analysis}
|
| 265 |
+
\label{sec:time_complexity}
|
| 266 |
+
|
| 267 |
+
In this section, we discuss the time complexity of \emph{\ourdw} and \emph{\ourline} and compare with the time complexity of \emph{DeepWalk} and \emph{LINE} respectively.
|
| 268 |
+
\emph{\ourntv} has the same time complexity as \emph{\ourdw}, thus it is not included in the discussion below.
|
| 269 |
+
|
| 270 |
+
\noindent \textbf{\ourdw}:
|
| 271 |
+
Given the number of random walks $\gamma$, walk length $t$, window size $w$ and representation size $d$,
|
| 272 |
+
the time complexity of \emph{DeepWalk} is dominated by the training time of the Skip-gram model, which is $\mathcal{O}(\gamma |V| t w (d + dlog|V|))$.
|
| 273 |
+
For \emph{\ourdw}, coarsening a graph with $|V|$ nodes produces a coarser graph with about $|V| / 2$ nodes.
|
| 274 |
+
The total number of nodes in all levels is approximately $|V|\sum_{i=0}^{log_2|V|}(\frac{1}{2})^{i}= 2|V|$.
|
| 275 |
+
Therefore, the time complexity of \emph{\ourdw} is $O(|V|)$ for copying binary tree and $\mathcal{O}(\gamma |V| t w (d + dlog|V|))$ for model training.
|
| 276 |
+
Thus, the overall time complexity of \emph{\ourdw} is also $\mathcal{O}(\gamma |V| t w (d + dlog|V|))$.
|
| 277 |
+
|
| 278 |
+
\noindent \textbf{\ourline}:
|
| 279 |
+
The time complexity of \emph{LINE} is linear to the number of edges in the graph and the number of iterations $r$ over edges, which is $\mathcal{O}(r |E|)$.
|
| 280 |
+
For \emph{\ourline}, coarsening a graph with $|E|$ nodes produces a coarsened graph with about $|E| / 2$ edges.
|
| 281 |
+
The total number edges in all levels is approximately $|E|\sum_{i=0}^{log_2|E|}(\frac{1}{2})^{i}= 2|E|$.
|
| 282 |
+
Thus, the time complexity of \emph{\ourline} is also $\mathcal{O}(r |E|)$.
|
| 283 |
+
\section{Experiment}
|
| 284 |
+
\label{Experiment}
|
| 285 |
+
In this section, we provide an overview of the datasets and methods used for experiments
|
| 286 |
+
and evaluate the effectiveness of our method on challenging multi-label classification tasks in several real-life networks.
|
| 287 |
+
We further illustrate the scalability of our method and discuss its performance with regard to several important parameters.
|
| 288 |
+
\subsection{Datasets}
|
| 289 |
+
Table \ref{tab:table-graph-stats} gives an overview of the datasets used in our experiments.
|
| 290 |
+
|
| 291 |
+
\begin{table}
|
| 292 |
+
\centering{\footnotesize
|
| 293 |
+
\begin{tabular}{l@{\quad}c c c c c}
|
| 294 |
+
\toprule
|
| 295 |
+
Name & DBLP & Blogcatalog & CiteSeer \\
|
| 296 |
+
\midrule
|
| 297 |
+
\# Vertices & 29,199 & 10,312 & 3,312 \\
|
| 298 |
+
\# Edges & 133,664 & 333,983 & 4,732 \\
|
| 299 |
+
\# Classes & 4 & 39 & 6 \\
|
| 300 |
+
Task & Classification & Classification & Classification \\
|
| 301 |
+
\bottomrule
|
| 302 |
+
\end{tabular}
|
| 303 |
+
}
|
| 304 |
+
\caption{Statistics of the graphs used in our experiments.}
|
| 305 |
+
\label{tab:table-graph-stats}
|
| 306 |
+
\end{table}
|
| 307 |
+
|
| 308 |
+
\begin{itemize}
|
| 309 |
+
\item{\emph{DBLP}} \cite{walklets} -- DBLP is a co-author graph of researchers in computer science.
|
| 310 |
+
The labels indicate the research areas a researcher publishes his work in.
|
| 311 |
+
The 4 research areas included in this dataset are DB, DM, IR, and ML.
|
| 312 |
+
\item{\emph{BlogCatalog}} \cite{tang2009relational} -- BlogCatalog is a network of social relationships between users on the BlogCatalog website. The labels represent the categories a blogger publishes in.
|
| 313 |
+
\item{\emph{CiteSeer}} \cite{sen:aimag08} -- CiteSeer is a citation network between publications in computer science.
|
| 314 |
+
The labels indicate the research areas a paper belongs to.
|
| 315 |
+
The papers are classified into 6 categories: Agents, AI, DB, IR, ML, and HCI.
|
| 316 |
+
\end{itemize}
|
| 317 |
+
\subsection{Baseline Methods}
|
| 318 |
+
We compare our model with the following graph embedding methods:
|
| 319 |
+
|
| 320 |
+
\begin{itemize}
|
| 321 |
+
|
| 322 |
+
\item \emph{DeepWalk} ---
|
| 323 |
+
\emph{DeepWalk} is a two-phase method for embedding graphs. Firstly, \emph{DeepWalk} generates random walks of fixed length from all the vertices of a graph. Then, the walks are treated as sentences in a language model and the Skip-Gram model for learning word embeddings is utilized to obtain graph embeddings. \emph{DeepWalk} uses hierarchical softmax for Skip-gram model optimization.
|
| 324 |
+
|
| 325 |
+
\item \emph{LINE} ---
|
| 326 |
+
\emph{LINE} is a method for embedding large-scale networks. The objective function of \emph{LINE} is designed for preserving both first-order and second-order proximities, and we use first-order \emph{LINE} for comparison. Skip-gram with negative sampling is used to solve the objective function.
|
| 327 |
+
|
| 328 |
+
\item \emph{Node2vec} ---
|
| 329 |
+
\emph{Node2vec} proposes an improvement to the random walk phase of \emph{DeepWalk}. By introducing the return parameter $p$ and the in-out parameter $q$, \emph{Node2vec} combines DFS-like and BFS-like neighborhood exploration.
|
| 330 |
+
\emph{Node2vec} also uses negative sampling for optimizing the Skip-gram model.
|
| 331 |
+
|
| 332 |
+
\end{itemize}
|
| 333 |
+
For each baseline method, we combine it with \emph{\ouralgorithm} and compare their performance.
|
| 334 |
+
\subsection{Parameter Settings}
|
| 335 |
+
Here we discuss the parameter settings for our models and baseline models.
|
| 336 |
+
Since \emph{DeepWalk}, \emph{LINE} and \emph{Node2vec} are all sampling based algorithms,
|
| 337 |
+
we always ensure that the total number of samples seen by the baseline algorithm
|
| 338 |
+
is the \textbf{same} as that of the corresponding \emph{\ouralgorithm} enhanced algorithm.
|
| 339 |
+
|
| 340 |
+
\textbf{DeepWalk.}
|
| 341 |
+
For \emph{DeepWalk} and \emph{\ourdw}, we need to set the following parameters:
|
| 342 |
+
the number of random walks $\gamma$, walk length $t$, window size $w$ for the Skip-gram model and representation size $d$.
|
| 343 |
+
In \emph{\ourdw}, the parameter setting is $\gamma = 40, t = 10, w = 10, d = 128$.
|
| 344 |
+
For \emph{DeepWalk}, all the parameters except $\gamma$ are the same as in \emph{\ourdw}.
|
| 345 |
+
Specifically, to ensure a fair comparison, we increase the value of $\gamma$ for \emph{DeepWalk}.
|
| 346 |
+
This gives \emph{DeepWalk} a larger training dataset (as large as all of the levels of \emph{\ourdw} combined).
|
| 347 |
+
We note that failure to increase $\gamma$ in this way resulted in substantially worse \emph{DeepWalk} (and \emph{Node2vec}) models.
|
| 348 |
+
|
| 349 |
+
\textbf{LINE.}
|
| 350 |
+
For \emph{\ourline}, we run $50$ iterations on all graph edges on all coarsening levels.
|
| 351 |
+
For \emph{LINE}, we increase the number of iterations over graph edges accordingly, so that the amount of training data for both models remain the same.
|
| 352 |
+
The representation size $d$ is set to $64$ for both \emph{LINE} and \emph{\ourline}.
|
| 353 |
+
|
| 354 |
+
\textbf{Node2vec.}
|
| 355 |
+
For \emph{\ourntv}, the parameter setting is $\gamma = 40, t = 10, w = 10, d = 128$.
|
| 356 |
+
Similar to \emph{DeepWalk}, we increase the value of $\gamma$ in \emph{Node2vec} to ensure a fair comparison.
|
| 357 |
+
Both in-out and return hyperparameters are set to 1.0.
|
| 358 |
+
For all models, the initial learning rate and final learning rate are set to 0.025 and 0.001 respectively.
|
| 359 |
+
\subsection{Graph Coarsening}
|
| 360 |
+
Figure \ref{fig:coarsening_stats} demonstrates the effect of our hybrid coarsening method on all test graphs.
|
| 361 |
+
The first step of graph coarsening for each graph eliminates about half the nodes,
|
| 362 |
+
but the number of edges only reduce by about 10\% for \emph{BlogCatalog}.
|
| 363 |
+
This illustrates the difficulty of coarsening real-world graphs.
|
| 364 |
+
However, as the graph coarsening process continues, the scale of all graphs drastically decrease.
|
| 365 |
+
At level 8, all graphs have less than 10\% nodes and edges left.
|
| 366 |
+
|
| 367 |
+
\begin{figure}[t]
|
| 368 |
+
\centering
|
| 369 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 370 |
+
\includegraphics[width=\linewidth]{figures/coarsen_dblp.pdf}
|
| 371 |
+
\caption{DBLP}
|
| 372 |
+
\end{subfigure}
|
| 373 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 374 |
+
\includegraphics[width=\linewidth]{figures/coarsen_blogcatalog.pdf}
|
| 375 |
+
\caption{BlogCatalog}
|
| 376 |
+
\end{subfigure}
|
| 377 |
+
\begin{subfigure}[b]{.32\linewidth}
|
| 378 |
+
\includegraphics[width=\linewidth]{figures/coarsen_citeseer.pdf}
|
| 379 |
+
\caption{CiteSeer}
|
| 380 |
+
\end{subfigure}
|
| 381 |
+
\caption{The ratio of nodes/edges of the coarsened graphs to that of the original test graphs.
|
| 382 |
+
For disconnected graphs, the graph coarsening result on the largest connected component is shown.}
|
| 383 |
+
\label{fig:coarsening_stats}
|
| 384 |
+
\end{figure}
|
| 385 |
+
\subsection{Visualization}
|
| 386 |
+
To show the intuition of the \emph{\ouralgorithm} paradigm, we set $d = 2$, and visualize the graph representation generated by \emph{\ourline} at each level.
|
| 387 |
+
|
| 388 |
+
Figure \ref{fig:poisson_2d_line_gc_detailed} shows the level-wise 2D graph embeddings obtained with \emph{\ourline} on \emph{Poisson 2D}.
|
| 389 |
+
The graph layout of level 5 (which has only 21 nodes) already highly resembles the layout of the original graph.
|
| 390 |
+
The graph layout on each subsequent level is initialized with the prolongation of the previous graph layout, thus the global structure is kept.
|
| 391 |
+
|
| 392 |
+
\begin{figure}
|
| 393 |
+
\centering
|
| 394 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 395 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_8.png}
|
| 396 |
+
\caption{Level 7}\label{fig:poisson_2d_gc_8}
|
| 397 |
+
\end{subfigure}
|
| 398 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 399 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_7.png}
|
| 400 |
+
\caption{Level 6}\label{fig:poisson_2d_gc_7}
|
| 401 |
+
\end{subfigure}
|
| 402 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 403 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_6.png}
|
| 404 |
+
\caption{Level 5}\label{fig:poisson_2d_gc_6}
|
| 405 |
+
\end{subfigure}
|
| 406 |
+
|
| 407 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 408 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_5.png}
|
| 409 |
+
\caption{Level 4}\label{fig:poisson_2d_gc_5}
|
| 410 |
+
\end{subfigure}
|
| 411 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 412 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_4.png}
|
| 413 |
+
\caption{Level 3}\label{fig:poisson_2d_gc_4}
|
| 414 |
+
\end{subfigure}
|
| 415 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 416 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_3.png}
|
| 417 |
+
\caption{Level 2}\label{fig:poisson_2d_gc_3}
|
| 418 |
+
\end{subfigure}
|
| 419 |
+
|
| 420 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 421 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_2.png}
|
| 422 |
+
\caption{Level 1}\label{fig:poisson_2d_gc_2}
|
| 423 |
+
\end{subfigure}
|
| 424 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 425 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gc_1.png}
|
| 426 |
+
\caption{Level 0}\label{fig:poisson_2d_gc_1}
|
| 427 |
+
\end{subfigure}
|
| 428 |
+
\begin{subfigure}[b]{.20\linewidth}
|
| 429 |
+
\includegraphics[width=\linewidth]{figures/poisson_2d_gd.png}
|
| 430 |
+
\caption{Input}\label{fig:poisson_2d_sfdp_dup}
|
| 431 |
+
\end{subfigure}
|
| 432 |
+
|
| 433 |
+
\caption{Two-dimensional embeddings generated with \emph{\ourline} on different coarsening levels on \emph{Poisson 2D}.
|
| 434 |
+
Level 7 denotes the smallest graph, while level 0 denotes the original graph.
|
| 435 |
+
The last subfigure is the graph layout generated by a force-direct graph drawing algorithm.}
|
| 436 |
+
\label{fig:poisson_2d_line_gc_detailed}
|
| 437 |
+
\end{figure}
|
| 438 |
+
\subsection{Multi-label Classification}
|
| 439 |
+
We evaluate our method using the same experimental procedure in \cite{perozzi2014deepwalk}.
|
| 440 |
+
Firstly, we obtain the graph embeddings of the input graph.
|
| 441 |
+
Then, a portion ($T_R$) of nodes along with their labels are randomly sampled from the graph as training data,
|
| 442 |
+
and the task is to predict the labels for the remaining nodes.
|
| 443 |
+
We train a one-vs-rest logistic regression model with L2 regularization on the graph embeddings for prediction.
|
| 444 |
+
The logistic regression model is implemented by LibLinear \cite{fan2008liblinear}.
|
| 445 |
+
To ensure the reliability of our experiment, the above process is repeated for 10 times, and the average Macro $F_1$ score is reported.
|
| 446 |
+
The other evaluation metrics such as Micro $F_1$ score and accuracy follow the same trend as Macro $F_1$ score,
|
| 447 |
+
thus are not shown.
|
| 448 |
+
\begin{table}[t!]
|
| 449 |
+
\centering
|
| 450 |
+
\begin{tabular}{clll}
|
| 451 |
+
\toprule
|
| 452 |
+
\textbf{Algorithm} & \multicolumn{3}{c}{\textbf{Dataset}} \\
|
| 453 |
+
& DBLP & BlogCatalog & CiteSeer \\ \midrule
|
| 454 |
+
\emph{DeepWalk} & 57.29 & 24.88 & 42.72 \\
|
| 455 |
+
\emph{\ourdw} & {$\mathbf{61.76^*}$} & $\mathbf{25.90^*}$ & $\mathbf{44.78^*}$ \\
|
| 456 |
+
\emph{Gain of \ouralgorithm[\%]} & \textbf{7.8} & \textbf{4.0} & \textbf{4.8} \\ \midrule
|
| 457 |
+
\emph{LINE} & 57.76 & 22.43 & 37.11 \\
|
| 458 |
+
\emph{\ourline} & $\mathbf{59.51^*}$ & $\mathbf{23.47^*}$ & $\mathbf{42.95^*}$ \\
|
| 459 |
+
\emph{Gain of \ouralgorithm[\%]} & \textbf{3.0} & \textbf{4.6} & \textbf{13.6} \\ \midrule
|
| 460 |
+
\emph{Node2vec} & 62.64 & 23.55 & 44.84 \\
|
| 461 |
+
\emph{\ourntv} & \textbf{62.80} & $\mathbf{24.66^*}$ & $\mathbf{46.08^*}$ \\
|
| 462 |
+
\emph{Gain of \ouralgorithm[\%]} & \textbf{0.3} & \textbf{4.7} & \textbf{2.8} \\
|
| 463 |
+
\bottomrule
|
| 464 |
+
\end{tabular}
|
| 465 |
+
\caption{Macro $F_1$ scores and performance gain of \emph{\ouralgorithm} on \emph{DBLP}, \emph{BlogCatalog}, and \emph{CiteSeer} in percentage.
|
| 466 |
+
* indicates statistically superior performance to the corresponding baseline method at level of 0.001 using a standard paired t-test.
|
| 467 |
+
Our method improves \textbf{all} existing neural embedding techniques.}
|
| 468 |
+
\label{tab:classification_summary}
|
| 469 |
+
\end{table}
|
| 470 |
+
|
| 471 |
+
\begin{figure*}[t]
|
| 472 |
+
\centering
|
| 473 |
+
|
| 474 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 475 |
+
\includegraphics[width=\linewidth]{figures/dblp-dw-macro-f1.pdf}
|
| 476 |
+
\end{subfigure}
|
| 477 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 478 |
+
\includegraphics[width=\linewidth]{figures/dblp-line-macro-f1.pdf}
|
| 479 |
+
\end{subfigure}
|
| 480 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 481 |
+
\includegraphics[width=\linewidth]{figures/dblp-nv-macro-f1.pdf}
|
| 482 |
+
\end{subfigure}
|
| 483 |
+
|
| 484 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 485 |
+
\includegraphics[width=\linewidth]{figures/blogcatalog-dw-macro-f1.pdf}
|
| 486 |
+
\end{subfigure}
|
| 487 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 488 |
+
\includegraphics[width=\linewidth]{figures/blogcatalog-line-macro-f1.pdf}
|
| 489 |
+
\end{subfigure}
|
| 490 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 491 |
+
\includegraphics[width=\linewidth]{figures/blogcatalog-nv-macro-f1.pdf}
|
| 492 |
+
\end{subfigure}
|
| 493 |
+
|
| 494 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 495 |
+
\includegraphics[width=\linewidth]{figures/citeseer-dw-macro-f1.pdf}
|
| 496 |
+
\end{subfigure}
|
| 497 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 498 |
+
\includegraphics[width=\linewidth]{figures/citeseer-line-macro-f1.pdf}
|
| 499 |
+
\end{subfigure}
|
| 500 |
+
\begin{subfigure}[b]{.3\linewidth}
|
| 501 |
+
\includegraphics[width=\linewidth]{figures/citeseer-nv-macro-f1.pdf}
|
| 502 |
+
\end{subfigure}
|
| 503 |
+
|
| 504 |
+
\caption{Detailed multi-label classification result on \emph{DBLP}, \emph{BlogCatalog}, and \emph{CiteSeer}.}
|
| 505 |
+
\label{fig:classification_details}
|
| 506 |
+
|
| 507 |
+
\end{figure*}
|
| 508 |
+
Table \ref{tab:classification_summary} reports the Macro $F_1$ scores achieved on \emph{DBLP}, \emph{BlogCatalog}, and \emph{CiteSeer} with 5\%, 50\%, and 5\% labeled nodes respectively.
|
| 509 |
+
The number of class labels of \emph{BlogCatalog} is about 10 times that of the other two graphs,
|
| 510 |
+
thus we use a larger portion of labeled nodes.
|
| 511 |
+
We can see that our method improves all existing neural embedding techniques on all test graphs.
|
| 512 |
+
In \emph{DBLP}, the improvements introduced by \emph{\ourdw}, \emph{\ourline} and \emph{\ourntv}
|
| 513 |
+
are 7.8\%, 3.0\% and 0.3\% respectively.
|
| 514 |
+
Given the scale-free nature of \emph{BlogCatalog}, graph coarsening is much harder due to a large amount of star-like structures in it.
|
| 515 |
+
Still, \emph{\ourdw}, \emph{\ourline} and \emph{\ourntv} achieve gains of
|
| 516 |
+
4.0\%, 4.6\% and 4.7\% over the corresponding baseline methods respectively.
|
| 517 |
+
For \emph{CiteSeer}, the performance improvement is also striking: \emph{\ourdw}, \emph{\ourline} and \emph{\ourntv}
|
| 518 |
+
outperforms the baseline methods by 4.8\%, 13.6\%, and 2.8\%.
|
| 519 |
+
|
| 520 |
+
To have a detailed comparison between \ouralgorithm\ and the baseline methods, we vary the portion of labeled nodes for classification,
|
| 521 |
+
and present the macro $F_1$ scores in Figure \ref{fig:classification_details}.
|
| 522 |
+
We can observe that \emph{\ourdw}, \emph{\ourline} and \emph{\ourntv}
|
| 523 |
+
consistently perform better than the corresponding baseline methods.
|
| 524 |
+
|
| 525 |
+
\textbf{DBLP.}
|
| 526 |
+
For \emph{DBLP}, the relative gain of \emph{\ourdw} is over 9\% with 4\% labeled data.
|
| 527 |
+
With only 2\% labeled data, \emph{\ourdw} achieves higher macro $F_1$ score than
|
| 528 |
+
\emph{DeepWalk} with 8\% label data.
|
| 529 |
+
\emph{\ourline} also consistently outperforms \emph{LINE} given any amount of training data,
|
| 530 |
+
with macro $F_1$ score gain between 1\% and 3\%.
|
| 531 |
+
\emph{\ourntv} and \emph{Node2vec} have comparable performance with less than 5\% labeled data,
|
| 532 |
+
but as the ratio of labeled data increases,
|
| 533 |
+
\emph{\ourntv} eventually distances itself to a 0.7\% improvement over \emph{Node2vec}.
|
| 534 |
+
We can also see that \emph{Node2vec} generally has better performance when compared to \emph{DeepWalk},
|
| 535 |
+
and the same holds for \emph{\ourntv} and \emph{\ourdw}.
|
| 536 |
+
The difference in optimization method for Skip-gram (negative sampling for \emph{Node2vec} and hierarchical softmax for \emph{DeepWalk})
|
| 537 |
+
may account for this difference.
|
| 538 |
+
|
| 539 |
+
\textbf{BlogCatalog.}
|
| 540 |
+
As a scale-free network with complex structure, \emph{BlogCatalog} is challenging for graph coarsening.
|
| 541 |
+
Still, by considering both first-order proximity and second-order proximity,
|
| 542 |
+
our hybrid coarsening algorithm generates an appropriate hierarchy of coarsened graphs.
|
| 543 |
+
With the same amount of training data, \emph{\ourdw} always leads by at least 3.0\%.
|
| 544 |
+
For \emph{\ourline}, it achieves a relative gain of 4.8\% with 80\% labeled data.
|
| 545 |
+
For \emph{\ourntv}, its gain over \emph{Node2vec} reaches 4.7\% given 50\% labeled nodes.
|
| 546 |
+
|
| 547 |
+
\textbf{Citeseer.}
|
| 548 |
+
For \emph{CiteSeer}, the lead of \emph{\ourdw} on Macro $F_1$ score varies between 5.7\% and 7.8\%.
|
| 549 |
+
For \emph{\ourline}, its improvement over \emph{LINE} with 4\% labeled data is an impressive 24.4\%.
|
| 550 |
+
\emph{\ourntv} also performs better than \emph{Node2vec} on any ratio of labeled nodes.
|
| 551 |
+
\subsection{Scalability}
|
| 552 |
+
\begin{figure}[t]
|
| 553 |
+
\hspace{-0.1in}
|
| 554 |
+
\centering
|
| 555 |
+
\begin{subfigure}[b]{.49\linewidth}
|
| 556 |
+
\includegraphics[width=\linewidth]{figures/run_time_all.pdf}
|
| 557 |
+
\caption{Test graphs.}
|
| 558 |
+
\label{fig:run_time_all}
|
| 559 |
+
\end{subfigure}
|
| 560 |
+
\begin{subfigure}[b]{.49\linewidth}
|
| 561 |
+
\includegraphics[width=\linewidth]{figures/run_time_er.pdf}
|
| 562 |
+
\caption{Erdos-Renyi graphs.}
|
| 563 |
+
\label{fig:run_time_er}
|
| 564 |
+
\end{subfigure}
|
| 565 |
+
|
| 566 |
+
\caption{Runtime analysis.}
|
| 567 |
+
\label{fig:run_time}
|
| 568 |
+
\end{figure}
|
| 569 |
+
|
| 570 |
+
We already shown that introducing \emph{\ouralgorithm} does not affect the time complexity of the underlying graph embedding algorithms.
|
| 571 |
+
Here, we compare the actual run time of \emph{\ouralgorithm} enhanced embedding algorithms with the corresponding baseline methods on all test graphs.
|
| 572 |
+
All models run on a single machine with 128GB memory, 24 CPU cores at 2.0GHZ with 20 threads.
|
| 573 |
+
As shown in Figure \ref{fig:run_time_all}, applying \emph{\ouralgorithm} typically only introduces an overhead of less than 10\% total running time.
|
| 574 |
+
The time spent on sampling and training the Skip-gram model dominates the overall running time.
|
| 575 |
+
|
| 576 |
+
Additionally, we learn graph embeddings on Erdos-Renyi graphs with node count ranging from 100 to 100,000 and constant average degree of 10.
|
| 577 |
+
In Figure \ref{fig:run_time_er}, we can observe that the running time of \emph{\ouralgorithm} increases linearly with the number of nodes in the graph.
|
| 578 |
+
Also, when compared to the corresponding baseline method,
|
| 579 |
+
the overhead introduces by the graph coarsening and prolongation process in \ouralgorithm\ is negligible, especially on large-scale graphs.
|
| 580 |
+
\section{Related Work}
|
| 581 |
+
\label{Related_Work}
|
| 582 |
+
The related work is in the areas of graph representation learning and graph drawing, which we briefly describe here.
|
| 583 |
+
|
| 584 |
+
\noindent
|
| 585 |
+
\textbf{Graph Representation Learning}.
|
| 586 |
+
Most early methods treated representation learning as performing dimension reduction on the Laplacian and adjacency matrices \cite{belkin2001laplacian,cox2000multidimensional,tenenbaum2000global}.
|
| 587 |
+
These methods work well on small graphs, but the time complexity of these algorithms is too high for the large-scale graphs commonly encountered today.
|
| 588 |
+
|
| 589 |
+
Recently, neural network-based methods have been proposed for constructing node representation in large-scale graphs. Deepwalk \cite{perozzi2014deepwalk} presents a two-phase algorithm for graph representation learning. In the first phase, Deepwalk samples sequences of neighboring nodes of each node by random walking on the graph. Then, the node representation is learned by training a Skip-gram model \cite{mikolov2013distributed} on the random walks.
|
| 590 |
+
A number of methods have been proposed which extend this idea.
|
| 591 |
+
First, several methods use different strategies for sampling neighboring nodes.
|
| 592 |
+
LINE \cite{tang2015line} learns graph embeddings which preserve both the first-order and second-order proximities in a graph.
|
| 593 |
+
Walklets \cite{walklets} captures multiscale node representation on graphs by sampling edges from higher powers of the graph adjacency matrix.
|
| 594 |
+
Node2vec \cite{node2vec-kdd2016} combines DFS-like and BFS-like exploration within the random walk framework.
|
| 595 |
+
Second, matrix factorization methods and deep neural networks have also been proposed \cite{cao2015grarep,ouasymmetric,wangstructural,abu2017learning} as alternatives to the Skip-gram model for learning the latent representations.
|
| 596 |
+
|
| 597 |
+
Although these methods are highly scalable, they all rely on optimizing a non-convex objective function.
|
| 598 |
+
With no prior knowledge of the graph, the latent representations are usually initialized with random numbers or zero.
|
| 599 |
+
With such an initialization scheme, these methods are at risk of converging to a poor local minima.
|
| 600 |
+
\emph{\ouralgorithm} overcomes this problem by introducing a multilevel paradigm for graph representation learning.
|
| 601 |
+
|
| 602 |
+
\noindent
|
| 603 |
+
\textbf{Graph Drawing}.
|
| 604 |
+
Multilevel layout algorithms are popular methods in the graph drawing community, where a hierarchy of approximations is used to solve the original layout problem
|
| 605 |
+
\cite{fruchterman1991graph,hu2005efficient,walshaw2003multilevel}.
|
| 606 |
+
Using an approximation of the original graph has two advantages - not only is the approximation usually simpler to solve, it can also be extended as a good initialization for solving the original problem.
|
| 607 |
+
In addition to force-directed graph drawing, the multilevel framework \cite{walshaw2004multilevel} has been proved successful in various graph theory problems, including the traveling salesman problem \cite{walshaw2001multilevel}, and graph partitioning \cite{karypis1998parallel}.
|
| 608 |
+
|
| 609 |
+
\emph{\ouralgorithm} extends the idea of the multilevel layout to neural representation learning methods.
|
| 610 |
+
We illustrate the utility of this paradigm by combining \emph{\ouralgorithm} with three state-of-the-art representation learning methods.
|
| 611 |
+
\section{Conclusion}
|
| 612 |
+
\label{Conclusion}
|
| 613 |
+
|
| 614 |
+
Recent literature on graph representation learning aims at optimizing a non-convex function.
|
| 615 |
+
With no prior knowledge of the graph, these methods could easily get stuck at a bad local minima as the result of poor initialization.
|
| 616 |
+
Moreover, these methods mostly aim to preserve local proximities in a graph but neglect its global structure.
|
| 617 |
+
In this paper, we propose a multilevel graph representation learning paradigm to address these issues.
|
| 618 |
+
By recursively coalescing the input graph into smaller but structurally similar graphs, \emph{\ouralgorithm} captures the global structure of the input graph.
|
| 619 |
+
By learning graph representation on these smaller graphs, a good initialization scheme for the input graph is derived.
|
| 620 |
+
This multilevel paradigm is further combined with the state-of-the-art graph embedding methods, namely \emph{DeepWalk}, \emph{LINE}, and \emph{Node2vec}. Experimental results on various real-world graphs show that introducing \emph{\ouralgorithm} yields graph embeddings of higher quality for all these three methods.
|
| 621 |
+
|
| 622 |
+
In the future, we would like to combine \emph{\ouralgorithm} with other graph representation learning methods.
|
| 623 |
+
Specifically, as Skip-gram is a shallow method for representation learning, it would be interesting to see if \emph{\ouralgorithm} also works well with deep representation learning methods.
|
| 624 |
+
On the other hand, our method could also be applied to language networks, possibly yielding better word embeddings.
|
| 625 |
+
\section{Acknowledgements}
|
| 626 |
+
\label{Ackonwledgements}
|
| 627 |
+
This work is partially supported by NSF grants IIS-1546113 and DBI-1355990.
|
| 628 |
+
|
| 629 |
+
\bibliography{chen-perozzi}
|
| 630 |
+
\bibliographystyle{aaai}
|
1707.01217v4.txt
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Domain adaptation defines the problem when the target domain labeled data is insufficient, while the source domain has much more labeled data. Even though the source and target domains have different marginal distributions \cite{ben2007analysis,pan2010survey}, domain adaptation aims at utilizing the knowledge distilled from the source domain to help target domain learning.
|
| 3 |
+
In practice, unsupervised domain adaptation is concerned and studied more commonly since manual annotation is often expensive or time-consuming. Faced with the covariate shift and the lack of annotations, conventional machine learning methods may fail to learn a high-performance model.
|
| 4 |
+
|
| 5 |
+
To effectively transfer a classifier across different domains, different methods have been proposed, including instance reweighting \cite{mansour2009domain}, subsampling \cite{chen2011automatic}, feature mapping \cite{tzeng2014deep} and weight regularization \cite{rozantsev2016beyond}. Among these methods feature mapping has shown great success recently, which projects the data from different domains to a common latent space where the feature representations are domain invariant. Recently, deep neural networks, as a great tool to automatically learn effective data representations, have been leveraged in learning knowledge-transferable feature representations for domain adaptation \cite{glorot2011domain,chen2012marginalized,zhuang2015supervised,long2015learning,ganin2016domain}.
|
| 6 |
+
|
| 7 |
+
On the other hand, generative adversarial nets (GANs) \cite{goodfellow2014generative} are heavily studied during recent years, which play a minimax game between two adversarial networks: the discriminator is trained to distinguish real data from the generated data, while the generator learns to generate high-quality data to fool the discriminator. It is intuitive to employ this minimax game for domain adaptation to make the source and target feature representations indistinguishable. These adversarial adaptation methods have become a popular solution to reduce domain discrepancy through an adversarial objective with respect to a domain classifier \cite{ganin2016domain,tzeng2017adversarial}. However, when the domain classifier network can perfectly distinguish target representations from source ones, there will be a gradient vanishing problem. A more reasonable solution would be to replace the domain discrepancy measure with Wasserstein distance, which provides more stable gradients even if two distributions are distant \cite{arjovsky2017wasserstein}.
|
| 8 |
+
|
| 9 |
+
In this paper, we propose a domain invariant representation learning approach to reduce domain discrepancy for domain adaptation, namely Wasserstein Distance Guided Representation Learning (WDGRL), inspired by recently proposed Wasserstein GAN \cite{arjovsky2017wasserstein}. WDGRL trains a domain critic network to estimate the empirical Wasserstein distance between the source and target feature representations. The feature extractor network will then be optimized to minimize the estimated Wasserstein distance in an adversarial manner. By iterative adversarial training, we finally learn feature representations invariant to the covariate shift between domains. Additionally, WDGRL can be easily adopted in existing domain adaptation frameworks \cite{tzeng2014deep,long2015learning,zhuang2015supervised,long2016deep,bousmalis2016domain} by replacing the representation learning approaches. Empirical studies on common domain adaptation benchmarks demonstrate that WDGRL outperforms the state-of-the-art representation learning approaches for domain adaptation. Furthermore, the visualization of learned representations clearly shows that WDGRL successfully unifies two domain distributions, as well as maintains obvious label discrimination.
|
| 10 |
+
\section{Related Works}
|
| 11 |
+
Domain adaptation is a popular subject in transfer learning \cite{pan2010survey}. It concerns covariate shift between two data distributions, usually labeled source data and unlabeled target data. Solutions to domain adaptation problems can be mainly categorized into three types: i). Instance-based methods, which reweight/subsample the source samples to match the distribution of the target domain, thus training on the reweighted source samples guarantees classifiers with transferability \cite{huang2007correcting,chen2011co,chu2013selective}. ii). Parameter-based methods, which transfer knowledge through shared or regularized parameters of source and target domain learners, or by combining multiple reweighted source learners to form an improved target learner \cite{duan2012exploiting,rozantsev2016beyond}. iii). The last but the most popular and effective methods are feature-based, which can be further categorized into two groups \cite{weiss2016survey}. Asymmetric feature-based methods transform the features of one domain to more closely match another domain \cite{hoffman2014asymmetric,kandemir2015asymmetric,courty2017optimal} while symmetric feature-based methods map different domains to a common latent space where the feature distributions are close.
|
| 12 |
+
|
| 13 |
+
Recently, deep learning has been regarded as a powerful way to learn feature representations for domain adaptation. Symmetric feature-based methods are more widely studied since it can be easily incorporated into deep neural networks \cite{chen2012marginalized,zhuang2015supervised,long2015learning,ganin2016domain,bousmalis2016domain,luo2017close}.
|
| 14 |
+
Among symmetric feature-based methods, minimizing the maximum mean discrepancy (MMD) \cite{gretton2012kernel} metric is effective to minimize the divergence of two distributions. MMD is a nonparametric metric that measures the distribution divergence between the mean embeddings of two distributions in reproducing kernel Hilbert space (RKHS). The deep domain confusion (DDC) method \cite{tzeng2014deep} utilized MMD metric in the last fully connected layer in addition to the regular classification loss to learn representations that are both domain invariant and discriminative. Deep adaptation network (DAN) \cite{long2015learning} was proposed to enhance the feature transferability by minimizing multi-kernel MMD in several task-specific layers. On the other hand, correlation alignment (CORAL) method \cite{sun2016return} was proposed to align the second-order statistics of the source and target distributions with a linear transformation and \cite{sun2016deep} extended CORAL and proposed Deep CORAL to learn a nonlinear transformation that aligns correlations of layer activations in deep neural networks.
|
| 15 |
+
|
| 16 |
+
Another class of symmetric feature-based methods uses an adversarial objective to reduce domain discrepancy. Motivated by theory in \cite{ben2007analysis,ben2010theory} suggesting that a good cross-domain representation contains no discriminative information about the origin (i.e. domain) of the input, domain adversarial neural network (DANN) \cite{ajakan2014domain,ganin2016domain} was proposed to learn domain invariant features by a minimax game between the domain classifier and the feature extractor. In order to back-propagate the gradients computed from the domain classifier, DANN employs a gradient reversal layer (GRL). On the other hand, \cite{tzeng2017adversarial} proposed a general framework for adversarial adaptation by choosing adversarial loss type with respect to the domain classifier and the weight sharing strategy. Our proposed WDGRL can also be viewed as an adversarial adaptation method since it evaluates and minimizes the empirical Wasserstein distance in an adversarial manner. Our WDGRL differs from previous adversarial methods: i). WDGRL adopts an iterative adversarial training strategy, ii). WDGRL adopts Wasserstein distance as the adversarial loss which has gradient superiority.
|
| 17 |
+
|
| 18 |
+
Another related work for domain adaptation is optimal transport \cite{courty2014domain,courty2017optimal}, which is equivalent to Wasserstein distance. And \cite{redko2016theoretical} gave a theoretical analysis that Wasserstein distance can guarantee generalization for domain adaptation. Though these works utilized Wasserstein distance in domain adaptation, there are distinct differences between WDGRL and the previous ones: these works are asymmetric feature-based methods which design a transformation from source representations to target ones based on optimal transport while WDGRL is a symmetric method that projects both domains to a common latent space to learn domain invariant features. And WDGRL can be integrated into other symmetric feature-based adaptation frameworks. %
|
| 19 |
+
|
| 20 |
+
Besides learning shared representations, domain separation network (DSN) \cite{bousmalis2016domain} was proposed to explicitly separate private representations for each domain and shared ones between the source and target domains. The private representations were learned by defining a difference loss via a soft orthogonality constraint between the shared and private representations while the shared representations were learned by DANN or MMD mentioned above. With the help of reconstruction through private and shared representations together, the classifier trained on the shared representations can better generalize across domains. Since our work focuses on learning the shared representations, it can also be integrated into DSN easily.
|
| 21 |
+
\section{Wasserstein Metric}
|
| 22 |
+
Before we introduce our domain invariant feature representation learning approach, we first give a brief introduction of the Wasserstein metric. The Wasserstein metric is a distance measure between probability distributions on a given metric space $(M, \rho)$, where $\rho(x,y)$ is a distance function for two instances $x$ and $y$ in the set $M$. The $p{\text{-th}}$ Wasserstein distance between two Borel probability measures $\mathbb{P} $ and $\mathbb{Q}$ is defined as
|
| 23 |
+
\begin{equation}
|
| 24 |
+
W_p(\mathbb{P}, \mathbb{Q}) = \Big(\inf_{\mu \in \Gamma(\mathbb{P}, \mathbb{Q}) } \int \rho(x,y)^p d\mu(x,y) \Big)^{1/p},
|
| 25 |
+
\end{equation}
|
| 26 |
+
where $\mathbb{P}, \mathbb{Q} \in \{\mathbb{P} : \int \rho (x,y) ^p d\mathbb{P}(x) < \infty , \forall y \in M \} $ are two probability measures on $M$ with finite $p{\text{-th}}$ moment and $\Gamma(\mathbb{P}, \mathbb{Q})$ is the set of all measures on $M \times M$ with marginals $\mathbb{P}$ and $\mathbb{Q}$. Wasserstein metric arises in the problem of optimal transport: $\mu(x,y)$ can be viewed as a randomized policy for transporting a unit quantity of some material from a random location $x$ to another location $y$ while satisfying the marginal constraint $x \sim \mathbb{P}$ and $y \sim \mathbb{Q}$. If the cost of transporting a unit of material from $x \in \mathbb{P}$ to $y \in \mathbb{Q}$ is given by $\rho(x,y)^p$, then $W_p(\mathbb{P}, \mathbb{Q})$ is the minimum expected transport cost.
|
| 27 |
+
|
| 28 |
+
The Kantorovich-Rubinstein theorem shows that when $M$ is separable, the dual representation of the first Wasserstein distance (Earth-Mover distance) can be written as a form of integral probability metric \cite{villani2008optimal}
|
| 29 |
+
\begin{equation}
|
| 30 |
+
W_1(\mathbb{P},\mathbb{Q})= \sup_{\left \| f \right \|_L \leq 1} \mathbb{E}_{x \sim \mathbb{P}}[f(x)] - \mathbb{E}_{x \sim \mathbb{Q}}[f(x)], \label{eq:w1-distance}
|
| 31 |
+
\end{equation}
|
| 32 |
+
where the Lipschitz semi-norm is defined as $\left \| f \right \|_L = \sup{|f(x) - f(y)|} / \rho(x,y)$. In this paper, for simplicity, Wasserstein distance represents the first Wasserstein distance.
|
| 33 |
+
\section{Wasserstein Distance Guided \\ Reprensentation Learning}
|
| 34 |
+
|
| 35 |
+
\subsection{Problem Definition}
|
| 36 |
+
In unsupervised domain adaptation problem, we have a labeled source dataset $X^s=\{(x^s_i,y^s_i)\}_{i=1}^{n^s}$ of $n^s$ samples from the source domain $\mathcal{D}_s$ which is assumed sufficient to train an accurate classifier, and an unlabeled target dataset $X^t = \{x_j^t\}^{n^t}_{j=1}$ of $n^t$ samples from the target domain $\mathcal{D}_t$. It is assumed that the two domains share the same feature space but follow different marginal data distributions, $\mathbb{P}_{x^s}$ and $\mathbb{P}_{x^t}$ respectively. The goal is to learn a transferable classifier $\eta(x)$ to minimize target risk $\epsilon_{t} = \mathrm{Pr}_{(x,y) \sim \mathcal{D}_t} [ \eta(x) \neq y ]$ using all the given data.
|
| 37 |
+
\subsection{Domain Invariant Representation Learning}
|
| 38 |
+
The challenge of unsupervised domain adaptation mainly lies in the fact that two domains have different data distributions. Thus the model trained with source domain data may be highly biased in the target domain. To solve this problem, we propose a new approach to learn feature representations invariant to the change of domains by minimizing empirical Wasserstein distance between the source and target representations through adversarial training.
|
| 39 |
+
|
| 40 |
+
In our adversarial representation learning approach, there is a feature extractor which can be implemented by a neural network. The feature extractor is supposed to learn the domain invariant feature representations from both domains. Given an instance $x \in \mathbb{R}^{m}$ from either domain, the feature extractor learns a function $f_g: \mathbb{R}^m \rightarrow \mathbb{R}^d$ that maps the instance to a $d$-dimensional representation with corresponding network parameter $\theta_g$. And then in order to reduce the discrepancy between the source and target domains, we use the domain critic, as suggested in \cite{arjovsky2017wasserstein}, whose goal is to estimate the Wasserstein distance between the source and target representation distributions. Given a feature representation $h = f_g(x)$ computed by the feature extractor, the domain critic learns a function $f_w:\mathbb{R}^d \rightarrow \mathbb{R}$ that maps the feature representation to a real number with parameter $\theta_w$. Then the Wasserstein distance between two representation distributions $\mathbb{P}_{h^s}$ and $\mathbb{P}_{h^t}$, where $h^s = f_g(x^s)$ and $h^t=f_g(x^t)$, can be computed according to Eq.~(\ref{eq:w1-distance})
|
| 41 |
+
{\small
|
| 42 |
+
\begin{equation}
|
| 43 |
+
\begin{aligned}
|
| 44 |
+
W_1(\mathbb{P}_{h^s},\mathbb{P}_{h^t}) & = \sup_{\left \| f_w \right \|_L \leq 1} \mathbb{E}_{\mathbb{P}_{h^s}} [f_w(h)] - \mathbb{E}_{\mathbb{P}_{h^t} }[f_w(h)] \\
|
| 45 |
+
&= \sup_{\left \| f_w \right \|_L \leq 1} \mathbb{E}_{\mathbb{P}_{x^s}} [f_w(f_g(x))] - \mathbb{E}_{\mathbb{P}_{x^t} }[f_w(f_g(x))]. \label{wd-for-da}
|
| 46 |
+
\end{aligned}
|
| 47 |
+
\end{equation}
|
| 48 |
+
}
|
| 49 |
+
If the parameterized family of domain critic functions $\{f_w\}$ are all $1$-Lipschitz, then we can approximate the empirical Wasserstein distance by maximizing the domain critic loss $\mathcal{L}_{wd} $ with respect to parameter $\theta_w$
|
| 50 |
+
\begin{equation}
|
| 51 |
+
\mathcal{L}_{wd}(x^s, x^t) \! = \! \frac{1}{n^s} \! \sum_{x^s \in X^s} \! f_w(f_g(x^s)) \!-\! \frac{1}{n^t} \! \sum_{x^t \in X^t} \! f_w(f_g(x^t)).
|
| 52 |
+
\end{equation}
|
| 53 |
+
Here comes the question of enforcing the Lipschitz constraint. \cite{arjovsky2017wasserstein} proposed to clip the weights of domain critic within a compact space $[-c, c]$ after each gradient update. However \cite{gulrajani2017improved} pointed out that weight clipping will cause capacity underuse and gradient vanishing or exploding problems. As suggested in \cite{gulrajani2017improved}, a more reasonable way is to enforce gradient penalty $\mathcal{L}_{grad}$ for the domain critic parameter $\theta_w$
|
| 54 |
+
\begin{equation}
|
| 55 |
+
\mathcal{L}_{grad}(\hat{h}) =(\| \nabla_{\hat{h}} f_w(\hat{h}) \|_2-1)^2,
|
| 56 |
+
\end{equation}
|
| 57 |
+
where the feature representations $\hat{h} $ at which to penalize the gradients are defined not only at the source and target representations but also at the random points along the straight line between source and target representation pairs. So we can finally estimate the empirical Wasserstein distance by solving the problem
|
| 58 |
+
\begin{equation}
|
| 59 |
+
\max_{\theta_w} \{ \mathcal{L}_{wd} - \gamma \mathcal{L}_{grad}\}
|
| 60 |
+
\end{equation}
|
| 61 |
+
where $\gamma$ is the balancing coefficient.
|
| 62 |
+
|
| 63 |
+
Since the Wasserstein distance is continuous and differentiable almost everywhere, we can first train the domain critic to optimality. Then by fixing the optimal parameter of domain critic and minimizing the estimator of Wasserstein distance, the feature extractor network can learn feature representations with domain discrepancy reduced. Up to now the representation learning can be achieved by solving the minimax problem
|
| 64 |
+
\begin{equation}
|
| 65 |
+
\min_{\theta_g}\max_{\theta _w} \{\mathcal{L}_{wd} - \gamma \mathcal{L}_{grad} \}
|
| 66 |
+
\end{equation}
|
| 67 |
+
where $\gamma$ should be set $0$ when optimizing the minimum operation since the gradient penalty should not guide the representation learning process. By iteratively learning feature representations with lower Wasserstein distance, the adversarial objective can finally learn domain invariant feature representations.
|
| 68 |
+
\subsection{Combining with Discriminator}
|
| 69 |
+
As mentioned above, our final goal is to learn a high-performance classifier for the target domain. However, the process of WDGRL is in an unsupervised setting, which may result in that the learned domain invariant representations are not discriminative enough.
|
| 70 |
+
Hence it is necessary to incorporate the supervision signals of source domain data into the representation learning process as in DANN \cite{ganin2016domain}. Next we further introduce the combination of the representation learning approaches and a discriminator, of which the overview framework is given by Figure~\ref{fig:wd-tl}. A detailed algorithm of the combination is given in Algorithm~\ref{alg:framework}.
|
| 71 |
+
|
| 72 |
+
\begin{figure}[tpb]
|
| 73 |
+
\centering
|
| 74 |
+
\includegraphics[width=0.45\textwidth]{wd.pdf}
|
| 75 |
+
\caption{WDGRL Combining with Discriminator.}
|
| 76 |
+
\label{fig:wd-tl}
|
| 77 |
+
\end{figure}
|
| 78 |
+
|
| 79 |
+
We further add several layers as the discriminator after the feature extractor network. Since WDGRL guarantees transferability of the learned representations, the shared discriminator can be directly applied to target domain prediction when training finished.
|
| 80 |
+
The objective of the discriminator $f_c : \mathbb{R}^d \rightarrow \mathbb{R}^ l $ is to compute the softmax prediction with parameter $\theta_c $ where $l$ is the number of classes. The discriminator loss function is defined as the cross-entropy between the predicted probabilistic distribution and the one-hot encoding of the class labels given the labeled source data:
|
| 81 |
+
\begin{equation}
|
| 82 |
+
\mathcal{L}_c(x^s, y^s) = -\frac{1}{n^s} \sum_{i=1}^{n^s} \sum_{k=1}^l 1(y^s_i = k) \cdot \log{f_c(f_g(x_i^s))}_k ,
|
| 83 |
+
\end{equation}
|
| 84 |
+
where $1(y^s_i = k)$ is the indicator function and ${f_c(f_g(x_i^s))}_k$ corresponds to the $k$-th dimension value of the distribution $f_c(f_g(x_i^s))$.
|
| 85 |
+
By combining the discriminator loss, we attain our final objective function
|
| 86 |
+
\begin{equation}
|
| 87 |
+
\min_{ \theta_g, \theta_c} \Big\{ \mathcal{L}_c + \lambda \max_{\theta _w}\Big[ \mathcal{L}_{wd} - \gamma \mathcal{L}_{grad} \Big] \Big\},
|
| 88 |
+
\end{equation}
|
| 89 |
+
where $\lambda $ is the coefficient that controls the balance between discriminative and transferable feature learning and $\gamma$ should be set 0 when optimizing the minimum operator.
|
| 90 |
+
|
| 91 |
+
Note that this algorithm can be trained by the standard back-propagation with two iterative steps. In a mini-batch containing labeled source data and unlabeled target data, we first train the domain critic network to optimality by optimizing the max operator via gradient ascent and then update the feature extractor by minimizing the classification loss computed by labeled source data and the estimated Wasserstein distance simultaneously. The learned representations can be domain invariant and target discriminative since the parameter $\theta_g$ receives the gradients from both the domain critic and the discriminator loss.
|
| 92 |
+
|
| 93 |
+
\begin{algorithm}[t]
|
| 94 |
+
\caption{Wasserstein Distance Guided Representation Learning Combining with Discriminator}\label{alg:framework}
|
| 95 |
+
\begin{algorithmic}[1]
|
| 96 |
+
\small
|
| 97 |
+
\REQUIRE
|
| 98 |
+
source data $X^s$; target data $X^t$; minibatch size $m$; critic training step $n$; coefficient $\gamma$, $\lambda$; learning rate for domain critic $\alpha_1$; learning rate for classification and feature learning $\alpha_2$
|
| 99 |
+
\STATE
|
| 100 |
+
Initialize feature extractor, domain critic, discriminator with random weights $\theta_g, \theta_w, \theta_c$
|
| 101 |
+
\REPEAT
|
| 102 |
+
\STATE
|
| 103 |
+
Sample minibatch $\{ x^s_i, y^s_i \}_{i=1}^m $, $\{x^t_i \}_{i=1}^m $ from $X^s$ and $X^t$
|
| 104 |
+
\FOR{$t=1,...,n $}
|
| 105 |
+
\STATE
|
| 106 |
+
$h^s \leftarrow f_g(x^s) $, $h^t \leftarrow f_g(x^t) $
|
| 107 |
+
\STATE
|
| 108 |
+
Sample $h$ as the random points along straight lines between $h^s$ and $h^t$ pairs
|
| 109 |
+
\STATE
|
| 110 |
+
$\hat{h} \leftarrow \{h^s, h^t, h \}$
|
| 111 |
+
\STATE
|
| 112 |
+
$\theta_w \leftarrow \theta_w + \alpha_1 \nabla_{\theta_w}[\mathcal{L}_{wd}(x^s, x^t) - \gamma \mathcal{L}_{grad}(\hat{h})]$
|
| 113 |
+
\ENDFOR
|
| 114 |
+
\STATE
|
| 115 |
+
$\theta_c \leftarrow \theta_c - \alpha_2 \nabla_{\theta_c}\mathcal{L}_c(x^s, y^s)$
|
| 116 |
+
\STATE
|
| 117 |
+
$\theta_g \leftarrow \theta_g - \alpha_2 \nabla_{\theta_g}[\mathcal{L}_c(x^s, y^s) + \mathcal{L}_{wd}(x^s, x^t)]$
|
| 118 |
+
\UNTIL{$\theta_g, \theta_w, \theta_c$ converge}
|
| 119 |
+
\end{algorithmic}
|
| 120 |
+
\end{algorithm}
|
| 121 |
+
\subsection{Theoretical Analysis}
|
| 122 |
+
In this section, we give some theoretical analysis about the advantages of using Wasserstein distance for domain adaptation.
|
| 123 |
+
\subsubsection{Gradient Superiority}
|
| 124 |
+
In domain adaptation, to minimize the divergence between the data distributions $\mathbb{P}_{x^s}$ and $\mathbb{P}_{x^t}$, the symmetric feature-based methods learn a transformation function to map the data from the original space to a common latent space with a distance measure. There are two situations after the mapping:
|
| 125 |
+
i). The two mapped feature distributions have supports that lie on low dimensional manifolds \cite{narayanan2010sample} in the latent space. In such situation, there will be a gradient vanishing problem if adopting the domain classifier to make data indistinguishable while Wasserstein distance could provide reliable gradients \cite{arjovsky2017wasserstein}.
|
| 126 |
+
ii). The feature representations may fill in the whole space since the feature mapping usually reduces dimensionality. However, if a data point lies in the regions where the probability of one distribution could be ignored compared with the other distribution, it makes no contributions to the gradients with traditional cross-entropy loss since the gradient computed by this data point is almost $0$. If we adopt Wasserstein distance as the distance measure, stable gradients can be provided wherever. So theoretically in either situation, WDGRL can perform better than previous adversarial adaptation methods \cite{ganin2016domain,tzeng2017adversarial}.
|
| 127 |
+
\subsubsection{Generalization Bound}
|
| 128 |
+
\cite{redko2016theoretical} proved that the target error can be bounded by the Wasserstein distance for empirical measures. However, the generalization bound exists when assuming the hypothesis class is a unit ball in RKHS and the transport cost function is RKHS distance. In this paper we prove the generalization bound in terms of the Kantorovich-Rubinstein dual formulation under a different assumption.
|
| 129 |
+
|
| 130 |
+
We first formalize some notations that will be used in the following statements. Let $\mathcal{X}$ be an instance set and $\{0, 1 \}$ be the label set for binary classification. We denote by $\mu_s$ the distribution of source instances on $\mathcal{X}$ and use $\mu_t$ for the target domain. We denote that two domains have the same labeling function $f:\mathcal{X} \rightarrow[0,1]$ which is always assumed to hold in domain adaptation problem. A hypothesis class $H$ is a set of predictor functions, $\forall h \in H, h:\mathcal{X} \rightarrow[0,1] $. The probability according to the distribution $\mu_s$ that a hypothesis $h$ disagrees with the labeling function $f$ (which can also be a hypothesis) is defined as $\epsilon_s(h,f) = \mathbb{E}_{x\in \mu_s}[|h(x)-f(x)|]$. We use the shorthand $\epsilon_s(h) = \epsilon_s(h,f)$ and $\epsilon_t(h)$ is defined the same. We now present the Lemma that introduces Wasserstein distance to relate the source and target errors.
|
| 131 |
+
|
| 132 |
+
\begin{lemma}
|
| 133 |
+
\label{lemma: wd-lip}
|
| 134 |
+
Let $ \mu_s,\mu_t \in \mathcal{P}(\mathcal{X}) $ be two probability measures. Assume the hypotheses $ h \in H$ are all $K$-Lipschitz continuous for some $K$. Then the following holds
|
| 135 |
+
\begin{equation}
|
| 136 |
+
\epsilon_t(h, h') \leq \epsilon_s(h,h') + 2KW_1(\mu_s,\mu_t)
|
| 137 |
+
\end{equation}
|
| 138 |
+
for every hypothesis $h,h' \in H$.
|
| 139 |
+
\end{lemma}
|
| 140 |
+
|
| 141 |
+
\begin{proof}
|
| 142 |
+
We first prove that for every $K$-Lipschitz continuous hypotheses $h,h' \in H$, $|h-h'|$ is $2K$-Lipschitz continuous. Using the triangle inequality, we have
|
| 143 |
+
{\small
|
| 144 |
+
\begin{equation}
|
| 145 |
+
\begin{aligned}
|
| 146 |
+
|h(x) \! - \! h'(x)|& \! \leq \! |h(x) \! - \! h(y)| \! + \! |h(y) \! - \! h'(x)| \\
|
| 147 |
+
& \! \leq \! |h(x) \! - \! h(y)| \! + \! |h(y) \!- \! h'(y)| \! + \! |h'(x) \! - \! h'(y)|
|
| 148 |
+
\end{aligned}
|
| 149 |
+
\end{equation}
|
| 150 |
+
}
|
| 151 |
+
and thus for every $x,y \in \mathcal{X}$,
|
| 152 |
+
{\small
|
| 153 |
+
\begin{equation}
|
| 154 |
+
\begin{aligned}
|
| 155 |
+
\frac{|h(x) \! - \! h'(x)| \! - \! |h(y) \! - \! h'(y)|}{\rho(x,y)} & \! \leq \! \frac{|h(x) \! - \! h(y)| \! + \! |h'(x) \! - \! h'(y)|}{\rho(x,y)} \\ & \leq 2K.
|
| 156 |
+
\end{aligned}
|
| 157 |
+
\end{equation}
|
| 158 |
+
}
|
| 159 |
+
Then for every hypothesis $h,h'$, we have
|
| 160 |
+
{\small
|
| 161 |
+
\begin{equation}
|
| 162 |
+
\begin{aligned}
|
| 163 |
+
\epsilon_t(h,h') \! - \! \epsilon_s(h,h') & \! = \! \mathbb{E}_{\mu_t}[|h(x) \! - \! h'(x)|] \! - \! \mathbb{E}_{\mu_s}[|h(x) \! - \! h'(x)|] \\
|
| 164 |
+
& \! \leq \! \sup_{\left \| f \right \|_L \leq 2K} \mathbb{E}_{\mu_t}[f(x)] \! - \! \mathbb{E}_{\mu_s}[f(x)] \\
|
| 165 |
+
& \! = \! 2K W_1(\mu_s,\mu_t)
|
| 166 |
+
\end{aligned}
|
| 167 |
+
\end{equation}
|
| 168 |
+
}
|
| 169 |
+
\end{proof}
|
| 170 |
+
|
| 171 |
+
\begin{theorem}
|
| 172 |
+
\label{theo: wd-bound}
|
| 173 |
+
Under the assumption of Lemma~\ref{lemma: wd-lip}, for every $h \in H$ the following holds
|
| 174 |
+
\begin{equation}
|
| 175 |
+
\epsilon_t(h) \leq \epsilon_s(h) + 2KW_1(\mu_s,\mu_t) + \lambda
|
| 176 |
+
\end{equation}
|
| 177 |
+
where $\lambda$ is the combined error of the ideal hypothesis $h^*$ that minimizes the combined error $\epsilon_s(h)+\epsilon_t(h)$.
|
| 178 |
+
\end{theorem}
|
| 179 |
+
|
| 180 |
+
\begin{proof}
|
| 181 |
+
\begin{equation}
|
| 182 |
+
\begin{aligned}
|
| 183 |
+
\epsilon_t(h) & \leq \epsilon_t(h^*) + \epsilon_t(h^*, h) \\
|
| 184 |
+
& = \epsilon_t(h^*) + \epsilon_s(h, h^*) + \epsilon_t(h^*,h) - \epsilon_s(h,h^*) \\
|
| 185 |
+
& \leq \epsilon_t(h^*) + \epsilon_s(h, h^*) + 2KW_1(\mu_s, \mu_t) \\
|
| 186 |
+
& \leq \epsilon_t(h^*) + \epsilon_s(h) + \epsilon_s(h^*) + 2KW_1(\mu_s, \mu_t) \\
|
| 187 |
+
& = \epsilon_s(h) + 2KW_1(\mu_s,\mu_t) + \lambda
|
| 188 |
+
\end{aligned}
|
| 189 |
+
\end{equation}
|
| 190 |
+
\end{proof}
|
| 191 |
+
|
| 192 |
+
Thus the generalization bound of applying Wasserstein distance between domain distributions has been proved, while the proof of using empirical measures on the source and target domain samples can be further proved according to Theorem 2.1 in \cite{bolley2007quantitative} as the same way in \cite{redko2016theoretical}.
|
| 193 |
+
|
| 194 |
+
The assumption made here is to specify the hypothesis class is $K$-Lipschitz continuous for some $K$. While it may seem too restrictive, in fact the hypotheses are always implemented by neural networks where the basic linear mapping functions and the activation functions such as sigmoid and relu are all Lipschitz continuous, so the assumption is not that strong and can be fulfilled. And the weights in neural networks are always regularized to avoid overfitting which means the constant $K$ will not be too large. Compared with the proof in \cite{redko2016theoretical} the assumptions are different and can be used for different cases.
|
| 195 |
+
\subsection{Application to Adaptation Frameworks}
|
| 196 |
+
WDGRL can be integrated into existing feature-based domain adaptation frameworks \cite{tzeng2014deep,long2015learning,zhuang2015supervised,long2016deep,bousmalis2016domain}. These frameworks are all symmetric feature-based and aim to learn domain invariant feature representations for adaptation using divergence measures such as MMD and DANN. We provide a promising alternative WDGRL to learn domain invariant representations, which can replace the MMD or DANN. We should point out that although WDGRL has gradient advantage over DANN, it takes more time to estimate the Wasserstein distance.
|
| 197 |
+
Although we only apply WDGRL on one hidden layer, it can also be applied on multilayer structures as implemented in \cite{long2015learning}.
|
| 198 |
+
\section{Experiments}
|
| 199 |
+
In this section, we evaluate the efficacy of our approach on sentiment and image classification adaptation datasets. Compared with other domain invariant representation learning approaches, WDGRL achieves better performance on average. Furthermore, we visualize the feature representations learned by these approaches for an empirical analysis.
|
| 200 |
+
\subsection{Datasets}
|
| 201 |
+
\textbf{Amazon review benchmark dataset.} The Amazon review dataset\footnote{https://www.cs.jhu.edu/\textasciitilde mdredze/datasets/sentiment/} \cite{blitzer2007biographies} is one of the most widely used benchmarks for domain adaptation and sentiment analysis. It is collected from product reviews from Amazon.com and contains four types (domains), namely books (B), DVDs (D), electronics (E) and kitchen appliances (K). For each domain, there are 2,000 labeled reviews and approximately 4,000 unlabeled reviews (varying slightly across domains) and the classes are balanced. In our experiments, for easy computation, we follow \cite{chen2012marginalized} to use the 5,000 most frequent terms of unigrams and bigrams as the input and totally $A_4^2=12$ adaptation tasks are constructed.
|
| 202 |
+
|
| 203 |
+
\textbf{Office-Caltech object recognition dataset.} The Office-Caltech dataset\footnote{https://cs.stanford.edu/\textasciitilde jhoffman/domainadapt/} released by \cite{gong2012geodesic} is comprised of 10 common categories shared by the Office-31 and Caltech-256 datasets. In our experiments, we construct 12 tasks across 4 domains: Amazon (A), Webcam (W), DSLR (D) and Caltech (C), with 958, 295, 157 and 1,123 image samples respectively. In our experiments, Decaf features are used as the input. Decaf features \cite{donahue2014decaf} are the 4096-dimensional FC7-layer hidden activations extracted by the deep convolutional neural network AlexNet.
|
| 204 |
+
\subsection{Compared Approaches}
|
| 205 |
+
We mainly compare our proposed approach with domain adversarial neural network (DANN) \cite{ganin2016domain}, maximum mean discrepancy metric (MMD) \cite{gretton2012kernel} and deep correlation alignment (CORAL) \cite{sun2016deep} since these approaches and our proposed WDGRL all aim at learning the domain invariant feature representations, which are crucial to reduce the domain discrepancy. Other domain adaptation frameworks \cite{bousmalis2016domain,tzeng2014deep,long2015learning,long2016deep,zhuang2015supervised} are not included in the comparison, because these frameworks focus on adaptation architecture design and all compared approaches can be easily integrated into these frameworks.
|
| 206 |
+
|
| 207 |
+
\textbf{S-only}: As an empirical lower bound, we train a model using the labeled source data only, and test it on the target test data directly.
|
| 208 |
+
|
| 209 |
+
\textbf{MMD}: The MMD metric is a measurement of the divergence between two probability distributions from their samples by computing the distance of mean embeddings in RKHS.
|
| 210 |
+
|
| 211 |
+
\textbf{DANN}: DANN is an adversarial representation learning approach that a domain classifier aims at distinguishing the learned source/target features while the feature extractor tries to confuse the domain classifier. The minimax optimization is solved via a gradient reversal layer (GRL).
|
| 212 |
+
|
| 213 |
+
\textbf{CORAL}: Deep correlation alignment minimizes domain discrepancy by aligning the second-order statistics of the source and target distributions and can be applied to the layer activations in neural networks.
|
| 214 |
+
\subsection{Implementation Details}
|
| 215 |
+
We implement all our experiments\footnote{Experiment code: https://github.com/RockySJ/WDGRL.} using TensorFlow and the models are all trained with Adam optimizer. We follow the evaluation protocol in \cite{Long_2013_ICCV} and evaluate all compared approaches through grid search on the hyperparameter space, and report the best results of each approach. For each approach we use a batch size of 64 samples in total with 32 samples from each domain, and a fixed learning rate $10^{-4}$. All compared approaches are combined with a discriminator to learn both domain invariant and discriminative representations and to conduct the classification task.
|
| 216 |
+
|
| 217 |
+
We use standard multi-layer perceptron (MLP) as the basic network architecture. MLP is sufficient to handle all the problems in our experiments. For Amazon review dataset the network is designed with one hidden layer of 500 nodes, relu activation function and softmax output function, while the network for Office-Caltech dataset has two hidden layers of 500 and 100 nodes. For each dataset the same network architecture is used for all compared approaches and these approaches are all applied on the last hidden layer.
|
| 218 |
+
|
| 219 |
+
For the MMD experiments we follow the suggestions of \cite{bousmalis2016domain} and use a linear combination of 19 RBF kernels with the standard deviation parameters ranging from \(10^{-6}\) to \(10^6\). As for DANN implementation, we add a gradient reversal layer (GRL) and then a domain classifier with one hidden layer of 100 nodes. And the CORAL approach computes a distance between the second-order statistics (covariances) of the source and target features and the distance is defined as the squared Frobenius norm. For each approach, the corresponding loss term is added to the classification loss with a coefficient for the trade-off. And the coefficients are tuned different to achieve the best results for each approach.
|
| 220 |
+
|
| 221 |
+
Our approach is easy to implement according to Algorithm~\ref{alg:framework}. In our experiments, the domain critic network is designed with a hidden layer of 100 nodes. The training steps $n$ is 5 which is chosen for fast computation and sufficient optimization guarantee for the domain critic, and the learning rate for the domain critic is $10^{-4}$. We penalize the gradients not only at source/target representations but also at the random points along the straight line between the source and target pairs and the coefficient $\gamma$ is set to 10 as suggested in \cite{gulrajani2017improved}.
|
| 222 |
+
\subsection{Results and Discussion}
|
| 223 |
+
\begin{table}[t]
|
| 224 |
+
\small
|
| 225 |
+
\caption{Performance (accuracy \%) on Amazon review dataset.} \label{tab:amazon-result}
|
| 226 |
+
\centering
|
| 227 |
+
\begin{tabular}{cccccc}
|
| 228 |
+
\hline
|
| 229 |
+
& S-only & MMD & DANN & CORAL & WDGRL \\
|
| 230 |
+
\hline
|
| 231 |
+
B \(\rightarrow \) D & 81.09 & 82.57& 82.07 &82.74& \textbf{83.05} \\
|
| 232 |
+
B \(\rightarrow \) E & 75.23 & 80.95& 78.98 &82.93& \textbf{83.28} \\
|
| 233 |
+
B \(\rightarrow \) K & 77.78 & 83.55& 82.76 &84.81& \textbf{85.45} \\
|
| 234 |
+
\hline
|
| 235 |
+
D \(\rightarrow \) B & 76.46 & 79.93& 79.35 &\textbf{80.81}& 80.72 \\
|
| 236 |
+
D \(\rightarrow \) E & 76.24 & 82.59& 81.64 &83.49& \textbf{83.58} \\
|
| 237 |
+
D \(\rightarrow \) K & 79.68 & 84.15& 83.41 &85.35& \textbf{86.24} \\
|
| 238 |
+
\hline
|
| 239 |
+
E \(\rightarrow \) B & 73.37 & 75.72& 75.95 &76.91& \textbf{77.22} \\
|
| 240 |
+
E \(\rightarrow \) D & 73.79 & 77.69& 77.58 &78.08& \textbf{78.28} \\
|
| 241 |
+
E \(\rightarrow \) K & 86.64 & 87.37& 86.63 &87.87& \textbf{88.16} \\
|
| 242 |
+
\hline
|
| 243 |
+
K \(\rightarrow \) B & 72.12 & 75.83& 75.81 &76.95& \textbf{77.16} \\
|
| 244 |
+
K \(\rightarrow \) D & 75.79 & 78.05& 78.53 &79.11& \textbf{79.89} \\
|
| 245 |
+
K \(\rightarrow \) E & 85.92 & 86.27& 86.11 &\textbf{86.83}& 86.29 \\
|
| 246 |
+
\hline
|
| 247 |
+
AVG & 77.84 & 81.22 & 80.74 & 82.16 & \textbf{82.43} \\
|
| 248 |
+
\hline
|
| 249 |
+
\end{tabular}
|
| 250 |
+
\end{table}
|
| 251 |
+
|
| 252 |
+
\textbf{Amazon review benchmark dataset.} The challenge of cross domain sentiment analysis lies in the distribution shift as different words are used in different domains. Table~\ref{tab:amazon-result} shows the detailed comparison results of these approaches in 12 transfer tasks. As we can see, our proposed WDGRL outperforms all other compared approaches in 10 out of 12 domain adaptation tasks, and it achieves the second highest scores in the remaining 2 tasks. We find that as adversarial adaptation approaches, WDGRL outperforms DANN, which is consistent with our theoretical analysis that WDGRL has more reliable gradients. MMD and CORAL are both non-parametric and have lower computational cost than WDGRL, while their classification performances are also lower than WDGRL.
|
| 253 |
+
|
| 254 |
+
\textbf{Office-Caltech object recognition dataset.} Table~\ref{tab:office-result} shows the results of our experiments on Office-Caltech dataset. We observe that our approach achieves better performance than other compared approaches on most tasks. Office-Caltech dataset is small since there are only hundreds of images in one domain and it is a 10-class classification problem. Thus we can draw a conclusion that the empirical Wasserstein distance can also be applied to small-scale datasets adaptation effectively. We note that CORAL performs better than MMD in Amazon review dataset while it performs worse than MMD in Office-Caltech dataset. A possible reason is that the reasonable covariance alignment approach requires large samples. On the other hand, we can see that these different approaches have different performances on different adaptation tasks.
|
| 255 |
+
|
| 256 |
+
\begin{table}[t]
|
| 257 |
+
\small
|
| 258 |
+
\caption{Performance (accuracy \%) on Office-Caltech dataset with Decaf features.}
|
| 259 |
+
\centering\label{tab:office-result}
|
| 260 |
+
\begin{tabular}{cccccc}
|
| 261 |
+
\hline
|
| 262 |
+
& S-only & MMD & DANN & CORAL & WDGRL \\
|
| 263 |
+
\hline
|
| 264 |
+
A \(\rightarrow \) C & 84.55 & \textbf{88.62} & 87.80 & 86.18 & 86.99 \\
|
| 265 |
+
A \(\rightarrow \) D & 81.05 & 90.53 & 82.46 & 91.23 & \textbf{93.68} \\
|
| 266 |
+
A \(\rightarrow \) W & 75.59 & \textbf{91.58} & 77.81 & 90.53 & 89.47 \\
|
| 267 |
+
\hline
|
| 268 |
+
W \(\rightarrow \) A & 79.82 & 92.22 & 82.98 & 88.39 & \textbf{93.67 }\\
|
| 269 |
+
W \(\rightarrow \) D & 98.25 & \textbf{100} & \textbf{100} & \textbf{100} & \textbf{100} \\
|
| 270 |
+
W \(\rightarrow \) C & 79.67 & 88.62 & 81.30 & 88.62 & \textbf{89.43} \\
|
| 271 |
+
\hline
|
| 272 |
+
D \(\rightarrow \) A & 84.56 & 90.11 & 84.70 & 85.75 & \textbf{91.69} \\
|
| 273 |
+
D \(\rightarrow \) W & 96.84 & \textbf{98.95} &\textbf{ 98.95} & 97.89 & 97.89 \\
|
| 274 |
+
D \(\rightarrow \) C & 80.49 & 87.80 & 82.11 & 85.37 & \textbf{90.24} \\
|
| 275 |
+
\hline
|
| 276 |
+
C \(\rightarrow \) A & 92.35 & 93.14 & 93.27 & 93.01 & \textbf{93.54} \\
|
| 277 |
+
C \(\rightarrow \) W & 84.21 & 91.58 & 89.47 & \textbf{92.63} & 91.58 \\
|
| 278 |
+
C \(\rightarrow \) D & 87.72 & 91.23 & 91.23 & 89.47 & \textbf{94.74} \\
|
| 279 |
+
\hline
|
| 280 |
+
AVG & 85.44 & 92.03 & 87.67 & 90.76 & \textbf{92.74} \\
|
| 281 |
+
\hline
|
| 282 |
+
\end{tabular}
|
| 283 |
+
\end{table}
|
| 284 |
+
\subsection{Feature Visualization}
|
| 285 |
+
We randomly choose the D\(\rightarrow \)E domain adaptation task of Amazon review dataset and plot in Figure~\ref{fig:t-sne} the t-SNE visualization following \cite{donahue2014decaf,long2016deep} to visualize the learned feature representations. In these figures, red and blue points represent positive and negative samples of the source domain, purple and green points represent positive and negative samples of the target domain. A transferable feature mapping should cluster red (blue) and purple (green) points together, and meanwhile classification can be easily conducted between purple and green points. We can see that almost all approaches learn discriminative and domain invariant feature representations to some extent. And representations learned by WDGRL are more transferable since the classes between the source and target domains align better and the region where purple and green points mix together is smaller.
|
| 286 |
+
|
| 287 |
+
\begin{figure}[tbp]
|
| 288 |
+
\subfigure[t-SNE of DANN features]{
|
| 289 |
+
\includegraphics[width=0.22\textwidth]{dann_tsne.pdf}
|
| 290 |
+
}
|
| 291 |
+
\subfigure[t-SNE of MMD features]{
|
| 292 |
+
\includegraphics[width=0.22\textwidth]{mmd_tsne.pdf}
|
| 293 |
+
}
|
| 294 |
+
|
| 295 |
+
\subfigure[t-SNE of CORAL features]{
|
| 296 |
+
\includegraphics[width=0.22\textwidth]{coral_tsne.pdf}
|
| 297 |
+
}
|
| 298 |
+
\subfigure[t-SNE of WDGRL features]{
|
| 299 |
+
\includegraphics[width=0.22\textwidth]{wd_tsne.pdf}
|
| 300 |
+
}
|
| 301 |
+
|
| 302 |
+
\caption{Feature visualization of the D\(\rightarrow \)E task in Amazon review dataset.} %
|
| 303 |
+
\label{fig:t-sne}
|
| 304 |
+
\end{figure}
|
| 305 |
+
\section{Conclusions}
|
| 306 |
+
In this paper, we propose a new adversarial approach WDGRL to learn domain invariant feature representations for domain adaptation. WDGRL can effectively reduce the domain discrepancy taking advantage of the gradient property of Wasserstein distance and the transferability is guaranteed by the generalization bound.
|
| 307 |
+
Our proposed approach could be further integrated into other domain adaptation frameworks \cite{bousmalis2016domain,tzeng2014deep,long2015learning,long2016deep,zhuang2015supervised} to attain better transferability. Empirical results on sentiment and image classification domain adaptation datasets demonstrate that WDGRL outperforms the state-of-the-art domain invariant feature learning approaches. From feature visualization, one can easily observe that WDGRL yields domain invariant yet target-discriminative feature representations.
|
| 308 |
+
In future work, we will investigate more sophisticated architectures for tasks on image data as well as integrate WDGRL into existing adaptation frameworks.
|
| 309 |
+
\section{Acknowledgement}
|
| 310 |
+
This work is financially supported by NSFC (61702327) and Shanghai Sailing Program (17YF1428200).
|
| 311 |
+
|
| 312 |
+
\bibliography{wd-tl}
|
| 313 |
+
\bibliographystyle{aaai}
|
| 314 |
+
|
| 315 |
+
\onecolumn
|
| 316 |
+
\section{Appendix}
|
| 317 |
+
|
| 318 |
+
\subsection{Gradient Superiority}
|
| 319 |
+
Here we would like to prove the gradient priority of Wasserstein distance over cross-entropy in the situation where the mapped feature distributions fill in the whole feature space.
|
| 320 |
+
For simplicity, we take two normal distributions as an example and the conclusion still holds in the high-dimensional space.
|
| 321 |
+
Fig~\ref{fig:gaussian} shows the two normal distributions and the whole space is divided into 3 regions where the probability of source data lying in region A is high while that of target data is extremely low. The situation is just opposite in region C and in region B two distributions differ a little.
|
| 322 |
+
|
| 323 |
+
\begin{figure}[htpb]
|
| 324 |
+
{
|
| 325 |
+
\centering
|
| 326 |
+
\includegraphics[width=0.4\textwidth]{gaussian.pdf}
|
| 327 |
+
|
| 328 |
+
}
|
| 329 |
+
\caption{Gaussian Example}
|
| 330 |
+
\label{fig:gaussian}
|
| 331 |
+
\end{figure}
|
| 332 |
+
|
| 333 |
+
We use the same notation here as above. We assume that source data are labeled 1 while target data are labeled 0 and a domain classifier is used to help learn the domain invariant representations. So given one instance $(x, y)$ from either domain, the feature extractor minimizes the following objective which could be viewed as the negative of cross-entropy between the domain label $y$ and its corresponding prediction $\sigma(f_d(f_g(x)))$
|
| 334 |
+
\begin{equation}
|
| 335 |
+
\mathcal{L}_D(x, y) = y \log \sigma (f_d(f_g(x))) + (1-y) \log (1-\sigma(f_d(f_g(x))))
|
| 336 |
+
\end{equation}
|
| 337 |
+
where $\sigma$ is the sigmoid function and $f_d$ is the logit computed by the domain classifier network. Then the gradient of $\mathcal{L}_D $ with respect to $\theta_g $ can be computed according to the chain rule, i.e.
|
| 338 |
+
$
|
| 339 |
+
\frac{\partial \mathcal{L}_D}{\partial \theta_g} = \frac{\partial \mathcal{L}_D}{\partial f_d} \frac{\partial f_d}{\partial f_g} \frac{\partial f_g}{\partial \theta_g}
|
| 340 |
+
$. The first term can be directly computed
|
| 341 |
+
\begin{equation}
|
| 342 |
+
\frac{\partial \mathcal{L}_D}{\partial f_d} = y - \sigma(f_d(f_g))
|
| 343 |
+
\end{equation}
|
| 344 |
+
As we know, the optimal domain classifier is $\sigma(f_d^*(h)) = \frac{p(h)}{p(h)+q(h)}$ where $h=f_g(x)$ and $p(h)$ represents the source feature distribution and $q(h)$ represents the target feature distribution. So if one source instance lies in region A, it provides gradient of almost 0. The same result holds for target samples lying in region C. So these points make no contribution to the gradient and thus the divergence between feature distributions couldn't be reduced effectively.
|
| 345 |
+
|
| 346 |
+
Now we consider Wasserstein distance as the loss function
|
| 347 |
+
\begin{equation}
|
| 348 |
+
\mathcal{L}_W = \mathbb{E}_{x \sim \mathbb{P}_{x^s}} [f_w(f_g(x))] - \mathbb{E}_{x \sim \mathbb{P}_{x^t} }[f_w(f_g(x))].
|
| 349 |
+
\end{equation}
|
| 350 |
+
The gradient of $\mathcal{L}_W $ with respect to $\theta_g $ can be computed according to the chain rule, i.e.
|
| 351 |
+
$
|
| 352 |
+
\frac{\partial \mathcal{L}_W}{\partial \theta_g} = \frac{\partial \mathcal{L}_W}{\partial f_w} \frac{\partial f_w}{\partial f_g} \frac{\partial f_g}{\partial \theta_g}
|
| 353 |
+
$.
|
| 354 |
+
So for source domain data $x \sim \mathbb{P}_{x^s}$, $\frac{\partial \mathcal{L}_W}{\partial f_w} = 1$; while for target domain data $x \sim \mathbb{P}_{x^t}$, $\frac{\partial \mathcal{L}_W}{\partial f_w} = -1$. Therefore Wasserstein distance can always provide stable gradients wherever data is.
|
| 355 |
+
\subsection{Generalization Bound}
|
| 356 |
+
We now continue from the Theorem 1 in the paper to prove that target error can be bounded by the Wasserstein distance for empirical measures on the source and target samples. we first present a statement showing the convergence of the empirical measure to the true Wasserstein distance.
|
| 357 |
+
|
| 358 |
+
\begin{theorem}
|
| 359 |
+
\label{theo: wd-emprical}
|
| 360 |
+
(\cite{bolley2007quantitative}, Theorem 2.1; \cite{redko2016theoretical}, Theorem 1) Let $\mu$ be a probability measure in $\mathbb{R}^d$
|
| 361 |
+
satisfying $T_1(\lambda)$ inequality.
|
| 362 |
+
Let $\hat{\mu} = \frac{1}{N} \sum_{i=1}^{N} \delta_{x_i}$ be its associated empirical defined on a sample of independent variables $ \{x_i\} _{i=1}^N $ drawn from $\mu$. Then for any $d'>d$ and $\lambda'< \lambda$ there exists some constant $N_0$ depending on $d'$ and some square exponential moment of $\mu $ such that for any $\epsilon>0$ and $N \geq N_0\text{max}(\varepsilon^{-(d+2)},1)$
|
| 363 |
+
\begin{equation}
|
| 364 |
+
\mathbb{P}[W_1(\mu,\hat{\mu})>\varepsilon] \leq \text{exp} \big( - \frac{\lambda'}{2} N \varepsilon^2 \big)
|
| 365 |
+
\end{equation}
|
| 366 |
+
where $d', \lambda'$ can be calculated explicitly.
|
| 367 |
+
\end{theorem}
|
| 368 |
+
|
| 369 |
+
Now we can follow the Theorem~\ref{theo: wd-bound} and Theorem~\ref{theo: wd-emprical} to prove that target error can be bounded by the Wasserstein distance for empirical measures on the source and target samples as the process of the proof of the Theorem 3. in \cite{redko2016theoretical}.
|
| 370 |
+
|
| 371 |
+
\begin{theorem}
|
| 372 |
+
Under the assumption of Lemma 1, let two probability measures satisfy $T_1(\lambda)$ inequality, $X_s$ and $X_t$ be two samples of size $N_s$ and $N_t$ drawn i.i.d from $\mu_s$ and $\mu_t$ resepectively. Let $\hat{\mu_s} = \frac{1}{N_s}\sum_{i=1}^{N_s} \delta _{x_i^s}$ and $\hat{\mu_t} = \frac{1}{N_t}\sum_{i=1}^{N_t} \delta _{x_i^t}$ be the associated empirical measures. Then for any $d' > d$ and $ \lambda' < \lambda $ there exists some constant $N_0$ depending on $d'$ such that for any $\delta >0 $ and $\text{min}(Ns,Nt) \geq N_0\text{max}(\delta^{-(d'+2)},1)$ with probability at least $1-\delta$ for all $h$ the followingt holds:
|
| 373 |
+
\begin{equation}
|
| 374 |
+
\epsilon_t(h) \leq \epsilon_s(h) + 2K W_1(\hat{\mu_s},\hat{\mu_t}) + \lambda + 2K \sqrt{2log \bigg(\frac{1}{\delta} \bigg) / \lambda'} \bigg( \sqrt{\frac{1}{N_s}} + \sqrt{\frac{1}{N_t}} \bigg)
|
| 375 |
+
\end{equation}
|
| 376 |
+
where $\lambda$ is the combined error of the ideal hypothesis $ h^* $ that minimizes the combined error of $\epsilon_s(h)+\epsilon_t(h)$.
|
| 377 |
+
\end{theorem}
|
| 378 |
+
|
| 379 |
+
\begin{proof}
|
| 380 |
+
\begin{equation}
|
| 381 |
+
\begin{aligned}
|
| 382 |
+
\epsilon_t(h)
|
| 383 |
+
& \leq \epsilon_s(h) + 2KW_1(\mu_s,\mu_t) + \lambda \\
|
| 384 |
+
& \leq \epsilon_s(h) + 2KW_1(\mu_s,\hat{\mu_s}) + 2KW_1(\hat{\mu_s}, \mu_t) + \lambda \\
|
| 385 |
+
& \leq \epsilon_s(h) + 2K \sqrt{2log \bigg(\frac{1}{\delta} \bigg) / N_s\lambda'} + 2KW_1(\hat{\mu_s}, \hat{\mu_t}) + 2KW_1(\hat{\mu_t,\mu_t}) + \lambda \\
|
| 386 |
+
& \leq \epsilon_s(h) + 2KW_1(\hat{\mu_s}, \hat{\mu_t}) + \lambda + 2K \sqrt{2log \bigg(\frac{1}{\delta} \bigg) / \lambda'} \bigg( \sqrt{\frac{1}{N_s}} + \sqrt{\frac{1}{N_t}} \bigg)
|
| 387 |
+
\end{aligned}
|
| 388 |
+
\end{equation}
|
| 389 |
+
\end{proof}
|
| 390 |
+
\subsection{More Experiment Results}
|
| 391 |
+
\textbf{Synthetic data.} We generate a synthetic dataset to show the superior gradient advantage of WDGRL over DANN. In the paper, we claim that when two representation distributions are distant or have regions they differ a lot, DANN will have gradient vanishing problem while WDGRL still provides the stable gradient. It is a little difficult to fully realize such situations, so we design a rather restrictive experiment. However, this toy experiment does verify DANN may fail in some situations while WDGRL can work. We visualize the data input in Figure~\ref{fig: synthetic-data} with 2000 samples for each domain. And from Figure~\ref{fig: dann_clssifier} we find that if we adopt DANN the domain classifier can distinguish two domain data well and the DANN loss decreases to nearly 0 as the training process continues. In such situation, the domain classifier can provide poor gradient. As shown in ~\ref{fig: target_acc}, our WDGRL approach can effectively classify the target data while DANN fails.
|
| 392 |
+
|
| 393 |
+
\begin{figure}[htbp]
|
| 394 |
+
\subfigure[input visualization]{
|
| 395 |
+
\centering
|
| 396 |
+
\includegraphics[width=0.31\textwidth]{toy_visualization.png}
|
| 397 |
+
\label{fig: synthetic-data}
|
| 398 |
+
}
|
| 399 |
+
\subfigure[DANN loss and accuracy]{
|
| 400 |
+
\centering
|
| 401 |
+
\includegraphics[width=0.31\textwidth]{dann_domain_classifier.png}
|
| 402 |
+
\label{fig: dann_clssifier}
|
| 403 |
+
}
|
| 404 |
+
\subfigure[Performance on target domain]{
|
| 405 |
+
\centering
|
| 406 |
+
\includegraphics[width=0.31\textwidth]{target_acc.png}
|
| 407 |
+
\label{fig: target_acc}
|
| 408 |
+
}
|
| 409 |
+
\caption{Synthetic experiment.}
|
| 410 |
+
\end{figure}
|
| 411 |
+
|
| 412 |
+
\textbf{Office-Caltech dataset with SURF features.} Table~\ref{tab:office-result-surf} shows the result of our experiments on Office-Caltech dataset with SURF features.
|
| 413 |
+
|
| 414 |
+
\begin{table}[ht]
|
| 415 |
+
\small
|
| 416 |
+
\caption{Performance (accuracy \%) on Office-Caltech dataset with Decaf features}
|
| 417 |
+
\centering\label{tab:office-result-surf}
|
| 418 |
+
\begin{tabular}{cccccc}
|
| 419 |
+
\hline
|
| 420 |
+
& S-only & MMD & DANN & D-CORAL & WDGRL \\
|
| 421 |
+
\hline
|
| 422 |
+
A \(\rightarrow \) C & 43.19 & 44.08 & 44.97 & 44.97 & \textbf{45.86} \\
|
| 423 |
+
A \(\rightarrow \) D & 35.03 & 41.40 & 41.40 & 40.13 & \textbf{44.59} \\
|
| 424 |
+
A \(\rightarrow \) W & 35.23 & 37.29 & 38.64 & 38.31 & \textbf{40.68} \\
|
| 425 |
+
\hline
|
| 426 |
+
W \(\rightarrow \) A & 30.06 & 34.13 & 34.13 & \textbf{34.86} & 32.15 \\
|
| 427 |
+
W \(\rightarrow \) D & 80.25 &\textbf{ 84.71} & 82.80 & 84.08 & 81.53 \\
|
| 428 |
+
W \(\rightarrow \) C & 30.19 & 30.72 & 32.68 & \textbf{33.30} & 31.08 \\
|
| 429 |
+
\hline
|
| 430 |
+
C \(\rightarrow \) W & 36.95 & 40.34 & \textbf{43.39} & 40.00 & 42.37 \\
|
| 431 |
+
C \(\rightarrow \) A & 52.92 & 54.80 & 54.91 & 53.44 & \textbf{55.22} \\
|
| 432 |
+
C \(\rightarrow \) D & 45.86 & 47.13 & 47.77 & 47.13 & \textbf{48.41} \\
|
| 433 |
+
\hline
|
| 434 |
+
D \(\rightarrow \) W & 69.50 & 73.56 & 74.24 & 73.90 & \textbf{76.95} \\
|
| 435 |
+
D \(\rightarrow \) A & 31.21 & 32.46 & 31.63 & 31.52 & \textbf{35.60} \\
|
| 436 |
+
D \(\rightarrow \) C & 30.37 & 30.72 & 32.24 & 31.52 & \textbf{32.59} \\
|
| 437 |
+
\hline
|
| 438 |
+
AVG & 43.4 & 45.95 & 46.57 & 46.10 & \textbf{47.25} \\
|
| 439 |
+
\hline
|
| 440 |
+
\end{tabular}
|
| 441 |
+
\end{table}
|
| 442 |
+
|
| 443 |
+
\textbf{Email spam filtering dataset.} The email spam filtering dataset \footnote{http://www.ecmlpkdd2006.org/challenge.html} released by ECML/PKDD 2006 discovery challenge contains 4 separate user inboxes. From public inbox (source domain) 4,000 labeled training samples were collected, among which half samples are spam emails and the other half non-spam ones. The test samples were collected from 3 private inboxes (target domains), each of which consists of 2,500 samples. In our experiments, 3 cross-domain tasks are constructed from the public inbox to the private inboxes. We choose the 5,067 most frequent terms as features and 4 test samples were deleted as a result of not containing any of these terms. Experimenting on the 3 tasks by transferring from public to private groups of private inboxes \(u1 \sim u3 \), we found our method does achieve better performance than MMD, DANN and D-CORAL, which is demonstrated in Table~\ref{tab:email-result}. We can see from this result that all these approaches can reach the goal of learning the transferable features for they all outperform the source only baseline at least \(9 \%\). Among them, MMD and DANN achieve almost the same performance while WDGRL further boosts the performance by a rate of \(2.90 \%\).
|
| 444 |
+
\begin{table}[ht]
|
| 445 |
+
\small
|
| 446 |
+
\caption{Performance (Accuracy \%) on email spam dataset}
|
| 447 |
+
\centering
|
| 448 |
+
\label{tab:email-result}
|
| 449 |
+
\begin{tabular}{cccccc}
|
| 450 |
+
\hline
|
| 451 |
+
& S only & MMD & DANN & D-CORAL & WDGRL\\
|
| 452 |
+
\hline
|
| 453 |
+
P \(\rightarrow u1\) & 69.63 & 80.95 & 83.27 &79.71& \textbf{85.67}\\
|
| 454 |
+
P \(\rightarrow u2\) & 76.01 & 85.98 & 85.74 &83.83& \textbf{88.26}\\
|
| 455 |
+
P \(\rightarrow u3\) & 81.24 & 94.08 & 91.92 &89.80& \textbf{95.76}\\
|
| 456 |
+
\hline
|
| 457 |
+
AVG & 75.63 & 87.00 & 86.98 &84.45& \textbf{89.90}\\
|
| 458 |
+
\hline
|
| 459 |
+
|
| 460 |
+
\end{tabular}
|
| 461 |
+
\end{table}
|
| 462 |
+
|
| 463 |
+
\textbf{Newsgroup classification dataset.} The 20 newsgroups dataset \footnote{http://qwone.com/\textasciitilde jason/20Newsgroups/} is a collection of 18,774 newsgroup documents across 6 top categories and 20 subcategories in a hierarchical structure. In our experiments, we adopt a similar setting as \cite{duan2012domain}. The task is to classify top categories and the four largest top categories (comp, rec, sci, talk) are chosen for evaluation. Specifically, for each top category, the largest subcategory is selected as the source domain while the second largest subcategory is chosen as the target domain. Moreover, the largest category comp is considered as the positive class and one of the three other categories as the negative class.
|
| 464 |
+
|
| 465 |
+
The distribution shift across newsgroups is caused by category specific words. Notice the construction of our domain adaptation tasks which aim to classify the top categories while the adaptation exists between the subcategories. It makes sense that there exist more differences among top categories than those among subcategories which implies that classification is not that sensitive to the subcategories and thus enables the ease of domain adaptation. Table~\ref{tab:news-reuslt} gives the information of performance on the 20newsgroup dataset from which we can find that the comparison methods are almost neck and neck, which is consistent with our previous observation.
|
| 466 |
+
|
| 467 |
+
\begin{table}[ht]
|
| 468 |
+
\small
|
| 469 |
+
\caption{Performance (Accuracy \%) on 20 newsgroup dataset}
|
| 470 |
+
\centering\label{tab:news-reuslt}
|
| 471 |
+
\begin{tabular}{cccccc}
|
| 472 |
+
\hline
|
| 473 |
+
& S only & MMD & DANN & D-CORAL &WDGRL\\
|
| 474 |
+
\hline
|
| 475 |
+
C vs. R & 81.62 & 97.85 & 98.10 & 97.57 &\textbf{98.35}\\
|
| 476 |
+
C vs. S & 74.01 & 87.52 & 90.57 & 84.20 &\textbf{91.33}\\
|
| 477 |
+
C vs. T & 94.44 & 96.96 & \textbf{97.75} & 97.22 &97.62\\
|
| 478 |
+
\hline
|
| 479 |
+
AVG & 83.36 & 94.11 & 95.47 & 93.00 & \textbf{95.77}\\
|
| 480 |
+
\hline
|
| 481 |
+
|
| 482 |
+
\end{tabular}
|
| 483 |
+
\end{table}
|
1707.01310v5.txt
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Reinforcement learning (RL) is typically concerned with a scenario where an agent (or multiple agents) taking actions and receiving rewards from an environment Kaelbling et al. (1996), and the goal of the learning is to find an optimal policy for the agent that maximizes the cumulative reward when interacting with the environment.Successful applications include playing games Mnih et al. (2013); Silver et al. (2016), scheduling traffic signal Abdulhai et al. (2003), regulating ad bidding Cai et al. (2017), to name just a few.
|
| 2 |
+
|
| 3 |
+
In most RL approaches, such as SARSA and Q-learning Sutton andBarto (1998), the model of the environment is, however, not necessarily known a priori before learning the optimal policy for the agent. Alternatively, model-based approaches, such as DYNA Sutton (1990) and prioritized sweeping Moore andAtkeson (1993), require establishing the environment model while learning the optimal policy. Nonetheless, in either case, the environment is assumed given and mostly either stationary or non-stationary without a purposive control Kaelbling et al. (1996).
|
| 4 |
+
|
| 5 |
+
In this paper, we extend the standard RL setting by considering the environment is strategic and controllable. We aim at learning to design an environment via interacting with an also learnable agent or multiple agents. This has many potential applications, ranging from designing a game (environment) with a desired level of difficulties in order to fit the current player’s learning stage Togelius andSchmidhuber (2008) and designing shopping space to impulse customers purchase and long stay Penn (2005) to controlling traffic signals Ceylan and Bell (2004). In general, we propose and formulate the design problem of environments which interact with intelligent agents/humans. We consider designing these environments via machine learning would release human labors and benefit social efficiency.Comparing to the well-studied image design/generation problem Goodfellow et al. (2014), environment design problem is new in three aspects:(i) there is no ground-truth samples;(ii) the sample to be generated may be discontinuous;(iii) the evaluation of a sample is through learning intelligent agents.
|
| 6 |
+
|
| 7 |
+
Our formulation extends the scope of RL by focusing on the environment modeling and control. Particularly, in an adversarial case, on one hand, the agent aims to maximize its accumulative reward; on the other hand, the environment tends to minimize the reward for a given optimal policy from the agent. This effectively creates a minimax game between the agent and the environment. Given the agent’s playing environment MDP, we, theoretically, find a dual MDP w.r.t. the environment, i.e., how the environment could decide or sample the successor state given the agent’s current state and an action taken.Solving the dual MDP yields a policy gradient solution Williams (1992) to optimize the parametric environment achieving its objective. When the environment’s parameters are not continuous, we propose a generative modeling framework for optimizing the parametric environment, which overcomes the constraints on the environment space. Our experiments on a Maze game generation task show the effectiveness of generating diverse and challenging Mazes against various types of agents in different settings. We show that our algorithms would be able to successfully find the weaknesses of the agents and play against them to generate purposeful environments.
|
| 8 |
+
|
| 9 |
+
The main contributions of this paper are threefold:(i) we propose the environment design problem, which is novel and potential for practical applications;(ii) we reduce the problem to the policy optimization problem for continuous cases and propose a generative framework for discontinuous cases; (iii) we apply our methods to Maze game design tasks and show their effectiveness by presenting the generated non-trivial Mazes.
|
| 10 |
+
|
| 11 |
+
Reinforcement learning (RL) Sutton andBarto (1998) studies how an intelligent agent learns to take actions through the interaction with an environment over time. In a typical RL setting, the environment is unknown yet fixed, and the focus is on optimizing the agent policies. Deep reinforcement learning (DRL) is a marriage of deep neural networks LeCun et al. (2015) and RL; it makes use of deep neural networks as a function approximator in the decision-making framework of RL to achieve human-level control and general intelligence Mnih et al. (2015).In this paper, instead, we consider a family of problems that is an extension of RL by considering that the environment is controllable and strategic. Unlike typical RL, our subject is the strategic environment not the agent, and the aim is to learn to design an optimal (game) environment via the interaction with the intelligent agent.
|
| 12 |
+
|
| 13 |
+
Our problem of environment design is related to the well-known mechanism design problemNisan and Ronen (2001), which studies how to design mechanisms for participants that achieves some objectives such as social welfare. In most studies, the designs are manual. Our work focuses on automated environment (mechanism) design by machine learning. Thus, we formulate the problem based on MDP and provide solutions based on RL. In parallel, the automated game-level design is a well-studied problem by applying search-based procedural content generationTogelius et al. (2011). For generating game-levels that conform to design requirements, genetic algorithm (GA) is proposed as a searcher. Our work instead providing sound solutions based on RL methods, which bring new properties such as gradient direction searching and game feature learning.
|
| 14 |
+
|
| 15 |
+
In the field of RL, our problem is related to safe/robust reinforcement learning, which maximizes the expectation of the return under some safety constraints such as uncertainty Garcıa andFernández (2015); Morimoto and Doya (2005), due to the common use of parametric MDPs. However, our problem setting is entirely different from safe RL as their focus is on single agent learning in an unknown environment, whereas our work is concerned with the learning of the environment to achieve its own objective. Our problem is also different from agent reward design Sorg et al. (2010), which optimizes designer’s cumulative reward given by a fixed environment (MDP). However, the environment is learnable in our setting.Another related work, FeUdal networks Vezhnevets et al. (2017), introduces transition policy gradient to update the proposed manager model, which is a component of agent policy. This is different from our transition gradient which is for updating the environment.
|
| 16 |
+
|
| 17 |
+
Our formulation is a general one, applicable in the setting where there are multiple agents Busoniu andDe Schutter . It is worth mentioning that although multi-agent reinforcement learning (MARL) studies the strategic interplays among different entities, the game (either collaborative or competitive) is strictly among multiple agents Littman (1994); Hu and Wellman (2003). By contrast, the strategic interplays in our formulation are between an agent (or multiple agents) and the environment. The recent work, interactive POMDPs Gmytrasiewicz andDoshi (2005), aims to spread beliefs over physical states of the environment and over models of other agents, but the environment in question is still non-strategic. Our problem, thus, cannot be formulated directly using MARL as the decision making of the environment is in an episode-level, while policies of agents typically operate and update in each time-step within an episode.
|
| 18 |
+
|
| 19 |
+
In addition, our minimax game formulation can also be found in the recently emerged generative adversarial nets (GANs), where a generator and a discriminator play a minimax adversarial game Goodfellow et al. (2014). Compared to GANs, our work addresses a different problem, where the true samples of desired environments are missing in our scenario; the training of our environment generator is guided by the behaviours of the agent (corresponding the GAN discriminator) who aims to maximize its cumulative reward in a given environment.
|
| 20 |
+
|
| 21 |
+
Let us first consider the standard reinforcement learning framework. In this framework there are a learning agent and a Markov decision process (MDP) ℳ=⟨𝒮,𝒜,𝒫,ℛ,γ⟩ℳ𝒮𝒜𝒫ℛ𝛾\mathcal{M}=\langle\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\gamma\rangle, where 𝒮𝒮\mathcal{S} denotes state space, 𝒜𝒜\mathcal{A} action space, 𝒫𝒫\mathcal{P} state transition probability function, ℛℛ\mathcal{R} reward function and γ𝛾\gamma discounted factor. The agent interacts with the MDP by taking action a𝑎a in state s𝑠s and observing reward r𝑟r in each time-step, resulting in a trajectory of states, actions and rewards: H1…∞=⟨S1,A1,R1,S2,A2,R2…⟩,St∈𝒮,At∈𝒜,Rt∈ℝformulae-sequencesubscript𝐻1…subscript𝑆1subscript𝐴1subscript𝑅1subscript𝑆2subscript𝐴2subscript𝑅2…formulae-sequencesubscript𝑆𝑡𝒮formulae-sequencesubscript𝐴𝑡𝒜subscript𝑅𝑡ℝH_{1\ldots\infty}=\langle S_{1},A_{1},R_{1},S_{2},A_{2},R_{2}\ldots\rangle,S_{t}\in\mathcal{S},A_{t}\in\mathcal{A},R_{t}\in\mathbb{R}, where ℙ[St+1=s′|St=s,At=a]=𝒫(s,a,s′)\mathbb{P}[S_{t+1}=s^{\prime}|S_{t}=s,A_{t}=a]=\mathcal{P}(s,a,s^{\prime}) and 𝔼[Rt|St=s,At=a]=ℛ(s,a)𝔼delimited-[]formulae-sequenceconditionalsubscript𝑅𝑡subscript𝑆𝑡𝑠subscript𝐴𝑡𝑎ℛ𝑠𝑎\mathbb{E}[R_{t}|S_{t}=s,A_{t}=a]=\mathcal{R}(s,a) hold.111In this paper, we use St,At,Rtsubscript𝑆𝑡subscript𝐴𝑡subscript𝑅𝑡S_{t},A_{t},R_{t} when they are in trajectories while using s,a,r𝑠𝑎𝑟s,a,r otherwise. The agent selects actions according to a policy πϕsubscript𝜋italic-ϕ\pi_{\phi}, where πϕ(a|s)subscript𝜋italic-ϕconditional𝑎𝑠\pi_{\phi}(a|s) defines the probability that the agent selects action a𝑎a in state s𝑠s. The agent learns πϕsubscript𝜋italic-ϕ\pi_{\phi} to maximize the return (cumulative reward) G=∑t=1∞γt−1Rt𝐺superscriptsubscript𝑡1superscript𝛾𝑡1subscript𝑅𝑡G=\sum_{t=1}^{\infty}\gamma^{t-1}R_{t}.
|
| 22 |
+
|
| 23 |
+
In the standard setting, the MDP is given fixed while the agent is flexible with its policy to achieve its objective. We extend this setting by also giving flexibility and purpose to ℳℳ\mathcal{M}. Specifically, we parametrize 𝒫𝒫\mathcal{P} as 𝒫θsubscript𝒫𝜃\mathcal{P}_{\theta} and set the objective of the MDP as O(H)𝑂𝐻O(H), which can be arbitrary based on the agent’s trajectory. We intend to design (generate) an MDP that achieves the objective along with the agent achieving its own objective:θ∗=argmax𝜃𝔼[O(H)|ℳθ=⟨𝒮,𝒜,𝒫θ,ℛ,γ⟩;\displaystyle\theta^{*}=\underset{\theta}{\operatorname{arg}\operatorname{max}}\;\mathbb{E}\big{[}O(H)|\mathcal{M}_{\theta}=\langle\mathcal{S},\mathcal{A},\mathcal{P}_{\theta},\mathcal{R},\gamma\rangle;πϕ∗=argmaxπϕ𝔼[G|πϕ;ℳθ]].\displaystyle\pi_{\phi^{*}}=\underset{\pi_{\phi}}{\operatorname{arg}\operatorname{max}}\;\mathbb{E}[G|\pi_{\phi};\mathcal{M}_{\theta}]\big{]}.(1)
|
| 24 |
+
|
| 25 |
+
In this paper, we consider a particular objective of the environment that it acts as an adversarial environment minimizing the expected return of the single agent, i.e., O(H)=∑t=1∞−γt−1Rt=−G𝑂𝐻superscriptsubscript𝑡1superscript𝛾𝑡1subscript𝑅𝑡𝐺O(H)=\sum_{t=1}^{\infty}-\gamma^{t-1}R_{t}=-G.This adversarial objective is useful in the game design domain because for many games the game designer need to design various game levels or set various game parameters to challenge game players playing with various game strategies. Thus, the relationship between the environment(game) and the agent(player) are adversarial. We intend to transfer this design work from human to machine by applying appropriate machine learning methods. Formally, the objective function is formulated as:θ∗=argmin𝜃maxϕ𝔼[G|πϕ;ℳθ=⟨𝒮,𝒜,𝒫θ,ℛ,γ⟩].superscript𝜃𝜃argminsubscriptitalic-ϕ𝔼delimited-[]conditional𝐺subscript𝜋italic-ϕsubscriptℳ𝜃𝒮𝒜subscript𝒫𝜃ℛ𝛾\displaystyle\theta^{*}=\underset{\theta}{\operatorname{arg}\operatorname{min}}\;\max_{\phi}\mathbb{E}[G|\pi_{\phi};\mathcal{M}_{\theta}=\langle\mathcal{S},\mathcal{A},\mathcal{P}_{\theta},\mathcal{R},\gamma\rangle].(2)
|
| 26 |
+
|
| 27 |
+
In general, we adopt an iterative framework for learning θ𝜃\theta and ϕitalic-ϕ\phi. In each iteration, the environment updates its parameter to maximize its objective w.r.t. the current agent policy then the agent updates its policy parameter by taking sufficient steps to be optimal w.r.t. the updated environment, as illustrated by Fig. 1 for learning the environment of a Maze. Since the agent’s policy can be updated using well-studied RL methods, we focus on the update methods for the environment. In each iteration, given the agent’s policy parameter ϕ∗superscriptitalic-ϕ\phi^{*}, the objective of the environment is
|
| 28 |
+
|
| 29 |
+
θ∗=argmin𝜃𝔼[G|ℳθ=⟨𝒮,𝒜,𝒫θ,ℛ,γ⟩;πϕ∗].superscript𝜃𝜃argmin𝔼delimited-[]conditional𝐺subscriptℳ𝜃𝒮𝒜subscript𝒫𝜃ℛ𝛾subscript𝜋superscriptitalic-ϕ\displaystyle\theta^{*}=\underset{\theta}{\operatorname{arg}\operatorname{min}}\;\mathbb{E}[G|\mathcal{M}_{\theta}=\langle\mathcal{S},\mathcal{A},\mathcal{P}_{\theta},\mathcal{R},\gamma\rangle;\pi_{\phi^{*}}].(3)
|
| 30 |
+
|
| 31 |
+
In the following sections, we propose two methods to solve this problem for continuous and discontinuous environments.
|
| 32 |
+
|
| 33 |
+
In this section, we propose a gradient method for continuous environment, i.e. the value of the transition probability for any ⟨s,a,s′⟩𝑠𝑎superscript𝑠′\langle s,a,s^{\prime}\rangle can be arbitrary in [0,1]01[0,1]. Thus, the parameter θ𝜃\theta of the environment actually consists of the values of the transition function 𝒫(s,a,s′)𝒫𝑠𝑎superscript𝑠′\mathcal{P}(s,a,s^{\prime}) for each ⟨s,a,s′⟩𝑠𝑎superscript𝑠′\langle s,a,s^{\prime}\rangle. Our task is to optimize the values of the transition function to minimize the agent’s cumulative reward.
|
| 34 |
+
|
| 35 |
+
To update the environment, we try to find the gradient of the environment objective w.r.t. θ𝜃\theta. We derive the gradient bytaking a new look at the environment and the agent in the opposite way, that the original environment ℳAsuperscriptℳ𝐴\mathcal{M}^{A} as an agent and the original agent as a part of the new environment ℳEsuperscriptℳ𝐸\mathcal{M}^{E}. Viewing in this way, the original environment ℳAsuperscriptℳ𝐴\mathcal{M}^{A} takes action AtEsubscriptsuperscript𝐴𝐸𝑡A^{E}_{t} to determine the next state St+1Asubscriptsuperscript𝑆𝐴𝑡1S^{A}_{t+1} given the current state StAsubscriptsuperscript𝑆𝐴𝑡S^{A}_{t} and the agent’s action AtAsubscriptsuperscript𝐴𝐴𝑡A^{A}_{t}. Thus we define the state sEsuperscript𝑠𝐸s^{E} in ℳEsuperscriptℳ𝐸\mathcal{M}^{E} as the combination ⟨sA,aA⟩superscript𝑠𝐴superscript𝑎𝐴\langle s^{A},a^{A}\rangle. On the other hand, given the original environment’s action AtE=St+1Asubscriptsuperscript𝐴𝐸𝑡subscriptsuperscript𝑆𝐴𝑡1A^{E}_{t}=S^{A}_{t+1} , the agent policy πϕ∗A(sA)superscriptsubscript𝜋superscriptitalic-ϕ𝐴superscript𝑠𝐴\pi_{\phi^{*}}^{A}(s^{A}) acts as a transition in ℳEsuperscriptℳ𝐸\mathcal{M}^{E} to determine At+1Asubscriptsuperscript𝐴𝐴𝑡1A^{A}_{t+1} as part of the next state St+1E=⟨St+1A,At+1A⟩subscriptsuperscript𝑆𝐸𝑡1subscriptsuperscript𝑆𝐴𝑡1subscriptsuperscript𝐴𝐴𝑡1S^{E}_{t+1}=\langle S^{A}_{t+1},A^{A}_{t+1}\rangle in ℳEsuperscriptℳ𝐸\mathcal{M}^{E}. Furthermore, optimizing agent policy in ℳEsuperscriptℳ𝐸\mathcal{M}^{E} is equal to optimizing environment transition in ℳAsuperscriptℳ𝐴\mathcal{M}^{A}.
|
| 36 |
+
|
| 37 |
+
Theoretically, we reduce our transition optimization problem in Eq. (3) to the well-studied policy optimization problem through a proposed concept of a duel MDP-policy pair.
|
| 38 |
+
|
| 39 |
+
We can see that the dual MDP-policy pair in fact describes an equal mechanism as the original MDP-policy pair from another perspective.Based on the dual MDP-policy pair, we give three theorems to derive the gradient of the transition function. The proofs are omitted for space reason.
|
| 40 |
+
|
| 41 |
+
Theorem 2 can be understood by the equivalence between HAsuperscript𝐻𝐴H^{A} and HEsuperscript𝐻𝐸H^{E} and the same generating probability of them as given in Theorem 1. Theorem 3 naturally extends Theorem 2 from the single trajectory to the distribution of trajectory according to the equal probability mass function given by Theorem 1.
|
| 42 |
+
|
| 43 |
+
Now we consider ⟨ℳθA,πA⟩subscriptsuperscriptℳ𝐴𝜃superscript𝜋𝐴\langle\mathcal{M}^{A}_{\theta},\pi^{A}\rangle and its duality ⟨ℳE,πθE⟩superscriptℳ𝐸subscriptsuperscript𝜋𝐸𝜃\langle\mathcal{M}^{E},\pi^{E}_{\theta}\rangle, where 𝒫θAsubscriptsuperscript𝒫𝐴𝜃\mathcal{P}^{A}_{\theta} and πθEsubscriptsuperscript𝜋𝐸𝜃\pi^{E}_{\theta} are of the same form about θ𝜃\theta. Given θ𝜃\theta, 𝒫θAsubscriptsuperscript𝒫𝐴𝜃\mathcal{P}^{A}_{\theta} and πθEsubscriptsuperscript𝜋𝐸𝜃\pi^{E}_{\theta} are exactly the same, resulting in 𝔼[GA|πA,ℳθA]=𝔼[GE|πθE,ℳE]𝔼delimited-[]conditionalsuperscript𝐺𝐴superscript𝜋𝐴subscriptsuperscriptℳ𝐴𝜃𝔼delimited-[]conditionalsuperscript𝐺𝐸subscriptsuperscript𝜋𝐸𝜃superscriptℳ𝐸\mathbb{E}[G^{A}|\pi^{A},\mathcal{M}^{A}_{\theta}]=\mathbb{E}[G^{E}|\pi^{E}_{\theta},\mathcal{M}^{E}] according to Theorem 3. Thus optimizing 𝒫θAsubscriptsuperscript𝒫𝐴𝜃\mathcal{P}^{A}_{\theta} as Eq. (3) is equivalent to optimizing πθEsubscriptsuperscript𝜋𝐸𝜃\pi^{E}_{\theta}:θ∗=argmin𝜃𝔼[G|ℳθA;πϕ∗A]=argmin𝜃𝔼[G|πθE;ℳϕ∗E].superscript𝜃𝜃argmin𝔼delimited-[]conditional𝐺subscriptsuperscriptℳ𝐴𝜃subscriptsuperscript𝜋𝐴superscriptitalic-ϕ𝜃argmin𝔼delimited-[]conditional𝐺subscriptsuperscript𝜋𝐸𝜃subscriptsuperscriptℳ𝐸superscriptitalic-ϕ\displaystyle\theta^{*}=\underset{\theta}{\operatorname{arg}\operatorname{min}}\;\mathbb{E}[G|\mathcal{M}^{A}_{\theta};\pi^{A}_{\phi^{*}}]=\underset{\theta}{\operatorname{arg}\operatorname{min}}\;\mathbb{E}[G|\pi^{E}_{\theta};\mathcal{M}^{E}_{\phi^{*}}].(4)We then apply the policy gradient theorem Sutton et al. (1999) on πθEsubscriptsuperscript𝜋𝐸𝜃\pi^{E}_{\theta} and derive the gradient for 𝒫θAsubscriptsuperscript𝒫𝐴𝜃\mathcal{P}^{A}_{\theta}:∇θJ(θ)subscript∇𝜃𝐽𝜃\displaystyle\nabla_{\theta}J(\theta)=𝔼[∇θlogπθE(aE|sE)QE(sE,aE)|πθE;ℳϕ∗E]absent𝔼delimited-[]conditionalsubscript∇𝜃subscriptsuperscript𝜋𝐸𝜃conditionalsuperscript𝑎𝐸superscript𝑠𝐸superscript𝑄𝐸superscript𝑠𝐸superscript𝑎𝐸subscriptsuperscript𝜋𝐸𝜃subscriptsuperscriptℳ𝐸superscriptitalic-ϕ\displaystyle=\mathbb{E}[\nabla_{\theta}\log\pi^{E}_{\theta}(a^{E}|s^{E})Q^{E}(s^{E},a^{E})|\pi^{E}_{\theta};\mathcal{M}^{E}_{\phi^{*}}](5)=𝔼[∇θlog𝒫θA(siA,aA,si′A)VA(si′A)|ℳθA;πϕ∗A],absent𝔼delimited-[]conditionalsubscript∇𝜃subscriptsuperscript𝒫𝐴𝜃superscriptsubscript𝑠𝑖𝐴superscript𝑎𝐴superscriptsubscript𝑠superscript𝑖′𝐴superscript𝑉𝐴superscriptsubscript𝑠superscript𝑖′𝐴subscriptsuperscriptℳ𝐴𝜃subscriptsuperscript𝜋𝐴superscriptitalic-ϕ\displaystyle=\mathbb{E}[\nabla_{\theta}\log\mathcal{P}^{A}_{\theta}(s_{i}^{A},a^{A},s_{i^{\prime}}^{A})V^{A}(s_{i^{\prime}}^{A})|\mathcal{M}^{A}_{\theta};\pi^{A}_{\phi^{*}}],where J(θ)𝐽𝜃J(\theta) is cost function, QE(sE,aE)superscript𝑄𝐸superscript𝑠𝐸superscript𝑎𝐸Q^{E}(s^{E},a^{E}) and VA(si′A)superscript𝑉𝐴superscriptsubscript𝑠superscript𝑖′𝐴V^{A}(s_{i^{\prime}}^{A}) are action-value function and value function of ⟨ℳE,πθE⟩superscriptℳ𝐸subscriptsuperscript𝜋𝐸𝜃\langle\mathcal{M}^{E},\pi^{E}_{\theta}\rangle and ⟨ℳθA,πA⟩subscriptsuperscriptℳ𝐴𝜃superscript𝜋𝐴\langle\mathcal{M}^{A}_{\theta},\pi^{A}\rangle respectively; and can be proved equal due to the equivalence of the two MDPs.
|
| 44 |
+
|
| 45 |
+
We name the gradient in Eq. (5) as transition gradient. Transition gradient can be used to update the transition function in an iterative way. In theory, it performs as well as policy gradient since it is equivalent to the policy gradient in the circumstance of the dual MDP-policy pair.
|
| 46 |
+
|
| 47 |
+
The transition gradient method proposed in the last section only works for continuous environment. For discontinuous environment, i.e. the range of the transition function 𝒫(s,a,s′)𝒫𝑠𝑎superscript𝑠′\mathcal{P}(s,a,s^{\prime}) is not continuous in [0,1]01[0,1], we cannot directly take the gradient of the transition function w.r.t. θ𝜃\theta.
|
| 48 |
+
|
| 49 |
+
To deal with the discontinuous situation, we propose a generative framework to find the optimal θ𝜃\theta alternative to the gradient method. In general, we build a parametrized generator to generate a distribution of the environment, then update the parameter of the generator by evaluating the environments it generates (illustrated in Fig. 2). Specifically, we generate environment parameter θ𝜃\theta using a w𝑤w-parametrized generator μwsubscript𝜇𝑤\mu_{w}, then optimize w𝑤w to obtain the (local) optimal w∗superscript𝑤w^{*} and a corresponding optimal distribution of θ𝜃\theta.Formally, our optimization objective is formulated asw∗=argmin𝑤superscript𝑤𝑤argmin\displaystyle w^{*}=\underset{w}{\operatorname{arg}\operatorname{min}}\;𝔼θ∼μw[𝔼[G|\displaystyle\mathbb{E}_{\theta\sim\mu_{w}}\big{[}\mathbb{E}[G|ℳθA=⟨𝒮A,𝒜A,𝒫θA,ℛA,γA⟩;πϕ∗]].\displaystyle\mathcal{M}^{A}_{\theta}=\langle\mathcal{S}^{A},\mathcal{A}^{A},\mathcal{P}^{A}_{\theta},\mathcal{R}^{A},\gamma^{A}\rangle;\pi_{\phi^{*}}]\big{]}.(6)We model the generation process using an auxiliary MDP ℳμsuperscriptℳ𝜇\mathcal{M}^{\mu}, i.e., the generator μwsubscript𝜇𝑤\mu_{w} generates θ𝜃\theta and updates w𝑤w in a reinforcement learning way. The reason we adopt reinforcement learning other than supervised learning is that in this generative task, (i) there is no training data to describe the distribution of the desired environments so we cannot compute likelihood of generated environments and (ii) we can only evaluate a generated environment through sampling, i.e., performing agents in the generated environment and getting a score from the trajectory, which can be naturally modeled by reinforcement learning by viewing the score as a reward of the actions of the generator.
|
| 50 |
+
|
| 51 |
+
In detail, the generator μwsubscript𝜇𝑤\mu_{w} consists of three elements ⟨ℳμ,πwμ,fμ⟩superscriptℳ𝜇subscriptsuperscript𝜋𝜇𝑤superscript𝑓𝜇\langle\mathcal{M}^{\mu},\pi^{\mu}_{w},f^{\mu}\rangle. For generating θ𝜃\theta, an auxiliary agent with policy πwμsubscriptsuperscript𝜋𝜇𝑤\pi^{\mu}_{w} acts in ℳμsuperscriptℳ𝜇\mathcal{M}^{\mu} to generate a trajectory Hμsuperscript𝐻𝜇H^{\mu}, after that θ𝜃\theta is determined by the transforming function θ=fμ(Hμ)𝜃superscript𝑓𝜇superscript𝐻𝜇\theta=f^{\mu}(H^{\mu}), i.e., the distribution of θ𝜃\theta is based on the distribution of trajectories, which are further induced by playing πwμsubscriptsuperscript𝜋𝜇𝑤\pi^{\mu}_{w} in ℳμsuperscriptℳ𝜇\mathcal{M}^{\mu}. For adversarial environments, the reward of the generator is designed to be opposite to the return of the agent got in ℳθsubscriptℳ𝜃\mathcal{M}_{\theta}, which reflects the minimization objective in Eq. (6). Thus, w𝑤w can be updated by applying policy gradient methods on πwμsubscriptsuperscript𝜋𝜇𝑤\pi^{\mu}_{w}.
|
| 52 |
+
|
| 53 |
+
There are various ways to designing ℳμsuperscriptℳ𝜇\mathcal{M}^{\mu} for a particular problem. Here we provide a general design that can be applied to any environment. Briefly, we generate the environment parameter in an additive way and ensures the validity along the generation process. In detail, we reshape the elements of θ𝜃\theta as a vector θ=⟨x1,x2,…,xNθ⟩,xk∈Xkformulae-sequence𝜃subscript𝑥1subscript𝑥2…subscript𝑥subscript𝑁𝜃subscript𝑥𝑘subscript𝑋𝑘\theta=\langle x_{1},x_{2},\ldots,x_{N_{\theta}}\rangle,x_{k}\in X_{k} and design ℳμ=⟨𝒮μ,𝒜μ,𝒫μ,ℛμ,γμ=1⟩superscriptℳ𝜇delimited-⟨⟩superscript𝒮𝜇superscript𝒜𝜇superscript𝒫𝜇superscriptℛ𝜇superscript𝛾𝜇1\mathcal{M}^{\mu}=\langle\mathcal{S}^{\mu},\mathcal{A}^{\mu},\mathcal{P}^{\mu},\mathcal{R}^{\mu},\gamma^{\mu}=1\rangle to generate θ𝜃\theta:
|
| 54 |
+
|
| 55 |
+
•𝒮μ={vk=⟨x1,x2,…,xk⟩|k=0…Nθ,∃vNθ=⟨x1,x2,…,xk,xk+1′…xNθ′⟩=θ,\mathcal{S}^{\mu}=\{v_{k}=\langle x_{1},x_{2},\ldots,x_{k}\rangle|k=0\ldots N_{\theta},\exists v_{N_{\theta}}=\langle x_{1},x_{2},\ldots,x_{k},x_{k+1}^{\prime}\ldots x_{N_{\theta}}^{\prime}\rangle=\theta, s.t. 𝒫θA∈𝔓A}\mathcal{P}^{A}_{\theta}\in\mathfrak{P}^{A}\};•𝒜μ=⋃k=1…NθXksuperscript𝒜𝜇subscript𝑘1…subscript𝑁𝜃subscript𝑋𝑘\mathcal{A}^{\mu}=\bigcup_{k=1\ldots N_{\theta}}X_{k};•𝒫μsuperscript𝒫𝜇\mathcal{P}^{\mu} is defined that for the current state vk=⟨x1,x2,…,xk⟩subscript𝑣𝑘subscript𝑥1subscript𝑥2…subscript𝑥𝑘v_{k}=\langle x_{1},x_{2},\ldots,x_{k}\rangle and an action xk+1subscript𝑥𝑘1x_{k+1}, if xk+1∈Xk+1subscript𝑥𝑘1subscript𝑋𝑘1x_{k+1}\in X_{k+1} and vk+1=⟨x1,x2,…,xk+1⟩∈𝒮μsubscript𝑣𝑘1subscript𝑥1subscript𝑥2…subscript𝑥𝑘1superscript𝒮𝜇v_{k+1}=\langle x_{1},x_{2},\ldots,x_{k+1}\rangle\in\mathcal{S}^{\mu} the next state is vk+1subscript𝑣𝑘1v_{k+1}, otherwise vksubscript𝑣𝑘v_{k};•ℛμsuperscriptℛ𝜇\mathcal{R}^{\mu} is defined that for terminal state vNθ=⟨x1,x2,…,xNθ⟩=θsubscript𝑣subscript𝑁𝜃subscript𝑥1subscript𝑥2…subscript𝑥subscript𝑁𝜃𝜃v_{N_{\theta}}=\langle x_{1},x_{2},\ldots,x_{N_{\theta}}\rangle=\theta the reward is the opposite number of the averaged return got by πϕ∗Asubscriptsuperscript𝜋𝐴superscriptitalic-ϕ\pi^{A}_{\phi^{*}} acting in ℳθAsubscriptsuperscriptℳ𝐴𝜃\mathcal{M}^{A}_{\theta}, otherwise the reward is 00.
|
| 56 |
+
|
| 57 |
+
In addition, the start state is v0=⟨⟩subscript𝑣0v_{0}=\langle\rangle and the terminal states are vNθ=⟨x1,x2,…,xNθ⟩subscript𝑣subscript𝑁𝜃subscript𝑥1subscript𝑥2…subscript𝑥subscript𝑁𝜃v_{N_{\theta}}=\langle x_{1},x_{2},\ldots,x_{N_{\theta}}\rangle. Corresponding to this ℳμsuperscriptℳ𝜇\mathcal{M}^{\mu}, πwμ(xk+1|vk;w)subscriptsuperscript𝜋𝜇𝑤conditionalsubscript𝑥𝑘1subscript𝑣𝑘𝑤\pi^{\mu}_{w}(x_{k+1}|v_{k};w) is designed to take an action xk+1∈Xk+1subscript𝑥𝑘1subscript𝑋𝑘1x_{k+1}\in X_{k+1} depending on the previous generated sequence vksubscript𝑣𝑘v_{k}, and the transforming function fμsuperscript𝑓𝜇f^{\mu} is designed as fμ(Hμ)=vNθ=θsuperscript𝑓𝜇superscript𝐻𝜇subscript𝑣subscript𝑁𝜃𝜃f^{\mu}(H^{\mu})=v_{N_{\theta}}=\theta.Note that due to the definition of 𝒮μsuperscript𝒮𝜇\mathcal{S}^{\mu}, any partial parameter vtsubscript𝑣𝑡v_{t} without potential to be completed as a valid parameter θ𝜃\theta is avoided to be generated. This ensures any constraint on environment parameter can be followed. On the other hand, any valid θ𝜃\theta is probable to be generated once πwμsubscriptsuperscript𝜋𝜇𝑤\pi^{\mu}_{w} is exploratory and of enough expression capacity.222The generative framework could also be applied for continuous environment generation although it results in low efficiency comparing to directly updating the environment by gradient.
|
| 58 |
+
|
| 59 |
+
In our experiment, we consider a use case of designing Maze game to test our solutions over the transition gradient method and the generative framework respectively. As shown in both Figs. 4 and 5, the Maze is a grid world containing a map of n×n𝑛𝑛n\times n cells.In every time-step, the agent is in a cell and has four directional actions {N,S,W,E}𝑁𝑆𝑊𝐸\{N,S,W,E\} to select from, and transitions are made deterministically to an adjacent cell, unless there is a wall (e.g., the black cells as illustrated in Figs. 4 and 5), in which case no movement occurs.The minimax game is defined as: the agent should go from the north-west cell to the south-east cell using steps as few as possible, while the goal of the Maze environment is to arrange the walls in order to maximize the number of steps taken by the agent.
|
| 60 |
+
|
| 61 |
+
Note that the above hard wall Maze results in an environment that is discontinuous. In order to also test the case of continuous environments, we consider a soft wall Maze as shown in Fig. 3. Specifically, instead of a hard wall that completely blocks the agent, each cell except the end cell has a blockage probability (soft wall) which determines how likely the agent will be blocked by this cell when it takes transition action from an adjacent cell. It is also ensured that the sum of blockage probabilities of all cells is 111 and the maximum blockage probability for each cell is 0.50.50.5. Thus, the task for the adversarial environment in this case is to allocate the soft wall to each cell to block the agent the most.
|
| 62 |
+
|
| 63 |
+
Our experiment is conducted on PCs with common CPUs. We implement our experiment environment using Keras-RL Plappert (2016) backed by Keras and Tensorflow. 333Our experiment is repeatable and the code is at goo.gl/o9MrDN.
|
| 64 |
+
|
| 65 |
+
We test the transition gradient method considering the 5×5555\times 5 soft wall Maze case.We model the transition probability function by a deep convolutional neural network, which is updated by the transition gradient following Eq. (5). We consider the two types of agents: Optimal (OPT) agent and Deep Q-network learning (DQN) agent. The OPT agent has no parameters to learn, but always finds the optimal policy against any generated environment. The DQN agent Mnih et al. (2013) is a learnable one, in which the agent’s action-value function is modeled by a deep neural network, which takes the whole map and its current position as input, processed by 3 convolutional layers and 1 dense layer, then outputs the Q-values over the four directions. For each updated environment, we train the DQN agent to be optimal, as Fig. 1 shows.
|
| 66 |
+
|
| 67 |
+
Fig. 3 shows the convergence that our transition gradient method has achieved. The change of the learned environment parameters, in the form of blockage probabilities, over time are indicated by the color intensity. Intuitively, the most effective adversarial environment to block the agent is to place two 0.50.50.5 soft walls in the two cells next to the end or the beginning cell, as this would have the highest blockage probabilities. We can see that in both cases, using the OPT agent and the DQN agent, our learning method can obtain one of the two most optimal Maze environments.
|
| 68 |
+
|
| 69 |
+
We now test our reinforcement learning generator by the hard wall Maze environment. We follow the proposed general generative framework to design μw=⟨ℳμ,πwμ,fμ⟩subscript𝜇𝑤superscriptℳ𝜇subscriptsuperscript𝜋𝜇𝑤superscript𝑓𝜇\mu_{w}=\langle\mathcal{M}^{\mu},\pi^{\mu}_{w},f^{\mu}\rangle, which gradually generates walls one by one from an empty map. Particularly, πwμsubscriptsuperscript𝜋𝜇𝑤\pi^{\mu}_{w} is modeled by a deep neural network that takes an on-going generated map as input and outputs a position for a new wall or a special action for termination. Actions lead to generating walls that completely block the agent are invalid and prevented. We test our generator against four types of agents each on four sizes of maps (from 5×5555\times 5 to 8×8888\times 8). Although the objective for every agent is to minimize the number of steps, not every agent has the ability to find the optimal policy because of model restrictions of πϕsubscript𝜋italic-ϕ\pi_{\phi} or limitations in the training phase. Therefore, besides testing our generator against the optimal agent (the OPT agent) and the DQN agent, we also adopt other two imperfect agents for our generator to design specific Mazes in order to understand more about our solution’s behaviors. They are:
|
| 70 |
+
|
| 71 |
+
Depth-first search (DFS) agent. The DFS agent searches the end in a depth-first way. In each time-step, without loss of generality, the DFS agent is set to select an action according to the priority of East, South, North, West. The DFS agent takes the highest priority action that leads to a blank and unvisited cell. If there are none, The DFS agent goes back to the cell from which it comes.
|
| 72 |
+
|
| 73 |
+
Right-hand search (RHS) agent. The RHS agent is aware of the heading direction and follows a strategy that always ensures its right-hand cell is a wall or the border. In each time-step, (i) the RHS agent checks its right-hand cell, if it is blank, the RHS agent will turn right and step into the cell; (ii) if not, then if the front cell is blank, the RHS agent will step forward; (iii) if the front cell is not blank, the RHS agent will continue turning left until it faces a blank cell, then steps into that cell.
|
| 74 |
+
|
| 75 |
+
Note that DFS and RHS are designed particularly for discontinuous Mazes. We also limit the network capacity and training time of the DQN agent to make it converge differently from the OPT agent. The learned optimal Mazes are given in Fig. 4 for different agents with different Maze sizes. The strongest Mazes designed by our generator are found when playing against the OPT agent, shown in Fig. 4 (OPT). We see that in all cases, from 5×5555\times 5 to 8×8888\times 8, our generator tends to design long narrow paths without any fork, which makes the optimal paths the longest. By contrast, the generator designs many forks to trap the DQN agent, shown in Fig. 4 (DQN), as the DQN agent runs a stochastic policy (ϵitalic-ϵ\epsilon-greedy).
|
| 76 |
+
|
| 77 |
+
In fact our generator could make use of the weakness from the agents to design the maps against them.Fig. 4 (DFS) shows the results that our generator designs extremely broad areas with only one entrance for the DFS agent to search exhaustively (visit every cell in the closed area twice). Fig. 4 (RHS) shows the Mazes generated to trouble the RHS agent the most by creating a highly symmetric Maze.
|
| 78 |
+
|
| 79 |
+
Next, Fig. 5 shows the snapshots of the results in different learning rounds.They all evolve differently, depending on the types of the agents. For the OPT agent, we find that our generator gradually links isolated walls to form a narrow but long path. For the DFS, our generator gradually encloses an area then broadens and sweeps it in order to best play against the policy that has the priority order of their travel directions. Fig. 5 (RHS) shows that our generator learns to adjust the wall into zigzag shapes to trouble the RHS agent. For the DQN agent, with limited network capacity or limited training time, it is usually the case that it cannot perfectly tell which road to go during the learning. As such, the generator tends to generate many forks to confuse the DQN agent.
|
| 80 |
+
|
| 81 |
+
Furthermore, Fig. 6 shows the process of training our generator against the four agents in 8×8888\times 8 map. We find that for OPT, DFS and RHS agents, the generator learns rapidly at first and gradually converges. But for the DQN agent, the learning curve is tortuous. This is because the ability of the DQN agent is gradually improved so it does not accurately and efficiently guide the learning of the generator. Also when the ability of the DQN agent improves greatly and suddenly, the learning curve for the generator may change its direction temporarily. Theoretically, training the DQN agent adequately in each iteration is a promising way towards to monotony and convergence.
|
| 82 |
+
|
| 83 |
+
In this paper, we presented an extension of standard reinforcement learning by considering that the environment is strategic and can be learned. We derived a gradient method by introducing a dual MDP-policy pair for continuous environment. To deal with discontinuous environment, we proposed a novel generative framework using reinforcement learning. We evaluated the effectiveness of our solution by considering designing a Maze game. The experiments showed that our methods can make use of the weaknesses of agents to learn the environment effectively.
|
| 84 |
+
|
| 85 |
+
In the future, we plan to apply the proposed methods to practical environment design tasks, such as video game design Hom and Marks (2007), shopping space design Penn (2005) and bots routine planning.
|
1707.01461v3.txt
ADDED
|
@@ -0,0 +1,378 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
While deep learning models achieve impressive accuracy in supervised learning tasks such as computer vision~\cite{Krizhevsky_imagenetclassification}, translation~\cite{WuGNMT16}, and speech recognition~\cite{Yu14ASR} training such models places significant demands on the amount of labeled data, computational resources, and manual efforts in tuning. Training is thus considered an infrequently performed resource-intensive batch process.
|
| 3 |
+
Many applications require trained models to quickly adapt to new examples and settings during deployment. Consider the online sequence prediction task that arises in applications such as text auto-completion, user trajectory prediction, or next-url prediction. Even when the prediction model has been trained on many sequences, next-token predictions on new sequences can benefit from true tokens observed online.
|
| 4 |
+
Another example is image recognition where a trained model should be able to recognize new objects not seen during batch training based on a few examples. This has led to a surge of interest in few-shot learning ~\cite{kaiser2017,SantoroBBWL16,VinyalsBLKW16,zemel17}. Few-shot learning is an artificially simplified setting where a small set of new labels define independent classification tasks. We consider the more useful but more difficult and less explored task where an existing image classifier has to be extended to handle new labels.
|
| 5 |
+
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
An established technique for model adaptation is to retune part or all of the model parameters using the domain-labeled data in a separate adaptation phase~\cite{daume2007}. More recently, deep meta-networks have been proposed that "learn to learn" such adaptation~\cite{Rei15,Finn2017ModelAgnosticMF,Huang2015MaximumAP,ravi17}. Parameter retuning methods typically require a one-time adaptation step, and operating them in online settings is slow.
|
| 12 |
+
Secondly with a pre-trained network the multiple gradient updates of meta-learning tend to destroy useful information learned by the PCN. This phenomenon is closely related to 'catastrophic forgetting' \cite{French99,KirkpatrickPRVD16}.
|
| 13 |
+
|
| 14 |
+
An alternative to parameter retuning is memorizing. In this approach neural networks are augmented with memory that can grow without correspondingly increasing the number of parameters to be trained. Many exciting uses have been found of such MANNs including program learning~\cite{GravesNTM}, question answering~\cite{Weston16,GulcehreCCB16}, learning rare events~\cite{kaiser2017}, and meta learning~\cite{SantoroBBWL16}. They hold promise for model adaptation because memory they can cut short the conventional path of iterative training to percolate new facts to model parameters.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
However, our initial attempts at using existing MANNs like NTMs~\cite{GravesNTM} and DNTMs~\cite{GulcehreCCB16} for online sequence prediction did not improve the baseline model. One major challenge is correctly balancing the roles of the memory and batch-trained model. On the one hand, we have a shared model trained over several instances, and on the other hand we have the few but more relevant instances encountered during testing. Recent MANNs designed for meta-learning~\cite{SantoroBBWL16} partition their roles by using the shared model to learn an embedding and the memory to implement a nearest neighbor like classifier. While this architecture works for few-shot learning where all labels are new, they cannot adapt classification models with softmax layers over a large shared label space.
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
\paragraph{Contributions}
|
| 22 |
+
In this paper we present a new MANN called Labeled Memory Network (LMN) that provides an easy, fast, and plug-and-play solution for adapting pre-trained models. We highlight three design decisions that made LMNs suitable for such adaptation.
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
First, we apply ideas from boosting~\cite{Schapire:1999adaboost} and treat memory as a second-stage classifier that is updated only when the current loss is non-zero. Existing MANNs write to memory during every pass. Even when the goal of the model is to use the memory to remember rare events \cite{kaiser2017}, the memory stores all events not just the rare ones. This causes a lot of memory to be wasted in storing non-rare vectors often displacing the rare ones.
|
| 29 |
+
|
| 30 |
+
Second, we propose a 'labeled memory' where the primary means of addressing a memory cell is by a class label. This is in contrast to all existing MANNs that use a controller to generate a hidden vector of the input as key. This simple, yet surprisingly unexplored alternative organization\footnote{Our method of using labels for addressing is very different from the discrete addressing mechanism proposed in \cite{GulcehreCCB16}. Even though both result in discrete addressing, in our case the key is the label whereas in \cite{GulcehreCCB16} the key continues to be computed from input $\vx$.} has two advantages: First, the controller is freed from the vaguely supervised task of generating keys that are distinctive and relevant leading to better memory use. Second, it safeguards against catastrophic forgetting of rare labels that current LRU based MANNs are subject to.
|
| 31 |
+
|
| 32 |
+
Third, we use the power of a RNN to adaptively define the roles of the memory and the neural network in a label dependent manner. This is unlike traditional boosting where the stage weights are fixed and derived based on simple functions of the error of each stage.
|
| 33 |
+
|
| 34 |
+
LMNs can be used for online adaptation in a variety of settings. We compare not only with existing MANNs but also state of the art meta-learning methods that retune parameters~\cite{Rei15,Finn2017ModelAgnosticMF}.
|
| 35 |
+
On online sequence prediction tasks spanning five applications like user trajectory predictions and next-click prediction, we show significant gains.
|
| 36 |
+
Second, we report higher accuracy in two different settings of the popular Omniglot image classification task. Finally, we present results from two popular language modeling benchmarks and report improvements over state of the art.
|
| 37 |
+
\section{Online Model Adaptation using Labeled Memory Networks (LMNs)}
|
| 38 |
+
\label{sec-online}
|
| 39 |
+
\paragraph{Problem Description}
|
| 40 |
+
Online model adaptation kicks in at the time of deploying a batch trained model. Our focus is classification models in this paper. During deployment the model sees inputs one at a time in sequence. At a time $t$ for the input $\vx_t$ we predict the label $\hat{y}_t$, after which the true output $y_t$ is revealed. The online model adapter decides how to improve the next input's $\vx_{t+1}$ prediction by combining the limited labeled data $\{(\vx_1,y_1),\ldots,(\vx_t,y_t)\}$ with the batch trained model. The adaptation has to be fast and performed synchronously at each step. We are agnostic about how the classifier is batch trained. However, we assume that the adapter can be trained using several such sequences representative of the deployment scenario.
|
| 41 |
+
Many problems such as user trajectory prediction, language modeling, and few-shot learning can be cast in such formulation.
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
We describe our method of online adaptation in two phases. We first explain how LMNs make predictions for an input $\vx_t$, and next how they adapt when the true label $y_t$ is revealed. LMNs comprise of three components: the primary classification network (PCN), the memory module, and a combiner network. Our architecture is depicted graphically in \ref{fig:lmn}. We describe each component of the architecture next.
|
| 46 |
+
\subsection{Primary Classification Network (PCN)}
|
| 47 |
+
This refers to the batch trained neural network that we seek to adapt.
|
| 48 |
+
The PCN may be stateful or stateless. For example, in applications like trajectory prediction the sequence of inputs are stateful, whereas in tasks like image classification the inputs are stateless.
|
| 49 |
+
Our only assumption is that the last layer of PCN transform each $\vx_t$ into a real vector $\vh_t \in R^d$ before feeding to a softmax layer to predict a distribution over the class labels.
|
| 50 |
+
We use $\vbeta_y \in R^d$ to denote the softmax parameter for class $y$, so the score $r_{ty}$ for predicting class $y$ for input $x_t$ is
|
| 51 |
+
\begin{equation}
|
| 52 |
+
\label{eq-pcn}
|
| 53 |
+
\begin{split}
|
| 54 |
+
r_{ty} = \frac{\exp(\vbeta_y \vh_t)}{\sum_{z}\exp(\vbeta_z \vh_t)} = \text{softmax}(\vbeta \vh_t)
|
| 55 |
+
\end{split}
|
| 56 |
+
\end{equation}
|
| 57 |
+
\subsection{Memory}
|
| 58 |
+
The memory consists of $N$ cells. Each cell $m$ is a 3-tuple with:
|
| 59 |
+
$\ell_m$ denoting the label of cell $m$,
|
| 60 |
+
$\vM_m$ denoting the hidden vector stored in $m$,
|
| 61 |
+
$\util_m$ denoting a weight attached to the cell. This storage format is similar to what is used in existing MANNs. But the way in which we read, use, and update the memory is very different. In existing MANNs memory is viewed as a part of the main network. Memory values are read based on matching a key with the stored vector $\vM_m$ and the read values are processed by the main network to produce the output. In contrast we view memory as a learner, specifically an online learner that is only loosely integrated with the PCN. We describe here our alternative design.
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
We index the memory with the class label $\ell_m$ so that given a label $y$, we can enumerate all cells with label $y$. The memory provides a score over each class label $y$ for an input $\vx_t$.
|
| 65 |
+
We use the PCN last layer output $\vh_t$ as an embedding of $\vx_t$ on the basis of which we can compute the kernel between $\vh_t$ and a memory vector as $K(\vh_t,\vM_m) = \exp(\lambda ~\text{cosine}(\vh_t,\vM_m))$.
|
| 66 |
+
Given $\vh_t$ and $y$ we read a vector $M_{ty}$ along with a scalar weight $\alpha_{ty}$ calculated as
|
| 67 |
+
\begin{equation}
|
| 68 |
+
\label{eq-mem-read}
|
| 69 |
+
\begin{split}
|
| 70 |
+
M_{ty},\alpha_{ty} = \sum_{m:\ell_m = y} w_{tm}\{\vM_m,\util_m\} \\
|
| 71 |
+
w_{tm} = \frac{K(\vh_t,\vM_m)}{\sum_{m': \ell_{m'} = y} K(\vh_t,\vM_{m'}) }
|
| 72 |
+
\end{split}
|
| 73 |
+
\end{equation}
|
| 74 |
+
This method of reading is very similar to soft addressing used in most memory models. But the key difference is that we take average only over cells with label $y$, and not all cells.
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
This label specific vector $M_{ty}$ read from memory is used to get a score for a class $y$ as:
|
| 78 |
+
\begin{equation}
|
| 79 |
+
\label{eq-mem-score}
|
| 80 |
+
\lmm_{ty} = \frac{\alpha_{ty}^\delta K(\vh_t, M_{ty})}{ \sum_{y'} \alpha_{ty'}^\delta K(\vh_t, M_{ty'})}
|
| 81 |
+
\end{equation}
|
| 82 |
+
where $\delta$ is a strength parameter. The memory can thus be viewed as a kernel classifier with $\alpha_{ty}$ denoting the weight of the kernel.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
When memory is large, the time to compute memory scores could be a concern but it is easy to get fast approximate scores using a similarity index~\cite{Guo16,kaiser2017}, and approximate nearest neighbor search has been used for large scale memories \cite{RaeHHDSWGL16,chandarSHPGY16}.
|
| 86 |
+
\subsection{Combining memory and PCN}
|
| 87 |
+
The final score for a label $y$ is computed by combining pcn-scores $r_{ty}$ and memory scores $\lmm_{ty}$ with an interpolation parameter $\theta$.
|
| 88 |
+
We made $\theta$ a dynamic variable, because we expect the relative importance of memory and PCN to evolve as more labeled data becomes available online. Following Adaboost ~\cite{Schapire:1999adaboost}, one way to choose $\theta$ as a function of the two classifier stages. However we obtained better results by using a RNN to determine $\theta$ as a function of label and time as well. The RNN works on a label dependent state and at each step takes three sets of input. First is the input embedding $\vh_t$, second are binary indicators $e^m_{t-1}, e^{pcn}_{t-1}$ which indicate whether the memory and PCN had error at the previous output, and the third set are label probabilities predicted by the memory and PCN. The RNN acts at each step on the state to produce label dependent outputs, from which the relative weights of memory and PCN are obtained via a sigmoid layer.
|
| 89 |
+
|
| 90 |
+
\begin{equation}
|
| 91 |
+
\label{eq-comb}
|
| 92 |
+
\begin{split}
|
| 93 |
+
\theta_{ty}& = \sigma(W_\theta \mu_{ty} + b_\theta) \\
|
| 94 |
+
\mu_{ty} &= \text{RNN}(\mu_{t-1,y}, \{\vh_t, e^{pcn}_{t-1}, e^m_{t-1}, r_{t-1,y}, \lmm_{t-1,y}\}) \\
|
| 95 |
+
\end{split}
|
| 96 |
+
\end{equation}
|
| 97 |
+
|
| 98 |
+
The final predicted distribution over the labels for an input $\vx_t$ is
|
| 99 |
+
\begin{equation}
|
| 100 |
+
\label{eq:overall}
|
| 101 |
+
P_t(y|\vx_t) \propto (1-\theta_{ty})r_{ty} + \theta_{ty} \lmm_{ty}
|
| 102 |
+
\end{equation}
|
| 103 |
+
|
| 104 |
+
\paragraph{Training the combiner network} The combiner parameters are trained to minimize the loss on $P_t(y|\vx)$ over a labeled sequence of instances that are representative of the deployment setting.
|
| 105 |
+
We take a pre-trained PCN and augment it with the memory and combiner modules. This new network is then trained in the online setting, by providing it data in a sequential manner.
|
| 106 |
+
|
| 107 |
+
An advantage of this architecture is that memory and PCN are loosely coupled, allowing the modules to be plugged in over existing models and can mix at varying levels depending on the amount of per-domain data. We show in the experimental section that even with $\theta_{ty}$ fixed to a single hyper parameter (over all $t,y$), LMNs are competitive with state of the art model adaptation methods.
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
\begin{figure*}
|
| 111 |
+
\begin{subfigure}[b]{0.5\textwidth}
|
| 112 |
+
\begin{center}
|
| 113 |
+
\includegraphics[width=0.9\hsize]{lmn.pdf}
|
| 114 |
+
\caption{LMN}
|
| 115 |
+
\label{fig:lmn}
|
| 116 |
+
\end{center}
|
| 117 |
+
\end{subfigure}
|
| 118 |
+
\rulesep
|
| 119 |
+
\begin{subfigure}[b]{0.5\textwidth}
|
| 120 |
+
\begin{center}
|
| 121 |
+
\includegraphics[width=0.9\hsize]{mem_net.pdf}
|
| 122 |
+
\caption{Memory network}
|
| 123 |
+
\label{fig:mem_net}
|
| 124 |
+
\end{center}
|
| 125 |
+
\end{subfigure}
|
| 126 |
+
\caption{Comparing Memory Networks and LMN}
|
| 127 |
+
\label{fig:net_comparison}
|
| 128 |
+
\end{figure*}
|
| 129 |
+
\subsection{Adapting to true label $y_t$}
|
| 130 |
+
When the true label of $\vx_t$ is revealed we take two steps: update the state of the combiner RNN as discussed in Equation~\ref{eq-comb}, and write to memory if needed. We describe our method for memory updates next.
|
| 131 |
+
|
| 132 |
+
The memory is partitioned across labels, and each memory cell is a tuple of label, content and $\alpha$. %
|
| 133 |
+
The way in which we update our memory is consistent with the role that memory serves of being a second classification stage that is updated online. We next discuss the three parts of our memory write strategy: when to write, how to write, what to replace and why. The overall algorithm is depicted in Figure~\ref{alg-write}.
|
| 134 |
+
\paragraph{When to write}
|
| 135 |
+
Like in online learners, we update memory only when the margin of separation between the scores of true and closest incorrect label is small. Specifically we update only if $\log P_t(y_t|\vx_t) - \max_{y \ne y_t} \log (y | \vx_t)$ is less than a margin threshold. For example, instances that are confidently classified by the PCN may never be fed to the memory.
|
| 136 |
+
In contrast, existing MANNs write to memory for every instance and are prone to fill up the memory on cases that can be accurately handled by PCN.
|
| 137 |
+
\paragraph{What to write}
|
| 138 |
+
Consider the content $\vM_m$ and weight $\alpha_m$ associated with
|
| 139 |
+
each memory cell $m$ at time $t$. We update the content of cells with label $y_t$ using $\vM_{m} = \vM_{m} + w_{tm}{\vh_t}$ where $w_{tm}$ is the fractional similarity of $\vh_t$ to contents of cell $m$ (Equation~\ref{eq-mem-read}). The weight $\alpha_m$ of the cell is incremented by the fractional similarity $w_{tm}$ to $\vh_t$ after decaying old weights.
|
| 140 |
+
Further, if the prediction is incorrect we attempt to create a new cell in memory by replacing an existing cell.
|
| 141 |
+
\paragraph{What cell to replace} We replace the cell with the smallest weight among all cells with the same label as $y_t$. %
|
| 142 |
+
Since we update $\alpha_m$ based on its fractional similarity to instances that had non-zero loss, this method essentially replaces the cell that is least useful for defining the classification task. Unlike existing MANNs that replace a cell least recently used across all labels, we replace only among cells with label $y_t$. A pure LRU based replacement could easily lead to forgetting of rare classes. Our method of replacement enables us to implement a fairer classifier atop the memory.
|
| 143 |
+
|
| 144 |
+
\begin{figure}
|
| 145 |
+
\begin{center}
|
| 146 |
+
\begin{algorithmic}
|
| 147 |
+
\STATE{\bf Input:} $y_t, P_t(y|\vx_t), \vh_t, M_t = \{(\ell_m, \vh_m, \alpha_m)\}$
|
| 148 |
+
\STATE $\hat{y} = \argmax_y P_t(y|\vx_t)$
|
| 149 |
+
\STATE $\tilde{y} = \argmax_{y \neq y_t} P_t(y|\vx_t)$
|
| 150 |
+
\STATE $\loss_t = - \min(0, \log P_t(y_t|\vx_t) - \log P_t(\tilde{y}|\vx_t) - \text{margin} )$
|
| 151 |
+
\STATE If $\loss_t=0$, no update. Return.
|
| 152 |
+
\STATE New cell $C$: $(\ell_{y_t}, \vh_t, 1)$
|
| 153 |
+
\STATE $j = \argmin_{m:\ell_m = y_t} \alpha_m$
|
| 154 |
+
\STATE $\vw_t = \text{softmax}\{\text{Cosine}(\vh_t^T \vM_m) :\ell_m = y_t\}$
|
| 155 |
+
\STATE $\vM_{m} = \vM_{m} + w_{tm}{\vh_t}~~~~\forall m: \ell_m = y_t$
|
| 156 |
+
\STATE $\alpha_{m} = \alpha_m*\text{decay} + w_{tm}~~~~\forall m: \ell_m = y_t$
|
| 157 |
+
\IF{$y_t \ne \hat{y}$ and $|m:\ell_m=y_t| > 1$}
|
| 158 |
+
|
| 159 |
+
\STATE Replace cell $j$ with new cell $C$.
|
| 160 |
+
\ENDIF
|
| 161 |
+
\end{algorithmic}
|
| 162 |
+
\caption{\label{alg-write}Memory updates in Labeled memory network. In our experiments we used a decay value of 0.99. The margin is a hyper-parameter.}
|
| 163 |
+
\end{center}
|
| 164 |
+
\end{figure}
|
| 165 |
+
|
| 166 |
+
Our memory updates are analogous to gradient updates in an online SVM learner. However we operate in a limited memory setting and merge and delete support vectors similar to budgeted-PEGASOS \cite{WangCV10}. If memory vectors are considered as SVM parameters, then the gradient w.r.t these parameters of the objective is precisely the current vector $\bf{h}$. In an online SVM learner when the loss is non-zero, the input element is added to the set of support vectors. Similarly in LMN, when margin loss is non-zero, the current vector $\bf{h}$ is added to the memory. The contribution of this specific memory update for the memory scores in subsequent steps will then be proportional to $\alpha_{ty}^\delta K(\vh_t, \bf{h})$. This acts as an online-SVM learner in the dual form, where the $\bf{h}$ are the support vectors, and $\alpha$ act as the associated dual variables.
|
| 167 |
+
\section{Related Work}
|
| 168 |
+
\paragraph{Memory in neural networks}
|
| 169 |
+
The earliest example of the use of memory in neural networks is attention~\shortcite{BahdanauCB14}.
|
| 170 |
+
Attention as memory is slow for long histories, leading to the development of several more flexible memory-based architectures~\cite{Weston16}.
|
| 171 |
+
Neural Turing Machines (NTMs)~\cite{GravesNTM} were developed for end-to-end learning of algorithmic tasks. One such task where NTMs were shown to work was learning N-gram distribution from token sequences. Since this is related to online sequence prediction, our first model was based on NTMs. However, on our real datasets we found NTMs to not be very effective. The reasons perhaps is the controller's difficulty with adaptively generating keys and values for memory operations. Dynamic-NTMs (DNTMs)~\cite{GulcehreCCB16} alleviate this via fixed trainable keys, and are shown to aid QA tasks but they did not work either as we will show in our experimental section.
|
| 172 |
+
Like LMNs, DNTMs also propose discrete memory addressing but the keys are trained from input $\vx_t$ unlike in LMNs where the discrete key is class label that requires no training.
|
| 173 |
+
Another difference with LMNs is that the memory is very tightly integrated with the neural network and requires joint training.
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
\paragraph{MANNs for classification}
|
| 178 |
+
More recent MANNs designed for classification employ a looser coupling~\cite{kaiser2017,SantoroBBWL16} and store hidden vectors and discrete labels as memory contents as in LMNs.
|
| 179 |
+
However, they differ in how the memory is addressed, updated, and used (shown graphically in Figure \ref{fig:net_comparison}).
|
| 180 |
+
First, LMNs treat memory as an on-line learner and update memory only when loss is non zero unlike all previous MANNs that update the memory for every step. This allows memory to be used more effectively to store instances when PCN is weak.
|
| 181 |
+
Second, in MANNs memory reads are fed back into the main model for getting a prediction. Instead, in LMNs memory reads are loosely combined with the PCN scores allowing us to use memory for plug-and-play adaptation of a trained model. Finally, most MANNs use a global LRU replacement strategy whereas we replace only within in a label based on importance. This reduces the bias against rare classes present in LRU policies.
|
| 182 |
+
|
| 183 |
+
|
| 184 |
+
|
| 185 |
+
|
| 186 |
+
\paragraph{Model Adaptation by parameter re-learning}
|
| 187 |
+
Another way to adapt is by training or tuning parameters. The methods of \cite{Rei15} and \cite{Huang2015MaximumAP} train only a subset of parameters that are local to each sequence. More recently,\cite{Finn2017ModelAgnosticMF} and \cite{ravi17} propose meta-learners that "learn to learn" via
|
| 188 |
+
the loss gradient. In general, however such model retraining techniques are resource-intensive. In our empirical evaluation we found these methods to be slower and less accurate than LMNs.
|
| 189 |
+
|
| 190 |
+
\paragraph{Online Learning} Online learning techniques such as \cite{shalevshwartz:icml07} for learning kernel coefficients is relevant if we view the memory vectors $ \vh_m$ acting as the support vectors and the memory scalars $\alpha_m$ as the associated dual variables. Our setup is a little different in that we employ a mix of batch and online learning. Our proposed scheme of memory updates and merge was inspired by the gradient updates in PEGASOS, and in the case of exactly one cell per label reduces to a specific form of budgeted-PEGASOS\cite{WangCV10}.
|
| 191 |
+
\section{Experiments}
|
| 192 |
+
We next present empirical comparison of LMNs with recent MANN based meta-learners and state of the art parameter re-learning based adaptive models. We experiment \footnote{code to be available on https://github.com/sshivs/LMN} on three different supervised learning tasks that require online model adaptation: sequence prediction on five datasets spanning applications like user trajectory prediction and next click prediction, image classification under online addition of new image labels, and language modeling.
|
| 193 |
+
\subsection{Online sequence prediction}
|
| 194 |
+
\label{sec-expt-online}
|
| 195 |
+
In this task the data consists of a sequence of discrete tokens $x_1,\ldots,x_n$ and the label $y_t$ to be predicted at time $t$ is just the next token $x_{t+1}$. The inputs are stateful and therefore the PCN has to be a RNN.
|
| 196 |
+
We collected five such datasets from different real-life applications. In Table~\ref{sequence-data} we summarize the average length of each sequence, number of tokens, and the number of sequences in the training and test set.
|
| 197 |
+
\begin{itemize}
|
| 198 |
+
\item
|
| 199 |
+
FSQNYC and FSQTokyo are Location Based Social Network data collected by ~\cite{yang2014} from FourSquare of user check-in at various venues over an year.
|
| 200 |
+
|
| 201 |
+
\item Brightkite \cite{ChoMyLes11} is a user check-in dataset made available as part of Stanford Network Analysis Project~\cite{snapnets}.
|
| 202 |
+
|
| 203 |
+
\item
|
| 204 |
+
Geolife \cite{geolife09} is the trajectory data of people collected over multiple days, and provides the GPS coordinates of people tracked at almost a minute interval. We discretize the locations with a resolution of 100 meters and limit to the densest subset around the city.
|
| 205 |
+
\item
|
| 206 |
+
The Yoochoose dataset \cite{Ben-Shimon:2015:RCY:2792838.2798723} is the click event sessions for a major European e-tailer collected over six months.
|
| 207 |
+
|
| 208 |
+
\end{itemize}
|
| 209 |
+
|
| 210 |
+
\begin{table}
|
| 211 |
+
\begin{center}
|
| 212 |
+
\begin{tabular}{|l|r|r|r|r|} \hline
|
| 213 |
+
Name & No. of train & No of test & Avg seq. & \# Tokens \\
|
| 214 |
+
& sequences & sequences & length & or labels \\ \hline
|
| 215 |
+
Brightkite & 1800 & 521 & 238 & 22811 \\
|
| 216 |
+
FSQNYC & 670 & 264 & 90 & 8325 \\
|
| 217 |
+
FSQTokyo & 1555 & 672 & 160 & 12589 \\
|
| 218 |
+
Geolife & 220 & 20 & 8000 & 31273\\
|
| 219 |
+
Yoochoose & 450523 & 112279 & 13 & 39481\\ \hline
|
| 220 |
+
\end{tabular}
|
| 221 |
+
\end{center}
|
| 222 |
+
\caption{\label{sequence-data} Statistics of data used for on-line sequence learning}
|
| 223 |
+
\end{table}
|
| 224 |
+
\paragraph*{Experimental setups}
|
| 225 |
+
In all experiments we used the Adam optimizer~\cite{KingmaB14}. The PCN is a GRU and the input is the embedding of the true observed token $y_{t-1}$ at the previous time.
|
| 226 |
+
The number of memory cells is equal to the number of labels.
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
\paragraph*{Methods compared}
|
| 231 |
+
|
| 232 |
+
We evaluate these tasks on six different methods.
|
| 233 |
+
\begin{itemize}
|
| 234 |
+
\item
|
| 235 |
+
As a baseline we train a larger LSTM \cite{Hochreiter97lstm} which has roughly 5 times more RNN parameters compared to the PCN used in LMN. This lets us evaluate if a larger LSTM state could substitute for memory.
|
| 236 |
+
\item
|
| 237 |
+
Next we choose two recent approaches from the family of meta-learners that re-tune model parameters: the method of \cite{Rei15} since it was specifically proposed for sequence prediction and the more recent but generic method MAML of \cite{Finn2017ModelAgnosticMF}. Both these models used an LSTM of size 50 as the base learner. After each true label is encountered these models compute gradient of the loss with respect to the adapting parameters, and apply those updates, before processing the next input.
|
| 238 |
+
|
| 239 |
+
\item
|
| 240 |
+
As a representative of MANNs, we implemented a version of D-NTM \cite{GulcehreCCB16} where we made two changes to adapt to the on-line prediction task. First, we use the previous read address as the new write address, and second we derive the new content from read memory content and $y_{t-1}$. We tried several other tweaks, including the unchanged D-NTM and obtained best results with these changes.
|
| 241 |
+
|
| 242 |
+
\item We compare these with LMN. To illustrate the importance of adaptively reweighting the PCN and memory scores as per Equation~\ref{eq-comb}, we also tried another model called LMN-fixed. In LMN-fixed $\theta_{ty}$ is fixed for all $t$ and $y$ and is determined by batched hyper-parameter optimization.
|
| 243 |
+
\end{itemize}
|
| 244 |
+
|
| 245 |
+
\begin{table*}[!htb]
|
| 246 |
+
\begin{center}
|
| 247 |
+
\begin{tabular}{|l|r|r|r|r|r|r|r|} \hline
|
| 248 |
+
& Baseline & \multicolumn{2}{|c|}{Parameter-retune} & \multicolumn{3}{|c|}{Memory-based} \\ \hline
|
| 249 |
+
Name & LSTM & Rei & MAML & DNTM & LMN-fixed & LMN \\ \hline
|
| 250 |
+
Brightkite & 10.7 (0.11) & 10.01 (0.18) & 4.27 (0.47) & 9.63 (0.13)& 3.88 (0.51) & \textbf{3.57 (0.55)}\\
|
| 251 |
+
FSQNYC & 8.95 (0.03) & 8.72 (0.07) & 6.55 (0.16) & 9.01 (0.05)& 6.13 (0.25) &\textbf{5.54 (0.27)}\\
|
| 252 |
+
FSQTokyo & 8.14 (0.08) & 6.95 (0.13)& 5.68 (0.23) & 7.25 (0.11) & 5.40 (0.26) & \textbf{5.32 (0.28)} \\
|
| 253 |
+
Geolife &1.13 \textbf{(0.84)} & 1.08 (0.83)& - & 1.11 (0.82) & \textbf{1.05 } (0.83) &1.08 (0.83) \\
|
| 254 |
+
Yoochoose & 5.01 (0.24) & 5.05 (0.23)& - & 5.01 (0.23) & 5.01 (0.24) &\textbf{4.96 (0.25)}\\ \hline
|
| 255 |
+
\end{tabular}
|
| 256 |
+
\end{center}
|
| 257 |
+
\caption{\label{sequence-results} Log Perplexity and MRR(in parantheses) on online sequence prediction tasks}
|
| 258 |
+
|
| 259 |
+
\end{table*}
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
\begin{table*}[!htb]
|
| 263 |
+
\begin{center}
|
| 264 |
+
\begin{tabular}{|l|r|r|r|r|r|r|r|} \hline
|
| 265 |
+
|
| 266 |
+
\end{tabular}
|
| 267 |
+
\end{center}
|
| 268 |
+
\end{table*}
|
| 269 |
+
{ \bf Results}
|
| 270 |
+
In Table \ref{sequence-results} we report the log-perplexity and mean reciprocal rank (MRR) of all six methods on the five datasets. We make the following observations from these.
|
| 271 |
+
\begin{enumerate}
|
| 272 |
+
\item LMN-based online model adaptation significantly boosts accuracy over a baseline LSTM with five times larger state-space.
|
| 273 |
+
The datasets vary significantly in their baseline and LMN accuracies. FSQNYC, FSQTokyo and Brightkite datasets have MRR increasing by 100 and 400\%. For Yoochoose improvements are smallest because most sequences are very short (13 on average). In Geolife the sequences are much larger but the baseline MRR (0.84) is already high indicating a saturation point.
|
| 274 |
+
\item The improved accuracy of LMN over LMN-fixed illustrates the importance of online reweighting of PCN and memory. We observe improvements over baseline on almost all datasets, even on Yoochoose where none of the other methods did. However, LMN-fixed is better than parameter retuning and DNTMs establishing that even without training the combiner, LMNs can be used as plug-and-play model adapters.
|
| 275 |
+
\item Meta learners that retune parameters for adaptation are indeed effective compared to the baseline. The Rei method that retunes only a designated 'sequence-vector' parameter is less effective than the MAML that retunes all parameters. Yet, our proposed LMN, (or its simpler LMN-fixed variant) provides an even greater boost. For example, for Brightkite the MRR increases from 0.11 to 0.18 with Rei, to 0.47 with MAML, and to 0.51 with LMN-fixed and 0.55 with LMN.
|
| 276 |
+
A major shortcoming of MAML is that training the meta-learner is very slow. We were not able to complete the training of MAML on our two largest datasets Geolife and Yoochoose within a reasonable time. In contrast, LMNs are significantly faster as they do minimal re-training.
|
| 277 |
+
DNTM, another MANN-based approach is not as effective as even LMN-fixed and we believe it is mainly because of the differences in their respective memory organization.
|
| 278 |
+
\end{enumerate}
|
| 279 |
+
These experiments establish that a well-designed MANN is a practical option for accurate and efficient online adaptation for next-token prediction tasks.
|
| 280 |
+
\subsection{Online Adaptation of Image Classifiers}
|
| 281 |
+
\label{sec-expt-rare}
|
| 282 |
+
We next demonstrate online adaptation of an image classifier to new labels observed during testing. Unlike existing work in few-shot learning~\cite{VinyalsBLKW16} where each test sequence has its own independent prediction space, we consider the more useful and challenging task where new labels co-exist with labels seen in the batch-trained PCN.
|
| 283 |
+
|
| 284 |
+
\paragraph*{Dataset and setup} We use the popular omniglot dataset~\cite{Lake1332}. The base data-set consisted of 1623 hand-drawn characters selected from 50 different alphabets. \cite{VinyalsBLKW16} extended the base data-set by various rotations of the images, and this increases the number of categories to 4515.
|
| 285 |
+
We create an online variant of this dataset as follows. We arbitrarily select 100 classes as unseen and 250 as seen classes. During training only seen classes are provided, but the test data has a uniform mix of all classes. Each test sequence is obtained by first randomly selecting 5 labels from the 350, and then choosing different input images from the selected labels up to a length of 10.
|
| 286 |
+
Thus, in each sequence we expect to encounter $\frac{10}{7}$ new labels on average. Accuracy is measured only over second occurrence of each of the five labels much like in one-shot learning experiments. The one major difference is that in our case the prediction space is all the seen labels and the expected new labels, whereas in few-shot learning the prediction space is only the 5 labels chosen for that test sequence. The results are averaged over 100 sequences.
|
| 287 |
+
|
| 288 |
+
\paragraph{Methods compared} We compare results of LMN with MAML~\cite{Finn2017ModelAgnosticMF} the most recent meta-learner that can work in this setup. We do not compare with the two recent MANNs~\shortcite{kaiser2017,SantoroBBWL16} that report Omniglot results on few-shot learning because their techniques do not easily extend to the case where new labels share label space with a pre-trained classifier. For reference we also report accuracy on the baseline classifier that will certainly mis-classify examples from the new class. We use as PCN a convolutional network, with the same configuration as used in ~\shortcite{kaiser2017}.
|
| 289 |
+
|
| 290 |
+
.
|
| 291 |
+
\begin{table}[!htb]
|
| 292 |
+
\centering
|
| 293 |
+
\begin{tabular}{|l|r|r|r|} \hline
|
| 294 |
+
Model & Overall & New labels & Seen labels \\ \hline
|
| 295 |
+
Baseline & 45\% & 0 & 63\% \\
|
| 296 |
+
MAML & 56\% & 49\% & 59\%\\
|
| 297 |
+
LMN & {\bf 86\%} & {\bf 71\%} & {\bf 92\%} \\ \hline
|
| 298 |
+
\end{tabular}
|
| 299 |
+
\caption{\label{tab-unk}Accuracy on Online adaptation for Omniglot}
|
| 300 |
+
\end{table}
|
| 301 |
+
\paragraph{Results}
|
| 302 |
+
In Table~\ref{tab-unk} we report our results. The baseline that does no adaptation achieves an overall accuracy of 45\% while obtaining an expected accuracy of 0\% on the new labels and $63\%$ on the seen labels. MAML boosts the overall accuracy to 56\%, while obtaining an accuracy of 49\% on the new labels. However, compared to the baseline the accuracy on seen labels has dropped. This is similar to catastrophic forgetting \shortcite{French99} and may be because during meta-learning updates the weights of the shared representation layer deteriorate.
|
| 303 |
+
The LMN architecture is better able to absorb new labels and changing priors of existing labels. LMN achieves an overall accuracy of 86\% with 71\% on new labels. The accuracy increases for the seen labels as well because LMN is able to use the memory for storing prototypes of examples with non-zero loss even from seen labels. Thereafter, the combiner RNN can pay more heed to the labels seen during the adaptation phase.
|
| 304 |
+
\subsubsection{Plain few-shot learning}
|
| 305 |
+
To enable comparison with the few-shot results of many recent published work, we also report results of LMN on this task.
|
| 306 |
+
In few-shot learning, the PCN only generates the input embedding $\vh_t$ and does not assign label scores since each test sequence has its own label space. The memory uses the embedding to assign label scores via Equation~\ref{eq-mem-score} based on which prediction is made without involving any combiner either.
|
| 307 |
+
These experiments will compare LMN's memory organization and update strategies with state-of-the-art MANNs that have reported results on few shot learning~\cite{kaiser2017}.
|
| 308 |
+
|
| 309 |
+
Our setup is the same as in recent published work ~\shortcite{VinyalsBLKW16} on few-shot learning but where the total label space has 4K possibilities labels. This is more interesting and realistic than 5-way classification where many recent methods, including ours, report more than 98\% accuracy with just 1-shot.
|
| 310 |
+
|
| 311 |
+
We present results with changing memory size. We run the experiments with a memory size equal to T-cell per label (T=2,3..). We observe that LMN accuracy is much higher than existing MANNs particularly when memory is limited. For example, at 2-cells per label (roughly 8K memory size) we obtain more than 4\% higher accuracy in 1-shot, 2-shot, and 3-shot learning. This proves the superior use of memory achieved via our labeled memory organization
|
| 312 |
+
|
| 313 |
+
For reference we also compare with parameter retuning-based approach (MAML)~\shortcite{Finn2017ModelAgnosticMF}. Even though this work reports state-of-art accuracy on 5-way few-shot learning, for 4k way few-shot learning it is not as effective. A softmax layer that has to arbitrate among 4k new classes perhaps need lot more gradient updates than learnable by meta-learners.
|
| 314 |
+
|
| 315 |
+
|
| 316 |
+
\begin{table}[!htb]
|
| 317 |
+
\begin{center}
|
| 318 |
+
\begin{tabular}{|l|r|r|r|} \hline
|
| 319 |
+
Name & 1 shot & 2 shot & 3 shot \\ \hline
|
| 320 |
+
Kaiser (2-cell/label) & 48.2\% & 58.0\% & 60.3\% \\
|
| 321 |
+
Our model (2-cell/label) & \textbf{52.6\%} & \textbf{62.5\%} & \textbf{64.1\%} \\ \hline
|
| 322 |
+
Kaiser (3-cell/label) & 49.7\% & 60.1\% & 63.8\% \\
|
| 323 |
+
Our model (3-cell/label) & \textbf{52.8\%} & \textbf{63.0\%} & \textbf{67.0\%} \\ \hline
|
| 324 |
+
Kaiser (5-cell/label) & 52.7\% & 63.0\% & 66.3\% \\
|
| 325 |
+
Our model (5-cell/label) & \textbf{54.3\%} & \textbf{63.2\%} & \textbf{66.9\%} \\ \hline
|
| 326 |
+
MAML & 44.2\% & 46.5\% & 47.3\% \\ \hline
|
| 327 |
+
\end{tabular}
|
| 328 |
+
\end{center}
|
| 329 |
+
\caption{\label{fewshot-results1} Test accuracies for 4k way few shot learning}
|
| 330 |
+
|
| 331 |
+
\end{table}
|
| 332 |
+
\subsection{Language Modeling}
|
| 333 |
+
Language modeling is the task of learning the probability distribution of words over texts. When framed as modeling the probability distribution of words conditioning on previous text, this is just another online sequence prediction task. The natural dependence on history in this task provides for another use-case of memory. Memory based models have been shown to get improvements over standard RNN based language models ~\cite{SukhbaatarSWF15,merity2016pointer,grave2016improving}.
|
| 334 |
+
In the same spirit, we apply LMNs to this task by taking the PCN as a RNN.
|
| 335 |
+
|
| 336 |
+
We compare our model directly with the recently published neural cache model of ~\cite{grave2016improving} and pointer LSTM of ~\cite{merity2016pointer}. These showcase variant uses of memory to improve the prediction of words that repeat in long text. The baseline model (and PCN) is an LSTM with same parameters as in \cite{grave2016improving}.
|
| 337 |
+
We compared on common language datasets Wikitext2 and Text8 with memory sizes 100 and 2000 as used in the previously published work. We used standard SGD as the optimizer.
|
| 338 |
+
|
| 339 |
+
In Table~\ref{tab-lm} we report the perplexities we obtained with LMN along with the results reported in published work for other three approaches. As the table demonstrates we achieve state of the art results in Text8 and Wikitext2. In LMN the auto-modulation caused by considering only cases where the PCN is weak is superior to memory cache. This shows up in tests when memory is constrained, when the focus on mis-predicted outputs in LMN allows for boosted recall, efficient memory utilization, and capturing longer contexts, compared to other models.
|
| 340 |
+
|
| 341 |
+
\begin{table}
|
| 342 |
+
\begin{center}
|
| 343 |
+
\begin{tabular}{|l|r|r|} \hline
|
| 344 |
+
Name & Wikitext2 (100 ) & Text8 (2000)\\ \hline
|
| 345 |
+
LSTM & 99.7 & 120.9 \\
|
| 346 |
+
Pointer LSTM & 80.8 & -\\
|
| 347 |
+
Neural cache & 81.6 & 99.9\\
|
| 348 |
+
LMN & \textbf{77.6} & \textbf{91.1}\\ \hline
|
| 349 |
+
\end{tabular}
|
| 350 |
+
\end{center}
|
| 351 |
+
\caption{ \label{tab-lm} Test perplexity for language modeling on Wikitext and Text8 with memory 100 and 2000 respectively.}
|
| 352 |
+
\end{table}
|
| 353 |
+
\section{Conclusion}
|
| 354 |
+
We extended standard memory models with a label addressable memory module and an adaptive weighting mechanism for on-line model adaptation.
|
| 355 |
+
LMNs mix limited data with pre-trained models by combining ideas from boosting and online kernel learning while tapping deep networks to learn representations and RNNs to model the evolving roles of memory and pre-trained models.
|
| 356 |
+
LMNs have some similarities to recent MANNs but has significant differences.
|
| 357 |
+
First, we have a label addressable memory instead of content based addressing. Second, we use memory to only store content on which primary network is weak.
|
| 358 |
+
Third, our model has a loose coupling between memory and network, and hence our model can be used to augment pre-trained models at a very low cost.
|
| 359 |
+
Fourth we use an adaptive reweighing mechanism to modulate the contribution of memory and PCN.
|
| 360 |
+
This LMN is demonstrated to be extremely successful on a variety of challenging classification tasks which required fast adaptation to input and handling non-local dependencies.
|
| 361 |
+
An interesting extension of LMNs is organizing the memory not just based on discrete labels but on learned multi-variate embeddings of labels
|
| 362 |
+
thereby paving the way for greater sharing among labels.
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
\paragraph{Acknowledgements}
|
| 366 |
+
We gratefully acknowledge the support of NVIDIA Corporation with the donation of the Titan X Pascal GPU used for this research.
|
| 367 |
+
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
|
| 373 |
+
|
| 374 |
+
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
\bibliographystyle{aaai}
|
| 378 |
+
\bibliography{neural-memory.bib}
|
1707.01476v6.txt
ADDED
|
@@ -0,0 +1,525 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Knowledge graphs are graph-structured knowledge bases, where facts are represented in the form of relationships (edges) between entities (nodes).
|
| 3 |
+
They have important applications in search, analytics, recommendation, and data integration -- however, they tend to suffer from incompleteness, that is, missing links in the graph.
|
| 4 |
+
For example, in Freebase and DBpedia more than 66\% of the person entries are missing a birthplace~\citep{DBLP:conf/kdd/0001GHHLMSSZ14,DBLP:conf/semweb/KrompassBT15}.
|
| 5 |
+
Identifying such missing links is referred to as \emph{link prediction}.
|
| 6 |
+
Knowledge graphs can contain millions of facts; as a consequence, link predictors should scale in a manageable way with respect to both the number of parameters and computational costs to be applicable in real-world scenarios.
|
| 7 |
+
|
| 8 |
+
For solving such scaling problems, link prediction models are often composed of simple operations, like inner products and matrix multiplications over an embedding space, and use a limited number of parameters~\citep{nickel2016review}.
|
| 9 |
+
DistMult~\citep{yang15:embedding} is such a model, characterised by three-way interactions between embedding parameters, which produce one feature per parameter.
|
| 10 |
+
Using such simple, fast, shallow models allows one to scale to large knowledge graphs, at the cost of learning less expressive features.
|
| 11 |
+
|
| 12 |
+
The only way to increase the number of features in shallow models -- and thus their expressiveness -- is to increase the embedding size.
|
| 13 |
+
However, doing so does not scale to larger knowledge graphs, since the total number of embedding parameters is proportional to the the number of entities and relations in the graph.
|
| 14 |
+
For example, a shallow model like DistMult with an embedding size of 200, applied to Freebase, will need 33~GB of memory for its parameters.
|
| 15 |
+
To increase the number of features independently of the embedding size requires the use of multiple layers of features.
|
| 16 |
+
However, previous multi-layer knowledge graph embedding architectures, that feature fully connected layers, are prone to overfit~\citep{nickel2016review}.
|
| 17 |
+
One way to solve the scaling problem of shallow architectures, and the overfitting problem of fully connected deep architectures, is to use parameter efficient, fast operators which can be composed into deep networks.
|
| 18 |
+
|
| 19 |
+
The convolution operator, commonly used in computer vision, has exactly these properties: it is parameter efficient and fast to compute, due to highly optimised GPU implementations.
|
| 20 |
+
Furthermore, due to its ubiquitous use, robust methodologies have been established to control overfitting when training multi-layer convolutional networks~\citep{szegedy2015going,ioffe2015batch,srivastava2014dropout,szegedy2016rethinking}.
|
| 21 |
+
|
| 22 |
+
In this paper we introduce ConvE, a model that uses 2D convolutions over embeddings to predict missing links in knowledge graphs.
|
| 23 |
+
ConvE is the simplest multi-layer convolutional architecture for link prediction: it is defined by a single convolution layer, a projection layer to the embedding dimension, and an inner product layer.
|
| 24 |
+
|
| 25 |
+
Specifically, our contributions are as follows:
|
| 26 |
+
|
| 27 |
+
\begin{itemize}
|
| 28 |
+
\item{
|
| 29 |
+
Introducing a simple, competitive 2D convolutional link prediction model, ConvE.
|
| 30 |
+
}
|
| 31 |
+
\item{
|
| 32 |
+
Developing a 1-N scoring procedure that speeds up training three-fold and evaluation by 300x.
|
| 33 |
+
}
|
| 34 |
+
\item{
|
| 35 |
+
Establishing that our model is highly parameter efficient, achieving better scores than DistMult and R-GCNs on FB15k-237 with 8x and 17x fewer parameters.
|
| 36 |
+
}
|
| 37 |
+
\item{
|
| 38 |
+
Showing that for increasingly complex knowledge graphs, as measured by indegree and PageRank, the difference in performance between our model and a shallow model increases proportionally to the complexity of the graph.
|
| 39 |
+
}
|
| 40 |
+
\item{
|
| 41 |
+
Systematically investigating reported inverse relations test set leakage across commonly used link prediction datasets, introducing robust versions of datasets where necessary, so that they cannot be solved using simple rule-based models.
|
| 42 |
+
}
|
| 43 |
+
\item{
|
| 44 |
+
Evaluating ConvE and several previously proposed models on these robust datasets: our model achieves state-of-the-art Mean Reciprocal Rank across most of them.
|
| 45 |
+
}
|
| 46 |
+
\end{itemize}
|
| 47 |
+
\section{Related Work}
|
| 48 |
+
Several neural link prediction models have been proposed in the literature, such as the Translating Embeddings model (TransE)~\citep{DBLP:conf/nips/BordesUGWY13}, the Bilinear Diagonal model (DistMult)~\citep{yang15:embedding} and its extension in the complex space (ComplEx)~\citep{DBLP:conf/icml/TrouillonWRGB16}; we refer to \citet{nickel2016review} for a recent survey.
|
| 49 |
+
The model that is most closely related to this work is most likely the Holographic Embeddings model (HolE)~\citep{DBLP:conf/aaai/NickelRP16}, which uses cross-correlation -- the inverse of circular convolution -- for matching entity embeddings; it is inspired by holographic models of associative memory.
|
| 50 |
+
However, HolE does not learn multiple layers of non-linear features, and it is thus theoretically less expressive than our model.
|
| 51 |
+
|
| 52 |
+
To the best of our knowledge, our model is the first neural link prediction model to use 2D convolutional layers.
|
| 53 |
+
\emph{Graph Convolutional Networks}~(GCNs)~\citep{DBLP:conf/nips/DuvenaudMABHAA15,DBLP:conf/nips/DefferrardBV16,DBLP:journals/corr/KipfW16} are a related line of research, where the convolution operator is generalised to use locality information in graphs.
|
| 54 |
+
However, the GCN framework is limited to undirected graphs, while knowledge graphs are naturally directed, and suffers from potentially prohibitive memory requirements~\citep{DBLP:journals/corr/KipfW16}.
|
| 55 |
+
Relational GCNs (R-GCNs)~\citep{schlichtkrull2017modeling} are a generalisation of GCNs developed for dealing with highly multi-relational data such as knowledge graphs -- we include them in our experimental evaluations.
|
| 56 |
+
|
| 57 |
+
Several convolutional models have been proposed in natural language processing (NLP) for solving a variety of tasks, including semantic parsing~\citep{DBLP:conf/conll/YihTPM11}, sentence classification~\citep{DBLP:conf/emnlp/Kim14}, search query retrieval~\citep{DBLP:conf/www/ShenHGDM14}, sentence modelling~\citep{DBLP:conf/acl/KalchbrennerGB14}, as well as other NLP tasks~\citep{DBLP:journals/jmlr/CollobertWBKKK11}.
|
| 58 |
+
However, most work in NLP uses 1D-convolutions, that is convolutions which operate over a temporal sequence of embeddings, for example a sequence of words in embedding space.
|
| 59 |
+
In this work, we use 2D-convolutions which operate spatially over embeddings.
|
| 60 |
+
\subsection{Number of Interactions for 1D vs 2D Convolutions}
|
| 61 |
+
Using 2D rather than 1D convolutions increases the expressiveness of our model through additional points of interaction between embeddings.
|
| 62 |
+
For example, consider the case where we concatenate two rows of 1D embeddings, $a$ and $b$ with dimension $n=3$: %
|
| 63 |
+
\begin{equation*}
|
| 64 |
+
\left(
|
| 65 |
+
\begin{bmatrix}
|
| 66 |
+
a & a & a
|
| 67 |
+
\end{bmatrix}
|
| 68 |
+
;
|
| 69 |
+
\begin{bmatrix}
|
| 70 |
+
b &b & b
|
| 71 |
+
\end{bmatrix}
|
| 72 |
+
\right)
|
| 73 |
+
=
|
| 74 |
+
\begin{bmatrix}
|
| 75 |
+
a& a & a&b&b & b
|
| 76 |
+
\end{bmatrix}.
|
| 77 |
+
\end{equation*}
|
| 78 |
+
A padded 1D convolution with filter size $k = 3$ will be able to model the interactions between these two embeddings around the concatenation point (with a number of interactions proportional to $k$).
|
| 79 |
+
|
| 80 |
+
If we concatenate (i.e. stack) two rows of 2D embeddings with dimension $m \times n$, where $m=2$ and $n=3$, we obtain the following:
|
| 81 |
+
\begin{equation*}
|
| 82 |
+
\left(
|
| 83 |
+
\begin{bmatrix}
|
| 84 |
+
a & a & a \\ a & a & a
|
| 85 |
+
\end{bmatrix}
|
| 86 |
+
;
|
| 87 |
+
\begin{bmatrix}
|
| 88 |
+
b &b & b\\ b & b & b
|
| 89 |
+
\end{bmatrix}
|
| 90 |
+
\right)
|
| 91 |
+
=
|
| 92 |
+
\begin{bmatrix}
|
| 93 |
+
a & a & a\\ a & a & a\\ b & b & b\\ b & b & b
|
| 94 |
+
\end{bmatrix}.
|
| 95 |
+
\end{equation*}
|
| 96 |
+
A padded 2D convolution with filter size $3 \times 3$ will be able to model the interactions around the entire concatenation line (with a number of interactions proportional to $n$ and $k$).
|
| 97 |
+
|
| 98 |
+
We can extend this principle to an alternating pattern, such as the following:
|
| 99 |
+
\begin{equation*}
|
| 100 |
+
\begin{bmatrix}
|
| 101 |
+
a & a & a\\ b & b & b\\ a & a & a\\ b & b & b
|
| 102 |
+
\end{bmatrix}.
|
| 103 |
+
\end{equation*}
|
| 104 |
+
In this case, a 2D convolution operation is able to model even more interactions between $a$ and $b$ (with a number of interactions proportional to $m$, $n$, and $k$).
|
| 105 |
+
Thus, 2D convolution is able to extract more feature interactions between two embeddings compared to 1D convolution.
|
| 106 |
+
The same principle can be extending to higher dimensional convolutions, but we leave this as future work.
|
| 107 |
+
\section{Background}
|
| 108 |
+
\begin{center}
|
| 109 |
+
\begin{table*}[ht]
|
| 110 |
+
\caption{Scoring functions $\fs_{r}(\emb{s}, \emb{o})$ from neural link predictors in the literature, their relation-dependent parameters and space complexity; $n_e$ and $n_r$ respectively denote the number of entities and relation types, i.e. $n_e = |\ents|$ and $n_r = |\rels|$.} \label{tab:overview}
|
| 111 |
+
\begin{center}
|
| 112 |
+
\begin{tabularx}{\textwidth}{lccc}
|
| 113 |
+
\toprule
|
| 114 |
+
\multicolumn{1}{c}{\bf Model} & {\bf Scoring Function} $\fs_{r}(\emb{s}, \emb{o})$ & {\bf Relation Parameters} & {\bf Space Complexity} \\
|
| 115 |
+
\hline
|
| 116 |
+
SE~\citep{DBLP:journals/ml/BordesGWB14} & $\norm{\mathbf{W}^{L}_{r} \emb{s} - \mathbf{W}^{R}_{r} \emb{o}}_{p}$ & $\mathbf{W}^{L}_{r}, \mathbf{W}^{R}_{r} \in \Real^{k \times k}$ & $\bigO{n_{e} k + n_{r} k^{2}}$\\
|
| 117 |
+
TransE~\citep{DBLP:conf/nips/BordesUGWY13} & $\norm{\emb{s} + \remb{r} - \emb{o}}_{p}$ & $\remb{r} \in \Real^{k}$ & $\bigO{n_{e} k + n_{r} k}$ \\
|
| 118 |
+
DistMult~\citep{yang15:embedding} & $\tdot{\emb{s}}{\remb{r}}{\emb{o}}$ & $\remb{r} \in \Real^{k}$ & $\bigO{n_{e} k + n_{r} k}$ \\
|
| 119 |
+
ComplEx~\citep{DBLP:conf/icml/TrouillonWRGB16} & $\tdot{\emb{s}}{\remb{r}}{\emb{o}}$ & $\remb{r} \in \Complex^{k}$ & $\bigO{n_{e} k + n_{r} k}$ \\
|
| 120 |
+
ConvE & $f ( \vect ( f ([ \overline{\emb{s}} ; \overline{\remb{r}} ] \ast \omega )) \mathbf{W} )\emb{o}$ & $\remb{r} \in \Real^{k'}$ & $\bigO{n_{e} k + n_{r} k'}$ \\
|
| 121 |
+
\bottomrule
|
| 122 |
+
\end{tabularx}
|
| 123 |
+
\end{center}
|
| 124 |
+
\end{table*}
|
| 125 |
+
\end{center}
|
| 126 |
+
|
| 127 |
+
A \emph{knowledge graph} $\mathcal{G} = \{ (s, r, o) \} \subseteq \ents \times \rels \times \ents$ can be formalised as a set of triples (facts), each consisting of a relationship $r \in \rels$ and two entities $s, o \in \ents$, referred to as the \emph{subject} and \emph{object} of the triple.
|
| 128 |
+
Each triple $(s, r, o)$ denotes a relationship of type $r$ between the entities $s$ and $o$.
|
| 129 |
+
|
| 130 |
+
The \emph{link prediction} problem can be formalised as a pointwise learning to rank problem, where the objective is learning a scoring function $\fs : \ents \times \rels \times \ents \mapsto \Real$.
|
| 131 |
+
Given an input triple $x = (s, r, o)$, its score $\fs(x) \in \Real$ is proportional to the likelihood that the fact encoded by $x$ is true.
|
| 132 |
+
\subsection{Neural Link Predictors}
|
| 133 |
+
Neural link prediction models~\citep{nickel2016review} can be seen as multi-layer neural networks consisting of an \emph{encoding component} and a \emph{scoring component}.
|
| 134 |
+
Given an input triple $(s, r, o)$, the encoding component maps entities $s, o \in \ents$ to their distributed embedding representations $\emb{s}, \emb{o} \in \Real^{k}$.
|
| 135 |
+
In the scoring component, the two entity embeddings $\emb{s}$ and $\emb{o}$ are scored by a function $\fs_{r}$.
|
| 136 |
+
The score of a triple $(s, r, o)$ is defined as $\fs(s, r, o) = \fs_{r}(\emb{s}, \emb{o}) \in \Real$.
|
| 137 |
+
|
| 138 |
+
In Table~\ref{tab:overview} we summarise the scoring function of several link prediction models from the literature.
|
| 139 |
+
The vectors $\emb{s}$ and $\emb{o}$ denote the subject and object embedding, where $\emb{s}, \emb{o} \in \Complex^{k}$ in ComplEx and $\emb{s}, \emb{o} \in \Real^{k}$ in all other models, and $\tdot{x}{y}{z} = \sum_{i} x_{i} y_{i} z_{i}$ denotes the tri-linear dot product; $\ast$ denotes the convolution operator; $f$ denotes a non-linear function.
|
| 140 |
+
\section{Convolutional 2D Knowledge Graphs Embeddings}
|
| 141 |
+
\begin{figure*}[ht]
|
| 142 |
+
\caption{In the ConvE model, the entity and relation embeddings are first reshaped and concatenated (steps 1, 2); the resulting matrix is then used as input to a convolutional layer (step 3); the resulting feature map tensor is vectorised and projected into a $k$-dimensional space (step 4) and matched with all candidate object embeddings (step 5).}
|
| 143 |
+
\label{fig:model}
|
| 144 |
+
\includegraphics[width=1.0\linewidth]{figures/model}
|
| 145 |
+
\end{figure*}
|
| 146 |
+
|
| 147 |
+
In this work we propose a neural link prediction model where the interactions between input entities and relationships are modelled by convolutional and fully-connected layers.
|
| 148 |
+
The main characteristic of our model is that the score is defined by a convolution over 2D shaped embeddings.
|
| 149 |
+
The architecture is summarised in Figure~\ref{fig:model}; formally, the scoring function is defined as follows:
|
| 150 |
+
\begin{equation}
|
| 151 |
+
\begin{aligned}
|
| 152 |
+
\fs_{r}(\emb{s}, \emb{o}) & = & f ( \vect ( f ( [ \overline{\emb{s}} ; \overline{\remb{r}} ] \ast \omega ) ) \mathbf{W} ) \emb{o}, \\
|
| 153 |
+
\end{aligned}
|
| 154 |
+
\end{equation}
|
| 155 |
+
\noindent where $\remb{r} \in \Real^{k}$ is a relation parameter depending on $r$, $\overline{\emb{s}}$ and $\overline{\remb{r}}$ denote a 2D reshaping of $\emb{s}$ and $\remb{r}$, respectively: if $\emb{s}, \remb{r} \in \Real^{k}$, then $\overline{\emb{s}}, \overline{\remb{r}} \in \Real^{k_{w} \times k_{h}}$, where $k = k_{w} k_{h}$.
|
| 156 |
+
|
| 157 |
+
In the feed-forward pass, the model performs a row-vector look-up operation on two embedding matrices, one for entities, denoted ${\bf E}^{|\ents| \times k}$ and one for relations, denoted ${ \bf R}^{|\rels| \times k'}$, where $k$ and $k'$ are the entity and relation embedding dimensions, and $|\ents|$ and $|\rels|$ denote the number of entities and relations.
|
| 158 |
+
The model then concatenates $\overline{\emb{s}}$ and $\overline{\remb{r}}$, and uses it as an input for a 2D convolutional layer with filters $\omega$.
|
| 159 |
+
Such a layer returns a feature map tensor $\mathcal{T} \in \Real^{c \times m \times n}$, where $c$ is the number of 2D feature maps with dimensions $m$ and $n$.
|
| 160 |
+
The tensor $\mathcal{T}$ is then reshaped into a vector $\vect(\mathcal{T}) \in \Real^{c m n}$, which is then projected into a $k$-dimensional space using a linear transformation parametrised by the matrix $\mathbf{W} \in \Real^{c m n \times k}$ and matched with the object embedding $\emb{o}$ via an inner product.
|
| 161 |
+
The parameters of the convolutional filters and the matrix $\mathbf{W}$ are independent of the parameters for the entities $s$ and $o$ and the relationship $r$.
|
| 162 |
+
|
| 163 |
+
For training the model parameters, we apply the logistic sigmoid function $\sigma(\cdot)$ to the scores, that is $p = \sigma(\fs_{r}(\emb{s}, \emb{o}))$, and minimise the following binary cross-entropy loss:
|
| 164 |
+
\begin{equation}
|
| 165 |
+
\mathcal{L}(p, t) = - \frac{1}{N} \sum_i (t_i \cdot \log(p_i) + (1 - t_i) \cdot \log(1 - p_i)),
|
| 166 |
+
\end{equation}
|
| 167 |
+
where $t$ is the label vector with dimension $\Real^{1x1}$ for 1-1 scoring or $\Real^{1xN}$ for 1-N scoring (see the next section for 1-N scoring); the elements of vector $t$ are ones for relationships that exists and zero otherwise.
|
| 168 |
+
|
| 169 |
+
We use rectified linear units as the non-linearity $f$ for faster training~\citep{krizhevsky2012imagenet}, and batch normalisation after each layer to stabilise, regularise and increase rate of convergence~\citep{ioffe2015batch}.
|
| 170 |
+
We regularise our model by using dropout~\citep{srivastava2014dropout} in several stages.
|
| 171 |
+
In particular, we use dropout on the embeddings, on the feature maps after the convolution operation, and on the hidden units after the fully connected layer.
|
| 172 |
+
We use Adam as optimiser~\citep{kingma2014adam}, and label smoothing to lessen overfitting due to saturation of output non-linearities at the labels~\citep{szegedy2016rethinking}.
|
| 173 |
+
\subsection{Fast Evaluation for Link Prediction Tasks}
|
| 174 |
+
\label{onetoN}
|
| 175 |
+
|
| 176 |
+
In our architecture convolution consumes about 75-90\% of the total computation time, thus it is important to minimise the number of convolution operations to speed up computation as much as possible.
|
| 177 |
+
For link prediction models, the batch size is usually increased to speed up evaluation~\citep{bordes2013translating}.
|
| 178 |
+
However, this is not feasible for convolutional models since the memory requirements quickly outgrow the GPU memory capacity when increasing the batch size.
|
| 179 |
+
|
| 180 |
+
Unlike other link prediction models which take an entity pair and a relation as a triple $(s, r, o)$, and score it (1-1 scoring), we take one $(s, r)$ pair and score it against all entities $o \in \ents$ simultaneously (1-N scoring).
|
| 181 |
+
If we benchmark 1-1 scoring on a high-end GPU with batch size and embedding size 128, then a training pass and an evaluation with a convolution model on FB15k -- one of the dataset used in the experiments -- takes 2.4 minutes and 3.34 hours.
|
| 182 |
+
Using 1-N scoring, the respective numbers are 45 and 35 seconds -- a considerable improvement of over 300x in terms of evaluation time.
|
| 183 |
+
Additionally, this approach is scalable to large knowledge graphs and increases convergence speed.
|
| 184 |
+
For a single forward-backward pass with batch size of 128, going from $N=100,000$ to $N=1,000,000$ entities only increases the computational time from 64ms to 80ms -- in other words, a ten-fold increase in the number of entities only increases the computation time by 25\% -- which attests the scalability of the approach.
|
| 185 |
+
|
| 186 |
+
If instead of 1-N scoring, we use 1-(0.1N) scoring -- that is, scoring against 10\% of the entities -- we can compute a forward-backward pass 25\% faster.
|
| 187 |
+
However, we converge roughly 230\% slower on the training set.
|
| 188 |
+
Thus 1-N scoring has an additional effect which is akin to batch normalisation~\citep{ioffe2015batch} -- we trade some computational performance for greatly increased convergence speed and also achieve better performance as shown in Section~\ref{ablation_study}.
|
| 189 |
+
Do note that the technique in general could by applied to any 1-1 scoring model.
|
| 190 |
+
This practical trick in speeding up training and evaluation can be applied to any 1-1 scoring model, such as the great majority of link prediction models.
|
| 191 |
+
\section{Experiments}
|
| 192 |
+
\label{Experiments}
|
| 193 |
+
\subsection{Knowledge Graph Datasets}
|
| 194 |
+
For evaluating our proposed model, we use a selection of link prediction datasets from the literature.
|
| 195 |
+
|
| 196 |
+
WN18~\citep{DBLP:conf/nips/BordesUGWY13} is a subset of WordNet which consists of 18 relations and 40,943 entities.
|
| 197 |
+
Most of the 151,442 triples consist of hyponym and hypernym relations and, for such a reason, WN18 tends to follow a strictly hierarchical structure.
|
| 198 |
+
|
| 199 |
+
FB15k~\citep{DBLP:conf/nips/BordesUGWY13} is a subset of Freebase which contains about 14,951 entities with 1,345 different relations.
|
| 200 |
+
A large fraction of content in this knowledge graph describes facts about movies, actors, awards, sports, and sport teams.
|
| 201 |
+
|
| 202 |
+
YAGO3-10~\citep{DBLP:conf/cidr/MahdisoltaniBS15} is a subset of YAGO3 which consists of entities which have a minimum of 10 relations each.
|
| 203 |
+
It has 123,182 entities and 37 relations.
|
| 204 |
+
Most of the triples deal with descriptive attributes of people, such as citizenship, gender, and profession.
|
| 205 |
+
|
| 206 |
+
Countries~\citep{bouchard2015approximate} is a benchmark dataset that is useful to evaluate a model's ability to learn long-range dependencies between entities and relations.
|
| 207 |
+
It consists of three sub-tasks which increase in difficulty in a step-wise fashion, where the minimum path-length to find a solution increases from 2 to 4.
|
| 208 |
+
|
| 209 |
+
It was first noted by~\citet{toutanova2015observed} that WN18 and FB15k suffer from test leakage through inverse relations: a large number of test triples can be obtained simply by inverting triples in the training set.
|
| 210 |
+
For example, the test set frequently contains triples such as $(s, \text{hyponym}, o)$ while the training set contains its inverse $(o, \text{hypernym}, s)$.
|
| 211 |
+
To create a dataset without this property, \citet{toutanova2015observed} introduced FB15k-237 -- a subset of FB15k where inverse relations are removed.
|
| 212 |
+
However, they did not explicitly investigate the severity of this problem, which might explain why research continues using these datasets for evaluation without addressing this issue (e.g. \citet{DBLP:conf/icml/TrouillonWRGB16}, \citet{DBLP:conf/aaai/NickelRP16}, \citet{nguyen2016stranse}, \citet{liu2016hierarchical}).%
|
| 213 |
+
|
| 214 |
+
In the following section, we introduce a simple rule-based model which demonstrates the severity of this bias by achieving state-of-the-art results on both WN18 and FB15k.
|
| 215 |
+
In order to ensure that we evaluate on datasets that do not have inverse relation test leakage, we apply our simple rule-based model to each dataset.
|
| 216 |
+
Apart from FB15k, which was corrected by FB15k-237, we also find flaws with WN18.
|
| 217 |
+
We thus create WN18RR to reclaim WN18 as a dataset, which cannot easily be completed using a single rule -- but requires modelling of the complete knowledge graph.
|
| 218 |
+
WN18RR\footnote{\url{https://github.com/TimDettmers/ConvE}} contains 93,003 triples with 40,943 entities and 11 relations.
|
| 219 |
+
For future research, we recommend against using FB15k and WN18 and instead recommend FB15k-237, WN18RR, and YAGO3-10.
|
| 220 |
+
\subsection{Experimental Setup}
|
| 221 |
+
We selected the hyperparameters of our ConvE model via grid search according to the mean reciprocal rank (MRR) on the validation set.
|
| 222 |
+
Hyperparameter ranges for the grid search were as follows -- embedding dropout $\{ 0.0, 0.1, 0.2 \}$, feature map dropout $\{ 0.0, 0.1, 0.2, 0.3 \}$, projection layer dropout $\{ 0.0, 0.1, 0.3, 0.5 \}$, embedding size $\{ 100, 200 \}$, batch size $\{ 64, 128, 256 \}$, learning rate $\{ 0.001, 0.003 \}$, and label smoothing $\{ 0.0, 0.1, 0.2, 0.3 \}$.
|
| 223 |
+
|
| 224 |
+
Besides the grid search, we investigated modifications of the 2D convolution layer for our models.
|
| 225 |
+
In particular, we experimented with replacing it with fully connected layers and 1D convolution; however, these modifications consistently reduced the predictive accuracy of the model.
|
| 226 |
+
We also experimented with different filter sizes, and found that we only receive good results if the first convolutional layer uses small (i.e. 3x3) filters.
|
| 227 |
+
|
| 228 |
+
\begin{table}[t]
|
| 229 |
+
\caption{Parameter scaling of DistMult vs ConvE.}
|
| 230 |
+
\label{parameters}
|
| 231 |
+
\begin{center}
|
| 232 |
+
\begin{tabular}{lcccccc}
|
| 233 |
+
\toprule
|
| 234 |
+
& Param. & Emb. & & \multicolumn{3}{c}{{ Hits}} \\
|
| 235 |
+
Model & count & size & MRR & @10 & @3 & @1 \\
|
| 236 |
+
\midrule
|
| 237 |
+
DistMult & 1.89M & 128 & .23 & .41 & .25 & .15 \\
|
| 238 |
+
DistMult & 0.95M & 64 & .22 & .39 & .25 & .14 \\
|
| 239 |
+
DistMult & 0.23M & 16 & .16 & .31 & .17 & .09 \\
|
| 240 |
+
\midrule
|
| 241 |
+
ConvE & 5.05M & 200 & .32 & .49 & .35 & .23 \\
|
| 242 |
+
ConvE & 1.89M & 96 & .32 & .49 & .35 & .23 \\
|
| 243 |
+
ConvE & 0.95M & 54 & .30 & .46 & .33 & .22 \\
|
| 244 |
+
ConvE & 0.46M & 28 & .28 & .43 & .30 & .20 \\
|
| 245 |
+
ConvE & 0.23M & 14 & .26 & .40 & .28 & .19 \\
|
| 246 |
+
\bottomrule
|
| 247 |
+
\end{tabular}
|
| 248 |
+
\end{center}
|
| 249 |
+
\end{table}
|
| 250 |
+
|
| 251 |
+
We found that the following combination of parameters works well on WN18, YAGO3-10 and FB15k: embedding dropout 0.2, feature map dropout 0.2, projection layer dropout 0.3, embedding size 200, batch size 128, learning rate 0.001, and label smoothing 0.1.
|
| 252 |
+
For the Countries dataset, we increase embedding dropout to 0.3, hidden dropout to 0.5, and set label smoothing to 0.
|
| 253 |
+
We use early stopping according to the mean reciprocal rank (WN18, FB15k, YAGO3-10) and AUC-PR (Countries) statistics on the validation set, which we evaluate every three epochs.
|
| 254 |
+
Unlike the other datasets, for Countries the results have a high variance, as such we average 10 runs and produce 95\% confidence intervals.
|
| 255 |
+
For our DistMult and ComplEx results with 1-1 training, we use an embedding size of 100, AdaGrad~\citep{DBLP:journals/jmlr/DuchiHS11} for optimisation, and we regularise our model by forcing the entity embeddings to have a L2 norm of 1 after each parameter update.
|
| 256 |
+
As in \citet{DBLP:conf/nips/BordesUGWY13}, we use a pairwise margin-based ranking loss.
|
| 257 |
+
|
| 258 |
+
The code for our model and experiments is made publicly available,\footnote{\url{https://github.com/TimDettmers/ConvE}} as well as the code for replicating the DistMult results.\footnote{\url{https://github.com/uclmr/inferbeddings}}
|
| 259 |
+
\subsection{Inverse Model}
|
| 260 |
+
It has been noted by \citet{toutanova2015observed}, that the training datasets of WN18 and FB15k have 94\% and 81\% test leakage as inverse relations, that is, 94\% and 81\% of the triples in these datasets have inverse relations which are linked to the test set.
|
| 261 |
+
For instance, a test triple \textit{(feline, hyponym, cat)} can easily be mapped to a training triple \textit{(cat, hypernym, feline)} if it is known that hyponym is the inverse of hypernym.
|
| 262 |
+
This is highly problematic, because link predictors that do well on these datasets may simply learn which relations that are the inverse of others, rather than to model the actual knowledge graph.
|
| 263 |
+
|
| 264 |
+
To gauge the severity of this problem, we construct a simple, rule-based model that solely models inverse relations. We call this model the \emph{inverse model}.
|
| 265 |
+
The model extracts inverse relationships automatically from the training set: given two relation pairs $r_1, r_2 \in \rels$, we check whether $(s, r_1, o)$ implies $(o, r_2, s)$, or vice-versa.
|
| 266 |
+
|
| 267 |
+
We assume that inverse relations are randomly distributed among the training, validation and test sets and, as such, we expect the number of inverse relations to be proportional to the size of the training set compared to the total dataset size.
|
| 268 |
+
Thus, we detect inverse relations if the presence of $(s, r_1, o)$ co-occurs with the presence of $(o, r_2, s)$ with a frequency of at least $0.99 - (f_v + f_t)$, where $f_v$ and $f_t$ is the fraction of the validation and test set compared to the total size of the dataset.
|
| 269 |
+
Relations matching this criterion are assumed to be the inverse of each other.
|
| 270 |
+
|
| 271 |
+
At test time, we check if the test triple has inverse matches outside the test set: if $k$ matches are found, we sample a permutation of the top $k$ ranks for these matches; if no match is found, we select a random rank for the test triple.
|
| 272 |
+
\section{Results}
|
| 273 |
+
\begin{table*}[t]
|
| 274 |
+
\caption{Link prediction results for WN18 and FB15k}
|
| 275 |
+
\label{results_dirty}
|
| 276 |
+
\centering
|
| 277 |
+
\begin{tabularx}{\textwidth}{lccccccccccc}
|
| 278 |
+
\toprule
|
| 279 |
+
& \multicolumn{5}{c}{{ \bf WN18}} & & \multicolumn{5}{c}{{\bf FB15k}} \\
|
| 280 |
+
\cmidrule{2-6}
|
| 281 |
+
\cmidrule{8-12}
|
| 282 |
+
& & & \multicolumn{3}{c}{Hits} & & & & \multicolumn{3}{c}{Hits} \\
|
| 283 |
+
& MR & MRR & @10 & @3 & @1 & & MR & MRR & @10 & @3 & @1 \\
|
| 284 |
+
\midrule
|
| 285 |
+
DistMult~\citep{yang15:embedding} & 902 & .822 & .936 & .914 & .728 & & 97 & .654 & .824 & .733 & .546 \\
|
| 286 |
+
ComplEx~\citep{DBLP:conf/icml/TrouillonWRGB16} & -- & .941 & .947 & .936 & .936 & & -- & .692 & .840 & .759 & .599 \\
|
| 287 |
+
Gaifman~\citep{DBLP:conf/nips/Niepert16} & \textbf{352} & -- & .939 & -- & .761 & & 75 & -- & .842 & -- & \textbf{.692} \\
|
| 288 |
+
ANALOGY~\citep{2017arXiv170502426L} & -- & .942 & .947 & .944 & .939 & & -- & \textbf{.725} & \textbf{.854} & \textbf{.785} & .646 \\
|
| 289 |
+
R-GCN~\citep{schlichtkrull2017modeling} & -- & .814 & .964 & .929 & .697 & & -- & .696 & .842 & .760 & .601 \\
|
| 290 |
+
\midrule
|
| 291 |
+
ConvE & 374 & .943 & .956 & .946 & .935 & & {\bf 51} & .657 & .831 & .723 & .558 \\
|
| 292 |
+
Inverse Model & 740 & \textbf{.963} & \textbf{.964} & \textbf{.964} & \textbf{.953} & & 2501 & .660 & .660 & .659 & .658 \\
|
| 293 |
+
\bottomrule
|
| 294 |
+
\end{tabularx}
|
| 295 |
+
\end{table*}
|
| 296 |
+
|
| 297 |
+
\begin{table*}[t]
|
| 298 |
+
\caption{Link prediction results for WN18RR and FB15k-237}
|
| 299 |
+
\label{results_clean}
|
| 300 |
+
\centering
|
| 301 |
+
\begin{tabularx}{\textwidth}{lccccccccccc}
|
| 302 |
+
\toprule
|
| 303 |
+
& \multicolumn{5}{c}{{ \bf WN18RR}} & & \multicolumn{5}{c}{{ \bf FB15k-237}} \\
|
| 304 |
+
\cmidrule{2-6}
|
| 305 |
+
\cmidrule{8-12}
|
| 306 |
+
& & & \multicolumn{3}{c}{Hits} & & & & \multicolumn{3}{c}{Hits} \\
|
| 307 |
+
\cmidrule{4-6} \cmidrule{10-12}
|
| 308 |
+
& MR & MRR & @10 & @3 & @1 & & MR & MRR & @10 & @3 & @1 \\
|
| 309 |
+
\midrule
|
| 310 |
+
DistMult~\citep{yang15:embedding} & {5110} & .43 & .49 & .44 & .39 & & 254 & .241 & .419 & .263 & .155 \\
|
| 311 |
+
ComplEx~\citep{DBLP:conf/icml/TrouillonWRGB16} & 5261 & .44 & {.51} & \textbf{.46} & \textbf{.41} & & 339 & .247 & .428 & .275 & .158 \\
|
| 312 |
+
|
| 313 |
+
R-GCN~\citep{schlichtkrull2017modeling} & -- & -- & -- & -- & -- & & -- & .248 & .417 & .258 & .153 \\
|
| 314 |
+
\midrule
|
| 315 |
+
ConvE & \textbf{4187} & {.43} & \textbf{.52} & .44 & .40 & & \textbf{244} & {\bf.325} & {\bf.501} & {\bf.356} & \textbf{.237} \\
|
| 316 |
+
Inverse Model & 13526 & .35 & {.35} & {.35} & .35 & & 7030 & .010 & .014 & .011 & {.007} \\
|
| 317 |
+
\bottomrule
|
| 318 |
+
\end{tabularx}
|
| 319 |
+
\end{table*}
|
| 320 |
+
|
| 321 |
+
\begin{table*}[t]
|
| 322 |
+
\caption{Link prediction results for YAGO3-10 and Countries}
|
| 323 |
+
\label{results_yago}
|
| 324 |
+
\centering
|
| 325 |
+
\begin{tabularx}{\textwidth}{lccccccccc}
|
| 326 |
+
\toprule
|
| 327 |
+
& \multicolumn{5}{c}{{ \bf YAGO3-10}} & \multicolumn{4}{c}{{ \bf Countries}} \\
|
| 328 |
+
\cmidrule{2-6} \cmidrule{8-10}
|
| 329 |
+
& & & \multicolumn{3}{c}{Hits} & \multicolumn{4}{c}{AUC-PR} \\
|
| 330 |
+
\cmidrule{4-6} \cmidrule{8-10}
|
| 331 |
+
& MR & MRR & @10 & @3 & @1 & & S1 & S2 & S3 \\
|
| 332 |
+
\midrule
|
| 333 |
+
DistMult~\citep{yang15:embedding} & {5926} & .34 & .54 & .38 & .24 & & \textbf{1.00\text{$\pm$}0.00} & 0.72\text{$\pm$}0.12 & 0.52\text{$\pm$}0.07 \\
|
| 334 |
+
ComplEx~\citep{DBLP:conf/icml/TrouillonWRGB16} & 6351 & {.36} & {.55} & .40 & .26 & & 0.97\text{$\pm$}0.02 & 0.57\text{$\pm$}0.10 & 0.43\text{$\pm$}0.07 \\
|
| 335 |
+
\midrule
|
| 336 |
+
ConvE & \textbf{1676} & \textbf{.44} & \textbf{.62} & \textbf{.49} & \textbf{.35} & & \textbf{1.00\text{$\pm$}0.00} & \textbf{0.99\text{$\pm$}0.01} & \textbf{0.86 \text{$\pm$}0.05} \\
|
| 337 |
+
Inverse Model & 59448 & .01 & {.02} & {.02} & .01 & & -- & -- & -- \\
|
| 338 |
+
\bottomrule
|
| 339 |
+
\end{tabularx}
|
| 340 |
+
\end{table*}
|
| 341 |
+
|
| 342 |
+
Similarly to previous work~\citep{yang15:embedding,DBLP:conf/icml/TrouillonWRGB16,DBLP:conf/nips/Niepert16}, we report results using a filtered setting, i.e. we rank test triples against all other candidate triples not appearing in the training, validation, or test set~\citep{DBLP:conf/nips/BordesUGWY13}.
|
| 343 |
+
Candidates are obtained by permuting either the subject or the object of a test triple with all entities in the knowledge graph.
|
| 344 |
+
Our results on the standard benchmarks FB15k and WN18 are shown in Table~\ref{results_dirty}; results on the datasets with inverse relations removed are shown in Table~\ref{results_clean}; results on YAGO3-10 and Countries are shown in Table~\ref{results_yago}.
|
| 345 |
+
|
| 346 |
+
Strikingly, the inverse model achieves state-of-the-art on many different metrics for both FB15k and WN18.
|
| 347 |
+
However, it fails to pick up on inverse relations for YAGO3-10 and FB15k-237.
|
| 348 |
+
The procedure used by \citet{toutanova2015observed} to derive FB15k-237 does not remove certain symmetric relationships, for example ``similar to''.
|
| 349 |
+
The presence of these relationships explains the good score of our inverse model on WN18RR, which was derived using the same procedure.
|
| 350 |
+
|
| 351 |
+
Our proposed model, ConvE, achieves state-of-the-art performance for all metrics on YAGO3-10, for some metrics on FB15k, and it does well on WN18.
|
| 352 |
+
On Countries, it solves the S1 and S2 tasks, and does well on S3, scoring better than other models like DistMult and ComplEx.
|
| 353 |
+
|
| 354 |
+
For FB15k-237, we could not replicate the basic model results from \citet{toutanova2015representing}, where the models in general have better performance than what we can achieve.
|
| 355 |
+
Compared to \citet{schlichtkrull2017modeling}, our results for standard models are a slightly better then theirs, and on-a-par with their R-GCN model.
|
| 356 |
+
\subsection{Parameter efficiency of ConvE}
|
| 357 |
+
From Table~\ref{parameters} we can see that ConvE for FB15k-237 with 0.23M parameters performs better than DistMult with 1.89M parameters for 3 metrics out of 5.
|
| 358 |
+
|
| 359 |
+
ConvE with 0.46M parameters still achieves state-of-the-art results on FB15k-237 with 0.425 Hits@10.
|
| 360 |
+
Comparing to the previous best model, R-GCN~\citep{schlichtkrull2017modeling}, which achieves 0.417 Hits@10 with more than 8M parameters.
|
| 361 |
+
|
| 362 |
+
Overall, ConvE is more than 17x parameter efficient than R-GCNs, and 8x more parameter efficient than DistMult.
|
| 363 |
+
For the entirety of Freebase, the size of these models would be more than 82GB for R-GCNs, 21GB for DistMult, compared to 5.2GB for ConvE.
|
| 364 |
+
\section{Analysis}
|
| 365 |
+
|
| 366 |
+
\subsection{Ablation Study}
|
| 367 |
+
Table~\ref{ablation_study} shows the results from our ablation study where we evaluate different parameter initialisation ($n=2$) to calculate confidence intervals.
|
| 368 |
+
We see that hidden dropout is by far the most important component, which is unsurprising since it is our main regularisation technique.
|
| 369 |
+
1-N scoring improves performance, as does input dropout, feature map dropout has a minor effect, while label smoothing seems to be unimportant -- as good results can be achieved without it.
|
| 370 |
+
|
| 371 |
+
\begin{center}
|
| 372 |
+
\begin{table}[ht]
|
| 373 |
+
\caption{Mean PageRank $\times$10$^{-3}$ of nodes in the test set vs reduction in error in terms of AUC-PR or Hits@10 of ConvE wrt. DistMult.}
|
| 374 |
+
\label{testset_pagerank}
|
| 375 |
+
\begin{center}
|
| 376 |
+
\begin{tabular}{lcc}
|
| 377 |
+
\toprule
|
| 378 |
+
Dataset & PageRank & Error Reduction \\
|
| 379 |
+
\midrule
|
| 380 |
+
WN18RR & 0.104 & 0.06 \\
|
| 381 |
+
WN18 & 0.125 & 0.45 \\
|
| 382 |
+
FB15k & 0.599 & 0.04 \\
|
| 383 |
+
FB15-237 & 0.733 & 0.16 \\
|
| 384 |
+
YAGO3-10 & 0.988 & 0.21 \\
|
| 385 |
+
Countries S3 & 1.415 & 2.36 \\
|
| 386 |
+
Countries S1 & 1.711 & 0.00 \\
|
| 387 |
+
Countries S2 & 1.796 & 17.6 \\
|
| 388 |
+
\bottomrule
|
| 389 |
+
\end{tabular}
|
| 390 |
+
\end{center}
|
| 391 |
+
\end{table}
|
| 392 |
+
\end{center}
|
| 393 |
+
|
| 394 |
+
\begin{center}
|
| 395 |
+
\begin{table}[t]
|
| 396 |
+
\caption{Ablation study for FB15k-237.}
|
| 397 |
+
\label{ablation_study}
|
| 398 |
+
\begin{center}
|
| 399 |
+
\begin{tabular}{lc}
|
| 400 |
+
\toprule
|
| 401 |
+
Ablation & Hits@10 \\
|
| 402 |
+
\midrule
|
| 403 |
+
Full ConvE & 0.491 \\
|
| 404 |
+
\midrule
|
| 405 |
+
Hidden dropout & -0.044 $\pm$ 0.003\\
|
| 406 |
+
Input dropout & -0.022 $\pm$ 0.000 \\
|
| 407 |
+
1-N scoring & -0.019 \\
|
| 408 |
+
Feature map dropout & -0.013 $\pm$ 0.001 \\
|
| 409 |
+
Label smoothing & -0.008 $\pm$ 0.000 \\
|
| 410 |
+
\bottomrule
|
| 411 |
+
\end{tabular}
|
| 412 |
+
\end{center}
|
| 413 |
+
\end{table}
|
| 414 |
+
\end{center}
|
| 415 |
+
\subsection{Analysis of Indegree and PageRank}
|
| 416 |
+
Our main hypothesis for the good performance of our model on datasets like YAGO3-10 and FB15k-237 compared to WN18RR, is that these datasets contain nodes with very high relation-specific indegree.
|
| 417 |
+
For example the node ``United States'' with edges ``was born in'' has an indegree of over 10,000.
|
| 418 |
+
Many of these 10,000 nodes will be very different from each other (actors, writers, academics, politicians, business people) and successful modelling of such a high indegree nodes requires capturing all these differences.
|
| 419 |
+
Our hypothesis is that deeper models, that is, models that learn multiple layers of features, like ConvE, have an advantage over shallow models, like DistMult, to capture all these constraints.
|
| 420 |
+
|
| 421 |
+
However, deeper models are more difficult to optimise, so we hypothesise that for datasets with low average relation-specific indegree~(like WN18RR and WN18), a shallow model like DistMult might suffice for accurately representing the structure of the network.
|
| 422 |
+
|
| 423 |
+
To test our two hypotheses, we take two datasets with low~(low-WN18) and high~(high-FB15k) relation-specific indegree and reverse them into high~(high-WN18) and low~(low-FB15k) relation-specific indegree datasets by deleting low and high indegree nodes.
|
| 424 |
+
We hypothesise that, compared to DistMult, ConvE will always do better on the dataset with high relation-specific indegree, and vice-versa.
|
| 425 |
+
|
| 426 |
+
Indeed, we find that both hypotheses hold: for low-FB15k we have ConvE 0.586 Hits@10 vs DistMult 0.728 Hits@10; for high-WN18 we have ConvE 0.952 Hits@10 vs DistMult 0.938 Hits@10. This supports our hypothesis that deeper models such as ConvE have an advantage to model more complex graphs (e.g. FB15k and FB15k-237), but that shallow models such as DistMult have an advantage to model less complex graphs (e.g. WN18 WN18RR).
|
| 427 |
+
|
| 428 |
+
To investigate this further, we look at PageRank, a measure of centrality of a node. PageRank can also be seen as a measure of the recursive indegree of a node: the PageRank value of a node is proportional to the indegree of this node, its neighbours indegrees, its neighbours-neighbours indegrees and so forth scaled relative to all other nodes in the network.
|
| 429 |
+
By this line of reasoning, we also expect ConvE to be better than DistMult on datasets with high average PageRank~(high connectivity graphs), and vice-versa.
|
| 430 |
+
|
| 431 |
+
To test this hypothesis, we calculate the PageRank for each dataset as a measure of centrality. We find that the most central nodes in WN18 have a PageRank value more than one order of magnitude smaller than the most central nodes in YAGO3-10 and Countries, and about 4 times smaller than the most central nodes in FB15k. When we look at the mean PageRank of nodes contained in the test sets, we find that the difference of performance in terms of Hits@10 between DistMult and ConvE is roughly proportional to the mean test set PageRank, that is, the higher the mean PageRank of the test set nodes the better ConvE does compared to DistMult, and vice-versa. See Table~\ref{testset_pagerank} for these statistics. The correlation between mean test set PageRank and relative error reduction of ConvE compared to DistMult is strong with $r=0.56$. This gives additional evidence that models that are deeper have an advantage when modelling nodes with high (recursive) indegree.
|
| 432 |
+
|
| 433 |
+
From this evidence we conclude, that the increased performance of our model compared to a standard link predictor, DistMult, can be partially explained due to our it's ability to model nodes with high indegree with greater precision -- which is possibly related to its depth.
|
| 434 |
+
\section{Conclusion and Future Work}
|
| 435 |
+
We introduced ConvE, a link prediction model that uses 2D convolution over embeddings and multiple layers of non-linear features to model knowledge graphs.
|
| 436 |
+
ConvE uses fewer parameters; it is fast through 1-N scoring; it is expressive through multiple layers of non-linear features; it is robust to overfitting due to batch normalisation and dropout; and achieves state-of-the-art results on several datasets, while still scaling to large knowledge graphs.
|
| 437 |
+
In our analysis, we show that the performance of ConvE compared to a common link predictor, DistMult, can partially be explained by its ability to model nodes with high (recursive) indegree.
|
| 438 |
+
|
| 439 |
+
Test leakage through inverse relations of WN18 and FB15k was first reported by~\citet{toutanova2015observed}: we investigate the severity of this problem for commonly used datasets by introducing a simple rule-based model, and find that it can achieve state-of-the-art results on WN18 and FB15k.
|
| 440 |
+
To ensure robust versions of all investigated datasets exists, we derive WN18RR.
|
| 441 |
+
|
| 442 |
+
Our model is still shallow compared to convolutional architecture found in computer vision, and future work might deal with convolutional models of increasing depth.
|
| 443 |
+
Further work might also look at the interpretation of 2D convolution, or how to enforce large-scale structure in embedding space so to increase the number of interactions between embeddings.
|
| 444 |
+
\subsection{Acknowledgements}
|
| 445 |
+
We would like to thank Johannes Welbl, Peter Hayes, and Takuma Ebisu for their feedback and helpful discussions related to this work. We thank Takuma Ebisu for pointing out an error in our Inverse Model script -- the corrected results are slightly better for WN18 and slightly worse for FB15k. We thank Victoria Lin for helping us to unroot and fix a bug where the exclusion of triples during inference worked incorrectly -- the changes did not affect the main results in this work, though some results in the appendix changed (UMLS, Nations).
|
| 446 |
+
This work was supported by a Marie Curie Career Integration Award, an Allen Distinguished Investigator Award, a Google Europe Scholarship for Students with Disabilities, and the H2020 project SUMMA.
|
| 447 |
+
|
| 448 |
+
\bibliographystyle{aaai}
|
| 449 |
+
\bibliography{references}
|
| 450 |
+
|
| 451 |
+
\appendix
|
| 452 |
+
\section{\LARGE{\sc Supplemental Material}}
|
| 453 |
+
\newcommand{\Test}{\ensuremath{\mathcal{T}}}
|
| 454 |
+
|
| 455 |
+
\newcommand{\corr}[1]{\ensuremath{\mathcal{C}(#1)}}
|
| 456 |
+
\newcommand{\scorr}[1]{\ensuremath{\mathcal{C}^{\text{s}}(#1)}}
|
| 457 |
+
\newcommand{\ocorr}[1]{\ensuremath{\mathcal{C}^{\text{o}}(#1)}}
|
| 458 |
+
|
| 459 |
+
\newcommand{\KG}{\ensuremath{\mathcal{G}}}
|
| 460 |
+
\newcommand{\ff}{\ensuremath{f}}
|
| 461 |
+
\newcommand{\card}[1]{\ensuremath{\left\vert{#1}\right\vert}}
|
| 462 |
+
\newcommand{\Rank}{\text{rank}}
|
| 463 |
+
\newcommand{\cN}{\ensuremath{\mathcal{N}}}
|
| 464 |
+
\newcommand{\scdot}{\ensuremath{{}\cdot{}}}
|
| 465 |
+
\section{Versions}
|
| 466 |
+
\begin{itemize}
|
| 467 |
+
\item 2018-07-04:
|
| 468 |
+
\begin{itemize}
|
| 469 |
+
\item Added new YAGO3-10 results. The new results are worse on most metrics, but state-of-the-art results are retained.
|
| 470 |
+
\item I was unable to replicate FB15k scores that I initially reported.\footnote{See \url{https://github.com/TimDettmers/ConvE/issues/26} for details.}
|
| 471 |
+
\item I update the PageRank table and the reported PageRank-error-reduction correlation to reflect the new scores.
|
| 472 |
+
\item I removed the Nations scores in the appendix. The Nations dataset has a high proportion of inverse relationships and is thus not suitable for the use in research. I do not want to encourage its use.
|
| 473 |
+
\end{itemize}
|
| 474 |
+
\item 2018-04-06: Victoria Lin helped us to find and fix issues\footnote{See \url{https://github.com/TimDettmers/ConvE/issues/18} for more information.} with triple masks during evaluation. We report new numbers for UMLS and Nations in the appendix. The results were unchanged on other datasets that we tested thus far (Kinship, WN18, WN18RR, FB15k-237).
|
| 475 |
+
\item 2018-03-28:
|
| 476 |
+
\begin{itemize}
|
| 477 |
+
\item New numbers for Inverse Model after bugfix by Takuma Ebisu.
|
| 478 |
+
\item New numbers for UMLS/Nations/Kinship datasets in appendix using the most commonly reported test data splits.
|
| 479 |
+
\end{itemize}
|
| 480 |
+
\item 2018-01-07: Extended AAAI camera ready (6/7/8).
|
| 481 |
+
\item 2017-07-08: Missing grant in acknowledgements.
|
| 482 |
+
\item 2017-07-05: Original NIPS submission (6/7/6).
|
| 483 |
+
\end{itemize}
|
| 484 |
+
\section{Further ConvE results}
|
| 485 |
+
\begin{center}
|
| 486 |
+
\begin{table}[h]
|
| 487 |
+
\caption{ConvE link prediction results for UMLS, Nations, and Kinship.}
|
| 488 |
+
\label{UMLS}
|
| 489 |
+
\begin{center}
|
| 490 |
+
\begin{tabularx}{\columnwidth}{lcccccc}
|
| 491 |
+
\toprule
|
| 492 |
+
& & & & \multicolumn{3}{c}{Hits} \\
|
| 493 |
+
\cmidrule{5-7}
|
| 494 |
+
Dataset & Model & MR & MRR & @10 & @3 & @1 \\
|
| 495 |
+
\midrule
|
| 496 |
+
UMLS & ConvE & 1 & .94 & .99 & .96 & .92 \\
|
| 497 |
+
Kinship & ConvE & 2 & .83 & .98 & .92 & .74 \\
|
| 498 |
+
\bottomrule
|
| 499 |
+
\end{tabularx}
|
| 500 |
+
\end{center}
|
| 501 |
+
\end{table}
|
| 502 |
+
\end{center}
|
| 503 |
+
\section{Evaluation Metrics}
|
| 504 |
+
We now describe the evaluation metrics used for assessing the quality of the models.
|
| 505 |
+
Let $\Test = \{ x_{1}, x_{2}, \ldots, x_{\card{\Test}} \}$ denote the test set.
|
| 506 |
+
Following \citet{DBLP:conf/nips/BordesUGWY13}, for the $i$-th test triple $x_{i}$ in $\Test$, we generate all its possible corruptions $\scorr{x_{i}}$ (resp. $\ocorr{x_{i}}$) -- obtained by replacing its subject (resp. object) with any other entity in the Knowledge Graph -- to check whether the model assigns an higher score to $x_{i}$ and a lower score to its corruptions.
|
| 507 |
+
Note that the set of corruptions can also contain several true triples, and it is not a mistake to rank them with an higher score than $x_{i}$.
|
| 508 |
+
For such a reason, we remove all triples in the graph from the set of corruptions: this is referred to as the \emph{filtered} setting in \citet{DBLP:conf/nips/BordesUGWY13}.
|
| 509 |
+
The \emph{left and right rank} of the $i$-th test triple -- each associated to corrupting either the subject or the object -- according to a model with scoring function $\fs(\scdot)$, are defined as follows:
|
| 510 |
+
\begin{equation*}
|
| 511 |
+
\begin{aligned}
|
| 512 |
+
\Rank^{\text{s}}_{i} = & 1 + \sum_{\tilde{x}_{i} \in \scorr{x_{i}} \setminus \KG} I\left[\fs(x_{i}) < \fs(\tilde{x}_{i}) \right], \\
|
| 513 |
+
\Rank^{\text{o}}_{i} = & 1 + \sum_{\tilde{x}_{i} \in \ocorr{x_{i}} \setminus \KG} I\left[\fs(x_{i}) < \fs(\tilde{x}_{i}) \right],
|
| 514 |
+
\end{aligned}
|
| 515 |
+
\end{equation*}
|
| 516 |
+
\noindent where $I\left[P\right]$ is $1$ iff the condition $P$ is true, and $0$ otherwise.
|
| 517 |
+
For measuring the quality of the ranking, we use the Mean Reciprocal Rank (MRR) and the Hits@$k$ metrics, which are defined as follows:
|
| 518 |
+
\begin{equation*}
|
| 519 |
+
\begin{array}{rl}
|
| 520 |
+
\text{MRR:} & \displaystyle{\frac{1}{2 |\Test|} \sum_{x_{i} \in \Test} \frac{1}{\Rank^{\text{s}}_{i}} + \frac{1}{\Rank^{\text{o}}_{i}} }, \\
|
| 521 |
+
\text{Hits@$k$ (\%):} & \displaystyle{\frac{100}{2 |\Test|} \sum_{x_{i} \in \Test} I\left[ \Rank^{\text{s}}_{i} \leq k \right] + I\left[ \Rank^{\text{o}}_{i} \leq k \right] }.
|
| 522 |
+
\end{array}
|
| 523 |
+
\end{equation*}
|
| 524 |
+
MRR is the average inverse rank for all test triples: the higher, the better.
|
| 525 |
+
Hits@$k$ is the percentage of ranks lower than or equal to $k$: the higher, the better.
|
1707.01917v2.txt
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Building Knowledge Graphs (KGs) out of unstructured data is an area of active research. Research in this has resulted in the construction of several large scale KGs, such as NELL Mitchell et al. (2015), Google Knowledge Vault Dong et al. (2014) and YAGO Suchanek et al. (2007). These KGs consist of millions of entities and beliefs involving those entities.Such KG construction methods are schema-guided as they require the list of input relations and their schemata (e.g., playerPlaysSport(Player, Sport)). In other words, knowledge of schemata is an important first step towards building such KGs.
|
| 2 |
+
|
| 3 |
+
While beliefs in such KGs are usually binary (i.e., involving two entities), many beliefs of interest go beyond two entities. For example, in the sports domain, one may be interested in beliefs of the form win(Roger Federer, Nadal, Wimbledon, London), which is an instance of the high-order (or n-ary) relation win whose schema is given by win(WinningPlayer, OpponentPlayer, Tournament, Location).We refer to the problem of inducing such relation schemata involving multiple arguments as Higher-order Relation Schema Induction (HRSI). In spite of its importance, HRSI is mostly unexplored.
|
| 4 |
+
|
| 5 |
+
Recently, tensor factorization-based methods have been proposed for binary relation schema induction Nimishakavi et al. (2016), with gains in both speed and accuracy over previously proposed generative models. To the best of our knowledge, tensor factorization methods have not been used for HRSI. We address this gap in this paper.
|
| 6 |
+
|
| 7 |
+
Due to data sparsity, straightforward adaptation of tensor factorization from Nimishakavi et al. (2016) to HRSI is not feasible, as we shall see in Section 3.1. We overcome this challenge in this paper, and make the following contributions.
|
| 8 |
+
|
| 9 |
+
•We propose Tensor Factorization with Back-off and Aggregation (TFBA), a novel tensor factorization-based method for Higher-order RSI (HRSI). In order to overcome data sparsity, TFBA backs-off and jointly factorizes multiple lower-order tensors derived from an extremely sparse higher-order tensor.•As an aggregation step, we propose a constrained clique mining step which constructs the higher-order schemata from multiple binary schemata.•Through experiments on multiple real-world datasets, we show the effectiveness of TFBA for HRSI.
|
| 10 |
+
|
| 11 |
+
Source code of TFBA is available at https://github.com/madhavcsa/TFBA.
|
| 12 |
+
|
| 13 |
+
The remainder of the paper is organized as follows. We discuss related work in Section 2. In Section 3.1, we first motivate why a back-off strategy is needed for HRSI, rather than factorizing the higher-order tensor. Further, we discuss the proposed TFBA framework in Section 3.2. In Section 4, we demonstrate the effectiveness of the proposed approach using multiple real world datasets. We conclude with a brief summary in Section 5.
|
| 14 |
+
|
| 15 |
+
In this section, we discuss related works in two broad areas: schema induction, and tensor and matrix factorizations.
|
| 16 |
+
|
| 17 |
+
Schema Induction: Most work on inducing schemata for relations has been in the binary setting Mohamed et al. (2011); Movshovitz-Attias andCohen (2015); Nimishakavi et al. (2016).McDonald et al. (2005) and Peng et al. (2017) extract n-ary relations from Biomedical documents, but do not induce the schema, i.e., type signature of the n-ary relations. There has been significant amount of work onSemantic Role Labeling Lang and Lapata (2011); Titov and Khoddam (2015); Roth and Lapata (2016), which can be considered as n-ary relation extraction. However, we are interested in inducing theschemata, i.e., the type signature of these relations.Event Schema Induction is the problem of inducing schemata for events in the corpus Balasubramanian et al. (2013); Chambers (2013); Nguyen et al. (2015). Recently, a model for event representations is proposed in Weber et al. (2018).
|
| 18 |
+
|
| 19 |
+
Cheung et al. (2013) propose a probabilistic model for inducing frames from text. Their notion of frame is closer to that of scripts Schank and Abelson (1977).Script learning is the process of automatically inferring sequence of events from text Mooney and DeJong (1985). There is a fair amount of recent work in statistical script learning Pichotta and Mooney (2016), Pichotta and Mooney (2014). While script learning deals with the sequence of events, we try to find the schemata of relations at a corpus level. Ferraro and Durme (2016) propose a unified Bayesian model for scripts, frames and events.Their model tries to capture all levels of Minsky Frame structure Minsky (1974), however we work with the surface semantic frames.
|
| 20 |
+
|
| 21 |
+
Tensor and Matrix Factorizations: Matrix factorization and joint tensor-matrix factorizations have been used for the problem of predicting links in the Universal Schema setting Riedel et al. (2013); Singh et al. (2015).Chen et al. (2015) use matrix factorizations for the problem of finding semantic slots for unsupervised spoken language understanding. Tensor factorization methods are also used in factorizing knowledge graphs Chang et al. (2014); Nickel et al. (2012). Joint matrix and tensor factorization frameworks, where the matrix provides additional information, is proposed in Acar et al. (2013) and Wang et al. (2015). These models are basedon PARAFAC Harshman (1970), a tensor factorization model which approximates the given tensor as a sum of rank-1 tensors. A boolean Tucker decomposition for discovering facts is proposed in Erdos and Miettinen (2013). In this paper, we use a modified version (Tucker2) of Tucker decomposition Tucker (1963).
|
| 22 |
+
|
| 23 |
+
RESCAL Nickel et al. (2011) is a simplified Tucker model suitable for relational learning.Recently, SICTF Nimishakavi et al. (2016), a variant of RESCAL with side information, is used for the problem of schema induction for binary relations.SICTF cannot be directly used to induce higher order schemata, as the higher-order tensors involved in inducing such schemata tend to be extremely sparse.TFBA overcomes these challenges to induce higher-order relation schemata by performing Non-Negative Tucker-style factorization of sparse tensor while utilizing a back-off strategy, as explained in the next section.
|
| 24 |
+
|
| 25 |
+
In this section, we start by discussing the approach of factorizing a higher-order tensor and provide the motivation for back-off strategy.Next, we discuss the proposed TFBA approach in detail. Please refer to Table 1 for notations used in this paper.
|
| 26 |
+
|
| 27 |
+
Given a text corpus, we use OpenIEv5 Mausam (2016) to extract tuples.Consider the following sentence “Federer won against Nadal at Wimbledon.”. Given this sentence, OpenIE extracts the 4-tuple (Federer, won, against Nadal, at Wimbledon). We lemmatize the relations in the tuples and only consider the noun phrases as arguments. Let 𝕋𝕋\mathbb{T} represent the set of these 4-tuples. We can construct a 4-order tensor 𝒳∈ℛ⇓\∞×\∈×\∋×⇕𝒳superscriptsubscriptℛ⇓subscript\∞subscript\∈subscript\∋⇕\ten{X}\in\mathbb{R}_{+}^{n_{1}\times n_{2}\times n_{3}\times m} from 𝕋𝕋\mathbb{T}{}.Here, n1subscript𝑛1n_{1} is the number of subject noun phrases (NPs), n2subscript𝑛2n_{2} is the number of object NPs, n3subscript𝑛3n_{3} is the number of other NPs, and m𝑚m is the number of relations in 𝕋𝕋\mathbb{T}{}. Values in the tensor correspond to the frequency of the tuples.In case of 5-tuples of the form (subject, relation, object, other-1, other-2), we split the 5-tuples into two 4-tuples of the form (subject, relation, object, other-1) and (subject, relation, object, other-2) and frequency of these 4-tuples is considered to be same as the original 5-tuple.Factorizing the tensor 𝒳𝒳\ten{X} results in discovering latent categories of NPs, which help in inducing the schemata. We propose the following approach to factorize 𝒳𝒳\ten{X}.
|
| 28 |
+
|
| 29 |
+
min𝒢⇔A⇔B⇔C∥𝒳↖𝒢×∞A×∈B×∋C×△I∥F2+λa∥A∥F2+λb∥B∥F2+λc∥C∥F2,\min\limits_{\ten{G},\mbox{\bf A},\mbox{\bf B},\mbox{\bf C}}\left\lVert\ten{X}-\ten{G}\times_{1}\mbox{\bf A}\times_{2}\mbox{\bf B}\times_{3}\mbox{\bf C}\times_{4}\mbox{\bf I}\right\rVert_{F}^{2}\\+\lambda_{a}\left\lVert\mbox{\bf A}\right\rVert_{F}^{2}+\lambda_{b}\left\lVert\mbox{\bf B}\right\rVert_{F}^{2}+\lambda_{c}\left\lVert\mbox{\bf C}\right\rVert_{F}^{2},
|
| 30 |
+
|
| 31 |
+
where,
|
| 32 |
+
|
| 33 |
+
A∈ℝ+n1×r1,B∈ℝ+n2×r2,C∈ℝ+n3×r3,𝒢∈ℛ⇓∇∞×∇∈×∇∋×⇕⇔λ⊣≥′⇔λ⌊≥′ and λ⌋≥′↙formulae-sequenceAsuperscriptsubscriptℝsubscript𝑛1subscript𝑟1formulae-sequenceBsuperscriptsubscriptℝsubscript𝑛2subscript𝑟2formulae-sequenceCsuperscriptsubscriptℝsubscript𝑛3subscript𝑟3𝒢superscriptsubscriptℛ⇓subscript∇∞subscript∇∈subscript∇∋⇕⇔subscript𝜆⊣′⇔subscript𝜆⌊′ and subscript𝜆⌋′↙\mbox{\bf A}\in\mathbb{R}_{+}^{n_{1}\times r_{1}},\mbox{\bf B}\in\mathbb{R}_{+}^{n_{2}\times r_{2}},\mbox{\bf C}\in\mathbb{R}_{+}^{n_{3}\times r_{3}},\\\ten{G}\in\mathbb{R}_{+}^{r_{1}\times r_{2}\times r_{3}\times m},\lambda_{a}\geq 0,\lambda_{b}\geq 0\text{~{}and~{}}\lambda_{c}\geq 0.
|
| 34 |
+
|
| 35 |
+
Here, I is the identity matrix.Non-negative updates for the variables can be obtained following Lee and Seung (2000). Similar to Nimishakavi et al. (2016), schemata induced will be of the form relation ⟨Ai,Bj,Ck⟩subscriptA𝑖subscriptB𝑗subscriptC𝑘\langle\mbox{\bf A}_{i},\mbox{\bf B}_{j},\mbox{\bf C}_{k}\rangle. Here, PisubscriptP𝑖\mbox{\bf P}_{i} represents the ithsuperscript𝑖thi^{\text{th}} column of a matrix P.A is the embedding matrix of subject NPs in 𝕋𝕋\mathbb{T}{} (i.e., mode-1 of 𝒳𝒳\ten{X}), r1subscript𝑟1r_{1} is the embedding rank in mode-1 which is the number of latent categories of subject NPs. Similarly, B and C are the embedding matrices of object NPs and other NPs respectively. r2subscript𝑟2r_{2} and r3subscript𝑟3r_{3} are the number of latent categories of object NPs and other NPs respectively. 𝒢𝒢\ten{G} is the core tensor. λasubscript𝜆𝑎\lambda_{a}, λbsubscript𝜆𝑏\lambda_{b} and λcsubscript𝜆𝑐\lambda_{c} are the regularization weights.
|
| 36 |
+
|
| 37 |
+
However, the 4-order tensors are heavily sparse for all the datasets we consider in this work. The sparsity ratio of this 4-order tensor for all the datasets is of the order 1e-7. As a result of the extreme sparsity, this approach fails to learn any schemata.Therefore, we propose a more successful back-off strategy for higher-order RSI in the next section.
|
| 38 |
+
|
| 39 |
+
To alleviate the problem of sparsity, we construct three tensors 𝒳∋superscript𝒳∋\ten{X}^{3}, 𝒳∈superscript𝒳∈\ten{X}^{2}, and 𝒳∞superscript𝒳∞\ten{X}^{1} from 𝕋𝕋\mathbb{T} as follows:
|
| 40 |
+
|
| 41 |
+
•𝒳∋∈ℛ⇓\∞×\∈×⇕superscript𝒳∋superscriptsubscriptℛ⇓subscript\∞subscript\∈⇕\ten{X}^{3}\in\mathbb{R}_{+}^{n_{1}\times n_{2}\times m} is constructed out of the tuples in 𝕋𝕋\mathbb{T}{} by dropping the other argument and aggregating resulting tuples, i.e., 𝒳⟩⇔|⇔√∋ℑ∑∥ℑ∞\∋𝒳⟩⇔|⇔∥⇔√subscriptsuperscript𝒳∋conditional⟩⇔⇔√ℑsuperscriptsubscript∥ℑ∞subscript\∋subscript𝒳conditional⟩⇔⇔∥⇔√\ten{X}^{3}_{i,j,p}=\sum_{k=1}^{n_{3}}\ten{X}_{i,j,k,p}. For example, 4-tuples ⟨⟨\langle(Federer, Win, Nadal, Wimbledon), 10⟩⟩\rangle and ⟨⟨\langle(Federer, Win, Nadal, Australian Open), 5⟩⟩\rangle will be aggregated to form a triple ⟨⟨\langle(Federer, Win, Nadal), 15⟩⟩\rangle.•𝒳∈∈ℛ⇓\∞×\∋×⇕superscript𝒳∈superscriptsubscriptℛ⇓subscript\∞subscript\∋⇕\ten{X}^{2}\in\mathbb{R}_{+}^{n_{1}\times n_{3}\times m} is constructed out of the tuples in 𝕋𝕋\mathbb{T}{} by dropping the object argument and aggregating resulting tuples i.e., 𝒳⟩⇔|⇔√∈ℑ∑∥ℑ∞\∈𝒳⟩⇔∥⇔|⇔√subscriptsuperscript𝒳∈conditional⟩⇔⇔√ℑsuperscriptsubscript∥ℑ∞subscript\∈subscript𝒳conditional⟩⇔∥⇔⇔√\ten{X}^{2}_{i,j,p}=\sum_{k=1}^{n_{2}}\ten{X}_{i,k,j,p}.•𝒳∞∈ℛ⇓\∈×\∋×⇕superscript𝒳∞superscriptsubscriptℛ⇓subscript\∈subscript\∋⇕\ten{X}^{1}\in\mathbb{R}_{+}^{n_{2}\times n_{3}\times m} constructed out of the tuples in 𝕋𝕋\mathbb{T}{} by dropping the subject argument and aggregating resulting tuples i.e., 𝒳⟩⇔|⇔√∞ℑ∑∥ℑ∞\∞𝒳∥⇔⟩⇔|⇔√subscriptsuperscript𝒳∞conditional⟩⇔⇔√ℑsuperscriptsubscript∥ℑ∞subscript\∞subscript𝒳conditional∥⇔⟩⇔⇔√\ten{X}^{1}_{i,j,p}=\sum_{k=1}^{n_{1}}\ten{X}_{k,i,j,p}.
|
| 42 |
+
|
| 43 |
+
The proposed framework TFBA for inducing higher order schemata involves the following two steps.•Step 1: In this step, TFBA factorizes multiple lower-order overlapping tensors, 𝒳∞superscript𝒳∞\ten{X}^{1}, 𝒳∈superscript𝒳∈\ten{X}^{2}, and 𝒳∋superscript𝒳∋\ten{X}^{3}, derived from 𝒳𝒳\ten{X} to induce binary schemata. This step is illustrated in Figure 1 and we discuss details in Section 3.2.1.•Step 2: In this step, TFBA connects multiple binary schemata identified above to induce higher-order schemata. The method accomplishes this by solving a constrained clique problem. This step is illustrated in Figure 2 and we discuss the details in Section 3.2.2.
|
| 44 |
+
|
| 45 |
+
A schematic overview of this step is shown in Figure 1. TFBA first preprocesses the corpus and extracts OpenIE tuple set 𝕋𝕋\mathbb{T}{} out of it. The 4-mode tensor 𝒳𝒳\ten{X} is constructed out of 𝕋𝕋\mathbb{T}{}. Instead of performing factorization of the higher-order tensor 𝒳𝒳\ten{X} as in Section 3.1, TFBA creates three tensors out of 𝒳𝒳\ten{X}: 𝒳\∈×\∋×⇕∞⇔𝒳\∞×\∋×⇕∈subscriptsuperscript𝒳∞subscript\∈subscript\∋⇕⇔subscriptsuperscript𝒳∈subscript\∞subscript\∋⇕\ten{X}^{1}_{n_{2}\times n_{3}\times m},\ten{X}^{2}_{n_{1}\times n_{3}\times m} and 𝒳\∞×\∈×⇕∋subscriptsuperscript𝒳∋subscript\∞subscript\∈⇕\ten{X}^{3}_{n_{1}\times n_{2}\times m}.
|
| 46 |
+
|
| 47 |
+
TFBA performs a coupled non-negative Tucker factorization of the input tensors 𝒳∞⇔𝒳∈superscript𝒳∞⇔superscript𝒳∈\ten{X}^{1},\ten{X}^{2} and 𝒳∋superscript𝒳∋\ten{X}^{3} by solving the following optimization problem.minA⇔B⇔C𝒢∞⇔𝒢∈⇔𝒢∋{⇐𝒳∋⇔𝒢∋⇔A⇔B⇒⇓{⇐𝒳∈⇔𝒢∈⇔A⇔C⇒+f(𝒳∞⇔𝒢∞⇔B⇔C⇒+λa∥A∥F2+λb∥B∥F2+λc∥C∥F2,\underset{\ten{G}^{1},\ten{G}^{2},\ten{G}^{3}}{\min\limits_{\mbox{\bf A},\mbox{\bf B},\mbox{\bf C}}}f(\ten{X}^{3},\ten{G}^{3},\mbox{\bf A},\mbox{\bf B})+f(\ten{X}^{2},\ten{G}^{2},\mbox{\bf A},\mbox{\bf C})\\\qquad\qquad\qquad+f(\ten{X}^{1},\ten{G}^{1},\mbox{\bf B},\mbox{\bf C})\\+\lambda_{a}\left\lVert\mbox{\bf A}\right\rVert_{F}^{2}+\lambda_{b}\left\lVert\mbox{\bf B}\right\rVert_{F}^{2}+\lambda_{c}\left\lVert\mbox{\bf C}\right\rVert_{F}^{2},(1)where,f(𝒳⟩⇔𝒢⟩⇔P⇔Q⇒ℑ∥𝒳⟩↖𝒢⟩×∞P×∈Q×∋I∥ℱ∈A∈ℝ+n1×r1,B∈ℝ+n2×r2,C∈ℝ+n3×r3𝒢∞∈ℛ⇓∇∈×∇∋×⇕⇔𝒢∈∈ℛ⇓∇∞×∇∋×⇕⇔𝒢∋∈ℛ⇓∇∞×∇∈×⇕↙f(\ten{X}^{i},\ten{G}^{i},\mbox{\bf P},\mbox{\bf Q})=\left\lVert\ten{X}^{i}-\ten{G}^{i}\times_{1}\mbox{\bf P}\times_{2}\mbox{\bf Q}\times_{3}\mbox{\bf I}\right\rVert_{F}^{2}\\\mbox{\bf A}\in\mathbb{R}^{n_{1}\times r_{1}}_{+},\mbox{\bf B}\in\mathbb{R}^{n_{2}\times r_{2}}_{+},\mbox{\bf C}\in\mathbb{R}^{n_{3}\times r_{3}}_{+}\\\ten{G}^{1}\in\mathbb{R}^{r_{2}\times r_{3}\times m}_{+},\ten{G}^{2}\in\mathbb{R}^{r_{1}\times r_{3}\times m}_{+},\ten{G}^{3}\in\mathbb{R}^{r_{1}\times r_{2}\times m}_{+}.We enforce non-negativity constraints on the matrices A,B,CABC\mbox{\bf A},\mbox{\bf B},\mbox{\bf C} and the core tensors 𝒢⟩superscript𝒢⟩\ten{G}^{i} (i∈{1,2,3}𝑖123i\in\{1,2,3\}). Non-negativity is essential for learning interpretable latent factors Murphy et al. (2012).
|
| 48 |
+
|
| 49 |
+
Each slice of the core tensor 𝒢∋superscript𝒢∋\ten{G}^{3} corresponds to one of the m𝑚m relations. Each cell in a slice corresponds to an induced schema in terms of the latent factors from matrices A and B. In other words, 𝒢⟩⇔|⇔∥∋subscriptsuperscript𝒢∋conditional⟩⇔⇔∥\ten{G}^{3}_{i,j,k} is an induced binary schema for relation k𝑘k involving induced categories represented by columns AisubscriptA𝑖\mbox{\bf A}_{i} and BjsubscriptB𝑗\mbox{\bf B}_{j}. Cells in 𝒢∞superscript𝒢∞\ten{G}^{1} and 𝒢∈superscript𝒢∈\ten{G}^{2} may be interpreted accordingly.
|
| 50 |
+
|
| 51 |
+
We derive non-negative multiplicative updates for A,BAB\mbox{\bf A},\mbox{\bf B} and C following the NMF updating rules given in Lee and Seung (2000). For the update of A, we consider the mode-1 matricization of first and the second term in Equation 1along with the regularizer.
|
| 52 |
+
|
| 53 |
+
A←A∗𝒳⇐∞⇒∋𝒢ℬ𝒜⊤⇓𝒳⇐∞⇒∈𝒢𝒞𝒜⊤A[𝒢BA𝒢BA⊤+𝒢CA𝒢CA⊤]+λaA,←AAsubscriptsuperscript𝒳∋⇐∞⇒superscriptsubscript𝒢subscriptℬ𝒜top⇓subscriptsuperscript𝒳∈⇐∞⇒superscriptsubscript𝒢subscript𝒞𝒜topAdelimited-[]subscript𝒢subscript𝐵𝐴superscriptsubscript𝒢subscript𝐵𝐴topsubscript𝒢subscript𝐶𝐴superscriptsubscript𝒢subscript𝐶𝐴topsubscript𝜆𝑎A\mbox{\bf A}\leftarrow\mbox{\bf A}*\frac{\ten{X}^{3}_{(1)}\mathcal{G}_{B_{A}}^{\top}+\ten{X}^{2}_{(1)}\mathcal{G}_{C_{A}}^{\top}}{\mbox{\bf A}[\mathcal{G}_{B_{A}}\mathcal{G}_{B_{A}}^{\top}+\mathcal{G}_{C_{A}}\mathcal{G}_{C_{A}}^{\top}]+\lambda_{a}\mbox{\bf A}},where,𝒢BA=(𝒢∋×∈B⇒⇐∞⇒⇔𝒢𝒞𝒜ℑ⇐𝒢∈×∈C⇒⇐∞⇒↙\mathcal{G}_{B_{A}}=(\ten{G}^{3}\times_{2}\mbox{\bf B})_{(1)},~{}~{}\mathcal{G}_{C_{A}}=(\ten{G}^{2}\times_{2}\mbox{\bf C})_{(1)}.
|
| 54 |
+
|
| 55 |
+
In order to estimate B, we consider mode-2 matricization of first term and mode-1 matricization of third term in Equation 1, along with the regularization term. We get the following update rule for B
|
| 56 |
+
|
| 57 |
+
B←B∗𝒳⇐∈⇒∋𝒢𝒜ℬ⊤⇓𝒳⇐∞⇒∞𝒢𝒞ℬ⊤B[𝒢AB𝒢AB⊤+𝒢CB𝒢CB⊤]+λbB,←BBsubscriptsuperscript𝒳∋⇐∈⇒superscriptsubscript𝒢subscript𝒜ℬtop⇓subscriptsuperscript𝒳∞⇐∞⇒superscriptsubscript𝒢subscript𝒞ℬtopBdelimited-[]subscript𝒢subscript𝐴𝐵superscriptsubscript𝒢subscript𝐴𝐵topsubscript𝒢subscript𝐶𝐵superscriptsubscript𝒢subscript𝐶𝐵topsubscript𝜆𝑏B\mbox{\bf B}\leftarrow\mbox{\bf B}*\frac{\ten{X}^{3}_{(2)}\mathcal{G}_{A_{B}}^{\top}+\ten{X}^{1}_{(1)}\mathcal{G}_{C_{B}}^{\top}}{\mbox{\bf B}[\mathcal{G}_{A_{B}}\mathcal{G}_{A_{B}}^{\top}+\mathcal{G}_{C_{B}}\mathcal{G}_{C_{B}}^{\top}]+\lambda_{b}\mbox{\bf B}},
|
| 58 |
+
|
| 59 |
+
where,
|
| 60 |
+
|
| 61 |
+
𝒢AB=(𝒢∋×∞A⇒⇐∈⇒⇔𝒢𝒞ℬℑ⇐𝒢∞×∈C⇒⇐∞⇒↙\mathcal{G}_{A_{B}}=(\ten{G}^{3}\times_{1}\mbox{\bf A})_{(2)},~{}~{}\mathcal{G}_{C_{B}}=(\ten{G}^{1}\times_{2}\mbox{\bf C})_{(1)}.
|
| 62 |
+
|
| 63 |
+
For updating C, we consider mode-2 matricization of second and third terms in Equation 1 along with the regularization term, and we get
|
| 64 |
+
|
| 65 |
+
C←C∗𝒳⇐∈⇒∋𝒢ℬ𝒞⊤⇓𝒳⇐∈⇒∈𝒢𝒜𝒞⊤C[𝒢AC𝒢AC⊤+𝒢BC𝒢BC⊤]+λcC,←CCsubscriptsuperscript𝒳∋⇐∈⇒superscriptsubscript𝒢subscriptℬ𝒞top⇓subscriptsuperscript𝒳∈⇐∈⇒superscriptsubscript𝒢subscript𝒜𝒞topCdelimited-[]subscript𝒢subscript𝐴𝐶superscriptsubscript𝒢subscript𝐴𝐶topsubscript𝒢subscript𝐵𝐶superscriptsubscript𝒢subscript𝐵𝐶topsubscript𝜆𝑐C\mbox{\bf C}\leftarrow\mbox{\bf C}*\frac{\ten{X}^{3}_{(2)}\mathcal{G}_{B_{C}}^{\top}+\ten{X}^{2}_{(2)}\mathcal{G}_{A_{C}}^{\top}}{\mbox{\bf C}[\mathcal{G}_{A_{C}}\mathcal{G}_{A_{C}}^{\top}+\mathcal{G}_{B_{C}}\mathcal{G}_{B_{C}}^{\top}]+\lambda_{c}\mbox{\bf C}},
|
| 66 |
+
|
| 67 |
+
where,
|
| 68 |
+
|
| 69 |
+
𝒢AC=(𝒢∋×∞B⇒⇐∈⇒⇔𝒢ℬ𝒞ℑ⇐𝒢∈×∞A⇒⇐∈⇒↙\mathcal{G}_{A_{C}}=(\ten{G}^{3}\times_{1}\mbox{\bf B})_{(2)},~{}~{}\mathcal{G}_{B_{C}}=(\ten{G}^{2}\times_{1}\mbox{\bf A})_{(2)}.
|
| 70 |
+
|
| 71 |
+
Finally, we update the three core tensors in Equation 1 following Kim and Choi (2007) as follows,
|
| 72 |
+
|
| 73 |
+
𝒢∞←𝒢∞⇑𝒳∞×∞B⊤×∈C⊤𝒢∞×∞B⊤B×∈C⊤C⇔←superscript𝒢∞superscript𝒢∞⇑subscript∈subscript∞superscript𝒳∞superscriptBtopsuperscriptCtopsubscript∈subscript∞superscript𝒢∞superscriptBtopBsuperscriptCtopC⇔\ten{G}^{1}\leftarrow\ten{G}^{1}*\frac{\ten{X}^{1}\times_{1}\mbox{\bf B}^{\top}\times_{2}\mbox{\bf C}^{\top}}{\ten{G}^{1}\times_{1}\mbox{\bf B}^{\top}\mbox{\bf B}\times_{2}\mbox{\bf C}^{\top}\mbox{\bf C}},𝒢∈←𝒢∈⇑𝒳∈×∞A⊤×∈C⊤𝒢∈×∞A⊤A×∈C⊤C⇔←superscript𝒢∈superscript𝒢∈⇑subscript∈subscript∞superscript𝒳∈superscriptAtopsuperscriptCtopsubscript∈subscript∞superscript𝒢∈superscriptAtopAsuperscriptCtopC⇔\ten{G}^{2}\leftarrow\ten{G}^{2}*\frac{\ten{X}^{2}\times_{1}\mbox{\bf A}^{\top}\times_{2}\mbox{\bf C}^{\top}}{\ten{G}^{2}\times_{1}\mbox{\bf A}^{\top}\mbox{\bf A}\times_{2}\mbox{\bf C}^{\top}\mbox{\bf C}},𝒢∋←𝒢∋⇑𝒳∋×∞A⊤×∈B⊤𝒢∋×∞A⊤A×∈B⊤B↙←superscript𝒢∋superscript𝒢∋⇑subscript∈subscript∞superscript𝒳∋superscriptAtopsuperscriptBtopsubscript∈subscript∞superscript𝒢∋superscriptAtopAsuperscriptBtopB↙\ten{G}^{3}\leftarrow\ten{G}^{3}*\frac{\ten{X}^{3}\times_{1}\mbox{\bf A}^{\top}\times_{2}\mbox{\bf B}^{\top}}{\ten{G}^{3}\times_{1}\mbox{\bf A}^{\top}\mbox{\bf A}\times_{2}\mbox{\bf B}^{\top}\mbox{\bf B}}.
|
| 74 |
+
|
| 75 |
+
In all the above updates, PQPQ\frac{\mbox{\bf P}}{\mbox{\bf Q}} represents element-wise division and I is the identity matrix.
|
| 76 |
+
|
| 77 |
+
Initialization: For initializing the component matrices A,BAB\mbox{\bf A},\mbox{\bf B}, and C, we first perform a non-negative Tucker2 Decomposition of the individual input tensors 𝒳∞⇔𝒳∈⇔superscript𝒳∞⇔superscript𝒳∈⇔\ten{X}^{1},\ten{X}^{2}, and 𝒳∋superscript𝒳∋\ten{X}^{3}. Then compute the average of component matrices obtained from each individual decomposition for initialization. We initialize the core tensors 𝒢∞⇔𝒢∈⇔superscript𝒢∞⇔superscript𝒢∈⇔\ten{G}^{1},\ten{G}^{2}, and 𝒢∋superscript𝒢∋\ten{G}^{3} with the core tensorsobtained from the individual decompositions.
|
| 78 |
+
|
| 79 |
+
In this section, we describe how a higher-order schema is constructed from the factorization described in the previous sub-section. Each relation k𝑘k has three representations given by the slices 𝒢∥∞subscriptsuperscript𝒢∞∥\ten{G}^{1}_{k}, 𝒢∥∈subscriptsuperscript𝒢∈∥\ten{G}^{2}_{k} and 𝒢∥∋subscriptsuperscript𝒢∋∥\ten{G}^{3}_{k} from each core tensor. We need a principledway to produce a joint schema from these representations. For a relation, we select top-n𝑛n indices (i,j)𝑖𝑗(i,j) with highest values from each matrix. The indices i𝑖i and j𝑗j from 𝒢∥∋subscriptsuperscript𝒢∋∥\ten{G}^{3}_{k} correspond to column numbers of A and Brespectively, indices from 𝒢∥∈subscriptsuperscript𝒢∈∥\ten{G}^{2}_{k} correspond to columns from A and C and columns from 𝒢∥∞subscriptsuperscript𝒢∞∥\ten{G}^{1}_{k} correspond to columns from B and C.
|
| 80 |
+
|
| 81 |
+
We construct a tri-partite graph with the column numbers from each of thecomponent matrices A, B and C as the vertices belonging to independent sets, the top-n𝑛n indices selected are the edges between these vertices. From this tri-partite graph, we find all the triangles which will give schemawith three arguments for a relation, illustrated in Figure 2. We find higher order schemata, i.e., schemata with more than three arguments by merging two third order schemata with same column number from A and B. For example, if we find two schemata(A2,B4,C10)subscriptA2subscriptB4subscriptC10(\mbox{\bf A}_{2},\mbox{\bf B}_{4},\mbox{\bf C}_{10}) and (A2,B4,C8)subscriptA2subscriptB4subscriptC8(\mbox{\bf A}_{2},\mbox{\bf B}_{4},\mbox{\bf C}_{8}) then we merge these two to give (A2,B4,C10,C8)subscriptA2subscriptB4subscriptC10subscriptC8(\mbox{\bf A}_{2},\mbox{\bf B}_{4},\mbox{\bf C}_{10},\mbox{\bf C}_{8}) as a higher order schema. This can be continuedfurther for even higher order schemata. This process may be thought of as finding a constrained clique over the tri-partite graph. Here the constraint is that in the maximal clique, there can only be one edge between sets correspondingto columns of A and columns of B.
|
| 82 |
+
|
| 83 |
+
The procedure above is inspired by McDonald et al. (2005). However, we note that McDonald et al. (2005) solved a different problem, viz., n-ary relation instance extraction, while our focus is on inducing schemata.Though we discuss the case of back-off from 4-order to 3-order, ideas presented above can be extended for even higher orders depending on the sparsity of the tensors.
|
| 84 |
+
|
| 85 |
+
In this section, we evaluate the performance of TFBA for the task of HRSI. We also propose a baseline model for HRSI called HardClust. HardClust: We propose a baseline model called the Hard Clustering Baseline (HardClust) for the task of higher order relation schema induction.This model induces schemata by grouping per-relation NP arguments from OpenIE extractions. In other words, for each relation, all the Noun Phrases (NPs) in first argument form a cluster that represents the subject of the relation, all the NPs in the second argument form a cluster that represents object and so on.Then from each cluster, the top most frequent NPs are chosen as the representative NPs for the argument type. We note that this method is only able to induce one schema per relation.
|
| 86 |
+
|
| 87 |
+
Datasets: We run our experiments on three datasets. The first dataset (Shootings) is a collection of 1,335 documents constructed from a publicly available database of mass shootings in the United States. The secondis New York Times Sports (NYT Sports) dataset which is a collection of 20,940 sports documents from the period 2005 and 2007. And the third dataset (MUC) is a set of 1300 Latin American newswire documents about terrorism events.After performing the processing steps described in Section 3,we obtained 357,914 unique OpenIE extractions from the NYT Sports dataset, 10,847 from Shootings dataset, and 8,318 from the MUC dataset.However, in order to properly analyze and evaluate the model, we consider only the 50 most frequent relations in the datasets and their corresponding OpenIE extractions.This is done to avoid noisy OpenIE extractions to yield better data quality and to aid subsequent manual evaluation of the data.We construct input tensors following the procedure described in Section 3.2.Details on the dimensions of tensors obtained are given in Table 2.
|
| 88 |
+
|
| 89 |
+
Model Selection: In order to select appropriate TFBA parameters, we perform a grid search over the space of hyper-parameters, and select the set of hyper-parameters that give best Average FIT score (AvgFITAvgFIT\mathrm{AvgFIT}).AvgFIT(𝒢∞⇔𝒢∈⇔𝒢∋⇔A⇔B⇔C⇔𝒳∞⇔𝒳∈⇔𝒳∋⇒ℑ13{FIT(𝒳∞⇔𝒢∞⇔B⇔C⇒⇓ℱℐ𝒯⇐𝒳∈⇔𝒢∈⇔A⇔C⇒+FIT(𝒳∋⇔𝒢∋⇔A⇔B⇒}⇔\mathrm{AvgFIT}(\ten{G}^{1},\ten{G}^{2},\ten{G}^{3},\mbox{\bf A},\mbox{\bf B},\mbox{\bf C},\ten{X}^{1},\ten{X}^{2},\ten{X}^{3})=\\\frac{1}{3}\{\mathrm{FIT}(\ten{X}^{1},\ten{G}^{1},\mbox{\bf B},\mbox{\bf C})+\mathrm{FIT}(\ten{X}^{2},\ten{G}^{2},\mbox{\bf A},\mbox{\bf C})\\+\mathrm{FIT}(\ten{X}^{3},\ten{G}^{3},\mbox{\bf A},\mbox{\bf B})\},where,FIT(𝒳⇔𝒢⇔P⇔Q⇒ℑ∞↖∥𝒳↖𝒢×∞P×∈Q∥ℱ∥𝒳∥ℱ↙\mathrm{FIT}(\ten{X},\ten{G},\mbox{\bf P},\mbox{\bf Q})=1-\frac{\left\lVert\ten{X}-\ten{G}\times_{1}\mbox{\bf P}\times_{2}\mbox{\bf Q}\right\rVert_{F}}{\left\lVert\ten{X}\right\rVert_{F}}.
|
| 90 |
+
|
| 91 |
+
We perform a grid search for the rank parameters between 5 and 20, for the regularization weights we perform a grid search over 0 and 1. Table 3 provides the details of hyper-parameters set for different datasets.Evaluation Protocol: For TFBA, we follow the protocol mentioned in Section 3.2.2 for constructing higher order schemata. For every relation, we consider top 5 binary schemata from the factorization of each tensor.We construct a tripartite graph, as explained in Section 3.2.2, and mine constrained maximal cliques from the tripartite graphs for schemata. Table 4 provides some qualitative examples of higher-order schemata induced by TFBA. Accuracy of the schemata induced by the model is evaluated by human evaluators. In our experiments, we use human judgments from three evaluators.For every relation, the first and second columns given in Table 4 are presented to the evaluators and they are asked to validate the schema.We present top 50 schemata based on the score of the constrained maximal clique induced by TFBA to the evaluators.This evaluation protocol was also used in Movshovitz-Attias andCohen (2015) for evaluating ontology induction. All evaluations were blind, i.e., the evaluators were not aware of the model they were evaluating.
|
| 92 |
+
|
| 93 |
+
Difficulty with Computing Recall: Even though recall is a desirable measure, due to the lack of availability of gold higher-order schema annotated corpus, it is not possible to compute recall. Although the MUC dataset has gold annotations for some predefined list of events, it does not have annotations for the relations.
|
| 94 |
+
|
| 95 |
+
Experimental results comparing performance of various models for the task of HRSI are given in Table 5. We present evaluation results from three evaluators represented as E1, E2 and E3.As can be observed from Table 5, TFBA achieves better results than HardClust for the Shootings and NYT Sports datasets, however HardClust achieves better results for the MUC dataset. Percentage agreement of the evaluators for TFBA is 72%, 70% and 60% for Shootings, NYT Sports and MUC datasets respectively.
|
| 96 |
+
|
| 97 |
+
HardClust Limitations: Even though HardClust gives better induction for MUC corpus, this approach has some serious drawbacks. HardClust can only induce one schema per relation. This is a restrictive constraint as multiple senses can exist for a relation.For example, consider the schemata induced for the relation shoot as shown in Table 4. TFBA induces two senses for the relation, but HardClust can induce only one schema.For a set of 4-tuples, HardClust can only induce ternary schemata; the dimensionality of the schemata cannot be varied. Since the latent factors induced by HardClust are entirely based on frequency, the latent categories induced by HardClust are dominated by only a fixed set of noun phrases.For example, in NYT Sports dataset, subject category induced by HardClust for all the relations is ⟨⟨\langleteam, yankees, mets⟩⟩\rangle. In addition to inducing only one schema per relation, most of the times HardClust only induces a fixed set of categories. Whereas for TFBA, the number of categories depends on the rank of factorization, which is a user provided parameter, thus providing more flexibility to choose the latent categories.
|
| 98 |
+
|
| 99 |
+
Event schema induction is defined as the task of learning high-level representations of events, like a tournament, and their entity roles, like winning-player etc, from unlabeled text. Even though the main focus of event schema induction is to induce the important roles of the events, as a side result most of the algorithms also provide schemata for the relations.In this section, we investigate the effectiveness of these schemata compared to the ones induced by TFBA.
|
| 100 |
+
|
| 101 |
+
Event schemata are represented as a set of (Actor, Rel, Actor) triples in Balasubramanian et al. (2013). Actors represent groups of noun phrases and Rels represent relations. From this style of representation, however, the n-ary schemata for relations cannot be induced.Event schemata generated in Weber et al. (2018) are similar to that in Balasubramanian et al. (2013).Event schema induction algorithm proposed in Nguyen et al. (2015) doesn’t induce schemata for relations, but rather induces the roles for the events. For this investigation we experiment with the following algorithm.
|
| 102 |
+
|
| 103 |
+
Chambers-13 Chambers (2013): This model learns event templates from text documents. Each event template provides a distribution over slots, where slots are clusters of NPs. Each event template also provides a cluster of relations, which is most likely to appear in the context of the aforementioned slots. We evaluate the schemata of these relation clusters.
|
| 104 |
+
|
| 105 |
+
As can be observed from Table 5, the proposed TFBA performs much better than Chambers-13. HardClust also performs better than Chambers-13 on all the datasets. From this analysis we infer that there is a need foralgorithms which induce higher-order schemata for relations, a gap we fill in this paper. Please note that the experimental results provided in Chambers (2013) for MUC dataset are for the task of event schema induction, but in this work we evaluate the relation schemata. Hence the results in Chambers (2013) and results in this paper are not comparable. Example schemata induced by TFBA and (Chambers-13) are provided as part of the supplementary material.
|
| 106 |
+
|
| 107 |
+
Higher order Relation Schema Induction (HRSI) is an important first step towards building domain-specific Knowledge Graphs (KGs). In this paper, we proposed TFBA, a tensor factorization-based method for higher-order RSI. To the best of our knowledge, this is the first attempt at inducing higher-order (n-ary) schemata for relations from unlabeled text. Rather than factorizing a severely sparse higher-order tensor directly, TFBA performs back-off and jointly factorizes multiple lower-order tensors derived out of the higher-order tensor. In the second step, TFBA solves a constrained clique problem to induce schemata out of multiple binary schemata.We are hopeful that the backoff-based factorization idea exploited in TFBA will be useful in other sparse factorization settings.
|
1707.01922v5.txt
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The useful information to solve practical tasks often exists in different domains captured by various sensors, where a domain can be either a modality or a dataset. For instance, the 3-D layout of a room can be either captured by a depth sensor or inferred from the RGB images. In real-world scenarios, it is highly likely that we can only access limited amount of data in certain domain(s). The performance of the solution (e.g. the classifier for classification tasks) we learn from one domain often degrades when the same solution is applied to other domains, which is caused by domain shift [17] in a typical domain adaptation (DA) task, where source-domain training data, target-domain training data, and a task of interest (TOI) are given. The goal of a DA task is to derive solution(s) of the TOI for both the source and target domains.
|
| 2 |
+
|
| 3 |
+
The state-of-the-art DA methods such as [1, 14, 15, 16, 25, 30, 35, 37, 39, 40, 41, 43, 44, 47, 50] are proposed to solve DA tasks under the assumption that the task-relevant data, the data directly applicable and related to the TOI (regardless of whether it is labeled or not), in the target domain is available at training time, which is not always true in practice. For instance, in real business use cases, acquiring the task-relevant target-domain training data can be infeasible due to the combination of the following reasons: 1) Unsuitable tools at the field. 2) Product development timeline. 3) Budget limitation. 4) Data import/export regulations. Such impractical assumption is also assumed true in the existing works of sensor fusion such as [31, 48], where the goal is to obtain a dual-domain (source and target) TOI solution which is robust to noise in either domain. This unsolved issue motivates us to propose zero-shot deep domain adaptation (ZDDA), a DA and sensor fusion approach which learns from the task-irrelevant dual-domain training pairs without using the task-relevant target-domain training data, where we use the term task-irrelevant data to refer to the data which is not task-relevant. In the rest of the paper, we use T-R and T-I as the shorthand of task-relevant and task-irrelevant, respectively.
|
| 4 |
+
|
| 5 |
+
We illustrate what ZDDA is designed to achieve in Fig. 1 using an example DA task (MNIST [27]→→\rightarrowMNIST-M [13]). We recommend that the readers view all the figures and tables in color. In Fig. 1, the source and target domains are gray scale and RGB images respectively, and the TOI is digit classification with both the MNIST [27] and MNIST-M [13] testing data. We assume that the MNIST-M [13] training data is unavailable. In this example, ZDDA aims at using the MNIST [27] training data and the T-I gray-RGB pairs from the Fashion-MNIST [46] dataset and the Fashion-MNIST-M dataset (the colored version of the Fashion-MNIST [46] dataset with the details in Sec. 4.1) to train digit classifiers for MNIST [27] and MNIST-M [13] images. Specifically, ZDDA achieves this by simulating the RGB representation using the gray scale image and building a joint network with the supervision of the TOI in the gray scale domain. We present the details of ZDDA in Sec. 3.
|
| 6 |
+
|
| 7 |
+
We make the following two contributions: (1) To the best of our knowledge, our proposed method, ZDDA, is the first deep learning based method performing domain adaptation between one source image modality and another different target image modality (not just different datasets in the same modality such as the Office dataset [32]) without using the task-relevant target-domain training data. We show ZDDA’s efficacy using the MNIST [27], Fashion-MNIST [46], NIST [18], EMNIST [9], and SUN RGB-D [36] datasets with cross validation. (2) Given no task-relevant target-domain training data, we show that ZDDA can perform sensor fusion and that ZDDA is more robust to noisy testing data in either source or target or both domains compared with a naive fusion approach in the scene classification task from the SUN RGB-D [36] dataset.
|
| 8 |
+
|
| 9 |
+
Domain adaptation (DA) has been extensively studied in computer vision and applied to various applications such as image classification [1, 14, 15, 16, 25, 30, 35, 37, 39, 40, 41, 43, 44, 47, 50], semantic segmentation [45, 51], and image captioning [8]. With the advance of deep neural networks in recent years, the state-of-the-art methods successfully perform DA with (fully or partially) labeled [8, 15, 25, 30, 39] or unlabeled [1, 14, 15, 16, 35, 37, 39, 40, 41, 43, 44, 45, 47, 50] T-R target-domain data. Although different strategies such as the domain adversarial loss [40] and the domain confusion loss [39] are proposed to improve the performance in the DA tasks, most of the existing methods need the T-R target-domain training data, which can be unavailable in reality. In contrast, we propose ZDDA to learn from the T-I dual-domain pairs without using the T-R target-domain training data. One part of ZDDA includes simulating the target-domain representation using the source-domain data, and similar concepts have been mentioned in [19, 21]. However, both of [19, 21] require the access to the T-R dual-domain training pairs, but ZDDA needs no T-R target-domain data.
|
| 10 |
+
|
| 11 |
+
Other problems related to ZDDA include unsupervised domain adaptation (UDA), multi-view learning (MVL), and domain generalization (DG), and we compare their problem settings in Table 1, which shows that the ZDDA problem setting is different from those of UDA, MVL, and DG. In UDA and MVL, T-R target-domain training data is given. In MVL and DG, T-R training data in multiple domains is given. However, in ZDDA, T-R target-domain training data is unavailable and the only available T-R training data is in one source domain. We further compare ZDDA with the existing methods relevant to our problem setting in Table 2, which shows that among the listed methods, only ZDDA can work under all four conditions.
|
| 12 |
+
|
| 13 |
+
In terms of sensor fusion, Ngiam et al. [31] define the three components for multimodal learning (multimodal fusion, cross modality learning, and shared representation learning) based on the modality used for feature learning, supervised training, and testing, and experiment on audio-video data with their proposed deep belief network and autoencoder based method. Targeting on the temporal data, Yang et al. [48] follow the setup of multimodal learning in [31], and validate their proposed encoder-decoder architecture using video-sensor and audio-video data. Although certain progress about sensor fusion is achieved in the previous works [31, 48], we are unaware of any existing sensor fusion method which overcomes the issue of lacking T-R target-domain training data, which is the issue that ZDDA is designed to solve.
|
| 14 |
+
|
| 15 |
+
Given a task of interest (TOI), a source domain Dssubscript𝐷𝑠D_{s}, and a target domain Dtsubscript𝐷𝑡D_{t}, our proposed method, zero-shot deep domain adaptation (ZDDA), is designed to achieve the following two goals: 1) Domain adaptation: Derive the solutions of the TOI for both Dssubscript𝐷𝑠D_{s} and Dtsubscript𝐷𝑡D_{t} when the T-R training data in Dtsubscript𝐷𝑡D_{t} is unavailable. We assume that we have access to the T-R labeled training data in Dssubscript𝐷𝑠D_{s} and the T-I dual-domain pairs in Dssubscript𝐷𝑠D_{s} and Dtsubscript𝐷𝑡D_{t}. 2) Sensor fusion: Given the previous assumption, derive the solution of TOI when the testing data in both Dssubscript𝐷𝑠D_{s} and Dtsubscript𝐷𝑡D_{t} is available. The testing data in either Dssubscript𝐷𝑠D_{s} or Dtsubscript𝐷𝑡D_{t} can be noisy. We assume that there is no prior knowledge available about the type of noise and which domain gives noisy data at testing time.
|
| 16 |
+
|
| 17 |
+
For convenience, we use a scene classification task in RGB-D as an example TOI to explain ZDDA, but ZDDA can be applied to other TOIs/domains. In this example, Dssubscript𝐷𝑠D_{s} and Dtsubscript𝐷𝑡D_{t} are depth and RGB images respectively. According to the our previous assumption, we have access to the T-R labeled depth data and T-I RGB-D pairs at training time. The training procedure of ZDDA is illustrated in Fig. 2, where we simulate the RGB representation using the depth image, build a joint network with the supervision of the TOI in depth images, and train a sensor fusion network in step 1, step 2, and step 3 respectively. We use the ID marked at the bottom of each convolutional neural networks (CNN) in Fig. 2 to refer to each CNN.
|
| 18 |
+
|
| 19 |
+
In step 1, we create two CNNs, s𝑠s1 and t𝑡t, to take the depth and RGB images of the T-I RGB-D pairs as input. The purpose of this step is to find s𝑠s1 and t𝑡t such that feeding the RGB image into t𝑡t can be approximated by feeding the corresponding depth image into s𝑠s1. We achieve this by fixing t𝑡t and enforcing the L2 loss on top of s𝑠s1 and t𝑡t at training time. We choose to train s𝑠s1 and fix t𝑡t here, but training t𝑡t and fixing s𝑠s1 can also achieve the same purpose. The L2 loss can be replaced with any suitable loss functions which encourage the similarity of the two input representations, and our selection is inspired by [19, 21]. The design in step 1 is similar to the hallucination architecture [21] and the supervision transfer [19], but we require no T-R dual-domain training pairs. Instead, we use the T-I dual-domain training pairs.
|
| 20 |
+
|
| 21 |
+
After step 1, we add another CNN, s𝑠s2 (with the same network architecture as that of s𝑠s1), and a classifier to the network (as shown in step 2) to learn from the label of the training depth images. The classifier in our experiment is a fully connected layer for simplicity, but other types of classifiers can also be used. The newly added CNN takes the T-R depth images as input, and shares all the weights with the original source CNN, so we use s𝑠s2 to refer to both of them. t𝑡t is the same as that in step 1. At training time, we pre-train s𝑠s2 from s𝑠s1 and fix t𝑡t. Our choice of fixing t𝑡t is inspired by the adversarial adaptation step in ADDA [40]. t𝑡t can also be trainable in step 2, but given our limited amount of data, we choose to fix it to make the number of trainable parameters manageable. s𝑠s2 and the source classifier are trained such that the weighted sum of the softmax loss and L2 loss are minimized. The softmax loss can be replaced with other losses suitable for the TOI.
|
| 22 |
+
|
| 23 |
+
After step 2, we expect to obtain a depth representation which is close to the RGB representation in the feature space and performs reasonably well with the trained classifier in the scene classification. Step 1 and step 2 can be done in one step with properly designed curriculum learning, but we separate them not only because of clarity but also because of the difficulty of designing the learning curriculum before training. After step 2, we can form the scene classifier in depth/RGB (denoted as CDsubscript𝐶𝐷C_{D}/CRGBsubscript𝐶𝑅𝐺𝐵C_{RGB}) by concatenating s𝑠s2/t𝑡t and the trained source classifier (as shown in Fig. 3a), which meets our first goal, domain adaptation. We use the notation ZDDA2 to refer to the method using the training procedure in Fig. 2 up to step 2 and the testing procedure in Fig. 3a.
|
| 24 |
+
|
| 25 |
+
To perform sensor fusion, we propose step 3, where we train a joint classifier for RGB-D input using only the T-R depth training data. We create two CNNs, s𝑠s3 and s𝑠s4 (each with the same network architecture as that of CNNs1𝐶𝑁subscript𝑁𝑠1CNN_{s\text{1}}), and add a concatenation layer on top of them to concatenate their output representations. The concatenated representation is connected to a joint classifier. At training time, we pre-train s𝑠s3 and s𝑠s4 from s𝑠s2 and s𝑠s1 respectively and fix s𝑠s4. Both s𝑠s3 and s𝑠s4 take the T-R depth images as the input. To train a more robust RGB-D scene classifier, we randomly select some inputs of s𝑠s3 and s𝑠s4, and optionally add noise to them independently. We supervise the entire network with the label of the depth training data for the scene classification, which is done by the softmax loss enforced on top of the joint classifier.
|
| 26 |
+
|
| 27 |
+
According to step 1, the output of s𝑠s4 is expected to simulate the RGB representation as if we feed the T-R RGB image to t𝑡t. This expectation is based on the assumption that the relationship between the dual-domain pairwise data is similar, regardless of whether the data is T-R or T-I. Given the simulated RGB representation, s𝑠s3 is trained to learn a depth representation suitable for the RGB-D scene classification without the constraint of the L2 loss in step 2. At testing time, s𝑠s4 is replaced with t𝑡t which takes the T-R RGB testing images as input with optional noise added to test the ZDDA’s performance given noisy RGB-D testing data (as shown in Fig. 3b). In Fig. 3b, we also test replacing “RGB images and t𝑡t” with “depth images and s𝑠s4” to evaluate the performance of ZDDA in step 3 given only testing depth images. After the training procedure in Fig. 2, we can form three scene classifiers in RGB, depth, and RGB-D domains (one classifier per domain), and our trained RGB-D classifier is expected to be able to handle noisy input with reasonable performance degradation. The 3-step training procedure of ZDDA in Fig. 2 can be framed as an end-to-end training process with proper learning curriculum. We separate these 3 steps due to the ease of explanation. We use the notation ZDDA3 to refer to the method using the training procedure in Fig. 2 up to step 3 and the testing procedure in Fig. 3b.
|
| 28 |
+
|
| 29 |
+
For domain adaptation (DA), we validate the efficacy of ZDDA under classification tasks using the MNIST [27], Fashion-MNIST [46], NIST [18], EMNIST [9], and SUN RGB-D [36] datasets. For sensor fusion, we experiment on the SUN RGB-D [36] dataset. We summarize the statistics of these datasets in Table 3, where we list the dataset IDs which we use to refer to these datasets. For DMsubscript𝐷𝑀D_{M}, DFsubscript𝐷𝐹D_{F}, DNsubscript𝐷𝑁D_{N}, and DEsubscript𝐷𝐸D_{E}, we create the colored version of these datasets (DMsubscript𝐷𝑀D_{M}-M, DFsubscript𝐷𝐹D_{F}-M, DNsubscript𝐷𝑁D_{N}-M, and DEsubscript𝐷𝐸D_{E}-M) according to the procedure proposed in Ganin’s work [13] — blending the gray scale images with the patches randomly extracted from the BSDS500 dataset [2]. These colored datasets and the original ones are used to construct four DA tasks adapting from gray scale to RGB images. For each DA task, we use one of the other three pairs of the datasets (original and colored ones) as the T-I data. For example, for the DA task DM→DM→subscript𝐷𝑀subscript𝐷𝑀D_{M}\rightarrow D_{M}-M, DFsubscript𝐷𝐹D_{F} and DFsubscript𝐷𝐹D_{F}-M together are one possible choice as the T-I data. The DA task DM→DM→subscript𝐷𝑀subscript𝐷𝑀D_{M}\rightarrow D_{M}-M is acknowledged as one of the standard experiments to test the efficacy of the DA methods in recent works [1, 7, 14, 20, 33, 34], so we adopt this experiment and extend it to DFsubscript𝐷𝐹D_{F}, DNsubscript𝐷𝑁D_{N}, and DEsubscript𝐷𝐸D_{E}.
|
| 30 |
+
|
| 31 |
+
DSsubscript𝐷𝑆D_{S} contains 10335 RGB-D pairs belonging to 45 different scenes. For each RGB-D pair, both the raw (noisy) depth image and post-processed clean depth image are provided, and we choose to use the raw depth image to simulate the real-world scenarios. Out of the 45 scenes, we select the following 10 scenes: computer room (0), conference room (1), corridor (2), dining room (3), discussion area (4), home office (5), idk (6), lab (7), lecture theatre (8), and study space (9), where the number after each scene is the scene ID we use to refer to each scene. The 8021 RGB-D pairs belonging to the other scenes are used as the T-I training data. The 10 scenes are selected based on the following two constraints: 1) Each scene contains at least 150 RGB-D pairs in DSsubscript𝐷𝑆D_{S}, which ensures a reasonable amount of T-R data. 2) The total number of the RGB-D pairs belonging to the selected 10 scenes is minimized, which maximizes the amount of the T-I training data. We empirically find that the amount and diversity of the T-I training data are important for ZDDA. To avoid the bias toward the scene with more data, for each of the selected 10 scenes, we randomly select 89/38 RGB-D pairs as the T-R training/testing data. When experimenting on different scene classification tasks using different selections of scenes, we only use the training/testing data associated with those selected scenes as the T-R data.
|
| 32 |
+
|
| 33 |
+
We use Caffe [24] to implement ZDDA. Table 4 lists the base network architecture (BNA) we use and the layer separating the source/target CNN and the source classifier in Fig. 2. For instance, in the case when the BNA is LeNet [5], the architecture of each source/target CNN in Fig. 2 is the LeNet [5] architecture up to the “ip1” layer, and the rest of the LeNet [5] architecture is used as the source classifier. For the DA tasks involving DMsubscript𝐷𝑀D_{M}, DFsubscript𝐷𝐹D_{F}, DNsubscript𝐷𝑁D_{N}, and DEsubscript𝐷𝐸D_{E}, we use the LeNet [5] as the BNA and train all the CNNs in Fig. 2 from scratch except that the target CNN is pre-trained from the T-I dataset and fixed afterwards. For example, when using DFsubscript𝐷𝐹D_{F} and DFsubscript𝐷𝐹D_{F}-M as the T-I data in the DA task DM→DM→subscript𝐷𝑀subscript𝐷𝑀D_{M}\rightarrow D_{M}-M, we train a CNN (denoted as CNNref𝐶𝑁subscript𝑁𝑟𝑒𝑓CNN_{ref}) with the LeNet [5] architecture from scratch using the images and labels of DFsubscript𝐷𝐹D_{F}-M, and pre-train the target CNNs in Fig. 2 from CNNref𝐶𝑁subscript𝑁𝑟𝑒𝑓CNN_{ref}. We follow similar procedures for other DA tasks and T-I datasets involving DMsubscript𝐷𝑀D_{M}, DFsubscript𝐷𝐹D_{F}, DNsubscript𝐷𝑁D_{N}, and DEsubscript𝐷𝐸D_{E}.
|
| 34 |
+
|
| 35 |
+
For the experiment involving DSsubscript𝐷𝑆D_{S}, we mostly use GoogleNet [38] as the BNA, but we also use AlexNet [26] and SqueezeNet_v1.1 [23] in the cross validation experiment with respect to different BNAs. Since only limited amount of RGB-D pairs are available in DSsubscript𝐷𝑆D_{S}, we pre-train all the CNNs in Fig. 2 from the BVLC GoogleNet model [4], BVLC AlexNet model [3], and the reference SqueezeNet model [22] when the BNA is GoogleNet [38], AlexNet [26], and SqueezeNet_v1.1 [23], respectively. These pre-trained models are trained for the ImageNet [10] classification task.
|
| 36 |
+
|
| 37 |
+
For the optionally added noise in ZDDA3, we experiment on training/testing with noise-free data and noisy data. In the latter case, given that no prior knowledge about the noise is available, we use the black image as the noisy image to model the extreme case where no information in the noisy image is available. We train ZDDA3 step 3 with the augmented training data formed by copying the original T-R source-domain training data 10 times and replacing ptrain%percentsubscript𝑝𝑡𝑟𝑎𝑖𝑛p_{train}\% of the images selected randomly with the black images. We follow this procedure twice independently and use the two augmented training datasets as the inputs of the two source CNNs in step 3. We empirically set ptrain=20subscript𝑝𝑡𝑟𝑎𝑖𝑛20p_{train}=20. The testing data in Fig. 3b is constructed by replacing ptest%percentsubscript𝑝𝑡𝑒𝑠𝑡p_{test}\% of the original testing images selected randomly with the black images, and we evaluate ZDDA under different ptestsubscript𝑝𝑡𝑒𝑠𝑡p_{test}s. For all the experiments, the number of the output nodes of the source/joint classifiers is set to be the number of classes in the TOI, and these classifiers are trained from scratch. For the joint classifiers, we use two fully connected layers unless otherwise specified, where the first fully connected layer of the joint classifier has 1024 output nodes.
|
| 38 |
+
|
| 39 |
+
In terms of the training parameters used in Fig. 2 for the task involving DSsubscript𝐷𝑆D_{S} when the BNA is GoogleNet [38], we use a batch size of 32 and a fixed learning rate 10−5superscript10510^{-5}/10−6superscript10610^{-6}/10−3superscript10310^{-3} for step 1/2/3. The learning rate is chosen such that the trained network can converge under a reasonable amount of time. We set the weight of the softmax loss and the L2 loss in step 2 to be 103superscript10310^{3} and 1 respectively such that both losses have comparable numerical values. Step 1/2/3 are trained for 104superscript10410^{4}/103superscript10310^{3}/103superscript10310^{3} iterations. For the other training parameters, we adopt the default ones used in training the BVLC GoogleNet model [4] for the ImageNet [10] classification task unless otherwise specified. In general, we adopt the default training parameters used in training each BNA for either the MNIST [27] or ImageNet [10] classification tasks in the Caffe [24] and SqueezeNet_v1.1 [23] implementation unless otherwise specified.
|
| 40 |
+
|
| 41 |
+
To obtain the performance references of the fully supervised methods, we train a classifier with the BNA in Table 4 in each domain using the T-R training data and labels in that domain. When the BNA is LeNet [5], we train the classifier from scratch. For the other BNAs, we pre-train the classifier in the same way as that described in Sec. 4.2. After training, for each DA task, we get two fully supervised classifiers Cfs,ssubscript𝐶𝑓𝑠𝑠C_{fs,s} and Cfs,tsubscript𝐶𝑓𝑠𝑡C_{fs,t} in the source and target domains respectively. For the baseline of the DA task, we directly feed the target-domain testing images to Cfs,ssubscript𝐶𝑓𝑠𝑠C_{fs,s} to obtain the performance without applying any DA method. For the baseline of sensor fusion, we compare ZDDA3 with a naive fusion method by predicting the label with the highest probability from CRGBsubscript𝐶𝑅𝐺𝐵C_{RGB} and CDsubscript𝐶𝐷C_{D} in Sec. 3.
|
| 42 |
+
|
| 43 |
+
We first compare ZDDA2 with the baseline in four domain adaptation (DA) tasks (adapting from gray scale to RGB images) involving DMsubscript𝐷𝑀D_{M}, DFsubscript𝐷𝐹D_{F}, DNsubscript𝐷𝑁D_{N}, and DEsubscript𝐷𝐸D_{E}, and the result is summarized in Table 5, where the first two numbers represent the overall/average per class accuracy (%). Darker cells in each column represent better classification accuracy in each task. In Table 5, the middle four rows represent the performance of ZDDA2. {DNsubscript𝐷𝑁D_{N}, DNsubscript𝐷𝑁D_{N}-M} and {DEsubscript𝐷𝐸D_{E}, DEsubscript𝐷𝐸D_{E}-M} cannot be the T-I data for each other because they are both directly related to the letter classification tasks. Table 5 shows that regardless of which T-I data we use, ZDDA2 significantly outperforms the baseline (source only). To see how the semantic similarity between the T-R dataset (denoted as DT−Rsubscript𝐷𝑇𝑅D_{T-R}) and T-I dataset (denoted as DT−Isubscript𝐷𝑇𝐼D_{T-I}) affects the performance, we are inspired by [12] and use the word2vec [29] to compute the mean similarity (denoted as S𝑆S) of any two labels from DT−Rsubscript𝐷𝑇𝑅D_{T-R} and DT−Isubscript𝐷𝑇𝐼D_{T-I} (one from each). We report S𝑆S(DT−Rsubscript𝐷𝑇𝑅D_{T-R}, DT−Isubscript𝐷𝑇𝐼D_{T-I}) in the parenthesis of the middle four rows of Table 5, where higher S𝑆S represents higher semantic similarity. Given Table 5 and the following reference S𝑆S values: S𝑆S(object, scene)=0.192, S𝑆S(animal, fruit)=0.171, and S𝑆S(cat, dog)=0.761, we find that: (1) For all the listed DA tasks except DF→DF→subscript𝐷𝐹subscript𝐷𝐹D_{F}\rightarrow D_{F}-M, higher S𝑆S corresponds to better performance, which is consistent with our intuition that using more relevant data as the T-I data improves the performance more. (2) All the listed S𝑆Ss in Table 5 are close to or lower than S𝑆S(animal, fruit)=0.171, which we believe shows that our T-I data is highly irrelevant to the T-R data.
|
| 44 |
+
|
| 45 |
+
Second, in Table 6, we compare ZDDA2 with the existing DA methods because the DA task DM→DM→subscript𝐷𝑀subscript𝐷𝑀D_{M}\rightarrow D_{M}-M is considered as one of the standard experiments in recent works [7, 14, 20, 33, 34]. Although this is not a fair comparison (because ZDDA2 has no access to the T-R target-domain training data), we find that ZDDA2 can reach the accuracy comparable to those of the state-of-the-art methods (even outperform some of them), which supports that ZDDA2 is a promising DA method when the T-R target-domain training data is unavailable.
|
| 46 |
+
|
| 47 |
+
Third, we test the efficacy of ZDDA on the DA tasks constructed from DSsubscript𝐷𝑆D_{S} (adapting from depth to RGB images). We compare ZDDA with the baseline under different scene classification tasks by changing the number of scenes involved. The result is summarized in Table 7, where we list the training and testing modalities for each method. We also list the scene IDs (introduced in Sec. 4.1) involved in each task. Darker cells represent better accuracy in each column. We verify the irrelevance degree between T-R and T-I data by measuring the semantic similarity using the word2vec [29] (the same method we use in Table 5). For the 10-class experiment in Table 7, S𝑆S(DSsubscript𝐷𝑆D_{S}(T-R), DSsubscript𝐷𝑆D_{S}(T-I))=0.198 (close to the reference S𝑆S(object, scene)=0.192), which we believe shows high irrelevance between our T-I and T-R data. For simplicity, we use Eisubscript𝐸𝑖E_{i} to refer to the experiment specified by exp. ID i𝑖i in this section. For the fully supervised methods in depth domain, ZDDA (E2subscript𝐸2E_{2}, E3subscript𝐸3E_{3}) outperforms the baseline (E1subscript𝐸1E_{1}) due to the extra information brought by the T-I RGB-D pairs. We find that for most listed tasks, ZDDA3 (E3subscript𝐸3E_{3}) outperforms ZDDA2 (E2subscript𝐸2E_{2}), which is consistent with our intuition because the source representation in ZDDA2 is constrained by the L2 loss, while the counterpart in ZDDA3 is learned without the L2 constraint given the simulated target representation. The fully supervised method in RGB domain (E6subscript𝐸6E_{6}) outperforms the baseline of the domain adaptation (E4subscript𝐸4E_{4}) and ZDDA2 (E5subscript𝐸5E_{5}) because E6subscript𝐸6E_{6} has access to the T-R RGB training data which is unavailable for E4subscript𝐸4E_{4} and E5subscript𝐸5E_{5}. The performance improvement from E4subscript𝐸4E_{4} to E5subscript𝐸5E_{5} is caused by ZDDA2’s training procedure as well as the extra T-I RGB-D training pairs. E3subscript𝐸3E_{3} and E7subscript𝐸7E_{7} perform similarly, which supports that the simulated target representation in ZDDA3 is similar to the real one.
|
| 48 |
+
|
| 49 |
+
To test the consistency of the performance of ZDDA compared to that of the baseline, we perform the following three experiments. First, we conduct 5-fold cross validation with different training/testing splits for the 10-scene classification. Second, we perform 10-fold validation with different selections of classes for the 9-scene classification (leave-one-class-out experiment out of the 10 selected scenes introduced in Sec. 4.1). Third, we validate ZDDA’s performance with different base network architectures. The results of the first two experiments are presented in Table 8, and the result of the third experiment is shown in Table 9. The results of Table 7, Table 8, and Table 9 are consistent.
|
| 50 |
+
|
| 51 |
+
In Table 7, Table 8, and Table 9, the classification accuracy is reported under the condition of noise-free training and testing data. To let ZDDA be more robust to noisy input, we train ZDDA3 step 3 with noisy training data (we use ptrain=20subscript𝑝𝑡𝑟𝑎𝑖𝑛20p_{train}=20 as explained in Sec. 4.2), and evaluate the classification accuracy under different noise conditions for both RGB and depth testing data. The result is presented in Fig. 4, where ZDDA3 (Fig. 4b) outperforms the naive fusion method (Fig. 4a) under most conditions, and the performance improvement is shown in Fig. 4c. Both Fig. 4a and Fig. 4b show that the performance degradation caused by the noisy depth testing data is larger than that caused by the noisy RGB testing data, which supports that the trained RGB-D classifier relies more on the depth domain. Traditionally, training a fusion model requires the T-R training data in both modalities. However, we show that without the T-R training data in the RGB domain, we can still train an RGB-D fusion model, and that the performance degrades smoothly when the noise increases. In addition to using black images as the noise model, we evaluate the same trained joint classifier in ZDDA3 using another noise model (adding a black rectangle with a random location and size to the clean image) at testing time, and the result also supports that ZDDA3 outperforms the naive fusion method. Although we only use black images as the noise model for ZDDA3 at training time, we expect that adding different noise models can improve the robustness of ZDDA3.
|
| 52 |
+
|
| 53 |
+
We propose zero-shot deep domain adaptation (ZDDA), a novel approach to perform domain adaptation (DA) and sensor fusion with no need of the task-relevant target-domain training data which can be inaccessible in reality. Rather than solving the zero-shot DA problem in general, we aim at solving the problems under the assumption that task-relevant source-domain data and task-irrelevant dual-domain paired data are available. Our key idea is to use the task-relevant source-domain data to simulate the task-relevant target-domain representations by learning from the task-irrelevant dual-domain pairs. Experimenting on the MNIST [27], Fashion-MNIST [46], NIST [18], EMNIST [9], and SUN RGB-D [36] datasets, we show that ZDDA outperforms the baselines in DA and sensor fusion even without the task-relevant target-domain training data. In the task adapting from MNIST [27] to MNIST-M [13], ZDDA can even outperform several state-of-the-art DA methods which require access to the MNIST-M [13] training data. One industrial use case which we plan to apply ZDDA to in our follow-up work is training an RGD object classifier given only the textureless CAD models of those objects. In this case, depth and RGB images are source and target domains, respectively. The depth images can be rendered from the provided CAD models, and publicly available RGB-D datasets can serve as the task-irrelevant RGB-D data. We believe that ZDDA can be straightforwardly extended to handle other tasks of interest by modifying the loss functions in Fig. 2 step 2 and step 3.
|
1707.03631v2.txt
ADDED
|
@@ -0,0 +1,529 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\noindent Deep neural networks (DNNs) have demonstrated the significant improvement on benchmark performances in a wide range of applications. As neural networks become deeper, the model complexity also increases quickly, and this complexity leads DNNs to potentially overfit a training data set. Several techniques \cite{hinton2012improving,poole2014analyzing,bishop1995regularization,lasserre2006principled} have emerged over the past years to address this challenge, and \emph{dropout} has become one of dominant methods due to its simplicity and effectiveness \cite{hinton2012improving,srivastava2014dropout}.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
\emph{Dropout} randomly disconnects neural units during training as a method to prevent the feature co-adaptation \cite{baldi2013understanding,wager2013dropout,wang2013fast,li2016improved}. The earlier work by Hinton et al. \shortcite{hinton2012improving} and Srivastava et al. \shortcite{srivastava2014dropout} interpreted dropout as an extreme form of model combinations, a.k.a. a model ensemble, by sharing extensive parameters on neural networks. They proposed learning the model combination through minimizing an expected loss of models perturbed by dropout. They also pointed out that the output of dropout is the geometric mean of the outputs from the model ensemble with the shared parameters. Extending the weight sharing perspective, several studies \cite{baldi2013understanding,chen2014dropout,jain2015drop} analyzed the ensemble effects from the dropout.
|
| 6 |
+
|
| 7 |
+
The recent work by Laine \& Aila (\citeyear{laine2016temporal}) enhanced the ensemble effect of dropout by adding self-ensembling terms. The self-ensembling term is constructed by a divergence between two sampled neural networks from the dropout. By minimizing the divergence, the sampled networks learn from each other, and this practice is similar to the working mechanism of the ladder network \cite{rasmus2015semi}, which builds a connection between an unsupervised and a supervised neural network. Our method also follows the principles of self-ensembling, but we apply the adversarial training concept to the sampling of neural network structures through dropout.
|
| 8 |
+
|
| 9 |
+
At the same time that the community has developed the dropout, \emph{adversarial training} has become another focus of the community. Szegedy et al. (\citeyear{szegedy2013intriguing}) showed that a certain neural network is vulnerable to a very small perturbation in the training data set if the noise direction is sensitive to the models' label assignment $y$ given $x$, even when the perturbation is so small that human eyes cannot discern the difference. They empirically proved that robustly training models against adversarial perturbation is effective in reducing test errors. However, their method of identifying adversarial perturbations contains a computationally expensive inner loop. To compensate it, Goodfellow et al. (\citeyear{goodfellow2014explaining}) suggested an approximation method, through the linearization of the loss function, that is free from the loop. Adversarial training can be conducted on supervised learning because the adversarial direction can be defined when true $y$ labels are known. Miyato et al. (\citeyear{miyato2015distributional}) proposed a virtual adversarial direction to apply the adversarial training in the semi-supervised learning that may not assume the true $y$ value. Until now, the adversarial perturbation can be defined as a unit vector of additive noise imposed on the input or the embedding spaces \cite{szegedy2013intriguing,goodfellow2014explaining,miyato2015distributional}.
|
| 10 |
+
|
| 11 |
+
Our proposed method, \emph{adversarial dropout}, can be viewed from the \emph{dropout} and from the \emph{adversarial training} perspectives. Adversarial dropout can be interpreted as dropout masks whose direction is optimized \textit{adversarially} to the model's label assignment. However, it should be noted that adversarial dropout and traditional adversarial training with additive perturbation are different because adversarial dropout induces the sparse structure of neural network while the other does not make changes in the structure of the neural network, directly.
|
| 12 |
+
\begin{figure}[t]
|
| 13 |
+
\centering
|
| 14 |
+
\includegraphics[width=8cm]{structure3}
|
| 15 |
+
\caption{Diagram description of loss functions from $\Pi$ model \cite{laine2016temporal}, the adversarial training \cite{miyato2015distributional}, and our adversarial dropout. } %
|
| 16 |
+
\end{figure}
|
| 17 |
+
|
| 18 |
+
Figure 1 describes the proposed loss function construction of adversarial dropout compared to 1) the recent dropout model, which is $\Pi$ model \cite{laine2016temporal} and 2) the adversarial training \cite{goodfellow2014explaining,miyato2015distributional}.
|
| 19 |
+
When we compare adversarial dropout to $\Pi$ model, both divergence terms are similarly computed from two different dropped networks, but adversarial dropout uses an optimized dropped network to adapt the concept of adversarial training. When we compare adversarial dropout to the adversarial training, the divergence term of the adversarial training is computed from one network structure with two training examples: clean and adversarial examples. On the contrary, the divergence term of the adversarial dropout is defined with two network structures: a randomly dropped network and an adversarially dropped network.
|
| 20 |
+
|
| 21 |
+
Our experiments demonstrated that 1) adversarial dropout improves the performance on MNIST supervised learning compared to the dropout suggested by $\Pi$ model, and 2) adversarial dropout showed the state-of-the-art performance on the semi-supervised learning task on SVHN and CIFAR-10 when we compare the most recent techniques of dropout and adversarial training. Following the performance comparison, we visualize the neural network structure from adversarial dropout to illustrate that the adversarial dropout enables a sparse structure compared to the neural network of standard dropout. Finally, we theoretically show the original characteristics of adversarial dropout that specifies the strength of the regularization effect by the rank-valued parameter while the adversarial training specifies the strength with the conventional continuous-valued scale.
|
| 22 |
+
\section{Preliminaries}
|
| 23 |
+
Before introducing adversarial dropout, we briefly introduce stochastic noise layers for deep neural networks. Afterwards, we review adversarial training and temporal ensembling, or $\Pi$ model, because two methods are closely related to adversarial dropout.
|
| 24 |
+
\subsection{Noise Layers}
|
| 25 |
+
Corrupting training data with noises has been well-known to be a method to stabilize prediction \cite{bishop1995training,maaten2013learning,wager2013dropout}. This section describes two types of noise injection techniques, such as additive Gaussian noise and dropout noise.
|
| 26 |
+
|
| 27 |
+
Let $\mathbf{h}^{(l)}$ denote the $l^{th}$ hidden variables in a neural network, and this layer can be replaced with a noisy version $\tilde{\mathbf{h}}^{(l)}$. We can vary the noise types as the followings.
|
| 28 |
+
\begin{itemize}
|
| 29 |
+
\item{
|
| 30 |
+
Additive Gaussian noise: $\tilde{\mathbf{h}}^{(l)}=\mathbf{h}^{(l)} + \boldsymbol{\gamma}$, where $\boldsymbol{\gamma} \sim \mathcal{N}(0, \sigma^2\mathbf{I}_{d \times d})$ with the parameter $\sigma^2$ to restrict the degree of noises.
|
| 31 |
+
}
|
| 32 |
+
\item{
|
| 33 |
+
Dropout noise: $\tilde{\mathbf{h}}^{(l)}=\mathbf{h}^{(l)} \odot \boldsymbol{\epsilon} $, where $\odot$ is the elementwise product of two vectors, and the elements of the noise vector are $\boldsymbol{\epsilon}_i \sim Bernoulli(1-p)$ with the parameter $p$. To simply put, this function specifies that $\boldsymbol{\epsilon}_i=0$ with probability $p$ and $\boldsymbol{\epsilon}_i=1$ with probability $(1-p)$.
|
| 34 |
+
}
|
| 35 |
+
\end{itemize}
|
| 36 |
+
Both additive Gaussian noise and dropout noise are generalization techniques to increase the generality of the trained model, but they have different properties. The additive Gaussian noise increases the margin of decision boundaries while the dropout noise affects a model to be sparse \cite{srivastava2014dropout}. These noise layers can be easily included in a deep neural network. For example, there can be a dropout layer between two convolutional layers. Similarly, a layer of additive Gaussian noise can be placed on the input layer.
|
| 37 |
+
\subsection{Self-Ensembling Model}
|
| 38 |
+
The recently reported self-ensembling (SE) \cite{laine2016temporal}, or $\Pi$ model, construct a loss function that minimizes the divergence between two outputs from two sampled dropout neural networks with the same input stimulus. Their suggested regularization term can be interpreted as the following:
|
| 39 |
+
\begin{equation} \mathcal{L}_{SE}(\mathbf{x}; \boldsymbol{\theta}):= D[f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^1), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^2)], \end{equation}
|
| 40 |
+
where $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$ are randomly sampled dropout noises in a neural network $f_{\boldsymbol{\theta}}$, whose parameters are $\boldsymbol{\theta}$. Also, $D[\mathbf{y}, \mathbf{y}']$ is a non-negative function that represents the distance between two output vectors: $\mathbf{y}$ and $\mathbf{y}'$. For example, $D$ can be the cross entropy function, $D[\mathbf{y}, \mathbf{y}']=-\sum_{i} \mathbf{y}_i \log \mathbf{y}'_i$, where $\mathbf{y}$ and $\mathbf{y}'$ are the vectors whose $i^{th}$ elements represent the probability of the $i^{th}$ class. The divergence could be calculated between two outputs of two different structures, which turn this regularization to be semi-supervised. $\Pi$ model is based on the principle of $\Gamma$ model, which is the ladder network by Rasmus et al. (\citeyear{rasmus2015semi}). Our proposed method, adversarial dropout, can be seen as a special case of $\Pi$ model when one dropout neural network is adversarially sampled.
|
| 41 |
+
\subsection{Adversarial Training}
|
| 42 |
+
Adversarial dropout follows the training mechanism of adversarial training, so we briefly introduce a generalized formulation of the adversarial training. The basic concept of adversarial training (AT) is an incorporation of adversarial examples on the training process. Additional loss function by including adversarial examples \cite{szegedy2013intriguing,goodfellow2014explaining,miyato2015distributional} can be defined as a generalized form:
|
| 43 |
+
\begin{gather} \mathcal{L}_{AT}(\mathbf{x}, y; \boldsymbol{\theta}, \delta):= D[g(\mathbf{x}, y, \boldsymbol{\theta}), f_{\boldsymbol{\theta}}(\mathbf{x}+\boldsymbol{\gamma}^{adv})] \\ \text{where} \: \boldsymbol{\gamma}^{adv}:=argmax_{\boldsymbol{\gamma};\| \boldsymbol{\gamma}\|_{\infty} \leq \delta} D[g(\mathbf{x}, y, \boldsymbol{\theta}), f_{\boldsymbol{\theta}}(\mathbf{x}+\boldsymbol{\gamma})]. \nonumber \end{gather}
|
| 44 |
+
Here, $\boldsymbol{\theta}$ is a set of model parameters, $\delta$ is a hyperparameter controlling the intensity of the adversarial perturbation $\boldsymbol{\gamma}^{adv}$. The function $f_{\boldsymbol{\theta}}(\mathbf{x})$ is an output distribution of a neural network to be learned. Adversarial training can be diversified by differentiating the definition of $g(\mathbf{x}, y, \boldsymbol{\theta})$, as the following.
|
| 45 |
+
\begin{itemize}
|
| 46 |
+
\item{
|
| 47 |
+
\emph{Adversarial training (AT)} \cite{goodfellow2014explaining,kurakin2016adversarial} defines $g(\mathbf{x}, y, \boldsymbol{\theta})$ as $g(y)$ ignoring $\mathbf{x}$ and $\boldsymbol{\theta}$, so $g(y)$ is an one-hot encoding vector of $y$. %
|
| 48 |
+
}
|
| 49 |
+
\item{
|
| 50 |
+
\emph{Virtual adversarial training (VAT)} \cite{miyato2015distributional,miyato2016virtual} defines $g(\mathbf{x}, y, \boldsymbol{\theta})$ as $f_{\hat{\boldsymbol{\theta}}}(\mathbf{x})$ where $\hat{\boldsymbol{\theta}}$ is the current estimated parameter. This training method does not use any information from $y$ in the adversarial part of the loss function. This enables the adversarial part to be used as a regularization term for the semi-supervised learning.
|
| 51 |
+
}
|
| 52 |
+
\end{itemize}
|
| 53 |
+
\section{Method}
|
| 54 |
+
This section presents our adversarial dropout that combines the ideas of adversarial training and dropout. First, we formally define the adversarial dropout. Second, we propose a training algorithm to find the instantiations of adversarial dropouts with a fast approximation method.
|
| 55 |
+
\subsection{General Expression of Adversarial Dropout}
|
| 56 |
+
Now, we propose the adversarial dropout (AdD), which could be an adversarial training method that determines the dropout condition to be sensitive on the model's label assignment. We use $f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})$ as an output distribution of a neural network with a dropout mask. The below is the description of the additional loss function by incorporating adversarial dropout.
|
| 57 |
+
\begin{gather}
|
| 58 |
+
\label{eq_general}
|
| 59 |
+
\mathcal{L}_{AdD}(\mathbf{x}, y, \boldsymbol{\epsilon}^s; \boldsymbol{\theta}, \delta):= D[g(\mathbf{x}, y, \boldsymbol{\theta}), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{adv})] \\
|
| 60 |
+
\text{where} \: \boldsymbol{\epsilon}^{adv}:=argmax_{{\boldsymbol{\epsilon}} ; \| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon} \|_2 \leq \delta H} D[g(\mathbf{x}, y, \boldsymbol{\theta}), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})]. \nonumber
|
| 61 |
+
\end{gather}
|
| 62 |
+
Here, $D[\cdot,\cdot]$ indicates a divergence function; $g(\mathbf{x}, y, \boldsymbol{\theta})$ represents an adversarial target function that can be diversified by its definition; $\boldsymbol{\epsilon}^{adv}$ is an adversarial dropout mask under the function $f_{\boldsymbol{\theta}}$ when $\boldsymbol{\theta}$ is a set of model parameters; $\boldsymbol{\epsilon}^s$ is a sampled random dropout mask instance; $\delta$ is a hyperparameter controlling the intensity of the noise; and $H$ is the dropout layer dimension.
|
| 63 |
+
|
| 64 |
+
We introduce the boundary condition, $\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon} \|_2 \leq \delta H$, which indicates a restriction of the number of the difference between two dropout conditions. An adversarial dropout mask should be infinitesimally different from the random dropout mask. Without this constraint, the network with adversarial dropout may become a neural network layer without connections. By restricting the adversarial dropout with the random dropout, we prevent finding such irrational layer, which does not support the back propagation. We found that the Euclidean distance between two $\boldsymbol{\epsilon}$ vectors can be calculated by using the graph edit distance or the Jaccard distance. In the supplementary material, we proved that the graph edit distance and the Jaccard distance can be abstracted as Euclidean distances between two $\boldsymbol{\epsilon}$ vectors. %
|
| 65 |
+
|
| 66 |
+
In the general form of adversarial training, the key point is the existence of the linear perturbation $\boldsymbol{\gamma}^{adv}$. We can interpret the input with the adversarial perturbation as this adversarial noise input $\tilde{\mathbf{x}}^{adv}=\mathbf{x}+\boldsymbol{\gamma}^{adv}$. From this perspective, the authors of adversarial training limited the adversarial direction only on the space of the additive Gaussian noise $\tilde{\mathbf{x}}=\mathbf{x}+\boldsymbol{\gamma}^{0}$, where $\boldsymbol{\gamma}^{0}$ is a sampled Gaussian noise on the input layer.
|
| 67 |
+
In contrast, adversarial dropout can be considered as a noise space generated by masking hidden units, $\tilde{\mathbf{h}}^{adv}=\mathbf{h} \odot \boldsymbol{\epsilon}^{adv}$ where $\mathbf{h}$ is hidden units, and $\boldsymbol{\epsilon}^{adv}$ is an adversarially selected dropout condition. If we assume the adversarial training as the Gaussian additive perturbation on the input, the perturbation is linear in nature, but adversarial dropout could be non-linear perturbation if the adversarial dropout is imposed upon multiple layers.
|
| 68 |
+
\subsubsection{Supervised Adversarial Dropout}
|
| 69 |
+
\emph{Supervised Adversarial dropout (SAdD)} defines $g(\mathbf{x}, y, \boldsymbol{\theta})$ as $y$, so $g$ is a one-hot vector of $y$ as the typical neural network.
|
| 70 |
+
The divergence term from Formula \ref{eq_general} can be converted as follows:
|
| 71 |
+
\begin{gather} \mathcal{L}_{SAdD}(\mathbf{x}, y, \boldsymbol{\epsilon}^s; \boldsymbol{\theta}, \delta):= D[g(y), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{adv})] \\ \text{where} \: \boldsymbol{\epsilon}^{adv}:=argmax_{\boldsymbol{\epsilon} ;\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon} \|_2 \leq \delta H} D[g(y), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})]. \nonumber \end{gather}
|
| 72 |
+
In this case, the divergence term can be seen as the pure loss function for a supervised learning with a dropout regularization. However, $\boldsymbol{\epsilon}^{adv}$ is selected to maximize the divergence between the true information and the output from the dropout network, so $\boldsymbol{\epsilon}^{adv}$ eventually becomes the mask on the most contributing features. This adversarial mask provides the learning opportunity on neurons, so called \emph{dead filter}, that was considered to be less informative.
|
| 73 |
+
\subsubsection{Virtual Adversarial Dropout}
|
| 74 |
+
\emph{Virtual adversarial dropout (VAdD)} defines $g(\mathbf{x}, y, \boldsymbol{\theta})=f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{s})$. This uses the loss function as a regularization term for semi-supervised learning.
|
| 75 |
+
The divergence term in Formula \ref{eq_general} can be represented as bellow:
|
| 76 |
+
\begin{gather} \mathcal{L}_{VAdD}(\mathbf{x}, y, \boldsymbol{\epsilon}^s; \boldsymbol{\theta}, \delta):= D[f_{\theta}(\mathbf{x}, \boldsymbol{\epsilon}^{s}), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{adv})] \\ \text{where} \: \boldsymbol{\epsilon}^{adv}:=argmax_{\boldsymbol{\epsilon} ;\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon} \|_2 \leq \delta H} D[f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{s}), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})]. \nonumber \end{gather}
|
| 77 |
+
VAdD is a special case of a self-ensembling model with two dropouts. They are 1) a dropout, $\boldsymbol{\epsilon}^s$, sampled from a random distribution with a hyperparameter and 2) a dropout, $\boldsymbol{\epsilon}^{adv}$, composed to maximize the divergence function of the learner, which is the concept of the noise injection from the virtual adversarial training. The two dropouts create a regularization as the virtual adversarial training, and the inference procedure optimizes the parameters to reduce the divergence between the random dropout and the adversarial dropout. This optimization triggers the self-ensemble learning in \cite{laine2016temporal}. However, the adversarial dropout is different from the previous self-ensembling because one dropout is induced by the adversarial setting, not by a random sampling.
|
| 78 |
+
\subsubsection{Learning with Adversarial Dropout}
|
| 79 |
+
The full objective function for the learning with the adversarial dropout is given by
|
| 80 |
+
\begin{equation} l(y, f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{s})) + \lambda \mathcal{L}_{AdD}(\mathbf{x}, y, \boldsymbol{\epsilon}^{s}; \boldsymbol{\theta}, \delta) \end{equation}
|
| 81 |
+
where $l(y, f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{s}))$ is the negative log-likelihood for $y$ given $x$ under the sampled dropout instance $\boldsymbol{\epsilon}^{s}$. There are two scalar-scale hyper-parameters: (1) a trade-off parameter, $\lambda$, for controlling the impact of the proposed regularization term and (2) the constraints, $\delta$, specifying the intensity of adversarial dropout. %
|
| 82 |
+
\subsubsection{Combining Adversarial Dropout and Adversarial Training}
|
| 83 |
+
Additionally, it should be noted that the adversarial training and the adversarial dropout are not exclusive training methods. A neural network can be trained by imposing the input perturbation with the Gaussian additive noise, and by enabling the adversarially chosen dropouts, simultaneously. Formula \ref{eq_ad_at} specifies the loss function of simultaneously utilizing the adversarial dropout and the adversarial training.
|
| 84 |
+
\begin{equation} \label{eq_ad_at} l(y, f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^{s})) + \lambda_{1} \mathcal{L}_{AdD}(\mathbf{x}, y, \boldsymbol{\epsilon}^s) + \lambda_{2} \mathcal{L}_{AT}(\mathbf{x}, y)\end{equation}
|
| 85 |
+
where $\lambda_{1}$ and $\lambda_{2}$ are trade-off parameters controlling the impact of the regularization terms.
|
| 86 |
+
\subsection{Fast Approximation Method for Finding Adversarial Dropout Condition}
|
| 87 |
+
Once the adversarial dropout, $\boldsymbol{\epsilon}^{adv}$, is identified, the evaluation of $\mathcal{L}_{AdD}$ simply becomes the computation of the loss and the divergence functions. However, the inference on $\boldsymbol{\epsilon}^{adv}$ is difficult because of three reasons. First, we cannot obtain a closed-form solution on the exact adversarial noise value, $\boldsymbol{\epsilon}^{adv}$. Second, the feasible space for $\boldsymbol{\epsilon}^{adv}$ is restricted under $\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon}^{adv} \|_2 \leq \delta H$, which becomes a constraint in the optimization. Third, $\boldsymbol{\epsilon}^{adv}$ is a binary-valued vector rather than a continuous-valued vector because $\boldsymbol{\epsilon}^{adv}$ indicates the activation of neurons. This discrete nature requires an optimization technique like \emph{integer programming}.
|
| 88 |
+
|
| 89 |
+
To mitigate this difficulty, we approximated the objective function, $\mathcal{L}_{AdD}$, with the first order of the Taylor expansion by relaxing the domain space of $\boldsymbol{\epsilon}^{adv}$. This Taylor expansion of the objective function was used in the earlier works of adversarial training \cite{goodfellow2014explaining,miyato2015distributional}. After the approximation, we found an adversarial dropout condition by solving an integer programming problem.
|
| 90 |
+
|
| 91 |
+
To define a neural network with a dropout layer, we separate the output function into two neural sub-networks, $f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})=f^{upper}_{\boldsymbol{\theta}_1}(\mathbf{h}(\mathbf{x})\odot\boldsymbol{\epsilon})$, where $f^{upper}_{\boldsymbol{\theta}_1}$ is the upper part neural network of the dropout layer and $\mathbf{h}(\mathbf{x})=f^{under}_{\boldsymbol{\theta}_2}(\mathbf{x})$ is the under part neural network. Our objective is optimizing an adversarial dropout noise $\boldsymbol{\epsilon}^{adv}$ by maximizing the following divergence function under the constraint $\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon}^{adv} \|_2 \leq \delta H$:
|
| 92 |
+
\begin{equation}
|
| 93 |
+
D(\mathbf{x}, \boldsymbol{\epsilon}; \boldsymbol{\theta},\boldsymbol{\epsilon}^{s}) = D[g(\mathbf{x}, y, \boldsymbol{\theta}, \boldsymbol{\epsilon}^s), f^{upper}_{\boldsymbol{\theta}_1}(\mathbf{h}(\mathbf{x})\odot\boldsymbol{\epsilon}))]
|
| 94 |
+
\end{equation}
|
| 95 |
+
where $\boldsymbol{\epsilon}^{s}$ is a sampled dropout mask, and $\boldsymbol{\theta}$ is a parameter of the neural network model. We approximate the above divergence function by deriving the first order of the Taylor expansion by relaxing the domain space of $\boldsymbol{\epsilon}$ from the multiple binary spaces, $\{0,1\}^{H}$, to the real value spaces, $[0,1]^H$. This conversion is a common step in the integer programming research as \cite{hemmecke2010nonlinear}:
|
| 96 |
+
\begin{align}
|
| 97 |
+
D(\mathbf{x}, \boldsymbol{\epsilon}; \boldsymbol{\theta},\boldsymbol{\epsilon}^{s}) \approx D(\mathbf{x}, \boldsymbol{\epsilon}^0; \boldsymbol{\theta},\boldsymbol{\epsilon}^{s}) + (\boldsymbol{\epsilon}-\boldsymbol{\epsilon}^{0})^T \mathbf{J}(\mathbf{x}, \boldsymbol{\epsilon}^{0})
|
| 98 |
+
\end{align}
|
| 99 |
+
where $\mathbf{J}(\mathbf{x}, \boldsymbol{\epsilon}^{0})$ is the Jacobian vector given by $\mathbf{J}(\mathbf{x}, \boldsymbol{\epsilon}^{0}):=\boldsymbol{\bigtriangledown}_{\boldsymbol{\epsilon}}D(\mathbf{x}, \boldsymbol{\epsilon}; \boldsymbol{\theta},\boldsymbol{\epsilon}^{s})|_{\boldsymbol{\epsilon}=\boldsymbol{\epsilon}^{0}}$ when $\boldsymbol{\epsilon}^{0}=1$ indicates no noise injection. The above Taylor expansion provides a linearized optimization objective function by controlling $\epsilon$. Therefore, we reorganized the Taylor expansion with respect to $\epsilon$ as the below:
|
| 100 |
+
\begin{equation}
|
| 101 |
+
\label{Jacobian_def}
|
| 102 |
+
D(\mathbf{x}, \boldsymbol{\epsilon}; \boldsymbol{\theta},\boldsymbol{\epsilon}^{s}) \propto \sum_{i} \boldsymbol{\epsilon}_i \mathbf{J}_i(\mathbf{x},\boldsymbol{\epsilon}^0)
|
| 103 |
+
\end{equation}
|
| 104 |
+
where $\mathbf{J}_i(\mathbf{x},\boldsymbol{\epsilon}^0)$ is the $i^{th}$ element of $\mathbf{J}(\mathbf{x},\boldsymbol{\epsilon}^0)$.
|
| 105 |
+
Since we cannot proceed further with the given formula, we introduce an alternative Jaccobian formula that further specifies the dropout mechanism by $\odot$ and $\mathbf{h(x)}$ as the below.
|
| 106 |
+
\begin{gather}
|
| 107 |
+
J(\mathbf{x},\boldsymbol{\epsilon}^0) \approx \mathbf{h}(\mathbf{x}) \odot \boldsymbol{\bigtriangledown}_{\mathbf{h}(\mathbf{x})} D(\mathbf{x}, \boldsymbol{\epsilon}^{0}; \boldsymbol{\theta}, \boldsymbol{\epsilon}^{s})
|
| 108 |
+
\end{gather}
|
| 109 |
+
where $\mathbf{h}(\mathbf{x})$ is the output vector of the under part neural network of the adversarial dropout.
|
| 110 |
+
|
| 111 |
+
\begin{algorithm}[t]
|
| 112 |
+
\caption{Finding Adversarial Dropout Condition}\label{fast_algo}
|
| 113 |
+
\SetKwInOut{Input}{Input}
|
| 114 |
+
\SetKwInOut{Output}{Output}
|
| 115 |
+
|
| 116 |
+
\Input{$\boldsymbol{\epsilon}^{s}$ is current sampled dropout mask}
|
| 117 |
+
\Input{$\delta$ is a hyper-parameter for the boundary}
|
| 118 |
+
\Input{$\mathbf{J}$ is the Jacobian vector}
|
| 119 |
+
\Input{$H$ is the layer dimension.}
|
| 120 |
+
\Output{$\boldsymbol{\epsilon}_{adv}$}
|
| 121 |
+
\Begin{
|
| 122 |
+
|
| 123 |
+
$\boldsymbol{z} \longleftarrow |\mathbf{J}|$ // absolute values of the Jacobian\\
|
| 124 |
+
$\boldsymbol{i} \longleftarrow $ Arg Sort $\boldsymbol{z}$ as $z_{i_1} \leq ... \leq z_{i_H}$ \\
|
| 125 |
+
$\boldsymbol{\epsilon}^{adv} \longleftarrow \boldsymbol{\epsilon}^{s}$ \\
|
| 126 |
+
$d \longleftarrow 1$ \\
|
| 127 |
+
\While{$\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon}^{adv} \|_2 \leq \delta H$ and $d \leq H$}{
|
| 128 |
+
\uIf{$\epsilon^{adv}_{i_d}=0$ and $\mathbf{J}_{i_d}>0$}{
|
| 129 |
+
$\epsilon^{adv}_{i_d} \longleftarrow 1$
|
| 130 |
+
}
|
| 131 |
+
\ElseIf{$\epsilon^{adv}_{i_d}=1$ and $\mathbf{J}_{i_d}<0$}{
|
| 132 |
+
$\epsilon^{adv}_{i_d} \longleftarrow 0$
|
| 133 |
+
}
|
| 134 |
+
$d \longleftarrow d + 1$
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
\end{algorithm}
|
| 138 |
+
|
| 139 |
+
The control variable, $\boldsymbol{\epsilon}$, is a binary vector whose elements are either one or zero. Under this approximate divergence, finding a maximal point of $\boldsymbol{\epsilon}$ can be viewed as the 0/1 knapsack problem \cite{kellerer2004introduction}, which is one of the most popular integer programming problems.
|
| 140 |
+
|
| 141 |
+
To find $\boldsymbol{\epsilon}^{adv}$ with the constraint, we propose Algorithm \ref{fast_algo} based on the dynamic programming for the 0/1 knapsack problem. In the algorithm, $\boldsymbol{\epsilon}^{adv}$ is initialized with $\boldsymbol{\epsilon}^s$, and $\boldsymbol{\epsilon}^{adv}$ changes its value by the order of the degree increasing the objective divergence until $\| \boldsymbol{\epsilon}^s - \boldsymbol{\epsilon}^{adv} \|_2 \leq \delta H$; or there is no increment in the divergence. After using the algorithm, we obtain $\boldsymbol{\epsilon}^{adv}$ that maximizes the divergence with the constraint, and we evaluate the loss function $\mathcal{L}_{AdD}$.
|
| 142 |
+
|
| 143 |
+
We should notice that the complex vector of the Taylor expansion is not $\boldsymbol{\epsilon}^{s}$, but $\boldsymbol{\epsilon}^{0}$. In the case of virtual adversarial dropout, whose divergence is formed as $D[f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^s), f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})]$, $\boldsymbol{\epsilon}^{s}$ is the minimal point leading the gradient to be zero because of the identical distribution between the random and the optimized dropouts. This zero gradient affects the approximation of the divergence term as zero. To avoid the zero gradients, we set the complex vector of the Taylor expansion as $\boldsymbol{\epsilon}_{0}$.
|
| 144 |
+
|
| 145 |
+
This zero gradient situation does not occur when the model function, $f_{\boldsymbol{\theta}}$, contains additional stochastic layers because $f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^s, \boldsymbol{\rho}^1) \neq f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon}^s, \boldsymbol{\rho}^2)$ when $\boldsymbol{\rho}^1$ and $\boldsymbol{\rho}^2$ are independently sampled noises from another stochastic layers.
|
| 146 |
+
|
| 147 |
+
\begin{table}[t]
|
| 148 |
+
\caption{Test performance with 1,000 labeled (semi-supervised) and 60,000 labeled (supervised) examples on MNIST. Each setting is repeated for eight times. }
|
| 149 |
+
\label{cnn_mnist_sup}
|
| 150 |
+
\centering
|
| 151 |
+
\begin{tabular}{lclcl}
|
| 152 |
+
\hline
|
| 153 |
+
& \multicolumn{2}{c}{Error rate ($\%$) with $\#$ labels } \\
|
| 154 |
+
\cline{2-3}
|
| 155 |
+
Method & 1,000 & All (60,000) \\
|
| 156 |
+
\hline
|
| 157 |
+
Plain (only dropout) & 2.99 $\pm$ 0.23 & 0.53 $\pm$ 0.03 \\
|
| 158 |
+
AT & - & 0.51 $\pm$ 0.03 \\
|
| 159 |
+
VAT & 1.35 $\pm$ 0.14 & 0.50 $\pm$ 0.01 \\
|
| 160 |
+
$\Pi$ model & 1.00 $\pm$ 0.08 & 0.50 $\pm$ 0.02 \\
|
| 161 |
+
\hline
|
| 162 |
+
SAdD & - & \textbf{0.46} $\pm$ \textbf{0.01} \\
|
| 163 |
+
VAdD (KL) & \textbf{0.99} $\pm$ \textbf{0.07} & 0.47 $\pm$ 0.01 \\
|
| 164 |
+
VAdD (QE) & \textbf{0.99} $\pm$ \textbf{0.09} & \textbf{0.46} $\pm$ \textbf{0.02} \\
|
| 165 |
+
\hline
|
| 166 |
+
\end{tabular}
|
| 167 |
+
\end{table}
|
| 168 |
+
\section{Experiments}
|
| 169 |
+
This section evaluates the empirical performance of adversarial dropout for supervised and semi-supervised classification tasks on three benchmark datasets, MNIST, SVHN, and CIFAR-10. In every presented task, we compared adversarial dropout, $\Pi$ model, and adversarial training. We also performed additional experiments to analyze the sparsity of adversarial dropout.
|
| 170 |
+
\subsection{Supervised and Semi-supervised Learning on MNIST task}
|
| 171 |
+
In the first set of experiments, we benchmark our method on the MNIST dataset \cite{lecun1998gradient}, which consists of 70,000 handwritten digit images of size $28\times28$ where 60,000 images are used for training and the rest for testing.
|
| 172 |
+
|
| 173 |
+
Our basic structure is a convolutional neural network (CNN) containing three convolutional layers, which filters are 32, 64, and 128, respectively, and three max-pooling layers sized by $2 \times 2$. The adversarial dropout applied only on the final hidden layer. The structure detail and the hyper-parameters are described in Appendix B.1.
|
| 174 |
+
|
| 175 |
+
We conducted both supervised and semi-supervised learnings to compare the performances from the standard dropout, $\Pi$ model, and adversarial training models utilizing linear perturbations on the input space. The supervised learning used 60,000 instances for training with full labels. The semi-supervised learning used 1,000 randomly selected instances with their labels and 59,000 instances with only their input images. Table 1 shows the test error rates including the baseline models. Over all experiment settings, SAdD and VAdD further reduce the error rate from $\Pi$ model, which had the best performance among the baseline models. In the table, KL and QE indicate Kullback-Leibler divergence and quadratic error, respectively, to specify the divergence function, $D[\mathbf{y}, \hat{\mathbf{y}}]$.
|
| 176 |
+
\subsection{Supervised and Semi-supervised Learning on SVHN and CIFAR-10}
|
| 177 |
+
\begin{table*}[t]
|
| 178 |
+
\caption{Test performances of semi-supervised and supervised learning on SVHN and CIFAR-10. Each setting is repeated for five times. KL and QE indicate Kullback-Leibler divergence and quadratic error, respectively, to specify the divergence function, $D[\mathbf{y}, \hat{\mathbf{y}}]$}
|
| 179 |
+
\label{cnn_mnist_sup}
|
| 180 |
+
\centering
|
| 181 |
+
\begin{tabular}{lccccc}
|
| 182 |
+
\hline
|
| 183 |
+
& \multicolumn{2}{c}{SVHN with $\#$ labels } & & \multicolumn{2}{c}{CIFAR-10 with $\#$ labels } \\
|
| 184 |
+
\cline{2-3} \cline{5-6}
|
| 185 |
+
Method & 1,000 & 73,257 (All) && 4,000 & 50,000 (All) \\
|
| 186 |
+
\hline
|
| 187 |
+
$\Pi$ model \cite{laine2016temporal} & 4.82 & 2.54 && 12.36 & 5.56 \\ %
|
| 188 |
+
Tem. ensembling \cite{laine2016temporal} & 4.42 & 2.74 && 12.16 & 5.60 \\
|
| 189 |
+
Sajjadi et al. \cite{sajjadi2016regularization} &- &- && 11.29 & - \\ %
|
| 190 |
+
VAT \cite{miyato2017virtual} & 3.86 & - && 10.55 & 5.81 \\ %
|
| 191 |
+
\hline
|
| 192 |
+
$\Pi$ model (our implementation) & 4.35 $\pm$ 0.04 & 2.53 $\pm$ 0.05 && 12.62 $\pm$ 0.29 & 5.77 $\pm$ 0.11\\
|
| 193 |
+
VAT (our implementation) & \textbf{3.74} $\pm$ \textbf{0.09} & 2.69 $\pm$ 0.04 && 11.96 $\pm$ 0.10 & 5.65 $\pm$ 0.17 \\
|
| 194 |
+
SAdD & - & 2.46 $\pm$ 0.05 && - & 5.46 $\pm$ 0.16 \\
|
| 195 |
+
VAdD (KL) & 4.16 $\pm$ 0.08 & \textbf{2.31} $\pm$ \textbf{0.01} && 11.68 $\pm$ 0.19 & 5.27 $\pm$ 0.10 \\
|
| 196 |
+
VAdD (QE) & 4.26 $\pm$ 0.14 & 2.37 $\pm$ 0.03 && \textbf{11.32} $\pm$ \textbf{0.11} & \textbf{5.24} $\pm$ \textbf{0.12} \\
|
| 197 |
+
\hline
|
| 198 |
+
VAdD (KL) + VAT & \textbf{3.55} $\pm$ \textbf{0.05} & \textbf{2.23} $\pm$ \textbf{0.03} && 10.07 $\pm$ 0.11 & \textbf{4.40} $\pm$ \textbf{0.12} \\
|
| 199 |
+
VAdD (QE) + VAT & \textbf{3.55} $\pm$ \textbf{0.07} & 2.34 $\pm$ 0.05 && \textbf{9.22} $\pm$ \textbf{0.10} & 4.73 $\pm$ 0.04 \\
|
| 200 |
+
\hline
|
| 201 |
+
\end{tabular}
|
| 202 |
+
\end{table*}
|
| 203 |
+
|
| 204 |
+
We experimented the performances of the supervised and the semi-supervised tasks on the SVHN \cite{netzer2011reading} and the CIFAR-10 \cite{krizhevsky2009learning} datasets consisting of $32\times32$ color images in ten classes. For these experiments, we used the large-CNN \cite{laine2016temporal,miyato2017virtual}. The details of the structure and the settings are described in Appendix B.2.
|
| 205 |
+
|
| 206 |
+
Table \ref{cnn_mnist_sup} shows the reported performances of the close family of CNN-based classifiers for the supervised and semi-supervised learning. We did not consider the recently advanced architectures, such as ResNet \cite{he2016identity} and DenseNet \cite{huang2016densely}, because we intend to compare the performance increment by the dropout and other training techniques.
|
| 207 |
+
|
| 208 |
+
In supervised learning tasks using all labeled train data, adversarial dropout models achieved the top performance compared to the results from the baseline models, such as $\Pi$ model and VAT, on both datasets. When applying adversarial dropout and adversarial training together, there were further improvements in the performances.
|
| 209 |
+
|
| 210 |
+
Additionally, we conducted experiments on the semi-supervised learning with randomly selected labeled data and unlabeled images. In SVHN, 1,000 labeled and 72,257 unlabeled data were used for training. In CIFAR-10, 4,000 labeled and 46,000 unlabeled data were used. Table \ref{cnn_mnist_sup} lists the performance of the semi-supervised learning models, and our implementations with both VAdD and VAT achieved the top performance compared to the results from \cite{sajjadi2016regularization}.
|
| 211 |
+
|
| 212 |
+
Our experiments demonstrate that VAT and VAdD are complementary. When applying VAT and VAdD together by simply adding their divergence terms on the loss function, see Formula \ref{eq_ad_at}, we achieved the state-of-the-art performances on the semi-supervised learning on both datasets; 3.55\% of test error rates on SVHN, and 10.04\% and 9.22\% of test error rates on CIFAR-10. Additionally, VAdD alone achieved a better performance than the self-ensemble model ($\Pi$ model). This indicates that considering an adversarial perturbation on dropout layers enhances the self-ensemble effect.
|
| 213 |
+
\subsection{Effect on Features and Sparsity from Adversarial Dropout}
|
| 214 |
+
Dropout prevents the co-adaptation between the units in a neural network, and the dropout decreases the dependency between hidden units \cite{srivastava2014dropout}. To compare the adversarial dropout and the standard dropout, we analyzed the co-adaptations by visualizing features of autoencoders on the MNIST dataset. The autoencoder consists with one hidden layer, whose dimension is 256, with the ReLU activation. When we trained the autoencoder, we set the dropout with $p = 0.5$, and we calculated the reconstruction error between the input data and the output layer as a loss function to update the weight values of the autoencoder with the standard dropout. On the other hand, the adversarial dropout error is also considered when we update the weight values of the autoencoder with the parameters, $\lambda$ = 0.2, and $\delta$ = 0.3. The trained autoencoders showed similar reconstruction errors on the test dataset.
|
| 215 |
+
|
| 216 |
+
\begin{figure}[h]
|
| 217 |
+
\centering
|
| 218 |
+
\includegraphics[width=0.23 \textwidth]{drop.png}
|
| 219 |
+
\includegraphics[width=0.23 \textwidth]{adv_drop.png}
|
| 220 |
+
\caption{Features of one hidden layer autoencoders trained on MNIST; a standard dropout (left) and an adversarial dropout (right).}
|
| 221 |
+
\label{features}
|
| 222 |
+
\end{figure}
|
| 223 |
+
Figure \ref{features} shows the visualized features from the autoencoders. There are two differences identified from the visualization; 1) adversarial dropout prevents that the learned weight matrix contains black boxes, or \emph{dead filters}, which may be all zero for many different inputs and 2) adversarial dropout tends to standardize other features, except for localized features viewed as black dots, while the standard dropout tends to ignore the neighborhoods of the localized features. These show that adversarial dropout standardizes the other features while preserving the characteristics of localized features from the standard dropout . These could be the main reason for the better generalization performance.
|
| 224 |
+
|
| 225 |
+
The important side-effect of the standard dropout is the sparse activations of the hidden units \cite{hinton2012improving}. To analyze the sparse activations by adversarial dropout, we compared the activation values of the auto-encoder models with no-dropout, dropout, and adversarial dropout on the MNIST test dataset. A sparse model should only have a few highly activated units, and the average activation of any unit across data instances should be low \cite{hinton2012improving}. Figure \ref{histogram2} plot the distribution of the activation values and their means across the test dataset. We found that the adversarial dropout has fewer highly activated units compared to others. Moreover, the mean activation values of the adversarial dropout were the lowest. These indicate that adversarial dropout improves the sparsity of the model than the standard dropout does.
|
| 226 |
+
|
| 227 |
+
\begin{figure}[t!]
|
| 228 |
+
\centering
|
| 229 |
+
\includegraphics[width=0.45\textwidth]{act.png}
|
| 230 |
+
\includegraphics[width=0.45\textwidth]{mean_act.png}
|
| 231 |
+
\caption{Histograms of the activation values and the mean activation values from a hidden layer of autoencoders in 1,000 MNIST test images. All values are converted by the log scale for the comparison.} %
|
| 232 |
+
\label{histogram2}
|
| 233 |
+
\end{figure}
|
| 234 |
+
\section{Disucssion}
|
| 235 |
+
The previous studies proved that the adversarial noise injections were an effective regularizer \cite{goodfellow2014explaining}. In order to investigate the different properties of adversarial dropout, we explore a very simple case of applying adversarial training and adversarial dropout to the linear regression.
|
| 236 |
+
\subsection{Linear Regression with Adversarial Training}
|
| 237 |
+
Let $\mathbf{x}_i \in \mathbb{R}^{D}$ be a data point and $y_i \in \mathbb{R}$ be a target where $i=\{1,...,N\}$. The objective of the linear regression is finding $\mathbf{w} \in \mathbb{R}^{D}$ that minimizes $l(\mathbf{w})=\sum_i \| y_i - \mathbf{x}_i^T\mathbf{w} \|^{2}$.
|
| 238 |
+
|
| 239 |
+
To express adversarial examples, we denote $\tilde{\mathbf{x}}_i = \mathbf{x}_i + \mathbf{r}_i^{adv}$ as the adversarial example of $\mathbf{x}_i$ where $\mathbf{r}_i^{adv}=\delta sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}))$ utilizing the fast gradient sign method (FGSM) \cite{goodfellow2014explaining}, $\delta$ is a control parameter representing the degree of adversarial noises. With the adversarial examples, the objective function of the adversarial training can be viewed as follows:
|
| 240 |
+
\begin{gather}
|
| 241 |
+
l_{AT}(\mathbf{w})=\sum_i \| y_i - (\mathbf{x}_i+\mathbf{r}^{adv}_i)^T\mathbf{w} \|^{2}
|
| 242 |
+
\end{gather}
|
| 243 |
+
The above equation is translated into the below formula by isolating the terms with $\mathbf{r}_i^{adv}$ as the additive noise.
|
| 244 |
+
\begin{gather}
|
| 245 |
+
l(\mathbf{w}) + \sum_{ij} |\delta \bigtriangledown_{x_{ij}} l(\mathbf{w})| + \delta^2 \mathbf{w}^T \Gamma_{AT} \mathbf{w}
|
| 246 |
+
\end{gather}
|
| 247 |
+
where $\Gamma_{AT}= \sum_i sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}))^T sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}) )$. The second term shows the $L_1$ regularization by multiplying the degree of the adversarial noise, $\delta$, at each data point. Additionally, the third term indicates the $L_2$ regularization with $\Gamma_{AT}$, which form the scales of $\mathbf{w}$ by the gradient direction differences over all data points. The penalty terms are closely related with the hyper-parameter $\delta$. When $\delta$ approaches to zero, the regularization term disappears because the inputs become adversarial examples, not anymore. For a large $\delta$, the regularization constant grows larger than the original loss function, and the learning becomes infeasible. The previous studies proved that the adversarial objective function based on the FGSM is an effective regularizer. This paper investigated that training a linear regression with adversarial examples provides two regularization terms of the above equation.
|
| 248 |
+
\subsection{Linear Regression with Adversarial Dropout}
|
| 249 |
+
Now, we turn to the case of applying adversarial dropout to a linear regression. To represent the adversarial dropout, we denote $\tilde{\mathbf{x}}_i = \boldsymbol{\epsilon}_i^{adv}\odot\mathbf{x}_i$ as the adversarially dropped input of $\mathbf{x}_i$ where $\boldsymbol{\epsilon}_i^{adv}=argmax_{\boldsymbol{\epsilon}; \|\boldsymbol{\epsilon}_i - 1 \|_{2} \leq k} \| y_i - (\boldsymbol{\epsilon}_i \odot \mathbf{x}_i)^T\mathbf{w} \|^{2}$ with the hyper-parameter, $k$, controlling the degree of the adversarial dropout. For simplification, we used one vector as the sampled dropout, $\boldsymbol{\epsilon}^{s}$, of the adversarial dropout. If we apply Algorithm \ref{fast_algo}, the adversarial dropout can be defined as follows:
|
| 250 |
+
\begin{gather}
|
| 251 |
+
\epsilon_{ij}^{adv} = \left\{
|
| 252 |
+
\begin{array}{rcl}
|
| 253 |
+
0 & & \mbox{if} \: \mathbf{x}_{ij}\boldsymbol{\bigtriangledown}_{\mathbf{x}_{ij}} l(\mathbf{w}) \leq min\{s_{ik}, 0\} \\
|
| 254 |
+
1 & & \mbox{otherwise}
|
| 255 |
+
\end{array} \right.
|
| 256 |
+
\end{gather}
|
| 257 |
+
where $s_{ik}$ is the $k^{th}$ lowest element of $ \mathbf{x}_{i} \odot \boldsymbol{\bigtriangledown}_{\mathbf{x}_{i}} l(\mathbf{w})$. This solution satisfies the constraint, $\|\boldsymbol{\epsilon}_i - \boldsymbol{\epsilon}^{s} \|_{2} \leq k$. With this adversarial dropout condition, the objective function of the adversarial dropout can be defined as the belows:
|
| 258 |
+
\begin{gather}
|
| 259 |
+
l_{AdD}(\mathbf{w})=\sum_i \| y_i - (\boldsymbol{\epsilon}_i^{adv} \odot \mathbf{x}_i)^T\mathbf{w} \|^{2}
|
| 260 |
+
\end{gather}
|
| 261 |
+
When we isolate the terms with $\boldsymbol{\epsilon}^{adv}$, the above equation is translated into the below formula.
|
| 262 |
+
\begin{gather}
|
| 263 |
+
l(\mathbf{w}) + \sum_{i} \sum_{j \in S_{i}} | x_{ij} \bigtriangledown_{x_{ij}} l(\mathbf{w})| + \mathbf{w}^T \Gamma_{AdD} \mathbf{w}
|
| 264 |
+
\end{gather}
|
| 265 |
+
where $S_{i} = \{ j | \epsilon_{ij}^{adv}=0 \}$ and $\Gamma_{AdD}=\sum_{i} (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)^T (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)$. The second term is the $L_1$ regularization of the $k$ largest loss changes from the features of each data point. The third term is the $L_2$ regularization with $\Gamma_{AdD}$. These two penalty terms are related with the hyper-parameter $k$ controlling the degree of the adversarial dropout, because the $k$ indicates the number of elements of the set $S_i, \forall i $. When $k$ becomes zero, the two penalty terms disappears because there will be no dropout by the constraint on $\boldsymbol{\epsilon}$.
|
| 266 |
+
|
| 267 |
+
There are two differences between the adversarial dropout and the adversarial training. First, the regularization terms of the adversarial dropout are dependent on the scale of the features of each data point. In $L_1$ regularization, the gradients of the loss function are re-scaled with the data points. In $L_2$ regularization, the data points affect the scales of the weight costs. In contrast, the penalty terms of adversarial training are dependent on the degree of adversarial noise, $\delta$, which is a static term across the instances because $\delta$ is a single-valued hyper parameter given in the training process. Second, the penalty terms of the adversarial dropout are selectively activated by the degree of the loss changes while the penalty terms of the adversarial training are always activated.
|
| 268 |
+
\section{Conclusion}
|
| 269 |
+
The key point of our paper is combining the ideas from the adversarial training and the dropout. The existing methods of the adversarial training control a linear perturbation with additive properties only on the input layer. In contrast, we combined the concept of the perturbation with the dropout properties on hidden layers. Adversarially dropped structure becomes a poor ensemble model for the label assignment even when very few nodes are changed. However, by learning the model with the poor structure, the model prevents over-fitting using a few effective features. The experiments showed that the generalization performances are improved by applying our adversarial dropout. Additionally, our approach achieved the-state-of-the-art performances of 3.55\% on SVHN and 9.22\% on CIFAR-10 by applying VAdD and VAT together for the semi-supervised learning.
|
| 270 |
+
|
| 271 |
+
\bibliographystyle{aaai}
|
| 272 |
+
\bibliography{adt_reff}
|
| 273 |
+
|
| 274 |
+
\appendix
|
| 275 |
+
\section{Appendix A. Distance between Two Dropout Conditions}
|
| 276 |
+
In this section, we describe process of induction for the boundary condition from the constraints $distance(\epsilon,\epsilon^{s})<\delta$. We applied two distance metrics, graph edit distance (GED) and Jaccard distance (JD) and proved that restricting upper bounds of two metrics is same with limiting the Euclidean distance.
|
| 277 |
+
\begin{equation}
|
| 278 |
+
GED(\boldsymbol{\epsilon}^1,\boldsymbol{\epsilon}^{2}) \propto JD(\boldsymbol{\epsilon}^1,\boldsymbol{\epsilon}^{2}) \propto ||\boldsymbol{\epsilon}^1 - \boldsymbol{\epsilon}^2||_2
|
| 279 |
+
\end{equation}
|
| 280 |
+
Following sub-sections show the propositions.
|
| 281 |
+
\subsection{A.1. Graph Edit Distance}
|
| 282 |
+
When we consider a neural network as a graph, we can apply the graph edit distance \cite{sanfeliu1983distance} to measure relative difference between two dropouted networks, $g_1$ and $g_2$, by dropout masks, $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$. The following is the definition of graph edit distance (GED) between two networks.
|
| 283 |
+
\begin{equation}
|
| 284 |
+
GED(g_1, g_2)=min_{(e_1,...,e_k) \in P(g_1, g_2) } \sum_{i=1}^{k} c(e_i),
|
| 285 |
+
\end{equation}
|
| 286 |
+
where $P(g_1, g_2)$ denotes the set of edit path transforming $g_1$ into $g_2$, $c(e) \geq 0$ is the cost of each graph edit operation $e$, and $k$ is the number of the edit operations required to change $g_1$ to $g_2$. For simplification, we only considered edge insertion and deletion operations and their cost are same as $1$. When a hidden node (vertex) is dropped, the cost of the GED is $N_l+N_u$ where $N_l$ is the numbers of lower layer nodes and $N_u$ is the number of upper layer nodes. If we consider a hidden node (vertex) is revival, change of GED is same as $N_l+N_u$. This leads following proposition.
|
| 287 |
+
|
| 288 |
+
\begin{prop}
|
| 289 |
+
Given two networks $g_1$ and $g_2$, generated by two dropout masks $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$, and all graph edit costs are same as $c(e)=1$, graph edit distance with two dropout masks can be interpreted as:
|
| 290 |
+
\begin{equation}
|
| 291 |
+
GED(g_1, g_2)=(N_l+N_u) \|\boldsymbol{\epsilon}^1 - \boldsymbol{\epsilon}^2\|_2.
|
| 292 |
+
\end{equation}
|
| 293 |
+
Due to $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$ are binary masks, their Euclidean distance can provide the number of different dropped nodes.
|
| 294 |
+
\end{prop}
|
| 295 |
+
\subsection{A.2. Jaccard Distance}
|
| 296 |
+
When we consider a dropout condition $\boldsymbol{\epsilon}$ as a set of selected hidden nodes, we can apply Jaccard distance to measure difference two dropout masks, $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$. The following equation is the definition of Jaccard distance:
|
| 297 |
+
\begin{equation}
|
| 298 |
+
JD(\boldsymbol{\epsilon}^1, \boldsymbol{\epsilon}^2) = \frac{|\boldsymbol{\epsilon}^1 \cup \boldsymbol{\epsilon}^2| - |\boldsymbol{\epsilon}^1 \cap \boldsymbol{\epsilon}^2|}{|\boldsymbol{\epsilon}^1 \cup \boldsymbol{\epsilon}^2|}.
|
| 299 |
+
\end{equation}
|
| 300 |
+
Since $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$ are binary vectors, $|\boldsymbol{\epsilon}^1 \cap \boldsymbol{\epsilon}^2|$ can be converted as $\|\boldsymbol{\epsilon}^1 \odot \boldsymbol{\epsilon}^2\|_2$ and $|\boldsymbol{\epsilon}^1 \cup \boldsymbol{\epsilon}^2|$ can be viewed as $\|\boldsymbol{\epsilon}^1 + \boldsymbol{\epsilon}^2 - \boldsymbol{\epsilon}^1 \odot \boldsymbol{\epsilon}^2\|_2$. This leads the following proposition.
|
| 301 |
+
|
| 302 |
+
\begin{prop}
|
| 303 |
+
Given two dropout masks $\boldsymbol{\epsilon}^1$ and $\boldsymbol{\epsilon}^2$, which are binary vectors, Jaccard distance between them can be defined as:
|
| 304 |
+
\begin{equation}
|
| 305 |
+
JD(\boldsymbol{\epsilon}^1, \boldsymbol{\epsilon}^2)=\frac{\|\boldsymbol{\epsilon}^1 - \boldsymbol{\epsilon}^2\|_2}{\|\boldsymbol{\epsilon}^1 + \boldsymbol{\epsilon}^2 - \boldsymbol{\epsilon}^1 \odot \boldsymbol{\epsilon}^2\|_2}.
|
| 306 |
+
\end{equation}
|
| 307 |
+
\end{prop}
|
| 308 |
+
\section{Appendix B. Detailed Experiment Set-up}
|
| 309 |
+
This section describes the network architectures and settings for the experimental results in this paper. The tensorflow implementations for reproducing these results can be obtained from \url{https://github.com/sungraepark/Adversarial-Dropout}.
|
| 310 |
+
\subsection{B.1. MNIST : Convolutional Neural Networks}
|
| 311 |
+
\begin{table}[h]
|
| 312 |
+
\caption{The CNN architecture used on MNIST}
|
| 313 |
+
\label{cnn_cifar_architecture}
|
| 314 |
+
\centering
|
| 315 |
+
\begin{tabular}{ll}
|
| 316 |
+
\hline
|
| 317 |
+
Name & Description \\
|
| 318 |
+
\hline
|
| 319 |
+
input & 28 X 28 image \\ %
|
| 320 |
+
conv1 & 32 filters, 1 x 1, pad='same', ReLU \\
|
| 321 |
+
pool1 & Maxpool 2 x 2 pixels \\
|
| 322 |
+
drop1 & Dropout, $p=0.5$ \\
|
| 323 |
+
conv2 & 64 filters, 1 x 1, pad='same', ReLU \\
|
| 324 |
+
pool2 & Maxpool 2 x 2 pixels \\
|
| 325 |
+
drop2 & Dropout, $p=0.5$ \\
|
| 326 |
+
conv3 & 128 filters, 1 x 1, pad='same', ReLU \\
|
| 327 |
+
pool3 & Maxpool 2 x 2 pixels \\
|
| 328 |
+
adt & Adversarial dropout, $p=0.5$, $\delta=0.005$ \\
|
| 329 |
+
dense1 & Fully connected 2048 $\rightarrow$ 625 \\
|
| 330 |
+
dense2 & Fully connected 625 $\rightarrow$ 10 \\
|
| 331 |
+
output & Softmax \\
|
| 332 |
+
\hline
|
| 333 |
+
\end{tabular}
|
| 334 |
+
\end{table}
|
| 335 |
+
|
| 336 |
+
The MNIST dataset (LeCun et al., 1998) consists of 70,000 handwritten digit images of size $28\times28$ where 60,000 images are used for training and the rest for testing. The CNN architecture is described in Table 1. All networks were trained using Adam \cite{kingma2014adam} with a learning rate of 0.001 and momentum parameters of $\beta_1=0.9$ and $\beta_2=0.999$. In all implementations, we trained the model for 100 epochs with minibatch size of 128.
|
| 337 |
+
|
| 338 |
+
For the constraint of adversarial dropout, we set $\delta=0.005$, which indicates 10 ($2048*0.005$) adversarial changes from the randomly selected dropout mask. In all training, we ramped up the trade-off parameter, $\lambda$, for proposed regularization term, $\mathcal{L}_{AdD}$. During the first 30 epochs, we used a Gaussian ramp-up curve $exp[-5(1-T)^2]$, where $T$ advances linearly from zero to one during the ramp-up period. The maximum values of $\lambda_{max}$ are 1.0 for VAdD (KL) and VAT , and 30.0 for VAdD (QE) and $\Pi$ model.
|
| 339 |
+
\subsection{B.2. SVHN and CIFAR-10 : Supervised and Semi-supervised learning}
|
| 340 |
+
\begin{table}[h]
|
| 341 |
+
\caption{The network architecture used on SVHN and CIFAR-10}
|
| 342 |
+
\label{cnn_cifar_architecture}
|
| 343 |
+
\centering
|
| 344 |
+
\begin{tabular}{ll}
|
| 345 |
+
\hline
|
| 346 |
+
|
| 347 |
+
Name & Description \\
|
| 348 |
+
\hline
|
| 349 |
+
input & 32 X 32 RGB image \\ %
|
| 350 |
+
noise & Additive Gaussian noise $\sigma=0.15$ \\ %
|
| 351 |
+
conv1a & 128 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 352 |
+
conv1b & 128 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 353 |
+
conv1c & 128 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 354 |
+
pool1 & Maxpool 2 x 2 pixels \\
|
| 355 |
+
drop1 & Dropout, $p=0.5$ \\
|
| 356 |
+
conv2a & 256 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 357 |
+
conv2b & 256 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 358 |
+
conv2c & 256 filters, 3 x 3, pad='same', LReLU($\alpha=0.1$) \\
|
| 359 |
+
pool2 & Maxpool 2 x 2 pixels \\
|
| 360 |
+
conv3a & 512 filters, 3 x 3, pad='valid', LReLU($\alpha=0.1$) \\
|
| 361 |
+
conv3b & 256 filters, 1 x 1, LReLU($\alpha=0.1$) \\
|
| 362 |
+
conv3c & 128 filters, 1 x 1, LReLU($\alpha=0.1$) \\
|
| 363 |
+
pool3 & Global average pool (6 x 6 $\rightarrow$ 1 x 1)pixels \\
|
| 364 |
+
add & Adversarial dropout, $p=1.0$, $\delta=0.05$ \\
|
| 365 |
+
dense & Fully connected 128 $\rightarrow$ 10 \\
|
| 366 |
+
output & Softmax \\
|
| 367 |
+
\hline
|
| 368 |
+
\end{tabular}
|
| 369 |
+
\end{table}
|
| 370 |
+
|
| 371 |
+
|
| 372 |
+
The both datasets, SVHN \cite{netzer2011reading} and CIFAR-10 \cite{krizhevsky2009learning}, consist of $32\times32$ colour images in ten classes. For these experiments, we used a CNN, which used by \cite{laine2016temporal,miyato2017virtual} described in Table 2. In all layers, we applied batch normalization for SVHN and mean-only batch normalization \cite{salimans2016weight} for CIFAR-10 with momentum 0.999. All networks were trained using Adam \cite{kingma2014adam} with the momentum parameters of $\beta_1=0.9$ and $\beta_2=0.999$, and the maximum learning rate 0.003. We ramped up the learning rate during the first 80 epochs using a Gaussian ramp-up curve $exp[-5(1-T)^2]$, where $T$ advances linearly from zero to one during the ramp-up period. Additionally, we annealed the learning rate to zero and the Adam parameter, $\beta_1$, to 0.5 during the last 50 epochs. The number of total epochs is set as 300. These learning setting are same with \cite{laine2016temporal}.
|
| 373 |
+
|
| 374 |
+
For adversarial dropout, we set the maximum value of regularization component weight, $\lambda_{max}$, as 1.0 for VAdD(KL) and 25.0 for VAdD(QE). We also ramped up the weight using the Gaussian ramp-up curve during the first 80 epochs. Additionally, we set $\delta$ as 0.05 and dropout probability $p$ as 1.0, which means dropping 6 units among the full hidden units. We set minibatch size as 100 for supervised learning and 32 labeled and 128 unlabeled data for semi-supervised learning.
|
| 375 |
+
\section{Appendix C. Definition of Notation}
|
| 376 |
+
In this section, we describe notations used over this paper.
|
| 377 |
+
|
| 378 |
+
\begin{table}[h]
|
| 379 |
+
\caption{The notation used over this paper.}
|
| 380 |
+
\label{notation}
|
| 381 |
+
\centering
|
| 382 |
+
\begin{tabular}{ll}
|
| 383 |
+
\hline
|
| 384 |
+
|
| 385 |
+
Notat. & Description \\
|
| 386 |
+
\hline
|
| 387 |
+
$\mathbf{x}$ & An input of a neural network \\
|
| 388 |
+
$y$ & A true label \\
|
| 389 |
+
$\theta$ & A set of parameters of a neural network \\
|
| 390 |
+
$\boldsymbol{\gamma}$ & A noise vector of additive Gaussian noise layer \\
|
| 391 |
+
$\boldsymbol{\epsilon}$ & A binary noise vector of dropout layer \\
|
| 392 |
+
$\delta$ & A hyperparameter controlling the intensity of \\
|
| 393 |
+
& the adversarial perturbation \\
|
| 394 |
+
$\lambda$ & A trade-off parameter controlling the impact of \\
|
| 395 |
+
& a regularization term \\
|
| 396 |
+
\hline
|
| 397 |
+
$D[\mathbf{y}, \mathbf{y}']$ & A nonnegative function that represents the \\
|
| 398 |
+
& distance between two output vectors: \\
|
| 399 |
+
& cross entropy(CE), KL divergence(KL), and \\
|
| 400 |
+
& quadratic error (QE) \\
|
| 401 |
+
$f_{\boldsymbol{\theta}}(\mathbf{x})$ & An output vector of a neural network with \\
|
| 402 |
+
& parameters ($\boldsymbol{\theta}$) and an input ($\mathbf{x}$) \\
|
| 403 |
+
$f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\rho})$ & An output vector of a neural network with \\
|
| 404 |
+
& parameters ($\boldsymbol{\theta}$), an input ($\mathbf{x}$), and \\
|
| 405 |
+
& noise ($\boldsymbol{\rho}$) \\
|
| 406 |
+
$f^{upper}_{\boldsymbol{\theta}_1}$ & A upper part of a neural network, $f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})$, \\
|
| 407 |
+
& of a adversarial dropout layer where \\
|
| 408 |
+
& $\boldsymbol{\theta}=\{ \boldsymbol{\theta}_1, \boldsymbol{\theta}_2 \}$ \\
|
| 409 |
+
$f^{under}_{\boldsymbol{\theta}_2}$ &A under part of a neural network, $f_{\boldsymbol{\theta}}(\mathbf{x}, \boldsymbol{\epsilon})$, \\
|
| 410 |
+
&of a adversarial dropout layer \\
|
| 411 |
+
\hline
|
| 412 |
+
\end{tabular}
|
| 413 |
+
\end{table}
|
| 414 |
+
\section{Appendix D. Performance Comparison with Other Models}
|
| 415 |
+
|
| 416 |
+
\subsection{D.1. CIFAR-10 : Supervised classification results with additional baselines}
|
| 417 |
+
We compared the reported performances of the additional close family of CNN-based classifier for the supervised learning. As we mentioned in the paper, we did not consider the recent advanced architectures, such as ResNet \cite{he2016identity} and DenseNet \cite{huang2016densely}.
|
| 418 |
+
|
| 419 |
+
\begin{table}[h!]
|
| 420 |
+
\caption{Supervised learning performance on CIFAR-10. Each setting is repeated for five times.}
|
| 421 |
+
\label{cnn_mnist_sup}
|
| 422 |
+
\centering
|
| 423 |
+
\begin{tabular}{lcll}
|
| 424 |
+
\hline
|
| 425 |
+
|
| 426 |
+
Method & Error rate ($\%$) \\
|
| 427 |
+
\hline
|
| 428 |
+
Network in Network \shortcite{lin2013network} & 8.81 \\ %
|
| 429 |
+
All-CNN \shortcite{springenberg2014striving} & 7.25 \\ %
|
| 430 |
+
Deep Supervised Net \shortcite{lee2015deeply} & 7.97 \\ %
|
| 431 |
+
Highway Network \shortcite{srivastava2015highway} & 7.72 \\ %
|
| 432 |
+
$\Pi$ model \shortcite{laine2016temporal} & 5.56 \\ %
|
| 433 |
+
Temportal ensembling \shortcite{laine2016temporal} & 5.60 \\ %
|
| 434 |
+
VAT \shortcite{miyato2017virtual} & 5.81 \\ %
|
| 435 |
+
\hline
|
| 436 |
+
$\Pi$ model (our implementation) & 5.77 $\pm$ 0.11 \\
|
| 437 |
+
VAT (our implementation) & 5.65 $\pm$ 0.17 \\
|
| 438 |
+
AdD & 5.46 $\pm$ 0.16 \\
|
| 439 |
+
VAdD (KL) & 5.27 $\pm$ 0.10 \\
|
| 440 |
+
VAdD (QE) & \textbf{5.24} $\pm$ \textbf{0.12} \\
|
| 441 |
+
\hline
|
| 442 |
+
VAdD (KL) + VAT & \textbf{4.40} $\pm$ \textbf{0.12} \\
|
| 443 |
+
VAdD (QE) + VAT & 4.73 $\pm$ 0.04 \\
|
| 444 |
+
\hline
|
| 445 |
+
\end{tabular}
|
| 446 |
+
\end{table}
|
| 447 |
+
\subsection{D.2. CIFAR-10 : Semi-supervised classification results with additional baselines}
|
| 448 |
+
We compared the reported performances of additional baseline models for the semi-supervised learning. Our implementation reproduced the closed performance from their reported results, and showed the performance improvement from adversarial dropout.
|
| 449 |
+
|
| 450 |
+
\begin{table}[h!]
|
| 451 |
+
\caption{Semi-supervised learning task on CIFAR-10 with 4,000 labeled examples. Each setting is repeated for five times.}
|
| 452 |
+
\label{cnn_mnist_sup}
|
| 453 |
+
\centering
|
| 454 |
+
\begin{tabular}{ll}
|
| 455 |
+
\hline
|
| 456 |
+
|
| 457 |
+
Method & Error rate ($\%$) \\ \hline
|
| 458 |
+
Ladder network \shortcite{rasmus2015semi} & 20.40 \\ %
|
| 459 |
+
CatGAN \shortcite{springenberg2015unsupervised} & 19.58 \\ %
|
| 460 |
+
GAN with feature matching \shortcite{DBLP:journals/corr/SalimansGZCRC16} & 18.63 \\ %
|
| 461 |
+
$\Pi$ model \shortcite{laine2016temporal} & 12.36 \\ %
|
| 462 |
+
Temportal ensembling \shortcite{laine2016temporal} & 12.16 \\ %
|
| 463 |
+
Sajjadi et al. \shortcite{sajjadi2016regularization} & 11.29 \\ %
|
| 464 |
+
VAT \shortcite{miyato2017virtual} & 10.55 \\ %
|
| 465 |
+
\hline
|
| 466 |
+
$\Pi$ model (our implementation) & 12.62 $\pm$ 0.29 \\
|
| 467 |
+
VAT (our implementation) & 11.96 $\pm$ 0.10 \\
|
| 468 |
+
VAdD (KL) & 11.68 $\pm$ 0.19 \\
|
| 469 |
+
VAdD (QE) & \textbf{11.32} $\pm$ \textbf{0.11} \\
|
| 470 |
+
\hline
|
| 471 |
+
VAdD (KL) + VAT & 10.07 $\pm$ 0.11 \\
|
| 472 |
+
VAdD (QE) + VAT & \textbf{9.22} $\pm$ \textbf{0.10} \\
|
| 473 |
+
\hline
|
| 474 |
+
\end{tabular}
|
| 475 |
+
\end{table}
|
| 476 |
+
\section{Appendix E. Proof of Linear Regression Regularization}
|
| 477 |
+
In this section, we showed the detailed proof of regularization terms from adversarial training and adversarial dropout.
|
| 478 |
+
\subsection{Linear Regression with Adversarial Training}
|
| 479 |
+
Let $\mathbf{x}_i \in \mathbb{R}^{D}$ be a data point and $y_i \in \mathbb{R}$ be a target where $i=\{1,...,N\}$. The objective of linear regression is to find a $\mathbf{w} \in \mathbb{R}^{D}$ that minimizes $l(\mathbf{w})=\sum_i \| y_i - \mathbf{x}_i^T\mathbf{w} \|^{2}$.
|
| 480 |
+
|
| 481 |
+
To express adversarial examples, we denote $\tilde{\mathbf{x}}_i = \mathbf{x}_i + \mathbf{r}_i^{adv}$ as the adversarial example of $\mathbf{x}_i$ where $\mathbf{r}_i^{adv}=\delta sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}))$ utilizing the fast gradient sign method (FGSM) \cite{goodfellow2014explaining}, $\delta$ is a controlling parameter representing the degree of adversarial noises. With the adversarial examples, the objective function of adversarial training can be viewed as follows:
|
| 482 |
+
\begin{gather}
|
| 483 |
+
l_{AT}(\mathbf{w})=\sum_i \| y_i - (\mathbf{x}_i+\mathbf{r}^{adv}_i)^T\mathbf{w} \|^{2}
|
| 484 |
+
\end{gather}
|
| 485 |
+
This can be divided to
|
| 486 |
+
\begin{gather}
|
| 487 |
+
l_{AT}(\mathbf{w})=l(\mathbf{w}) - 2 \sum_i (y_i - \mathbf{x}_i^T\mathbf{w})\mathbf{w}^T\mathbf{r}^{adv}_i \\
|
| 488 |
+
\: \: + \sum_i \mathbf{w}^T (\mathbf{r}^{adv}_i)^T (\mathbf{r}^{adv}_i) \mathbf{w} \nonumber
|
| 489 |
+
\end{gather}
|
| 490 |
+
where $l(\mathbf{w})$ is the loss function without adversarial noise. Note that the gradient is $\boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w})= - 2 (y_i - \mathbf{x}_i^T\mathbf{w}) \mathbf{w}$, and $\mathbf{a}^Tsign(\mathbf{a})=\| \mathbf{a} \|_1$. The above equation can be transformed as the following:
|
| 491 |
+
\begin{gather}
|
| 492 |
+
l_{AT}(\mathbf{w})=l(\mathbf{w}) + \sum_{ij} |\delta \bigtriangledown_{x_{ij}} l(\mathbf{w})| + \delta^2 \mathbf{w}^T \Gamma_{AT} \mathbf{w},
|
| 493 |
+
\end{gather}
|
| 494 |
+
where $\Gamma_{AT}= \sum_i sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}))^T sign( \boldsymbol{\bigtriangledown}_{\mathbf{x}_i} l(\mathbf{w}) )$.
|
| 495 |
+
\subsection{Linear Regression with Adversarial Dropout}
|
| 496 |
+
To represent adversarial dropout, we denote $\tilde{\mathbf{x}}_i = \boldsymbol{\epsilon}_i^{adv}\odot\mathbf{x}_i$ as the adversarially dropped input of $\mathbf{x}_i$ where $\boldsymbol{\epsilon}_i^{adv}=argmax_{\boldsymbol{\epsilon}; \|\boldsymbol{\epsilon}_i - 1 \|_{2} \leq k} \| y_i - (\boldsymbol{\epsilon}_i \odot \mathbf{x}_i)^T\mathbf{w} \|^{2}$ with the hyper-parameter, $k$, controlling the degree of adversarial dropout. For simplification, we used one vector as the base condition of a adversarial dropout. If we applied our proposed algorithm, the adversarial dropout can be defined as follows:
|
| 497 |
+
\begin{gather}
|
| 498 |
+
\epsilon_{ij}^{adv} = \left\{
|
| 499 |
+
\begin{array}{rcl}
|
| 500 |
+
0 & & \mbox{if} \: x_{ij}\bigtriangledown_{x_{ij}} l(\mathbf{w}) \leq min\{s_{ik}, 0\} \\
|
| 501 |
+
1 & & \mbox{otherwise}
|
| 502 |
+
\end{array} \right.
|
| 503 |
+
\end{gather}
|
| 504 |
+
where $s_{ik}$ is the $k^{th}$ lowest element of $ \mathbf{x}_{i} \odot \boldsymbol{\bigtriangledown}_{\mathbf{x}_{i}} l(\mathbf{w})$. This solution satisfies the constraint, $\|\boldsymbol{\epsilon}_i - 1 \|_{2} \leq k$. With this adversarial dropout condition, the objective function of adversarial dropout can be defined as the following:
|
| 505 |
+
\begin{gather}
|
| 506 |
+
l_{AdD}(\mathbf{w})=\sum_i \| y_i - (\boldsymbol{\epsilon}_i^{adv} \odot \mathbf{x}_i)^T\mathbf{w} \|^{2}
|
| 507 |
+
\end{gather}
|
| 508 |
+
This can be divided to
|
| 509 |
+
\begin{gather}
|
| 510 |
+
l_{AdD}(\mathbf{w})=l(\mathbf{w}) + 2 \sum_i (y_i - \mathbf{x}_i^T\mathbf{w}) (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)^T\mathbf{w} \\
|
| 511 |
+
\: \: + \sum_i \mathbf{w}^T (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)^T (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)\mathbf{w} \nonumber
|
| 512 |
+
\end{gather}
|
| 513 |
+
The second term of the right handside can be viewed as
|
| 514 |
+
\begin{gather}
|
| 515 |
+
2 \sum_i (y_i - \mathbf{x}_i^T\mathbf{w}) \sum_j ( 1 - \epsilon_{ij}^{adv})x_{ij} w_j.
|
| 516 |
+
\end{gather}
|
| 517 |
+
By defining a set $S_{i} = \{ j | \mathbf{\epsilon}_{ij}^{adv}=0 \}$, the second term can be transformed as the following.
|
| 518 |
+
\begin{gather}
|
| 519 |
+
- \sum_i \sum_{j \in S_{i}} -2(y_i - \mathbf{x}_i^T\mathbf{w}) w_j x_{ij}.
|
| 520 |
+
\end{gather}
|
| 521 |
+
Note that the gradient is $\bigtriangledown_{x_{ij}} l(\mathbf{w})= - 2 (y_i - \mathbf{x}_i^T\mathbf{w}) \mathbf{w}_j$ and $x_{ij}\bigtriangledown_{x_{ij}} l(\mathbf{w})$ is always negative when $j \in S_{i}$. The second term can be re-defined as the following.
|
| 522 |
+
\begin{gather}
|
| 523 |
+
\sum_i \sum_{j \in S_{i}} | x_{ij} \bigtriangledown_{x_{ij}} l(\mathbf{w})|
|
| 524 |
+
\end{gather}
|
| 525 |
+
Finally, the objective function of adversarial dropout is re-organized.
|
| 526 |
+
\begin{gather}
|
| 527 |
+
l_{AdD}(\mathbf{w})=l(\mathbf{w}) + \sum_{i} \sum_{j \in S_{i}} | x_{ij} \bigtriangledown_{x_{ij}} l(\mathbf{w})| + \mathbf{w}^T \Gamma_{AdD} \mathbf{w},
|
| 528 |
+
\end{gather}
|
| 529 |
+
where $S_{i} = \{ j | \epsilon_{ij}^{adv}=0 \}$ and $\Gamma_{AdD}=\sum_{i} (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)^T (( 1 - \boldsymbol{\epsilon}_i^{adv}) \odot \mathbf{x}_i)$.
|
1707.03986v1.txt
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Face grouping is an actively researched computer vision problem due to its enormous potential in commercial applications. It not only allows users to organize and tag photos based on faces but also retrieve and revisit huge quantity of relevant images effortlessly.
|
| 2 |
+
|
| 3 |
+
The performance of face grouping significantly benefits from the recent emergence of deep learning approaches [5, 24, 28, 30, 33, 37]. Nevertheless, we still observe some challenges when we apply existing methods on real-world photo albums. In particular, we found that deeply learned representation can still perform poorly given profile faces and false detections. In addition, there is no obvious mechanism to disambiguate large quantity of non-interested faces111Non-interested faces refer to faces that we do not want to group (e.g. faces in the background). This is the term popularized by the earlier work in face clustering [47]. that are captured under the same condition with the person of interests.We provide an illustrative example in Fig. 1, of which results were obtained from the Inception-v3 model [32] fine-tuned with MS-Celeb-1M [13] images with face identity.Despite the model achieves an accuracy of 99.27% on LFW [14], which is on par with the accuracy reported by a state-of-the-art method [37], its performance on the open-world face grouping task is unsatisfactory.We attempted to adapt the deep model with open-world albums [45] but with limited success. We show experimental results in Sec. 5. Learning such an open-world model is still far from being solved due to highly imbalanced data (much more frontal faces compared to profile instances in existing datasets) and a large negative space to cover.
|
| 4 |
+
|
| 5 |
+
Thinking about humans, we tend to execute a visual grouping task in sequence with intermediate decision to govern our next step, like playing a jigsaw puzzle [42] with pieces of varying visual complexity. First we will link pieces with strong correlation and high confidence, then gain insights and accumulate visual evidence from these stable clusters. Consequently, a larger group can be formed through merging ambiguous positives and discarding uninteresting outliers. In the process, we may exploit contextual cues and global picture considering other samples.
|
| 6 |
+
|
| 7 |
+
The above intuition motivates a novel face grouping framework. Our goal is not to design a better deep representation, but learning to make better merging/not-merging decision from expert?s demonstration using existing representation.In particular, we wish to introduce intermediate sequential decision between the clustering steps, i.e., when to merge two samples or groups given the dynamic context.Towards this goal, we assume different clustering states, where the states differ in their current partitions of data. At each time step, an agent will choose from two possible actions, i.e., to merge or not to merge a pair of face groups. The process responds at the next time step by moving to a new state and provides a reward to the agent. A sequence of good actions would lead to higher accumulative reward than suboptimal decisions.
|
| 8 |
+
|
| 9 |
+
Learning a decision strategy in our problem is non-trivial. In particular, the decision process is adversely affected by uninteresting faces and noisy detections. Defining a reward function for face grouping is thus not straightforward, which needs to consider the similarity of faces, group consistency, and quality of images.In addition, we also need to consider the operation cost involved, i.e., the manual human effort spent on adding or removing a photo from a group.It is hard to determine the relative weights of these terms a-priori. This is in contrast to (first person) imitation learning setting of which the reward is usually assumed known and fixed, e.g., using the change of game score [20].
|
| 10 |
+
|
| 11 |
+
Contributions:We make the following contributions to overcome the aforementioned challenges:
|
| 12 |
+
|
| 13 |
+
1) We formulate a novel face grouping framework based on imitation learning (IL)via inverse reinforcement learning [21, 27].To our knowledge, this is the first attempt to address visual clustering via inverse reinforcement learning. Once learned, the policy can be transferred to unseen photo albums with good generalization performance.
|
| 14 |
+
|
| 15 |
+
2) We assume the reward as an unknown to be ascertained through learning by watching an expert’s behavior. We formulate the learning such that both short- and long-terms rewards are considered. The formal considers similarity, consistency and quality of local candidate clusters; whereas the latter measures the operation cost to get from an arbitrary photos partition to the final ground-truth partition. The new reward system effectively handles the challenges of profile, noisy, and uninteresting faces, and works well with conventional face similarity under an open-world context.
|
| 16 |
+
|
| 17 |
+
3) We introduce a large-scale dataset called Grouping Faces in the Wild (GFW) to facilitate the research of real-world photo grouping. The new dataset contains 78,0007800078,000 faces of 3,13231323,132 identities collected from a social network. This dataset is realistic, providing a large number of uninteresting faces and noisy detections.
|
| 18 |
+
|
| 19 |
+
Extensive experiments are conducted on three datasets, namely, LFW simulated albums, ACCIO dataset (Harry Potter movie) [12], and the GFW introduced by us.We show that the proposed method can be adapted to a variety of clustering algorithms, from the conventional k-means and hierarchical clustering to the more elaborated graph degree linkage (GDL) approach [44].We show that it outperforms a number of unsupervised and supervised baselines.
|
| 20 |
+
|
| 21 |
+
Face Grouping:Traditional face clustering methods [4, 18, 22, 47] are usually purely data-driven and unsupervised. They mainly focus on finding good distance metric between faces or effective subspaces for face representation. For instance, Zhu et al. [47] propose a rank-order distance that measures the similarity between two faces using their neighboring information. Fitzgibbon and Zisserman [9] further develop a joint manifold distance (JMD) that measures the distance between two subspaces, each of which invariant to a desired group of transformations.Zhang et al. [44] propose agglomerative clustering on a directed graph to better capture global manifold structures of face data.There exist techniques that employ user interactions [35], extra information on the web [3] and prior knowledge of family photo albums [39].Deep representation is recently found effective for face clustering [28], and large-scale face clustering has been attempted [23].Beyond image-based clustering, most existing video-based approaches employ pairwise constraints derived from face tracklets [6, 38, 41, 45] or other auxiliary information [8, 34, 46] to facilitate face clustering in video. The state-of-the-art method by Zhang et al. [45] adapts DeepID2+ model [31] to a target domain with joint face representation adaptation and clustering.
|
| 22 |
+
|
| 23 |
+
In this study, we focus on image-based face grouping without temporal information. Our method differs significantly to existing methods [45] that cluster instances by deep representation alone. Instead, our method learns from experts to make sequential decision on grouping considering both short- and long-term rewards. It is thus capable of coping with uninteresting faces and noisy detections effectively.
|
| 24 |
+
|
| 25 |
+
Clustering with Reinforcement Learning:There exist some pioneering studies that explored clustering with RL.Likas [19] models the decision process of assigning a sample from a data stream to a prototype, e.g., cluster centers produced by on-line K-means.Barbakh and Fyfe [2] employ RL to select a better initialization for K-means.Our work differs to the aforementioned studies: (1) [2, 19] are unsupervised, e.g., their loss is related to the distance from data to a cluster prototype. In contrast, our framework guides an agent with a teacher’s behavior. (2) We consider a decision that extends more flexibly to merge arbitrary instances or groups. We also investigate a novel reward function and new mechanisms to deal with noises.
|
| 26 |
+
|
| 27 |
+
Imitation Learning: Ng and Russel [21] introduced the concept of inverse reinforcement learning (IRL), which is also known as imitation learning or apprenticeship learning [1]. The goal of IRL is to find a reward function to explain observed behavior of an expert who acts according to an unknown policy. Inverse reinforcement learning is useful when a reward function is multivariate, i.e., consists of several reward terms of which the relative weights of these terms are unknown a-priori.Imitation learning was shown effective when the supervision of a dynamic process is obtainable, e.g., in robotic navigation [1], activity understanding and forecasting [16] and visual tracking [40].
|
| 28 |
+
|
| 29 |
+
An illustration of the proposed framework is given in Fig. 2. We treat grouping as a sequential process. In each step during test time, two candidate groups Cisubscript𝐶𝑖C_{i} and Cjsubscript𝐶𝑗C_{j} are chosen. Without loss of generality, a group can be formed by just a single instance.Given the two groups, we extract meaningful features to characterize their similarity, group consistency, and image quality.Based on the features, an agent will then perform an action, which can be either i) merging the two groups, or ii) not merging the two groups. Once the action is executed accordingly, the grouping proceeds to select the next pair of groups.The merging stops when there are no further candidate groups can be chosen, e.g., the similarity between any groups is higher than a pre-defined threshold.Next, we define some key terminologies.
|
| 30 |
+
|
| 31 |
+
Recommender: At each time step we pick and consider the merging of two face groups. The action space is large with a complexity of O(N2)𝑂superscript𝑁2O(N^{2}), where N𝑁N is the number of groups. This adds hurdles to both learning and test stages.To makes our approach scalable, we employ a recommender, M𝑀M, which recommends two candidates cluster Cisubscript𝐶𝑖C_{i} and Cjsubscript𝐶𝑗C_{j} at each time step. This reduces the O(N2)𝑂superscript𝑁2O(N^{2}) action space to a binary problem, i.e., to merge or not to merge a pair of face groups.A recommender M𝑀M can be derived from many classic clustering algorithms especially agglomerative-based algorithm like hierarchical clustering (HC), ranked-ordered clustering [47] and GDL approach [44].For instance, hierarchical clustering-based M𝑀M always suggest two clusters that are nearest by some distance metric.In Sec. 5, we perform rigorous evaluations on plausible choices of a recommender.
|
| 32 |
+
|
| 33 |
+
State: Each state st=(ht,Ht)∈𝒮subscript𝑠𝑡subscriptℎ𝑡subscript𝐻𝑡𝒮s_{t}=(h_{t},H_{t})\in\mathcal{S}, contains the current grouping partition htsubscriptℎ𝑡h_{t} and recommender history Htsubscript𝐻𝑡H_{t}, at time step t𝑡t. In each discrete state, the recommender M𝑀M will recommend a pair of cluster (Ci,Cj)=M(s)subscript𝐶𝑖subscript𝐶𝑗𝑀𝑠(C_{i},C_{j})=M(s) based on the current state.
|
| 34 |
+
|
| 35 |
+
Action: An action is denoted as a𝑎a. An agent can execute two possible actions, i.e., merge two groups or not. That is the action set is defined as 𝒜={merge,not_merge}𝒜mergenot_merge\mathcal{A}=\left\{\mathrm{merge},\mathrm{not}\text{\_}\mathrm{merge}\right\}, and a∈𝒜𝑎𝒜a\in\mathcal{A}.
|
| 36 |
+
|
| 37 |
+
Transition:If a merging action is executed, candidate groups Cisubscript𝐶𝑖C_{i} and Cjsubscript𝐶𝑗C_{j} will be merged. The corresponding partition is updated as ht+1←{ht\{Ci,Cj}}∪{Ci∪Cj}←subscriptℎ𝑡1\subscriptℎ𝑡subscript𝐶𝑖subscript𝐶𝑗subscript𝐶𝑖subscript𝐶𝑗h_{t+1}\leftarrow\{h_{t}\backslash\{C_{i},C_{j}\}\}\cup\{C_{i}\cup C_{j}\}. Otherwise, the partition remains unchanged, ht+1←ht←subscriptℎ𝑡1subscriptℎ𝑡h_{t+1}\leftarrow h_{t}. The candidate information will be appended to the history Ht+1subscript𝐻𝑡1H_{t+1} so that the same pair would not be recommended by M𝑀M.The transition is thus represented as st+1=T(st,a)subscript𝑠𝑡1𝑇subscript𝑠𝑡𝑎s_{t+1}=T(s_{t},a), where T(⋅)𝑇⋅T(\cdot) denotes the transition function, and st+1=(ht+1,Ht+1)subscript𝑠𝑡1subscriptℎ𝑡1subscript𝐻𝑡1s_{t+1}=(h_{t+1},H_{t+1}) and st=(ht,Ht)subscript𝑠𝑡subscriptℎ𝑡subscript𝐻𝑡s_{t}=(h_{t},H_{t}).
|
| 38 |
+
|
| 39 |
+
The previous section explains the face grouping process at test time. An agent is used to determine the right action at each step, i.e., merging or not merging a pair of groups.To learn an agent with the desired behavior, we assume access to demonstrations by some expert.In our study, we obtain these demonstrations from a set training photo albums of which the ground-truth partition of the photos is known. Consequently, given any two candidate groups, Cisubscript𝐶𝑖C_{i} and Cjsubscript𝐶𝑗C_{j}, we know if merging them is a correct action or not.These ground-truth actions {aGT}subscript𝑎GT\left\{a_{\mathrm{GT}}\right\} represent the pseudo expert’s behavior.
|
| 40 |
+
|
| 41 |
+
Towards the goal of learning an agent from the expert’s behavior, we perform the learning in two stages: (1) we find a reward function to explain the behavior via inverse reinforcement learning [21], (2) with the learned reward function we find a policy that maximizes the cumulative rewards.
|
| 42 |
+
|
| 43 |
+
Formally, let R:𝒮×𝒜→ℝ:𝑅→𝒮𝒜ℝR:\mathcal{S}\times\mathcal{A}\rightarrow\mathbb{R} denotes the reward function, which rewards the agent after it executes action a𝑎a in state s𝑠s. And 𝒯𝒯\mathcal{T} is a set of state transition probabilities upon taking action a𝑎a in state s𝑠s.For any policy π𝜋\pi, a value function Vπsuperscript𝑉𝜋V^{\pi} evaluates the value of a state as the total amount of reward an agent can expect to accumulate over the future, starting from that state, s1subscript𝑠1s_{1},Vπ(s1)=E[∑t=0∞γt−1R(st,at|π)],superscript𝑉𝜋subscript𝑠1Edelimited-[]superscriptsubscript𝑡0superscript𝛾𝑡1𝑅subscript𝑠𝑡conditionalsubscript𝑎𝑡𝜋V^{\pi}(s_{1})=\mathrm{E}\left[\sum\nolimits_{t=0}^{\infty}\gamma^{t-1}R(s_{t},a_{t}|\pi)\right],(1)where γ𝛾\gamma is a discount factor.
|
| 44 |
+
|
| 45 |
+
An action-value function Qπsuperscript𝑄𝜋Q^{\pi} is used to judge the value of actions, according toQπ(s,a)=R(s,a)+γVπ(s′|s′=T(s,a)),superscript𝑄𝜋𝑠𝑎𝑅𝑠𝑎𝛾superscript𝑉𝜋conditionalsuperscript𝑠′superscript𝑠′𝑇𝑠𝑎Q^{\pi}(s,a)=R(s,a)+\gamma V^{\pi}(s^{\prime}|s^{\prime}=T(s,a)),(2)where the notation s′=T(s,a)superscript𝑠′𝑇𝑠𝑎s^{\prime}=T(s,a) represents the transition to state s′superscript𝑠′s^{\prime} after taking an action a𝑎a at state s𝑠s.Our goal is to first uncover the reward function R𝑅R from expert’s behavior, and find a policy π𝜋\pi that maximizes Qπ(s,a)superscript𝑄𝜋𝑠𝑎Q^{\pi}(s,a).
|
| 46 |
+
|
| 47 |
+
Rewards: In our study, the reward function that we wish to learn consists of two terms, denoted asR=Rshort+βRlong.𝑅subscript𝑅short𝛽subscript𝑅longR=R_{\mathrm{short}}+\beta R_{\mathrm{long}}.(3)The first and second term corresponds to short- and long-term rewards, respectively. The parameter β𝛽\beta helps balance the scale of the two terms.The short-term reward is multivariate. It considers how strong two instances/groups should be merged locally based on face similarity, group consistency, and face quality.A long-term reward captures more far-sighted clustering strategy through measuring the operation cost to get from an arbitrary photos partition to the final ground-truth partition.Note that during the test time, the long-term reward function is absorbed in our learned action-value function for a policy π𝜋\pi, thus no ground-truth is needed during testing.We provide explanations on the short- and long-term rewards as follows.
|
| 48 |
+
|
| 49 |
+
Before a human user decides a merge between any two face groups, he/she will determine how close the two groups are in terms of face similarity. In addition, he/she may consider the quality and consistency of images in each group to prevent any accidental merging of uninteresting faces and noisy detections.We wish to capture such a behavior through learning a reward function.
|
| 50 |
+
|
| 51 |
+
The reward is considered short-term since it only examines the current groups’ partition.Specifically, we compute the similarity between two groups, the quality for each group and photos consistency in each group as a feature vector ϕ(s)italic-ϕ𝑠\phi(s), and we project this feature into a scalar reward,Rshort(s,a)=y(a)(𝐰𝖳ϕ(s)+b),subscript𝑅short𝑠𝑎𝑦𝑎superscript𝐰𝖳italic-ϕ𝑠𝑏R_{\mathrm{short}}(s,a)=y(a)\left(\mathbf{w}^{\mathsf{T}}\phi(s)+b\right),(4)where y(a)=1𝑦𝑎1y(a)=1 if action a=merge𝑎mergea=\mathrm{merge}, and y(a)=−1𝑦𝑎1y(a)=-1 if a=not_merge𝑎not_mergea=\mathrm{not}\text{\_}\mathrm{merge}.Note that we assume the actual reward function is unknown and (𝐰,b)𝐰𝑏(\mathbf{w},b) should be learned through IRL.We observe that through IRL, a powerful reward function can be learned. An agent can achieve a competitive result even by myopically deciding based on one step’s reward function rather than multiple steps. We will show that optimizing (𝐰,b)𝐰𝑏(\mathbf{w},b) is equivalent to learning a hyperplane in support vector machine (SVM) (Sec. 4.3).
|
| 52 |
+
|
| 53 |
+
Next, we describe how we design the feature vector ϕ(s)italic-ϕ𝑠\phi(s), which determines the characteristics an agent should examine before making a group merging decision.A feature vector is extracted considering the candidate groups, all faces’ representation 𝐗𝐗\mathbf{X} in the groups, and current partition hℎh, that is ϕ(s)=ψ(Ci,Cj,𝐗,h)italic-ϕ𝑠𝜓subscript𝐶𝑖subscript𝐶𝑗𝐗ℎ\phi(s)=\psi\left(C_{i},C_{j},\mathbf{X},h\right).
|
| 54 |
+
|
| 55 |
+
The proposed feature vector contains three kinds of features, so as to capture face similarity, group consistency, and image quality. All face representation are extracted from Inception-v3 model [32] fine-tuned with MS-Celeb-1M [13]. More elaborated features can be considered given the flexibility of the framework.
|
| 56 |
+
|
| 57 |
+
Face Similarity: We compute a multi-dimensional similarity vector to describe the relationship between two face groups Cisubscript𝐶𝑖C_{i} and Cjsubscript𝐶𝑗C_{j}. Specifically, we first define the distance between the representation of two arbitrary faces 𝐱iu∈Cisubscriptsuperscript𝐱𝑢𝑖subscript𝐶𝑖\mathbf{x}^{u}_{i}\in C_{i}, and 𝐱jv∈Cjsubscriptsuperscript𝐱𝑣𝑗subscript𝐶𝑗\mathbf{x}^{v}_{j}\in C_{j} as d(𝐱iu,𝐱jv)𝑑subscriptsuperscript𝐱𝑢𝑖subscriptsuperscript𝐱𝑣𝑗d(\mathbf{x}^{u}_{i},\mathbf{x}^{v}_{j}). The subscript on 𝐱𝐱\mathbf{x} indicates its group. In this study, we define the distance function as angular distance.We then start from Cisubscript𝐶𝑖C_{i}: for a face 𝐱iusubscriptsuperscript𝐱𝑢𝑖\mathbf{x}^{u}_{i} in Cisubscript𝐶𝑖C_{i}, we compute its distance to all the faces in Cjsubscript𝐶𝑗C_{j} and select a median from the resulting distances. That isdmed(𝐱iu,Cj)=median{d(𝐱iu,𝐱j1),…,d(𝐱iu,𝐱jnj)},subscript𝑑medsubscriptsuperscript𝐱𝑢𝑖subscript𝐶𝑗median𝑑subscriptsuperscript𝐱𝑢𝑖subscriptsuperscript𝐱1𝑗…𝑑subscriptsuperscript𝐱𝑢𝑖subscriptsuperscript𝐱subscript𝑛𝑗𝑗d_{\mathrm{med}}(\mathbf{x}^{u}_{i},C_{j})=\mathrm{median}\left\{d(\mathbf{x}^{u}_{i},\mathbf{x}^{1}_{j}),\dots,d(\mathbf{x}^{u}_{i},\mathbf{x}^{n_{j}}_{j})\right\},(5)where nj=|Cj|subscript𝑛𝑗subscript𝐶𝑗n_{j}=|C_{j}|. We select η𝜂\eta number of instances with the shortest distances from {dmed(𝐱iu,Cj),∀u}subscript𝑑medsubscriptsuperscript𝐱𝑢𝑖subscript𝐶𝑗for-all𝑢\left\{d_{\mathrm{med}}(\mathbf{x}^{u}_{i},C_{j}),\forall u\right\} to define the distance from Cisubscript𝐶𝑖C_{i} to Cjsubscript𝐶𝑗C_{j}. Note that the distance is not symmetric. Hence, we repeat the above process to obtain another η𝜂\eta shortest distances from {dmed(Ci,𝐱jv),∀v}subscript𝑑medsubscript𝐶𝑖subscriptsuperscript𝐱𝑣𝑗for-all𝑣\left\{d_{\mathrm{med}}(C_{i},\mathbf{x}^{v}_{j}),\forall v\right\} to define the distance from Cisubscript𝐶𝑖C_{i} to Cjsubscript𝐶𝑗C_{j}.Lastly, these 2η2𝜂2\eta distances are concatenated to form a 2η2𝜂2\eta-dimensional feature vector.
|
| 58 |
+
|
| 59 |
+
Group Consistency: Group consistency measures how close the samples in a group to each other. Even two groups have high similarity in between their respective members, we may not want to merge them if one of the group is not consistent, which may happen when there are a number of non-interesting faces inside the group.We define the consistency of a group as the median of pairwise distances between faces in the group itself. Given a group Cisubscript𝐶𝑖C_{i}:consistency(Ci)=median{d(𝐱iu,𝐱iv),u≠v,∀(u,v)∈Ci}.consistency(C_{i})\!=\!\mathrm{median}\left\{d(\mathbf{x}^{u}_{i},\mathbf{x}^{v}_{i}),u\!\neq\!v,\forall(u,v)\!\in\!C_{i}\right\}.(6)Consistency is computed for the two candidate groups, contribute a two-dimensional feature vector to ϕ(s)italic-ϕ𝑠\phi(s).
|
| 60 |
+
|
| 61 |
+
Face Quality: As depicted in Fig. 1, profile faces and noises could easily confuse a state-of-the-art face recognition model. To make our reward function more informed on the quality of the images, we train a linear classifier by using annotated profile and falsely detected faces as negative samples, and clear frontal faces as positive samples. A total of 100k face images extracted from movies is used for training. The output of the classifier serves as the quality measure. Here, we concatenate the quality values of the top η𝜂\eta faces in each of the two groups to form another 2η2𝜂2\eta-dimensional features to ϕ(s)italic-ϕ𝑠\phi(s).
|
| 62 |
+
|
| 63 |
+
While the short-term reward Rshortsubscript𝑅shortR_{\mathrm{short}} captures how likely two groups should be merged given the current partition, the long-term reward Rlongsubscript𝑅longR_{\mathrm{long}} needs to encapsulate a more far-sighted clustering strategy.
|
| 64 |
+
|
| 65 |
+
To facilitate the learning of this reward, we introduce the term ‘operation cost’, which measures the efforts needed to manipulate the images in the current partition to approach to ground-truth partition.Formally, given a partition h∈𝒱ℎ𝒱h\in\mathcal{V} and ground-truth partition g∈𝒱𝑔𝒱g\in\mathcal{V}. A sequence of operations oi∈𝒪:𝒱→𝒱:subscript𝑜𝑖𝒪→𝒱𝒱o_{i}\in\mathcal{O}:\mathcal{V}\rightarrow\mathcal{V} can be executed to gradually modify the partition hℎh to g𝑔g.The cost function c:𝒪→ℝ>0:𝑐→𝒪subscriptℝabsent0c:\mathcal{O}\rightarrow\mathbb{R}_{>0} maps each type of operations into a positive time cost. then we define Op(h,g)𝑂𝑝ℎ𝑔Op(h,g) as the minimal cost for this change:Op(h,g)=minΓ,o1…oΓ𝑂𝑝ℎ𝑔subscriptΓsubscript𝑜1…subscript𝑜Γ\displaystyle Op(h,g)=\min_{\Gamma,o_{1}\ldots o_{\Gamma}}∑t=1Γc(ot),superscriptsubscript𝑡1Γ𝑐subscript𝑜𝑡\displaystyle\sum\nolimits_{t=1}^{\Gamma}c\left(o_{t}\right),(7)s.t.gformulae-sequencest𝑔\displaystyle\mathrm{s.t.~{}}g=oΓ⋅…⋅o2⋅o1⋅habsent⋅subscript𝑜Γ…subscript𝑜2subscript𝑜1ℎ\displaystyle=o_{\Gamma}\cdot\ldots\cdot o_{2}\cdot o_{1}\cdot hotsubscript𝑜𝑡\displaystyle o_{t}∈𝒪absent𝒪\displaystyle\in\mathcal{O}where ΓΓ\Gamma is the number of steps needed to get from hℎh to g𝑔g.
|
| 66 |
+
|
| 67 |
+
The cost function c(⋅)𝑐⋅c(\cdot) can be obtained from a user study. In particular, we requested 30 volunteers and show them a number of randomly shuffled images as an album. Their task is to reorganize the photos into a desired groups’ partition. We recorded the time needed for three types of operations: (1) adding a photo into a group, (2) removing a photo from a group, and (3) merging two groups. The key results are shown in Fig. 3. It can be observed that the ‘removing’ operation takes roughly 6×\times longer than the ‘adding’ operation. The ‘merging’ operation is almost similar to ‘adding’. Consequently, we set the cost for these three operations as 1, 6, 1, respectively. The validity is further confirmed by the plot in Fig. 3 that shows a high-correlation between the time consumed and the computed operation cost.
|
| 68 |
+
|
| 69 |
+
Given Eqn. (7), we define the long-term reward as:Rlong=−ΔOp(K)=−(Op(ht−K,g)−Op(ht,g)),subscript𝑅longΔ𝑂superscript𝑝𝐾𝑂𝑝subscriptℎ𝑡𝐾𝑔𝑂𝑝subscriptℎ𝑡𝑔R_{\mathrm{long}}=-\Delta Op^{(K)}=-(Op(h_{t-K},g)-Op(h_{t},g)),(8)which encodes the operation cost changes in K𝐾K steps.
|
| 70 |
+
|
| 71 |
+
The key benefit brought by Rlongsubscript𝑅longR_{\mathrm{long}} is that it provides a long-term reward that guides an agent to thinking about the global picture of the grouping process. For any action that can hardly be decided (e.g., merging two noisy groups or merging a clean group with a noisy group), this term provides a strong evidence to the action-value function.
|
| 72 |
+
|
| 73 |
+
As discussed in Sec. 4, we assume the availability of a set training photo albums of which the ground-truth partition of the photos is known.Let Ω={ω(i)}Ωsuperscript𝜔𝑖\Omega=\{\omega^{(i)}\} denotes a set of albums in a training set. The ground-truth partition for albums ω(i)superscript𝜔𝑖\omega^{(i)} is given as g(i)superscript𝑔𝑖g^{(i)}, from which we can derive the ground-truth actions {aGT}subscript𝑎GT\left\{a_{\mathrm{GT}}\right\} as an expert’s behavior. Our goal is to find a reward function based on this behavior.We perform the learning in two steps to ease the convergence of our method: (1) Firstly, we employ IRL [21] to find the reward function with a myopic or short-sighted policy. (2) We then use the classic ϵitalic-ϵ\epsilon-greedy algorithm [36] to find the optimal policy.
|
| 74 |
+
|
| 75 |
+
Step 1:Algorithm 1 summarizes the first step. Specifically, we set γ=0𝛾0\gamma=0 in Eqn. (2) and β=0𝛽0\beta=0 in Eqn. (3). This leads to a myopic policy Qπ(s,a|π)superscript𝑄𝜋𝑠conditional𝑎𝜋Q^{\pi}(s,a|\pi)=Rshort(s,a)absentsubscript𝑅short𝑠𝑎=R_{\mathrm{short}}(s,a) that considers the current maximal short-term reward. This assumption greatly simplifies our optimization as (𝐰,b)𝐰𝑏(\mathbf{w},b) of Rshortsubscript𝑅shortR_{\mathrm{short}} (Eqn. (4)) are the only parameters to be learned. We solve this using a binary RBF-kernel SVM with actions as the classes.We start the learning process with an SVM of random weights and an empty training set ℒ=ℒabsent\mathcal{L}=∅\emptyset. We execute the myopic policy repeatedly on albums. Once the agent chooses the wrong action w.r.t. the ground-truth, the representations of the involved groups and the associated ground-truth will be added to the SVM training set. Different albums constitute different games in which SVM will be continually optimized using the instances that it does not perform well. Note that the set ℒℒ\mathcal{L} is accumulated, hence each time we use samples collected from over time for retraining (𝐰,b)𝐰𝑏(\mathbf{w},b). The learning stops when all albums are correctly partitioned.
|
| 76 |
+
|
| 77 |
+
Step 2:Once the reward function is learned, finding the best policy π𝜋\pi becomes a classic RL problem. Here we apply the ϵitalic-ϵ\epsilon-greedy algorithm [36]. ϵitalic-ϵ\epsilon-greedy policy is a way of selecting random actions with uniform distribution from a set of available actions. Using this policy either we can select random action with ϵitalic-ϵ\epsilon probability and we can select an action with 1−ϵ1italic-ϵ1-\epsilon probability that gives maximum reward in a given state.Specifically, we set γ=0.9𝛾0.9\gamma=0.9 in Eqn. (2) and β=0.8𝛽0.8\beta=0.8 in Eqn. (3). We first approximate the action-value function Qπsuperscript𝑄𝜋Q^{\pi} in Eqn. (2) by a random forest regressor Q(ϕ(s),a)𝑄italic-ϕ𝑠𝑎Q(\phi(s),a) [25]. The input to the regressor is (ϕ(s),a)italic-ϕ𝑠𝑎(\phi(s),a) and the output is the associated Qπsuperscript𝑄𝜋Q^{\pi} value. The parameters of the regressor are initialized by ϕ(s)italic-ϕ𝑠\phi(s), a𝑎a, and Qπsuperscript𝑄𝜋Q^{\pi} value, which are obtained in the first step (Algorithm 1).After the initialization, the agent selects and executes an action according to Q𝑄Q, i.e., a=argmaxaQ(ϕ(s),a)𝑎subscriptargmax𝑎𝑄italic-ϕ𝑠𝑎a=\operatorname*{argmax}_{a}Q(\phi(s),a), but with a probability ϵitalic-ϵ\epsilon the agent will act randomly so as to discover a state that it has never visited before. At the same time the parameters of Q𝑄Q will be updated directly from the samples of experience drawn from the algorithm’s past games. At the end of learning, the value of ϵitalic-ϵ\epsilon is decayed to 0, and Q𝑄Q is used as our action-value function for policy π𝜋\pi.
|
| 78 |
+
|
| 79 |
+
Training Data:Our algorithm needs to learn a grouping policy from a training set. The learned policy can be applied to other datasets for face grouping. Here we employ 2,00020002,000 albums simulated from MS-Celeb-1M [13] of 80k identities as our training source.We will release the training data.
|
| 80 |
+
|
| 81 |
+
Test Data: To show the generalizability of the learned policy, we evaluate the proposed approach on three datasets of different scenarios exclusive from the training source. Example images are provided in Fig. 4.
|
| 82 |
+
|
| 83 |
+
1) LFW-Album: We construct a challenging simulated albums from LFW [14], MS-Celeb-1M [13], and PFW [29], with a good mix of frontal, profile, and non-interested faces. We prepare 20 albums and with exclusive identities. Note that the MS-Celeb-1M samples used here are exclusive from the training data.
|
| 84 |
+
|
| 85 |
+
2) ACCIO Dataset: This dataset [12] is commonly used in the studies of video face clustering. It contains face tracklets extracted from series of Harry Potter movie. Following [45], we conduct experiments on the first instalment of the series, which contains 3243 tracklets from 36 known identities. For a fair comparison, we do not consider uninterested faces in this dataset following [45]. We discard the temporal information and used only the frames in our experiments.
|
| 86 |
+
|
| 87 |
+
3) Grouping Face in the Wild (GFW): To better evaluate our algorithm for real-world application, we collect 60 real users’ albums with permission from a Chinese social network portal. The size of an album varies from 120 to 3600 faces, with a maximum number of identities of 321. In total, the dataset contains 84,200 images with 78,000 faces of 3,132 different identities. All faces are automatically detected using Faster-RCNN [26]. False detections are observed. We annotate all detections with identity/noise labels.The images are unconstrained, taken in various indoor/outdoor scenes. Faces are naturally distributed with different poses with spontaneous expression. In addition, faces can be severely occluded, blurred with motion, and differently illuminated under different scenes. We will release the data and annotations. To our knowledge, this is the largest real-world face clustering dataset.
|
| 88 |
+
|
| 89 |
+
Given the limited space, we exclude results on traditional grouping datasets like Yale-B [11, 17], MSRA-A [47], MSRA-B [47] and Easyalbum [7]. Yale-B were captured in controlled condition with very few profile faces and noises. The number of albums is limited in the other three datasets.
|
| 90 |
+
|
| 91 |
+
Implementation Details:All face representation are extracted from Inception-v3 model [32] fine-tuned with MS-Celeb-1M [13].We suggest some parameter settings as follows. We set β=0.8𝛽0.8\beta=0.8 in Eqn. (3) to balance the scales of short- and long-term rewards. We fixed the number of faces η=5𝜂5\eta=5 to form the similarity and quality features (Sec. 4.1). The five shortest distances is a good trade-off between performance and feature complexity. If a group has fewer than five faces (to the extreme only one face exists), we pad the distance vector with the farthest distance.
|
| 92 |
+
|
| 93 |
+
Evaluation Metrics:We employ multiple metrics to evaluate the face grouping performance, including the B-cubed precision, recall, and F1subscript𝐹1F_{1} score suggested by [43] and [45]. Specifically, B-cubed recall measures the average fraction of face pairs belonging to the ground truth identity assigned to the same cluster. And B-cubed precision is the fraction of face pairs assigned to a cluster with matching identity labels. The F1subscript𝐹1F_{1} score measures the harmonic means of these two metrics.We also use operation cost introduced in Sec. 4.2. To facilitate comparisons across datasets of different sizes, we compute the operation cost normalized by the number of photos as our metric, i.e., Op¯=Op/N¯𝑂𝑝𝑂𝑝𝑁\overline{Op}=Op/N. We believe that this metric is more important than the others since it directly reflects how much effort per image a user needs to spend to organize a photo album.
|
| 94 |
+
|
| 95 |
+
We compare our method with classic and popular clustering approaches: 1) K-means, 2) Graph Degree Linkage (GDL) [44], 3) Hierarchical Clustering (HC), and 4) Affinity Propagation (AP) [10]. Note that we also compare with [45]. Since the code is not publicly available, we only compare with its reported precision, recall, and F1subscript𝐹1F_{1} scores on the ACCIO-1 dataset.Note that these baselines use the same features as our approach, as discussed in Sec. 4.1.To verify if the proposed imitation learning (IL) framework helps existing clustering methods, we adapt K-means, GDL and HC into IL-K-means222For IL-K-means algorithm, the action space A𝐴A is no longer binary due to the nature of K-means. Here we adapt the framework to have an action space of K+1𝐾1K+1, for determining the merging of a sample into one of the K𝐾K clusters. And we replace the SVM with a RankSVM [15] to compute the rewards for each cluster., IL-GDL and IL-HC to equip them with the sequential decision capability. This is achieved by using the respective algorithm as the recommender (see Sec. 3).
|
| 96 |
+
|
| 97 |
+
Table 1 summarizes the results on three datasets. We observed that: (1) imitation learning consistently improves the different clustering baselines. For instance, on LFW-Album, the F1subscript𝐹1F_{1} score and Op¯¯𝑂𝑝\overline{Op} of HC improves from 76.6% and 0.35 to 91.1% to 0.14. Notably, IL-HC outperforms other variants based on the proposed IL, although our framework is not specifically developed to work only with hierarchical clustering.(2) The operation cost is lower with a high-precision algorithm. This result matches with our user study since a user is good at adding similar photos into a group but poor at removing noisy faces that can be hard to distinguish.
|
| 98 |
+
|
| 99 |
+
We compare grouping results of IL-HC and HC qualitatively in Fig. 5. IL-HC yields more coherent face groupings with exceptional robustness to outliers.
|
| 100 |
+
|
| 101 |
+
We compare our framework with two supervised baselines, namely a SVM classifier and a three-layer Siamese network. The three layers of the Siamese network have 256, 64, 64 hidden neurons, respectively. A contrastive loss is used for training. To train the baselines, each time we sample two subsets of identities from MS-Celeb-1M as the training data. SVM and the Siamese Network are used to predict if two groups should be merged or not.Features are extracted following the method presented in Sec. 4.1. These supervised baselines are thus strong since their input features are identical to those we use in our IL framework. The features include face similarity vector that is derived from Inception-v3 face recognition model fine-tuned with MS-Celeb-1M dataset. The deep representation achieves 99.27% on LFW, which is better than [30] and on-par with [37].The results of the baseline are presented in Table 1. It is observed that the IL-based approach outperforms the supervised baselines by a considerable margin.
|
| 102 |
+
|
| 103 |
+
Further Analysis on Recommender:In Sec. 5.1, we tested three different recommenders based on different clustering methods, namely K-means, GDL, and HC.In this experiment, we further analyze the use of a random recommender that randomly chooses a pair to recommend.Figure 6 shows the F1subscript𝐹1F_{1} score comparisons between a Hierarchical Clustering (HC) recommender and a random recommender. In comparison to the recommender based on HC, which always recommends the nearest groups, the random recommender exhibits a slower convergence and poorer results. It is worth pointing out that the random recommender still achieves a F1subscript𝐹1F_{1} score of 61.9% on GFW, which outperforms the unsupervised baseline, which only achieves 15%. The results suggest the usefulness of deploying a recommender.
|
| 104 |
+
|
| 105 |
+
We also evaluate an extreme approach that does not employ a recommender but selects a group pair to merge based on the values produced by the learned action-value function. Specifically, in each step, we compute the Q(ϕ(s),a)𝑄italic-ϕ𝑠𝑎Q(\phi(s),a) exhaustively for all possible pairs of group, and select the pair with the highest value to merge. This approach achieves 82.7%percent82.782.7\% F1subscript𝐹1F_{1} on GFW. It is not surprising that the result is better than our IL-HC as this approach performs exhaustive search for pairs. This method has a runtime complexity of O(N3)Osuperscript𝑁3\operatorname{O}(N^{3}), much higher than the IL-HC. The results suggest the effectiveness of the clustering-based recommender in our framework.
|
| 106 |
+
|
| 107 |
+
Discard the Face Quality Feature:If we remove the face quality feature from the feature vector ϕ(s)italic-ϕ𝑠\phi(s), the F1subscript𝐹1F_{1} score achieved by IL-HC of LFW-Album, ACCIO-1, and GFW will drop from 91.1%, 84.3%, and 67.3%, to 89.5%, 65.0%, and 48.4%, respectively.The results suggest that the importance of quality measure depends on the dataset. Face quality feature is essential on the GFW dataset but less so on others, since GFW consists more poor-quality images.
|
| 108 |
+
|
| 109 |
+
Reward Function Settings:We evaluate the effect of two reward terms in the reward function defined in Eqn. (3).
|
| 110 |
+
|
| 111 |
+
1) Rshortsubscript𝑅shortR_{\mathrm{short}} & Rlongsubscript𝑅𝑙𝑜𝑛𝑔R_{long}: The full reward setting with β≠0𝛽0\beta\neq 0.
|
| 112 |
+
|
| 113 |
+
2) w/o Rlongsubscript𝑅longR_{\mathrm{long}}: Without the long-term reward based on operation cost, i.e., β=0𝛽0\beta=0.
|
| 114 |
+
|
| 115 |
+
3) w/o Rshortsubscript𝑅shortR_{\mathrm{short}}: In this setting, we discarded Rshortsubscript𝑅shortR_{\mathrm{short}} learned by IRL, and redefined it to take a naïve ±1plus-or-minus1\pm 1 loss, i.e., Rshort=𝟙(a=aGT)subscript𝑅short1𝑎subscript𝑎GTR_{\mathrm{short}}=\mathbbm{1}(a=a_{\mathrm{GT}}), where 𝟙(⋅)1⋅\mathbbm{1}(\cdot) is an indicator function that outputs 1 if the condition is true, and -1 if it is false.
|
| 116 |
+
|
| 117 |
+
The results reported in Table 2 shows that both short- and long-term rewards are indispensable to achieve good results.Comparing the baselines “w/o Rshortsubscript𝑅shortR_{\mathrm{short}}” against the full reward, we observed that IL learned a more powerful short-term reward function than the naïve ±1plus-or-minus1\pm 1 loss.Comparing the baselines “w/o Rlongsubscript𝑅longR_{\mathrm{long}}” against the full reward, albeit removing Rlongsubscript𝑅longR_{\mathrm{long}} only reduces the F1subscript𝐹1F_{1} score slightly, the number of false positive and false negative merges actually increase for noisy and hard cases.Figure 7 shows some representative groups that were mistakenly handled by IL-HC w/o Rlongsubscript𝑅longR_{\mathrm{long}}.It is worth pointing out that by adjusting the cost distributions of Rlongsubscript𝑅longR_{\mathrm{long}}, e.g., changing the cost of ‘add, remove, merge’ from (1,6,1) to (1,1,1), one could alter the algorithm’s bias on precision and recall to suit for different application scenarios. A chart of B-cubed PR-curves is depicted in Fig. 8 to show the influence of cost distribution. Hierarchical clustering with imitation learning (IL-HC) outperforms the baselines HC and AP no matter which settings we use. We recommend a high precision setting in order to achieve a low normalized operation cost Op¯¯𝑂𝑝\overline{Op}, as suggested by experiments in Sec. 5.1.
|
| 118 |
+
|
| 119 |
+
We have proposed a novel face grouping framework that makes sequential merging decision based on short- and long-term rewards. With inverse reinforcement learning, we learn powerful reward function to cope with real-world grouping tasks with unconstrained face poses, illumination, occlusion, and abundant of uninteresting faces and false detections. We have demonstrated that the framework benefits many existing agglomerative-based clustering algorithms.
|
1707.04873v2.txt
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
The great success of deep neural networks in various challenging applications \cite{krizhevsky2012imagenet,bahdanau2014neural,silver2016mastering}
|
| 3 |
+
has led to a paradigm shift from feature designing to architecture designing, which still remains a laborious task and requires human expertise. In recent years, many techniques for automating the architecture design process have been proposed \cite{snoek2012practical,bergstra2012random,baker2016designing,zoph2016neural,real2017large,negrinho2017deeparchitect}, and promising results of designing competitive models against human-designed models are reported on some benchmark datasets \cite{zoph2016neural,real2017large}.
|
| 4 |
+
Despite the promising results as reported, their success is based on vast computational resources (e.g. hundreds of GPUs), making them difficult to be used in practice for individual researchers, small sized companies, or university research teams. Another key drawback is that they still design and train each network from scratch during exploring the architecture space without any leverage of previously explored networks, which results in high computational resources waste.
|
| 5 |
+
|
| 6 |
+
In fact, during the architecture design process, many slightly different networks are trained for the same task. Apart from their final validation performances that are used to guide exploration, we should also have access to their architectures, weights, training curves etc., which contain abundant knowledge and can be leveraged to accelerate the architecture design process just like human experts \cite{chen2015net2net,klein2016learning}. Furthermore, there are typically many well-designed architectures, by human or automatic architecture designing methods, that have achieved good performances at the target task. Under restricted computational resources limits, instead of totally neglecting these existing networks and exploring the architecture space from scratch (which does not guarantee to result in better performance architectures), a more economical and efficient alternative could be exploring the architecture space based on these successful networks and reusing their weights.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
In this paper, we propose a new framework, called EAS, Efficient Architecture Search, where the meta-controller explores the architecture space by \emph{network transformation} operations such as widening a certain layer (more units or filters), inserting a layer, adding skip-connections etc., given an existing network trained on the same task. To reuse weights, we consider the class of function-preserving transformations \cite{chen2015net2net} that allow to initialize the new network to represent the same function as the given network but use different parameterization to be further trained to improve the performance, which can significantly accelerate the training of the new network especially for large networks. Furthermore, we combine our framework with recent advances of reinforcement learning (RL) based automatic architecture designing methods \cite{baker2016designing,zoph2016neural}, and employ a RL based agent as the meta-controller.
|
| 13 |
+
|
| 14 |
+
Our experiments of exploring the architecture space of the plain convolutional neural networks (CNNs), which purely consists of convolutional, fully-connected and pooling layers without skip-connections, branching etc., on image benchmark datasets (CIFAR-10, SVHN), show that EAS with limited computational resources (5 GPUs) can design competitive architectures. The best plain model designed by EAS on CIFAR-10 with standard data augmentation achieves 4.23\% test error rate, even better than many modern architectures that use skip-connections. We further apply our method to explore the DenseNet \cite{huang2016densely} architecture space, and achieve 4.66\% test error rate on CIFAR-10 without data augmentation and 3.44\% on CIFAR-10 with standard data augmentation, surpassing the best results given by the original DenseNet while still maintaining fewer parameters.
|
| 15 |
+
\section{Related Work and Background}
|
| 16 |
+
\label{sec:relate} %
|
| 17 |
+
\subsubsection{Automatic Architecture Designing}
|
| 18 |
+
\label{para:aad}
|
| 19 |
+
There is a long standing study on automatic architecture designing.
|
| 20 |
+
Neuro-evolution algorithms which mimic the evolution processes in the nature, are one of the earliest automatic architecture designing methods \cite{miller1989designing,stanley2002evolving}.
|
| 21 |
+
Authors in \cite{real2017large} used neuro-evolution algorithms to explore a large CNN architecture space and achieved networks which can match performances of human-designed models.
|
| 22 |
+
In parallel, automatic architecture designing has also been studied in the context of Bayesian optimization \cite{bergstra2012random,domhan2015speeding,mendoza2016towards}.
|
| 23 |
+
Recently, reinforcement learning is introduced in automatic architecture designing and has shown strong empirical results. Authors in
|
| 24 |
+
\cite{baker2016designing} presented a Q-learning agent to sequentially pick CNN layers; authors in \cite{zoph2016neural} used an auto-regressive recurrent network to generate a variable-length string that specifies the architecture of a neural network and trained the recurrent network with policy gradient.
|
| 25 |
+
|
| 26 |
+
As the above solutions rely on designing or training networks from scratch, significant computational resources have been wasted during the construction. In this paper, we aim to address the efficiency problem. Technically, we allow to reuse the existing networks trained on the same task and take network transformation actions. Both function-preserving transformations and an alternative RL based meta-controller are used to explore the architecture space. Moreover, we notice that there are some complementary techniques, such as learning curve prediction \cite{klein2016learning}, for improving the efficiency, which can be combined with our method.
|
| 27 |
+
\subsubsection{Network Transformation and Knowledge Transfer}
|
| 28 |
+
\label{para:net_trans}
|
| 29 |
+
Generally, any modification to a given network can be viewed as a network transformation operation. In this paper, since our aim is to utilize knowledge stored in previously trained networks, we focus on identifying the kind of network transformation operations that would be able to reuse pre-existing models. The idea of reusing pre-existing models or knowledge transfer between neural networks has been studied before. Net2Net technique introduced in \cite{chen2015net2net} describes two specific function-preserving transformations, namely Net2WiderNet and Net2DeeperNet, which respectively initialize a wider or deeper student network to represent the same functionality of the given teacher network and have proved to significantly accelerate the training of the student network especially for large networks.
|
| 30 |
+
Similar function-preserving schemes have also been proposed in ResNet particularly for training very deep architectures \cite{he2016deep}.
|
| 31 |
+
Additionally, the network compression technique presented in \cite{han2015learning} prunes less important connections (low-weight connections) in order to shrink the size of neural networks without reducing their accuracy.
|
| 32 |
+
|
| 33 |
+
In this paper, instead, we focus on utilizing such network transformations to reuse pre-existing models to efficiently and economically explore the architecture space for automatic architecture designing.
|
| 34 |
+
\subsubsection{Reinforcement Learning Background}
|
| 35 |
+
\label{para:rl-meta}
|
| 36 |
+
Our meta-controller in this work is based on RL \cite{sutton1998reinforcement}, techniques for training the agent to maximize the cumulative reward when interacting with an environment \cite{cai2017real}. We use the REINFORCE algorithm \cite{williams1992simple} similar to \cite{zoph2016neural} for updating the meta-controller, while other advanced policy gradient methods \cite{kakade2002natural,schulman2015trust} can be applied analogously. Our action space is, however, different with that of \cite{zoph2016neural} or any other RL based approach \cite{baker2016designing}, as our actions are the network transformation operations like adding, deleting, widening, etc., while others are specific configurations of a newly created network layer on the top of preceding layers.
|
| 37 |
+
Specifically, we model the automatic architecture design procedure as a sequential decision making process, where the state is the current network architecture and the action is the corresponding network transformation operation. After $T$ steps of network transformations, the final network architecture, along with its weights transferred from the initial input network, is then trained in the real data to get the validation performance to calculate the reward signal, which is further used to update the meta-controller via policy gradient algorithms to maximize the expected validation performances of the designed networks by the meta-controller.
|
| 38 |
+
\section{Architecture Search by Net Transformation}
|
| 39 |
+
\label{sec:method}
|
| 40 |
+
|
| 41 |
+
In this section, we first introduce the overall framework of our meta-controller, and then show how each specific network transformation decision is made under it. We later extend the function-preserving transformations to the DenseNet \cite{huang2016densely} architecture space where directly applying the original Net2Net operations can be problematic since the output of a layer will be fed to all subsequent layers.
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
We consider learning a meta-controller to generate network transformation actions given the current network architecture, which is specified with a variable-length string \cite{zoph2016neural}. To be able to generate various types of network transformation actions while keeping the meta-controller simple, we use an encoder network to learn a low-dimensional representation of the given architecture, which is then fed into each separate actor network to generate a certain type of network transformation actions. Furthermore, to handle variable-length network architectures as input and take the whole input architecture into consideration when making decisions, the encoder network is implemented with a bidirectional recurrent network \cite{schuster1997bidirectional} with an input embedding layer. The overall framework is illustrated in Figure~\ref{fig:rl-meta-frame}, which is an analogue of end-to-end sequence to sequence learning \cite{sutskever2014sequence,bahdanau2014neural}.
|
| 46 |
+
|
| 47 |
+
\begin{figure}[t]
|
| 48 |
+
\centering
|
| 49 |
+
\includegraphics[width=\columnwidth]{figures/eas_frame.pdf}
|
| 50 |
+
\caption{Overview of the RL based meta-controller in EAS, which consists of an encoder network for encoding the architecture and multiple separate actor networks for taking network transformation actions.}
|
| 51 |
+
\label{fig:rl-meta-frame}
|
| 52 |
+
\end{figure}
|
| 53 |
+
\subsection{Actor Networks}
|
| 54 |
+
Given the low dimensional representation of the input architecture, each actor network makes necessary decisions for taking a certain type of network transformation actions. In this work, we introduce two specific actor networks, namely Net2Wider actor and Net2Deeper actor which correspond to Net2WiderNet and Net2DeeperNet respectively.
|
| 55 |
+
\subsubsection{Net2Wider Actor}
|
| 56 |
+
Net2WiderNet operation allows to replace a layer with a wider layer, meaning more units for fully-connected layers, or more filters for convolutional layers, while preserving the functionality. For example, consider a convolutional layer with kernel $\bs{K}_l$ whose shape is $(k^l_w, k^l_h, f^l_i, f^l_o)$ where $k^l_w$ and $k^l_h$ denote the filter width and height, while $f^l_i$ and $f^l_o$ denote the number of input and output channels. To replace this layer with a wider layer that has $\hat{f}^l_o$ ($> f^l_o$) output channels, we should first introduce a random remapping function $G_l$, which is defined as
|
| 57 |
+
{\small
|
| 58 |
+
\begin{equation}
|
| 59 |
+
\label{eq:remapping}
|
| 60 |
+
G_l(j) = \begin{cases}
|
| 61 |
+
j & \!\! 1 \leq j \leq f^l_o \\
|
| 62 |
+
\text{random sample from}~\{1, \cdots, f^l_o\} & \!\! f^l_o \! < \! j \! \leq \! \hat{f}^l_o
|
| 63 |
+
\end{cases}.
|
| 64 |
+
\end{equation}
|
| 65 |
+
}With the remapping function $G_l$, we have the new kernel $\hat{\bs{K}}_l$ for the wider layer with shape $(k^l_w, k^l_h, f^l_i, \hat{f}^l_o)$
|
| 66 |
+
{\small
|
| 67 |
+
\begin{equation}
|
| 68 |
+
\label{eq:wider_kernel}
|
| 69 |
+
\hat{\bs{K}}_l [x, y, i, j] = \bs{K}_l [x, y, i, G_l(j)].
|
| 70 |
+
\end{equation}
|
| 71 |
+
}As such, the first $f^l_o$ entries in the output channel dimension of $\hat{\bs{K}}_l$ are directly copied from $\bs{K}_l$ while the remaining $\hat{f}^l_o - f^l_o$ entries are created by choosing randomly as defined in $G_l$.
|
| 72 |
+
Accordingly, the new output of the wider layer is $\hat{\bs{O}}_l$ with $\hat{\bs{O}}_l(j) = \bs{O}_l(G_l(j))$, where $\bs{O}_l$ is the output of the original layer and we only show the channel dimension to make the notation simpler.
|
| 73 |
+
|
| 74 |
+
To preserve the functionality, the kernel $\bs{K}_{l+1}$ of the next layer should also be modified due to the replication in its input. The new kernel $\hat{\bs{K}}_{l+1}$ with shape $(k^{l+1}_w, k^{l+1}_h, \hat{f}^{l+1}_i = \hat{f}^l_o, f^{l+1}_o)$ is given as
|
| 75 |
+
{\small
|
| 76 |
+
\begin{equation}
|
| 77 |
+
\label{eq:prev_widen}
|
| 78 |
+
\hat{\bs{K}}_{l+1} [x, y, j, k] = \frac{\bs{K}_{l+1} [x, y, G_l(j), k]}{\big| \{z | G_l(z) = G_l(j)\} \big|}.
|
| 79 |
+
\end{equation}
|
| 80 |
+
}For further details, we refer to the original Net2Net work \cite{chen2015net2net}.
|
| 81 |
+
|
| 82 |
+
\begin{figure}[t]
|
| 83 |
+
\centering
|
| 84 |
+
\includegraphics[width=0.7\columnwidth]{figures/eas_wider.pdf}
|
| 85 |
+
\caption{Net2Wider actor, which uses a shared sigmoid classifier to simultaneously determine whether to widen each layer based on its hidden state given by the encoder network.}
|
| 86 |
+
\label{fig:wider-nets}
|
| 87 |
+
\end{figure}
|
| 88 |
+
|
| 89 |
+
In our work, to be flexible and efficient, the Net2Wider actor simultaneously determines whether each layer should be extended. Specifically, for each layer, this decision is carried out by a shared sigmoid classifier given the hidden state of the layer learned by the bidirectional encoder network.
|
| 90 |
+
Moreover, we follow previous work and search the number of filters for convolutional layers and units for fully-connected layers in a discrete space. Therefore, if the Net2Wider actor decides to widen a layer, the number of filters or units of the layer increases to the next discrete level, e.g. from 32 to 64. The structure of Net2Wider actor is shown in Figure~\ref{fig:wider-nets}.
|
| 91 |
+
\subsubsection{Net2Deeper Actor}
|
| 92 |
+
\begin{figure}[t]
|
| 93 |
+
\centering
|
| 94 |
+
\includegraphics[width=0.75\columnwidth]{figures/eas_deeper.pdf}
|
| 95 |
+
\caption{Net2Deeper actor, which uses a recurrent network to sequentially determine where to insert the new layer and corresponding parameters for the new layer based on the final hidden state of the encoder network given the input architecture.}
|
| 96 |
+
\label{fig:deeper-nets}
|
| 97 |
+
\end{figure}
|
| 98 |
+
|
| 99 |
+
Net2DeeperNet operation allows to insert a new layer that is initialized as adding an identity mapping between two layers so as to preserve the functionality. For a new convolutional layer, the kernel is set to be identity filters while for a new fully-connected layer, the weight matrix is set to be identity matrix. Thus the new layer is set with the same number of filters or units as the layer below at first, and could further get wider when Net2WiderNet operation is performed on it. To fully preserve the functionality, Net2DeeperNet operation has a constraint on the activation function $\phi$, i.e. $\phi$ must satisfy $\phi(\bs{I} \phi(\bs{v})) = \phi(\bs{v})$ for all vectors $\bs{v}$.
|
| 100 |
+
This property holds for rectified linear activation (ReLU) but fails for sigmoid and tanh activation. However, we can still reuse weights of existing networks with sigmoid or tanh activation, which could be useful compared to random initialization. Additionally, when using batch normalization \cite{ioffe2015batch}, we need to set output scale and output bias
|
| 101 |
+
of the batch normalization layer to undo the normalization, rather than initialize them as ones and zeros. Further details about the Net2DeeperNet operation is provided in the original paper \cite{chen2015net2net}.
|
| 102 |
+
|
| 103 |
+
The structure of the Net2Deeper actor is shown in Figure~\ref{fig:deeper-nets}, which is a recurrent network whose hidden state is initialized with the final hidden state of the encoder network.
|
| 104 |
+
Similar to previous work \cite{baker2016designing}, we allow the Net2Deeper actor to insert one new layer at each step. Specifically, we divide a CNN architecture into several blocks according to the pooling layers and Net2Deeper actor sequentially determines which block to insert the new layer, a specific index within the block and parameters of the new layer. For a new convolutional layer, the agent needs to determine the filter size and the stride while for a new fully-connected layer, no parameter prediction is needed. In CNN architectures, any fully-connected layer should be on the top of all convolutional and pooling layers. To avoid resulting in unreasonable architectures, if the Net2Deeper actor decides to insert a new layer after a fully-connected layer or the final global average pooling layer, the new layer is restricted to be a fully-connected layer, otherwise it must be a convolutional layer.
|
| 105 |
+
\subsection{Function-preserving Transformation for DenseNet}
|
| 106 |
+
The original Net2Net operations proposed in \cite{chen2015net2net} are discussed under the scenarios where the network is arranged layer-by-layer, i.e. the output of a layer is only fed to its next layer. As such, in some modern CNN architectures where the output of a layer would be fed to multiple subsequent layers, such as DenseNet \cite{huang2016densely}, directly applying the original Net2Net operations can be problematic. In this section, we introduce several extensions to the original Net2Net operations to enable function-preserving transformations for DenseNet.
|
| 107 |
+
|
| 108 |
+
Different from the plain CNN, in DenseNet, the $l^{th}$ layer would receive the outputs of all preceding layers as input, which are concatenated on the channel dimension, denoted as $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l-1}]$, while its output $\bs{O}_l$ would be fed to all subsequent layers.
|
| 109 |
+
|
| 110 |
+
Denote the kernel of the $l^{th}$ layer as $\bs{K}_l$ with shape $(k^l_w, k^l_h, f^l_i, f^l_o)$. To replace the $l^{th}$ layer with a wider layer that has $\hat{f}^l_o$ output channels while preserving the functionality, the creation of the new kernel $\hat{\bs{K}}_l$ in the $l^{th}$ layer is the same as the original Net2WiderNet operation (see Eq.~(\ref{eq:remapping}) and Eq.~(\ref{eq:wider_kernel})). As such, the new output of the wider layer is $\hat{\bs{O}}_l$ with $\hat{\bs{O}}_l(j) = \bs{O}_l(G_l(j))$, where $G_l$ is the random remapping function as defined in Eq.~(\ref{eq:remapping}).
|
| 111 |
+
Since the output of the $l^{th}$ layer will be fed to all subsequent layers in DenseNet, the replication in $\hat{\bs{O}}_l$ will result in replication in the inputs of all layers after the $l^{th}$ layer. As such, instead of only modifying the kernel of the next layer as done in the original Net2WiderNet operation, we need to modify the kernels of all subsequent layers in DenseNet. For the $m^{th}$ layer where $m > l$, its input becomes $[\bs{O}_0, \cdots, \bs{O}_{l-1}, \hat{\bs{O}}_l, \bs{O}_{l+1}, \cdots, \bs{O}_{m-1}]$ after widening the $l^{th}$ layer, thus from the perspective of $m^{th}$ layer, the equivalent random remapping function $\hat{G}_m$ can be written as
|
| 112 |
+
{\small
|
| 113 |
+
\begin{equation}
|
| 114 |
+
\label{eq:eqv_remapping}
|
| 115 |
+
\hat{G}_m(j) \! = \!
|
| 116 |
+
\begin{cases}
|
| 117 |
+
j & 1 \leq j \leq f^{0:l}_o \\
|
| 118 |
+
f^{0:l}_o \! + \! G_l(j) & f^{0:l}_o \! < \! j \! \leq \! f^{0:l}_o \! + \! \hat{f}^l_o \\
|
| 119 |
+
j - \hat{f}^l_o \! + \! f^l_o & f^{0:l}_o + \hat{f}^l_o < j \leq f^{0:m}_o \! + \! \hat{f}^l_o \! - \! f^l_o \\
|
| 120 |
+
\end{cases},
|
| 121 |
+
\end{equation}
|
| 122 |
+
}where $f^{0:l}_o = \sum_{v=0}^{l-1} f^v_o$ is the number of input channels for the $l^{th}$ layer, the first part corresponds to $[\bs{O}_0, \cdots, \bs{O}_{l-1}]$, the second part corresponds to $[\hat{\bs{O}}_l]$, and the last part corresponds to $[\bs{O}_{l+1}, \cdots, \bs{O}_{m-1}]$.
|
| 123 |
+
A simple example of $\hat{G}_m$ is given as
|
| 124 |
+
{\small
|
| 125 |
+
\begin{align*}
|
| 126 |
+
\hat{G}_m &: \{1, \cdots, 5, \overbrace{6, 7, 8, 9}^{\hat{\bs{O}}_l}, 10, 11\} \rightarrow \{1, \cdots, 5, \overbrace{6, 7, 6, 6}^{\hat{\bs{O}}_l}, 8, 9\} \\
|
| 127 |
+
& \quad \text{where } G_l: \{1, 2, 3, 4\} \rightarrow \{1, 2, 1, 1\}.
|
| 128 |
+
\end{align*}
|
| 129 |
+
}Accordingly the new kernel of $m^{th}$ layer can be given by Eq.~(\ref{eq:prev_widen}) with $G_l$ replaced with $\hat{G}_m$.
|
| 130 |
+
|
| 131 |
+
To insert a new layer in DenseNet, suppose the new layer is inserted after the $l^{th}$ layer. Denote the output of the new layer as $\bs{O}_{\text{new}}$, and its input is $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l}]$. Therefore, for the $m^{th}$ $(m > l)$ layer, its new input after the insertion is $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l}, \bs{O}_{\text{new}}, \bs{O}_{l+1}, \cdots, \bs{O}_{m-1}]$. To preserve the functionality, similar to the Net2WiderNet case, $\bs{O}_{\text{new}}$ should be the replication of some entries in $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l}]$. It is possible, since the input of the new layer is $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l}]$.
|
| 132 |
+
Each filter in the new layer can be represented with a tensor, denoted as $\hat{\bs{F}}$ with shape $(k^{\text{new}}_w, k^{\text{new}}_h, f^{\text{new}}_i = f^{0:l+1}_o) $, where $k^{\text{new}}_w$ and $k^{\text{new}}_h$ denote the width and height of the filter, and $f^{\text{new}}_i$ is the number of input channels. To make the output of $\hat{\bs{F}}$ to be a replication of the $n^{th}$ entry in $[\bs{O}_0, \bs{O}_1, \cdots, \bs{O}_{l}]$,
|
| 133 |
+
we can set $\hat{\bs{F}}$ (using the special case that $k^{\text{new}}_w$ = $k^{\text{new}}_h$ = 3 for illustration) as the following
|
| 134 |
+
{\small
|
| 135 |
+
\begin{equation}
|
| 136 |
+
\hat{\bs{F}} [x, y, n] =
|
| 137 |
+
\begin{bmatrix}
|
| 138 |
+
0 & 0 & 0 \\
|
| 139 |
+
0 & 1 & 0 \\
|
| 140 |
+
0 & 0 & 0 \\
|
| 141 |
+
\end{bmatrix},
|
| 142 |
+
\end{equation}
|
| 143 |
+
}while all other values in $\hat{\bs{F}}$ are set to be 0.
|
| 144 |
+
Note that $n$ can be chosen randomly from $\{1, \cdots, f^{0:l+1}_o\}$ for each filter.
|
| 145 |
+
After all filters in the new layer are set, we can form an equivalent random remapping function for all subsequent layers as is done in Eq.~(\ref{eq:eqv_remapping}) and modify their kernels accordingly.
|
| 146 |
+
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
\begin{table*}[t]
|
| 150 |
+
\centering
|
| 151 |
+
\caption{Simple start point network. C$(n, f, l)$ denotes a convolutional layer with $n$ filters, filter size $f$ and stride $l$; P$(f, l, \text{MAX})$ and P$(f, l, \text{AVG})$ denote a max and an average pooling layer with filter size $f$ and stride $l$ respectively; FC$(n)$ denotes a fully-connected layer with $n$ units; SM$(n)$ denotes a softmax layer with $n$ output units.}
|
| 152 |
+
\label{tab:start_net}
|
| 153 |
+
\resizebox{0.75\textwidth}{!}{
|
| 154 |
+
\begin{tabular}{| l | c |}
|
| 155 |
+
\hline
|
| 156 |
+
Model Architecture & Validation Accuracy (\%)\\
|
| 157 |
+
\hline
|
| 158 |
+
\tabincell{l}{C(16, 3, 1), P(2, 2, MAX), C(32, 3, 1), P(2, 2, MAX), C(64, 3, 1), \\ P(2, 2, MAX), C(128, 3, 1), P(4, 4, AVG), FC(256), SM(10)} & 87.07 \\
|
| 159 |
+
\hline
|
| 160 |
+
\end{tabular}
|
| 161 |
+
}
|
| 162 |
+
\end{table*}
|
| 163 |
+
\section{Experiments and Results}
|
| 164 |
+
In line with the previous work \cite{baker2016designing,zoph2016neural,real2017large}, we apply the proposed EAS on image benchmark datasets (CIFAR-10 and SVHN) to explore high performance CNN architectures for the image classification task\footnote{Experiment code and discovered top architectures along with weights: \url{https://github.com/han-cai/EAS}}. Notice that the performances of the final designed models largely depend on the architecture space and the computational resources. In our experiments, we evaluate EAS in two different settings. In all cases, we use restricted computational resources (5 GPUs) compared to the previous work such as \cite{zoph2016neural} that used 800 GPUs. In the first setting, we apply EAS to explore the plain CNN architecture space, which purely consists of convolutional, pooling and fully-connected layers. While in the second setting, we apply EAS to explore the DenseNet architecture space.
|
| 165 |
+
\subsection{Image Datasets}
|
| 166 |
+
|
| 167 |
+
\subsubsection{CIFAR-10}
|
| 168 |
+
The CIFAR-10 dataset \cite{krizhevsky2009learning} consists of 50,000 training images and 10,000 test images.
|
| 169 |
+
We use a standard data augmentation scheme that is widely used for CIFAR-10 \cite{huang2016densely}, and denote the augmented dataset as C10+ while the original dataset is denoted as C10. For preprocessing, we normalized the images using the channel means and standard deviations. Following the previous work \cite{baker2016designing,zoph2016neural}, we randomly sample 5,000 images from the training set to form a validation set while using the remaining 45,000 images for training during exploring the architecture space.
|
| 170 |
+
\subsubsection{SVHN}
|
| 171 |
+
The Street View House Numbers (SVHN) dataset \cite{netzer2011reading} contains 73,257 images in the original training set, 26,032 images in the test set, and 531,131 additional images in the extra training set. For preprocessing, we divide the pixel values by 255 and do not perform any data augmentation, as is done in \cite{huang2016densely}.
|
| 172 |
+
We follow \cite{baker2016designing} and use the original training set during the architecture search phase with 5,000 randomly sampled images as the validation set, while training the final discovered architectures using all the training data, including the original training set and extra training set.
|
| 173 |
+
\subsection{Training Details}
|
| 174 |
+
For the meta-controller, we use a one-layer bidirectional LSTM with 50 hidden units as the encoder network (Figure \ref{fig:rl-meta-frame}) with an embedding size of 16, and train it with the ADAM optimizer \cite{kingma2014adam}.
|
| 175 |
+
|
| 176 |
+
At each step, the meta-controller samples 10 networks by taking network transformation actions. Since the sampled networks are not trained from scratch but we reuse weights of the given network in our scenario, they are then trained for 20 epochs, a relative small number compared to 50 epochs in \cite{zoph2016neural}. Besides, we use a smaller initial learning rate for this reason.
|
| 177 |
+
Other settings for training networks on CIFAR-10 and SVHN, are similar to \cite{huang2016densely,zoph2016neural}. Specifically, we use the SGD with a Nesterov momentum \cite{sutskever2013importance} of 0.9, a weight decay of 0.0001, a batch size of 64. The initial learning rate is 0.02 and is further annealed with a cosine learning rate decay \cite{gastaldi2017shake}. The accuracy in the held-out validation set is used to compute the reward signal for each sampled network. Since the gain of improving the accuracy from 90\% to 91\% should be much larger than from 60\% to 61\%, instead of directly using the validation accuracy $acc_v$ as the reward, as done in \cite{zoph2016neural}, we perform a non-linear transformation on $acc_v$, i.e. $\tan(acc_v \times \pi / 2)$, and use the transformed value as the reward. Additionally, we use an exponential moving average of previous rewards, with a decay of 0.95 as the baseline function to reduce the variance.
|
| 178 |
+
|
| 179 |
+
\begin{figure}[t]
|
| 180 |
+
\centering
|
| 181 |
+
\includegraphics[width=0.9\columnwidth]{figures/cifar10_steps.pdf}
|
| 182 |
+
\caption{Progress of two stages architecture search on C10+ in the plain CNN architecture space.}
|
| 183 |
+
\label{fig:cifar10_steps}
|
| 184 |
+
\end{figure}
|
| 185 |
+
\subsection{Explore Plain CNN Architecture Space}
|
| 186 |
+
\label{para:plain_cnn_exp}
|
| 187 |
+
We start applying EAS to explore the plain CNN architecture space. Following the previous automatic architecture designing methods \cite{baker2016designing,zoph2016neural}, EAS searches layer parameters in a discrete and limited space. For every convolutional layer, the filter size is chosen from \{1, 3, 5\} and the number of filters is chosen from $\{16, 32, 64, 96, 128, 192, 256, 320,$ $ 384, 448, 512\}$, while the stride is fixed to be 1 \cite{baker2016designing}. For every fully-connected layer, the number of units is chosen from $\{64, 128, 256, 384, 512, 640, 768, 896, 1024\}$. Additionally, we use ReLU and batch normalization for each convolutional or fully-connected layer. For SVHN, we add a dropout layer after each convolutional layer (except the first layer) and use a dropout rate of 0.2 \cite{huang2016densely}.
|
| 188 |
+
\subsubsection{Start with Small Network}
|
| 189 |
+
%
|
| 190 |
+
We begin the exploration on C10+, using a small network (see Table \ref{tab:start_net}), which achieves 87.07\% accuracy in the held-out validation set, as the start point. Different from \cite{zoph2016neural,baker2016designing}, EAS is not restricted to start from empty and can flexibly use any discovered architecture as the new start point. As such, to take the advantage of such flexibility and also reduce the search space for saving the computational resources and time, we divide the whole architecture search process into two stages where we allow the meta-controller to take 5 steps of Net2Deeper action and 4 steps of Net2Wider action in the first stage. After 300 networks are sampled, we take the network which performs best currently and train it with a longer period of time (100 epochs) to be used as the start point for the second stage. Similarly, in the second stage, we also allow the meta-controller to take 5 steps of Net2Deeper action and 4 steps of Net2Wider action and stop exploration after 150 networks are sampled.
|
| 191 |
+
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
The progress of the two stages architecture search is shown in Figure~\ref{fig:cifar10_steps}, where we can find that EAS gradually learns to pick high performance architectures at each stage. As EAS takes function-preserving transformations to explore the architecture space, we can also find that the sampled architectures consistently perform better than the start point network at each stage. Thus it is usually ``safe'' to explore the architecture space with EAS.
|
| 195 |
+
We take the top networks discovered during the second stage and further train the networks with 300 epochs using the full training set. Finally, the best model achieves 95.11\% test accuracy (i.e. 4.89\% test error rate). Furthermore, to justify the transferability of the discovered networks, we train the top architecture (95.11\% test accuracy) on SVHN from random initialization with 40 epochs using the full training set and achieves 98.17\% test accuracy (i.e. 1.83\% test error rate), better than both human-designed and automatically designed architectures that are in the plain CNN architecture space (see Table~\ref{tab:vs_pure}).
|
| 196 |
+
|
| 197 |
+
We would like to emphasize that the required computational resources to achieve this result is much smaller than those required in \cite{zoph2016neural,real2017large}. Specifically, it takes less than 2 days on 5 GeForce GTX 1080 GPUs with totally 450 networks trained to achieve 4.89\% test error rate on C10+ starting from a small network.
|
| 198 |
+
|
| 199 |
+
\begin{table}[t]
|
| 200 |
+
\centering
|
| 201 |
+
\caption{Test error rate (\%) comparison with CNNs that use convolutional, fully-connected and pooling layers alone.}\label{tab:vs_pure}
|
| 202 |
+
\resizebox{\columnwidth}{!}{
|
| 203 |
+
\begin{tabular}{c | l | c | c}
|
| 204 |
+
\hline
|
| 205 |
+
& Model & C10+ & SVHN\\
|
| 206 |
+
\hline
|
| 207 |
+
\tabincell{l}{human \\ designed} & \tabincell{l}{Maxout \cite{goodfellow2013maxout} \\ NIN \cite{lin2013network} \\ All-CNN \cite{springenberg2014striving} \\ VGGnet \cite{simonyan2014very}} & \tabincell{c}{9.38 \\ 8.81 \\ 7.25 \\ 7.25} & \tabincell{c}{2.47 \\ 2.35 \\ - \\ -} \\
|
| 208 |
+
\hline
|
| 209 |
+
\tabincell{l}{auto \\ designed} & \tabincell{l}{MetaQNN \cite{baker2016designing} (depth=7) \\ MetaQNN \cite{baker2016designing} (ensemble) \\ EAS (plain CNN, depth=16) \\ EAS (plain CNN, depth=20)} & \tabincell{c}{6.92 \\ - \\ 4.89 \\ \textbf{4.23}} & \tabincell{c}{- \\ 2.06 \\ 1.83 \\ \textbf{1.73}} \\
|
| 210 |
+
\hline
|
| 211 |
+
\end{tabular}
|
| 212 |
+
}
|
| 213 |
+
\end{table}
|
| 214 |
+
|
| 215 |
+
\begin{table*}[t]
|
| 216 |
+
\centering
|
| 217 |
+
\caption{Test error rate (\%) comparison with state-of-the-art architectures.}\label{tab:vs_modern}
|
| 218 |
+
\resizebox{0.7\textwidth}{!}{
|
| 219 |
+
\begin{tabular}{c | l | c | c | c }
|
| 220 |
+
\hline
|
| 221 |
+
& Model & Depth & Params & C10+\\
|
| 222 |
+
\hline
|
| 223 |
+
\tabincell{l}{human \\ designed} & \tabincell{l}{ResNet \cite{he2016deep} \\ ResNet (stochastic depth) \cite{huang2016densely} \\ Wide ResNet \cite{zagoruyko2016wide} \\ Wide ResNet \cite{zagoruyko2016wide} \\ ResNet (pre-activation) \cite{he2016identity} \\ DenseNet ($L=40, k=12$) \cite{huang2016densely} \\ DenseNet-BC ($L=100, k=12$) \cite{huang2016densely} \\ DenseNet-BC ($L=190, k=40$) \cite{huang2016densely} } & \tabincell{c}{110 \\ 1202 \\ 16 \\ 28 \\ 1001 \\ 40 \\ 100 \\ 190} & \tabincell{c}{1.7M \\ 10.2M \\ 11.0M \\ 36.5M \\ 10.2M \\ 1.0M \\ 0.8M \\ 25.6M} & \tabincell{c}{6.61 \\ 4.91 \\ 4.81 \\ 4.17 \\ 4.62 \\ 5.24 \\ 4.51 \\ \textbf{3.46}} \\
|
| 224 |
+
\hline
|
| 225 |
+
\tabincell{l}{auto \\ designed} & \tabincell{l}{Large-Scale Evolution (250 GPUs)\cite{real2017large} \\ NAS (predicting strides, 800 GPUs) \cite{zoph2016neural} \\ NAS (max pooling, 800 GPUs) \cite{zoph2016neural} \\ NAS (post-processing, 800 GPUs) \cite{zoph2016neural} \\ EAS (plain CNN, 5 GPUs)} & \tabincell{c}{- \\ 20 \\ 39 \\ 39 \\ 20} & \tabincell{c}{5.4M \\ 2.5M \\ 7.1M \\ 37.4M \\ 23.4M} & \tabincell{c}{5.40 \\ 6.01 \\ 4.47 \\ \textbf{3.65} \\ 4.23}\\
|
| 226 |
+
\hline
|
| 227 |
+
\end{tabular}
|
| 228 |
+
}
|
| 229 |
+
\end{table*}
|
| 230 |
+
\subsubsection{Further Explore Larger Architecture Space}
|
| 231 |
+
To further search better architectures in the plain CNN architecture space, in the second experiment, we use the top architectures discovered in the first experiment, as the start points to explore a larger architecture space on C10+ and SVHN. This experiment on each dataset takes around 2 days on 5 GPUs.
|
| 232 |
+
|
| 233 |
+
The summarized results of comparing with human-designed and automatically designed architectures that use a similar design scheme (plain CNN), are reported in Table \ref{tab:vs_pure}, where we can find that the top model designed by EAS on the plain CNN architecture space outperforms all similar models by a large margin. Specifically, comparing to human-designed models, the test error rate drops from 7.25\% to 4.23\% on C10+ and from 2.35\% to 1.73\% on SVHN. While comparing to MetaQNN, the Q-learning based automatic architecture designing method, EAS achieves a relative test error rate reduction of 38.9\% on C10+ and 16.0\% on SVHN. We also notice that the best model designed by MetaQNN on C10+ only has a depth of 7, though the maximum is set to be 18 in the original paper \cite{baker2016designing}. We suppose maybe they trained each designed network from scratch and used an aggressive training strategy to accelerate training, which resulted in many networks under performed, especially for deep networks. Since we reuse the weights of pre-existing networks, the deep networks are validated more accurately in EAS, and we can thus design deeper and more accurate networks than MetaQNN.
|
| 234 |
+
|
| 235 |
+
We also report the comparison with state-of-the-art architectures that use advanced techniques such as skip-connections, branching etc., on C10+ in Table~\ref{tab:vs_modern}. Though it is not a fair comparison since we do not incorporate such advanced techniques into the search space in this experiment, we still find that the top model designed by EAS is highly competitive even comparing to these state-of-the-art modern architectures. Specifically, the 20-layers plain CNN with 23.4M parameters outperforms ResNet, its stochastic depth variant and its pre-activation variant. It also approaches the best result given by DenseNet. When comparing to automatic architecture designing methods that incorporate skip-connections into their search space, our 20-layers plain model beats most of them except NAS with post-processing, that is much deeper and has more parameters than our model. Moreover, we only use 5 GPUs and train hundreds of networks while they use 800 GPUs and train tens of thousands of networks.
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
\begin{figure}[t]
|
| 241 |
+
\centering
|
| 242 |
+
\includegraphics[width=\columnwidth]{figures/cifar10_agent_vs_random.pdf}
|
| 243 |
+
\caption{Comparison between RL based meta-controller and random search on C10+.}
|
| 244 |
+
\label{fig:cifar10_agent_vs_random}
|
| 245 |
+
\end{figure}
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
\begin{table}[t]
|
| 249 |
+
\centering
|
| 250 |
+
\caption{Test error rate (\%) results of exploring DenseNet architecture space with EAS.}\label{tab:eas_with_densenet}
|
| 251 |
+
\resizebox{\columnwidth}{!}{
|
| 252 |
+
\begin{tabular}{l | c | c | c | c }
|
| 253 |
+
\hline
|
| 254 |
+
Model & Depth & Params & C10 & C10+ \\
|
| 255 |
+
\hline
|
| 256 |
+
DenseNet ($L=100, k=24$) & 100 & 27.2M & 5.83 & 3.74 \\
|
| 257 |
+
DenseNet-BC ($L=250, k=24$) & 250 & 15.3M & 5.19 & 3.62 \\
|
| 258 |
+
DenseNet-BC ($L=190, k=40$) & 190 & 25.6M & - & 3.46 \\
|
| 259 |
+
NAS (post-processing) & 39 & 37.4M & - & 3.65 \\
|
| 260 |
+
\hline
|
| 261 |
+
EAS (DenseNet on C10) & 70 & 8.6M & \textbf{4.66} & - \\
|
| 262 |
+
EAS (DenseNet on C10+) & 76 & 10.7M & - & \textbf{3.44} \\
|
| 263 |
+
\hline
|
| 264 |
+
\end{tabular}
|
| 265 |
+
}
|
| 266 |
+
\end{table}
|
| 267 |
+
\subsubsection{Comparison Between RL and Random Search}
|
| 268 |
+
Our framework is not restricted to use the RL based meta-controller. Beside RL, one can also take network transformation actions to explore the architecture space by random search, which can be effective in some cases \cite{bergstra2012random}. In this experiment, we compare the performances of the RL based meta-controller and the random search meta-controller in the architecture space that is used in the above experiments.
|
| 269 |
+
Specifically, we use the network in Table~\ref{tab:start_net} as the start point and let the meta-controller to take 5 steps of Net2Deeper action and 4 steps of Net2Wider action.
|
| 270 |
+
The result is reported in Figure~\ref{fig:cifar10_agent_vs_random}, which shows that the RL based meta-controller can effectively focus on the right search direction, while the random search cannot (left plot), and thus find high performance architectures more efficiently than random search.
|
| 271 |
+
\subsection{Explore DenseNet Architecture Space}
|
| 272 |
+
We also apply EAS to explore the DenseNet architecture space. We use the DenseNet-BC ($L=40, k=40$) as the start point. The growth rate, i.e. the width of the non-bottleneck layer is chosen from $\{40, 44, 48, 52, 56, 60, 64\}$, and the result is reported in Table~\ref{tab:eas_with_densenet}. We find that by applying EAS to explore the DenseNet architecture space, we achieve a test error rate of 4.66\% on C10, better than the best result, i.e. 5.19\% given by the original DenseNet while having 43.79\% less parameters. On C10+, we achieve a test error rate of 3.44\%, also outperforming the best result, i.e. 3.46\% given by the original DenseNet while having 58.20\% less parameters.
|
| 273 |
+
\section{Conclusion}
|
| 274 |
+
In this paper, we presented EAS, a new framework toward economical and efficient architecture search, where the meta-controller is implemented as a RL agent. It learns to take actions for network transformation to explore the architecture space. By starting from an existing network and reusing its weights via the class of function-preserving transformation operations, EAS is able to utilize knowledge stored in previously trained networks and take advantage of the existing successful architectures in the target task to explore the architecture space efficiently.
|
| 275 |
+
Our experiments have demonstrated EAS's outstanding performance and efficiency compared with several strong baselines. For future work, we would like to explore more network transformation operations and apply EAS for different purposes such as searching networks that not only have high accuracy but also keep a balance between the size and the performance.
|
| 276 |
+
\section{Acknowledgments}
|
| 277 |
+
This research was sponsored by Huawei Innovation Research Program, NSFC (61702327) and Shanghai Sailing Program (17YF1428200).
|
| 278 |
+
|
| 279 |
+
{\small
|
| 280 |
+
\bibliographystyle{aaai}
|
| 281 |
+
\bibliography{eas-trans}
|
| 282 |
+
}
|
1707.05128v3.txt
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Testing whether observed data conforms to an underlying model is a fundamental scientific problem. In a statistical framework, given samples from an unknown probabilistic model, the goal is to determine whether the underlying model has a property of interest.
|
| 2 |
+
|
| 3 |
+
This question has received great attention in statistics as hypothesis testing Neyman and Pearson (1933); Lehmann and Romano (2006), where it was mostly studied in the asymptotic regime when the number of samples m→∞→𝑚m\to\infty. In the past two decades there has been a lot of work from the computer science, information theory, and statistics community on various distribution testing problems in the non-asymptotic (small-sample) regime, where the domain size k𝑘k could be potentially larger than m𝑚m (See Batu et al. (2000, 2001); Goldreich and Ron (2000); Batu (2001); Paninski (2008); Acharya et al. (2013, 2014); Chan et al. (2014); Diakonikolas et al. (2015b); Bhattacharya and Valiant (2015); Canonne et al. (2016); Diakonikolas and Kane (2016); Batu and Canonne (2017), references therein, and Canonne (2015) for a recent survey). Here the goal is to characterize the minimum number of samples necessary (sample complexity) as a function of the domain size k𝑘k, and the other parameters.
|
| 4 |
+
|
| 5 |
+
At the same time, preserving the privacy of individuals who contribute to the data samples has emerged as one of the key challenges in designing statistical mechanisms over the last few years. For example, the privacy of individuals participating in surveys on sensitive subjects is of utmost importance.Without a properly designed mechanism, statistical processing might divulge the sensitive information about the data. There have been many publicized instances of individual data being de-anonymized, including the deanonymization of Netflix database Narayanan and Shmatikov (2008), and individual information from census-related data Sweeney (2002). Protecting privacy for the purposes of data release, or even computation on data has been studied extensively across several fields, including statistics, machine learning, database theory, algorithm design, and cryptography (See e.g., Warner (1965); Dalenius (1977); Dinur and Nissim (2003); Wasserman and Zhou (2010); Duchi et al. (2013); Wainwright et al. (2012); Chaudhuri et al. (2011)). While the motivation is clear, even a formal notion of privacy is not straight-forward. We use differential privacy Dwork et al. (2006), a notion which rose from database and cryptography literature, and has emerged as one of the most popular privacy measures (See Dwork et al. (2006); Dwork (2008); Wasserman and Zhou (2010); Dwork et al. (2010); Blum et al. (2013); McSherry and Talwar (2007); Li et al. (2015); Kairouz et al. (2017), references therein, and the recent book Dwork and Roth (2014)).Roughly speaking, it requires that the output of the algorithm should be statistically close on two neighboring datasets. For a formal definition of differential privacy, see Section 2.
|
| 6 |
+
|
| 7 |
+
A natural question when designing a differentially private algorithm is to understand how the data requirement grows to ensure privacy, along with the same accuracy level. In this paper, we study the sample size requirements for differentially private discrete distribution testing.
|
| 8 |
+
|
| 9 |
+
We consider two fundamental statistical tasks for testing distributions over [k]delimited-[]𝑘[k]: (i) identity testing, where given sample access to an unknown distribution p𝑝p, and a known distribution q𝑞q, the goal is to decide whether p=q𝑝𝑞p=q, or dTV(p,q)≥αsubscript𝑑𝑇𝑉𝑝𝑞𝛼d_{TV}(p,q)\geq\alpha, and (ii) closeness testing, where given sample access to unknown distributions p𝑝p, and q𝑞q, the goal is to decide whether p=q𝑝𝑞p=q, or dTV(p,q)≥αsubscript𝑑𝑇𝑉𝑝𝑞𝛼d_{TV}(p,q)\geq\alpha. (See Section 2 for precise statements of these problems).Given differential privacy constraints (ε,δ)𝜀𝛿(\varepsilon,\delta), we provide (ε,δ)𝜀𝛿(\varepsilon,\delta)-differentially private algorithms for both these tasks. For identity testing, our bounds are optimal up to constant factors for all ranges of k,α,ε,δ𝑘𝛼𝜀𝛿k,\alpha,\varepsilon,\delta, and for closeness testing the results are tight in the small sample regime where m=O(k)𝑚𝑂𝑘m=O(k). Our upper bounds are based on various methods to privatize the previously known tests. A critical component is to design and analyze test statistic that have low sensitivity, in order to preserve privacy.
|
| 10 |
+
|
| 11 |
+
We first state that any (ε+δ,0)𝜀𝛿0(\varepsilon+\delta,0)-DP algorithm is also an (ε,δ)𝜀𝛿(\varepsilon,\delta) algorithm. Cai et al. (2017) showed that for testing problems, any (ε,δ)𝜀𝛿(\varepsilon,\delta) algorithm will also imply a (ε+cδ,0)𝜀𝑐𝛿0(\varepsilon+c\delta,0)-DP algorithm. Therefore, for all the problems, we simply consider (ε,0)𝜀0(\varepsilon,0)-DP algorithms, and we can replace ε𝜀\varepsilon with ε+δ𝜀𝛿\varepsilon+\delta in both the upper and lower bounds without loss of generality.
|
| 12 |
+
|
| 13 |
+
One of the main contributions of our work is to propose a general framework for establishing lower bounds the sample complexity of statistical problems such as property estimation and hypothesis testing under privacy constraints. We describe this, and the other results below. A summary of the results is presented in Table 1, which we now describe in detail.1.DP Lower Bounds via Coupling. We establish a general method to prove lower bounds for distribution testing problems. Suppose X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m} are generated by two statistical sources. Further suppose there is a coupling between the two sources such that the expected hamming distance between the coupled samples is at most D𝐷D, then if D=o(1/(ε+δ))𝐷𝑜1𝜀𝛿D=o(1/(\varepsilon+\delta)), there is no (ε,δ)𝜀𝛿(\varepsilon,\delta)-differentially private algorithm to distinguish between the two sources. This result is stated precisely in Theorem 11.Using carefully designed coupling schemes, we provide lower bounds for binary testing, identity testing, and closeness testing.2.Binary Testing. To study the problem of identity testing, we warm up with the binary testing problem, where k=2𝑘2k=2. The sample complexity of this problem is Θ(1α2+1αε)Θ1superscript𝛼21𝛼𝜀\Theta(\frac{1}{\alpha^{2}}+\frac{1}{\alpha\varepsilon}). The upper bound is extremely simple, and can be obtained by the Laplace mechanism Dwork and Roth (2014), and the lower bound follows as an application of our general lower bound argument. The result is stated in Theorem 12.We construct a coupling between binary distributions, and apply Theorem 11 to obtain a lower bound of Ω(1α2+1αε)Ω1superscript𝛼21𝛼𝜀\Omega(\frac{1}{\alpha^{2}}+\frac{1}{\alpha\varepsilon}) samples for binary testing problem, which is tight up to a constant factor.3.Reduction from identity to uniformity. We reduce the problem of ε𝜀\varepsilon-DP identity testing of distributions over [k]delimited-[]𝑘[k] to ε𝜀\varepsilon-DP uniformity testing over distributions over [6k]delimited-[]6𝑘[6k]. Such a reduction, without privacy constraints was shown in Goldreich (2016), and we use their result to obtain a reduction that also preserves privacy, with at most a constant factor blow-up in the sample complexity. This result is given in Theorem 14.4.Identity Testing. It was recently shown that O(kα2)𝑂𝑘superscript𝛼2O(\frac{\sqrt{k}}{\alpha^{2}}) Paninski (2008); Valiant and Valiant (2014); Diakonikolas et al. (2015b); Acharya et al. (2015) samples are necessary and sufficient for identity testing without privacy constraints. The statistic used in these papers are variants of chi-squared tests, which could have a high global sensitivity.Given the reduction from identity to uniformity, it suffices to consider the statistic in Paninski (2008) for uniformity testing. We show that privatizing this statistic yields a sample optimal testing algorithm with sample complexity O(kα2+kαε)𝑂𝑘superscript𝛼2𝑘𝛼𝜀O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}}\right)}, in the sparse regime where m≤k𝑚𝑘m\leq k. This result is stated in Section C. However, Paninski’s test fails when m=Ω(k)𝑚Ω𝑘m=\Omega(k). We therefore consider the test statistic studied by Diakonikolas et al. (2017) which is simply the distance of the empirical distribution to the uniform distribution. This statistic also has a low sensitivity, and futhermore has the optimal sample complexity in all parameter ranges, without privacy constraints. In Theorem 13, we state the optimal sample complexity of identity testing. The upper bounds are derived by privatizing the statistic in Diakonikolas et al. (2017). We design a coupling between the uniform distribution u[k]𝑢delimited-[]𝑘u[{k}], and a mixture of distributions, which are all at distance α𝛼\alpha from u[k]𝑢delimited-[]𝑘u[{k}] in total variation distance. In particular, we consider the mixture distribution used in Paninski (2008). Much of the technical details go into proving the existence of couplings with small expected Hamming distance. Cai et al. (2017) studied identity testing under pure differential privacy, and obtained an algorithm with complexity O(kα2+klogkα3/2ε+(klogk)1/3α5/3ε2/3)𝑂𝑘superscript𝛼2𝑘𝑘superscript𝛼32𝜀superscript𝑘𝑘13superscript𝛼53superscript𝜀23O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k\log k}}{\alpha^{3/2}\varepsilon}+\frac{(k\log k)^{1/3}}{\alpha^{5/3}\varepsilon^{2/3}}}\right)}. Our bounds improve their bounds significantly.5.Closeness Testing.Closeness testing problem was proposed by Batu et al. (2000), and optimal bound of Θ(max{k2/3α4/3,k1/2α2})Θsuperscript𝑘23superscript𝛼43superscript𝑘12superscript𝛼2\Theta{\left({\max\{\frac{k^{2/3}}{\alpha^{4/3}},\frac{k^{1/2}}{\alpha^{2}}\}}\right)} was shown in Chan et al. (2014). They proposed a chi-square based statistic, which we show has a small sensitivity. We privatize their algorithm to obtain the sample complexity bounds. In the sparse regime we prove a sample complexity bound of Θ(k2/3α4/3+kαε)Θsuperscript𝑘23superscript𝛼43𝑘𝛼𝜀\Theta{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}}\right)}, and in the dense regime, we obtain a bound of O(kα2+1α2ε)𝑂𝑘superscript𝛼21superscript𝛼2𝜀O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{1}{\alpha^{2}\varepsilon}}\right)}. These results are stated in Theorem 19.Since closeness testing is a harder problem than identity testing, all the lower bounds from identity testing port over to closeness testing. The closeness testing lower bounds are given in Theorem 19.
|
| 14 |
+
|
| 15 |
+
A number of papers have recently studied hypothesis testing problems under differential privacy guarantees Wang et al. (2015); Gaboardi et al. (2016); Rogers and Kifer (2017). Some works analyze the distribution of the test statistic in the asymptotic regime. The work most closely related to ours is in Cai et al. (2017), which studied identity testing in the finite sample regime. We mentioned their guarantees along with our results on identity testing in the previous section.
|
| 16 |
+
|
| 17 |
+
There has been a line of research for statistical testing and estimation problems under the notion of local differential privacy Wainwright et al. (2012); Duchi et al. (2013); Erlingsson et al. (2014); Pastore and Gastpar (2016); Kairouz et al. (2016); Wang et al. (2016a); Ye and Barg (2017). These papers study some of the most basic statistical problems and also provide minimax lower bounds using Fano’s inequality. Diakonikolas et al. (2015a) study structured distribution estimation under differential privacy.
|
| 18 |
+
|
| 19 |
+
Information theoretic approaches to data privacy have been studied recently using quantities like mutual information, and guessing probability to quantify privacy Mir (2012); Sankar et al. (2013); Cuff and Yu (2016); Wang et al. (2016b); Issa and Wagner (2017).
|
| 20 |
+
|
| 21 |
+
In a contemporaneous and independent work, Aliakbarpour et al. (2017), the authors study the same problems that we consider, and obtain the same upper bounds for the sparse case, when m≤k𝑚𝑘m\leq k. They also provide experimental results to show the performance of the privatized algorithms. However, their results are sub-optimal for m=Ω(k)𝑚Ω𝑘m=\Omega(k) for identity testing, and they do not provide any lower bounds for the problems. Both Cai et al. (2017), and Diakonikolas et al. (2017) consider only pure-differential privacy, which are a special case of our results.
|
| 22 |
+
|
| 23 |
+
In Section 2, we discuss the definitions and notations. A general technique for proving lower bounds for differentially private algorithms is described in Section 3. In Section 4, we study differentially private binary hypothesis testing as a warm-up. Section 5 gives upper and lower bounds for identity testing, and closeness testing is studied in Section 6. Section C proves that the original uniformity tester of Paninski (2008) is optimal in the sparse sample regime.
|
| 24 |
+
|
| 25 |
+
We consider discrete distributions over a domain of size k𝑘k, which we assume without loss of generality to be [k]=Δ{1,…,k}superscriptΔdelimited-[]𝑘1…𝑘[k]\stackrel{{\scriptstyle\Delta}}{{=}}\{1{,}\ldots{,}k\}. We denote length-m𝑚m samples X1,…,Xmsubscript𝑋1…subscript𝑋𝑚X_{1}{,}\ldots{,}X_{m} by X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}. For x∈[k]𝑥delimited-[]𝑘x\in[k], let pxsubscript𝑝𝑥p_{x} be the probability of x𝑥x under p𝑝p. Let Mx(X1m)subscript𝑀𝑥superscriptsubscript𝑋1𝑚M_{x}(X_{1}^{m}) be the number of times x𝑥x appears in X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}. For A⊆[k]𝐴delimited-[]𝑘A\subseteq[k], let p(A)=∑x∈Apx𝑝𝐴subscript𝑥𝐴subscript𝑝𝑥p(A)=\sum_{x\in A}p_{x}. Let X∼psimilar-to𝑋𝑝X\sim p denote that the random variable X𝑋X has distribution p𝑝p. Let u[k]𝑢delimited-[]𝑘u[{k}] be the uniform distribution over [k]delimited-[]𝑘[k], and B(b)𝐵𝑏B(b) be the Bernoulli distribution with bias b𝑏b.
|
| 26 |
+
|
| 27 |
+
We now define (ε,δ)𝜀𝛿(\varepsilon,\delta)-differential privacy.
|
| 28 |
+
|
| 29 |
+
The case when δ=0𝛿0\delta=0 is called pure differential privacy. For simplicity, we denote pure differential privacy as ε𝜀\varepsilon-differential privacy (ε𝜀\varepsilon-DP). The next lemma states a relationship between (ε,δ)𝜀𝛿(\varepsilon,\delta)- differential privacy and ε𝜀\varepsilon-differential privacy. The result is implicitly present in Cai et al. (2017), but we state here for completeness.
|
| 30 |
+
|
| 31 |
+
Proof The proof has two parts.•The first is to show that any (ε+δ,0)𝜀𝛿0(\varepsilon+\delta,0)-DP algorithm is also (ε,δ)𝜀𝛿(\varepsilon,\delta)-DP. This is perhaps folklore, and is shown below. Suppose 𝒜𝒜{\cal A} is a (ε+δ)𝜀𝛿(\varepsilon+\delta)-differentially private algorithm. Then for any X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m} with d(X1m,Y1m)≤1𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚1d(X_{1}^{m},Y_{1}^{m})\leq 1 and any S⊂range(𝒜)𝑆range𝒜S\subset\text{range}({\cal A}), we havePr(𝒜(X1m)∈S)≤eε+δ⋅Pr(𝒜(Y1m)∈S)=eε⋅Pr(𝒜(Y1m)∈S)+(eδ−1)⋅eεPr(𝒜(Y1m)∈S).Pr𝒜superscriptsubscript𝑋1𝑚𝑆⋅superscript𝑒𝜀𝛿Pr𝒜superscriptsubscript𝑌1𝑚𝑆⋅superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆⋅superscript𝑒𝛿1superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆\displaystyle\Pr{\left({{\cal A}(X_{1}^{m})\in S}\right)}\leq e^{\varepsilon+\delta}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}=e^{\varepsilon}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}+(e^{\delta}-1)\cdot e^{\varepsilon}\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}.If eε⋅Pr(𝒜(Y1m)∈S)>1−δ⋅superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆1𝛿e^{\varepsilon}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}>1-\delta, then Pr(𝒜(X1m)∈S)≤1<eε⋅Pr(𝒜(Y1m)∈S)+δPr𝒜superscriptsubscript𝑋1𝑚𝑆1⋅superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆𝛿\Pr{\left({{\cal A}(X_{1}^{m})\in S}\right)}\leq 1<e^{\varepsilon}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}+\delta.Otherwise, eε⋅Pr(𝒜(Y1m)∈S)≤1−δ⋅superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆1𝛿e^{\varepsilon}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}\leq 1-\delta. To prove (eδ−1)⋅eε⋅Pr(𝒜(Y1m)∈S)<δ⋅superscript𝑒𝛿1superscript𝑒𝜀Pr𝒜superscriptsubscript𝑌1𝑚𝑆𝛿(e^{\delta}-1)\cdot e^{\varepsilon}\cdot\Pr{\left({{\cal A}(Y_{1}^{m})\in S}\right)}<\delta, it suffices to show (eδ−1)(1−δ)≤δsuperscript𝑒𝛿11𝛿𝛿(e^{\delta}-1)(1-\delta)\leq\delta, which is equivalent to e−δ≥1−δsuperscript𝑒𝛿1𝛿e^{-\delta}\geq 1-\delta, completing the proof.•Consider an (ε,δ)𝜀𝛿(\varepsilon,\delta)-DP algorithm with error probability at most 0.05. Consider an algorithm that finally flips the answer with probability 0.05. This algorithm has error probability at most 0.1, and for any input, each outcome has probability at least 0.05. Cai et al. (2017) essentially showed that this new algorithm is (ε+10δ,0)𝜀10𝛿0(\varepsilon+10\delta,0)-DP.
|
| 32 |
+
|
| 33 |
+
A notion that is often useful in establishing bounds for differential privacy is sensitivity, defined below.
|
| 34 |
+
|
| 35 |
+
We need the following result for the sigmoid function.
|
| 36 |
+
|
| 37 |
+
Proof Since σ(x)𝜎𝑥\sigma(x) is an increasing function, it suffice to assume that γ>0𝛾0\gamma>0. In this case,σ(x+γ)σ(x)=exp(γ)⋅1+exp(x)1+exp(x+γ)<exp(γ)𝜎𝑥𝛾𝜎𝑥⋅𝛾1𝑥1𝑥𝛾𝛾\frac{\sigma(x+\gamma)}{\sigma(x)}=\exp(\gamma)\cdot\frac{{1+\exp(x)}}{{1+\exp(x+\gamma)}}<\exp(\gamma).For the second part,σ(x)=1−11+ex≥1−1ex≥1−η𝜎𝑥111superscript𝑒𝑥11superscript𝑒𝑥1𝜂\sigma(x)=1-\frac{1}{1+e^{x}}\geq 1-\frac{1}{e^{x}}\geq 1-\eta.
|
| 38 |
+
|
| 39 |
+
Given description of a probability distribution q𝑞q over [k]delimited-[]𝑘[k], parameters α𝛼\alpha, and ε𝜀\varepsilon, and m𝑚m independent samples X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} from an unknown distribution p𝑝p. An algorithm 𝒜𝒜{\cal A} is an (k,α)𝑘𝛼(k,\alpha) - identity testing algorithm for q𝑞q, if•when p=q𝑝𝑞p=q, 𝒜𝒜{\cal A} outputs “p=q𝑝𝑞p=q” with probability at least 0.9, and•when dTV(p,q)≥αsubscript𝑑𝑇𝑉𝑝𝑞𝛼d_{TV}(p,q)\geq\alpha, 𝒜𝒜{\cal A} outputs “p≠q𝑝𝑞p\neq q” with probability at least 0.9.Furthermore, if 𝒜𝒜{\cal A} is (ε,0)𝜀0(\varepsilon,0)-differentially private, we say 𝒜𝒜{\cal A} is an (k,α,ε)𝑘𝛼𝜀(k,\alpha,\varepsilon)-identity testing algorithm.
|
| 40 |
+
|
| 41 |
+
Given parameters α𝛼\alpha, and ε𝜀\varepsilon, and m𝑚m independent samples X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m} from unknown distributions p𝑝p, and q𝑞q. An algorithm 𝒜𝒜{\cal A} is an (k,α)𝑘𝛼(k,\alpha)-closeness testing algorithm if•If p=q𝑝𝑞p=q, 𝒜𝒜{\cal A} outputs p=q𝑝𝑞p=q with probability at least 0.9, and•If dTV(p,q)≥αsubscript𝑑𝑇𝑉𝑝𝑞𝛼d_{TV}(p,q)\geq\alpha, 𝒜𝒜{\cal A} outputs p≠q𝑝𝑞p\neq q with probability at least 0.9.Furthermore, if 𝒜𝒜{\cal A} is (ε,0)𝜀0(\varepsilon,0)-differentially private, we say 𝒜𝒜{\cal A} is an (k,α,ε)𝑘𝛼𝜀(k,\alpha,\varepsilon)-closeness testing algorithm.
|
| 42 |
+
|
| 43 |
+
We note again that by Lemma 5, we need to only consider pure differential privacy for both upper and lower bounds.
|
| 44 |
+
|
| 45 |
+
Recall that coupling between distributions p𝑝p and q𝑞q over 𝒳𝒳{\cal X}, and 𝒴𝒴{\cal Y}, is a distribution over 𝒳×𝒴𝒳𝒴{\cal X}\times{\cal Y} whose marginal distributions are p𝑝p and q𝑞q (Definition 2). For simplicity, we treat coupling as a randomized function f:𝒳→𝒴:𝑓→𝒳𝒴f:{\cal X}\to{\cal Y} such that if X∼psimilar-to𝑋𝑝X\sim p, then Y=f(X)∼q𝑌𝑓𝑋similar-to𝑞Y=f(X)\sim q. Note that X𝑋X, and Y𝑌Y are not necessarily independent.
|
| 46 |
+
|
| 47 |
+
We would like to use coupling to prove lower bounds on differentially private algorithms for testing problems. Let p𝑝p and q𝑞q be distributions over 𝒳msuperscript𝒳𝑚{\cal X}^{m}. If there is a coupling between p𝑝p and q𝑞q with a small expected Hamming distance, we might expect that the algorithm cannot have strong privacy guarantees. The following theorem formalizes this notion, and will be used to prove sample complexity bounds of differentially private algorithms.
|
| 48 |
+
|
| 49 |
+
Proof Let (X1m,Y1m)superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚(X_{1}^{m},Y_{1}^{m}) be a coupling of p𝑝p, and q𝑞q with 𝔼[d(X1m,Y1m)]≤D𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝐷\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]\leq D. Then,Pr(𝒜(X1m)=p)≥0.9, and Pr(𝒜(Y1m)=q)≥0.9formulae-sequencePr𝒜superscriptsubscript𝑋1𝑚𝑝0.9 and Pr𝒜superscriptsubscript𝑌1𝑚𝑞0.9\Pr{\left({{\cal A}(X_{1}^{m})=p}\right)}\geq 0.9,\text{ and }\Pr{\left({{\cal A}{\left({Y_{1}^{m}}\right)}=q}\right)}\geq 0.9implies thatPr(𝒜(X1m)=p∩𝒜(Y1m)=q)≥0.9+0.9−1=0.8.Pr𝒜superscriptsubscript𝑋1𝑚𝑝𝒜superscriptsubscript𝑌1𝑚𝑞0.90.910.8\Pr{\left({{\cal A}{\left({X_{1}^{m}}\right)}=p\cap{\cal A}{\left({Y_{1}^{m}}\right)}=q}\right)}\geq 0.9+0.9-1=0.8.By Markov’s inequality,Pr(d(X1m,Y1m)>10D)<Pr(d(X1m,Y1m)>10⋅𝔼[d(X1m,Y1m)])<0.1Pr𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚10𝐷Pr𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅10𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚0.1\Pr{\left({d(X_{1}^{m},Y_{1}^{m})>10D}\right)}<\Pr{\left({d(X_{1}^{m},Y_{1}^{m})>10\cdot\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]}\right)}<0.1.Therefore,Pr(𝒜(X1m)=p∩𝒜(Y1m)=q∩d(X1m,Y1m)<10D)≥0.8+0.9−1=0.7.Pr𝒜superscriptsubscript𝑋1𝑚𝑝𝒜superscriptsubscript𝑌1𝑚𝑞𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚10𝐷0.80.910.7\displaystyle\Pr{\left({{\cal A}{\left({X_{1}^{m}}\right)}=p\cap{\cal A}{\left({Y_{1}^{m}}\right)}=q\cap d(X_{1}^{m},Y_{1}^{m})<10D}\right)}\geq 0.8+0.9-1=0.7.(1)
|
| 50 |
+
|
| 51 |
+
The condition of differential privacy states that for any X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m},e−ε⋅d(X1m,Y1m)<Pr(𝒜(X1m)=p)Pr(𝒜(Y1m)=p)<eε⋅d(X1m,Y1m).superscript𝑒⋅𝜀𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚Pr𝒜superscriptsubscript𝑋1𝑚𝑝Pr𝒜superscriptsubscript𝑌1𝑚𝑝superscript𝑒⋅𝜀𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚e^{-\varepsilon\cdot d(X_{1}^{m},Y_{1}^{m})}<\frac{\Pr{\left({{\cal A}{\left({X_{1}^{m}}\right)}=p}\right)}}{\Pr{\left({{\cal A}{\left({Y_{1}^{m}}\right)}=p}\right)}}<e^{\varepsilon\cdot d(X_{1}^{m},Y_{1}^{m})}.Consider one sequence pair X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m} that satisfies (1). Then, we know that Pr(𝒜(X1m)=p)>0.7Pr𝒜superscriptsubscript𝑋1𝑚𝑝0.7\Pr{\left({{\cal A}{\left({X_{1}^{m}}\right)}=p}\right)}>0.7, and Pr(𝒜(Y1m)=q)>0.7Pr𝒜superscriptsubscript𝑌1𝑚𝑞0.7\Pr{\left({{\cal A}{\left({Y_{1}^{m}}\right)}=q}\right)}>0.7. By the condition of differential privacy,0.3≥Pr(𝒜(Y1m)=p)≥Pr(𝒜(X1m)=p)⋅e−ε⋅d(X1m,Y1m)=0.7⋅e−10εD.0.3Pr𝒜superscriptsubscript𝑌1𝑚𝑝⋅Pr𝒜superscriptsubscript𝑋1𝑚𝑝superscript𝑒⋅𝜀𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅0.7superscript𝑒10𝜀𝐷\displaystyle 0.3\geq{\Pr{\left({{\cal A}{\left({Y_{1}^{m}}\right)}=p}\right)}}\geq{\Pr{\left({{\cal A}{\left({X_{1}^{m}}\right)}=p}\right)}}\cdot e^{-\varepsilon\cdot d(X_{1}^{m},Y_{1}^{m})}=0.7\cdot e^{-10\varepsilon D}.Taking logarithm we obtainD≥ln(7/3)101ε=Ω(1ε),𝐷73101𝜀Ω1𝜀D\geq\frac{\ln(7/3)}{10}\frac{1}{\varepsilon}=\Omega{\left({\frac{1}{\varepsilon}}\right)},completing the proof.
|
| 52 |
+
|
| 53 |
+
We start with a simple testing problem. Given b0subscript𝑏0b_{0}, α>0𝛼0\alpha>0, and ε>0𝜀0\varepsilon>0, and samples X1m∈{0,1}msuperscriptsubscript𝑋1𝑚superscript01𝑚X_{1}^{m}\in\{0,1\}^{m} from B(b)𝐵𝑏B(b), distinguish between the cases b=b0𝑏subscript𝑏0b=b_{0}, and |b−b0|≥α𝑏subscript𝑏0𝛼\left|b-b_{0}\right|\geq\alpha. We prove the following theorem (stated for ε𝜀\varepsilon-DP without loss of generality).
|
| 54 |
+
|
| 55 |
+
Simple bias and variance arguments show that the sample complexity of this problem is Θ(1/α2)Θ1superscript𝛼2\Theta(1/\alpha^{2}). In this section, we study the sample complexity with privacy constraints. We note that the upper bound can simply be achieved by the well known Laplace mechanism in differential privacy. We add a Lap(1/ε)𝐿𝑎𝑝1𝜀Lap(1/\varepsilon) random variable to the number of 1’s in X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and then threshold the output appropriately. The privacy is guaranteed by privacy guarantees of the Laplace mechanism. A small bias variance computation also gives the second term. For completeness, we provide a proof of the upper bound using our techniques in Section A. The lower bound is proved using the coupling defined in Example 1 with Theorem 11.
|
| 56 |
+
|
| 57 |
+
Suppose b0=0.5subscript𝑏00.5b_{0}=0.5. Then least Ω(1/α2)Ω1superscript𝛼2\Omega{\left({1/\alpha^{2}}\right)} samples are necessary to test whether b=b0𝑏subscript𝑏0b=b_{0}, or |b−b0|>α𝑏subscript𝑏0𝛼\left|b-b_{0}\right|>\alpha. We will prove the second term, namely a lower bound of Ω(1αε)Ω1𝛼𝜀\Omega{\left({\frac{1}{\alpha\varepsilon}}\right)} using a coupling.
|
| 58 |
+
|
| 59 |
+
Consider the special case of Example 1 with b2=12+αsubscript𝑏212𝛼b_{2}={\frac{1}{2}}+\alpha, and b1=12subscript𝑏112b_{1}={\frac{1}{2}}. Then, D=(b2−b1)m=αm𝐷subscript𝑏2subscript𝑏1𝑚𝛼𝑚D=(b_{2}-b_{1})m=\alpha m, and 𝔼[d(X1m,Y1m)]=αm𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝛼𝑚\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]=\alpha m.Applying Theorem 11, we know that any ε𝜀\varepsilon-DP algorithm must satisfy𝔼[d(X1m,Y1m)]≥Ω(1ε)𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚Ω1𝜀\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]\geq\Omega{\left({\frac{1}{\varepsilon}}\right)}, which implies thatm≥Ω(1αε).𝑚Ω1𝛼𝜀m\geq\Omega{\left({\frac{1}{\alpha\varepsilon}}\right)}.
|
| 60 |
+
|
| 61 |
+
In this section, we prove the bounds for identity testing. Our main result is the following (stated for ε𝜀\varepsilon-DP without loss of generality):
|
| 62 |
+
|
| 63 |
+
Our bounds are tight up to constant factors in all parameters, including pure differential privacy when δ=0𝛿0\delta=0.
|
| 64 |
+
|
| 65 |
+
For proving upper bounds, by Lemma 5, it suffices to prove them only in pure differential privacy case, which means S(𝙸𝚃,k,α,ε)=O(kα2+kαε+k1/3α4/3ε2/3+1αε)𝑆𝙸𝚃𝑘𝛼𝜀𝑂𝑘superscript𝛼2𝑘𝛼𝜀superscript𝑘13superscript𝛼43superscript𝜀231𝛼𝜀S({\tt IT},k,\alpha,\varepsilon)=O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}+\frac{k^{1/3}}{\alpha^{4/3}\varepsilon^{2/3}}+\frac{1}{\alpha\varepsilon}}\right)}. In Theorem 14 we will show a reduction from identity to uniformity testing under pure differential privacy. Using this, it will be enough to design algorithms for uniformity testing, which is done in Section 5.2 where we will prove the upper bound.
|
| 66 |
+
|
| 67 |
+
Moreover since uniformity testing is a special case of identity testing, any lower bound for uniformity will port over to identity, and we give such bounds in Section 5.3.
|
| 68 |
+
|
| 69 |
+
The sample complexity of testing identity of any distribution is O(kα2)𝑂𝑘superscript𝛼2O(\frac{\sqrt{k}}{\alpha^{2}}), a bound that is tight for the uniform distribution. Recently Goldreich (2016) proposed a scheme to reduce the problem of testing identity of distributions over [k]delimited-[]𝑘[k] for total variation distance α𝛼\alpha to the problem of testing uniformity over [6k]delimited-[]6𝑘[6k] with total variation parameter α/3𝛼3\alpha/3. In other words, they show that S(𝙸𝚃,k,α)≤S(𝚄𝚃,6k,α/3)𝑆𝙸𝚃𝑘𝛼𝑆𝚄𝚃6𝑘𝛼3S({\tt IT},k,\alpha)\leq S({\tt UT},6k,\alpha/3). Our upper bounds use (ε+δ,0)𝜀𝛿0(\varepsilon+\delta,0)-DP, and therefore we only need to prove this result for pure differential privacy. Building up on the construction of Goldreich (2016), we show that such a bound also holds for differentially private algorithms.
|
| 70 |
+
|
| 71 |
+
The theorem is proved in Section B.
|
| 72 |
+
|
| 73 |
+
We had mentioned in the results that we can use the statistic of Paninski (2008) to achieve the optimal sample complexity in the sparse case. This result is shown in Section D. In this section, we will show that by privatizing the statistic proposed in Diakonikolas et al. (2017) we can achieve the sample complexity in Theorem 13 for all parameter ranges. The procedure is described in Algorithm 1.
|
| 74 |
+
|
| 75 |
+
Recall that Mx(X1m)subscript𝑀𝑥superscriptsubscript𝑋1𝑚M_{x}(X_{1}^{m}) is the number of appearances of x𝑥x in X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}. LetS(X1m)=Δ12⋅∑x=1n|Mx(X1m)m−1k|,superscriptΔ𝑆superscriptsubscript𝑋1𝑚⋅12superscriptsubscript𝑥1𝑛subscript𝑀𝑥superscriptsubscript𝑋1𝑚𝑚1𝑘\displaystyle S(X_{1}^{m})\stackrel{{\scriptstyle\Delta}}{{=}}\frac{1}{2}\cdot\sum_{x=1}^{n}\left|\frac{M_{x}(X_{1}^{m})}{m}-\frac{1}{k}\right|,(2)be the distance of the empirical distribution from the uniform distribution. Let μ(p)=𝔼[S(X1m)]𝜇𝑝𝔼delimited-[]𝑆superscriptsubscript𝑋1𝑚\mu(p)=\mathbb{E}\left[S(X_{1}^{m})\right] when the samples are drawn from distribution p𝑝p. They show the following separation result on the expected value of S(X1m)𝑆superscriptsubscript𝑋1𝑚S(X_{1}^{m}).
|
| 76 |
+
|
| 77 |
+
Diakonikolas et al. (2017) used this result to show that thresholding S(X1m)𝑆superscriptsubscript𝑋1𝑚S(X_{1}^{m}) at 0 is an optimal algorithm for identity testing. Their result is stronger than what we require in our work, since we only care about making the error probability at most 0.1. We first normalize the statistic to simplify the presentation of our DP algorithm. LetZ(X1m)=Δ{k(S(X1m)−μ(u[k])−12cα2⋅m2k2),when m≤km(S(X1m)−μ(u[k])−12cα2⋅mk),when k<m≤kα2m(S(X1m)−μ(u[k])−12cα),when m≥kα2 superscriptΔ𝑍superscriptsubscript𝑋1𝑚cases𝑘𝑆superscriptsubscript𝑋1𝑚𝜇𝑢delimited-[]𝑘⋅12𝑐superscript𝛼2superscript𝑚2superscript𝑘2when m≤k𝑚𝑆superscriptsubscript𝑋1𝑚𝜇𝑢delimited-[]𝑘⋅12𝑐superscript𝛼2𝑚𝑘when k<m≤kα2𝑚𝑆superscriptsubscript𝑋1𝑚𝜇𝑢delimited-[]𝑘12𝑐𝛼when m≥kα2 Z(X_{1}^{m})\stackrel{{\scriptstyle\Delta}}{{=}}\begin{cases}k{\left({S(X_{1}^{m})-\mu(u[{k}])-\frac{1}{2}c\alpha^{2}\cdot\frac{m^{2}}{k^{2}}~{}}\right)},&\text{when $m\leq k$}\\m{\left({S(X_{1}^{m})-\mu(u[{k}])-\frac{1}{2}c\alpha^{2}\cdot\sqrt{\frac{m}{k}}~{}}\right)},&\text{when $k<m\leq\frac{k}{\alpha^{2}}$}\\m{\left({S(X_{1}^{m})-\mu(u[{k}])-\frac{1}{2}c\alpha}\right)},&\text{when $m\geq\frac{k}{\alpha^{2}}$ }\end{cases}(3)where c𝑐c is the constant in Lemma 15, and μ(u[k])𝜇𝑢delimited-[]𝑘\mu(u[{k}]) is the expected value of S(X1m)𝑆superscriptsubscript𝑋1𝑚{S(X_{1}^{m})} when X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} are drawn from uniform distribution.
|
| 78 |
+
|
| 79 |
+
Therefore, for X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} drawn from u[k]𝑢delimited-[]𝑘u[{k}],𝔼[Z(X1m)]≤{−12cα2⋅m2k,when m≤k−12cα2⋅m3/2k1/2,when k<m≤kα2−12cmα,when m≥kα2 . 𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚cases⋅12𝑐superscript𝛼2superscript𝑚2𝑘when m≤k⋅12𝑐superscript𝛼2superscript𝑚32superscript𝑘12when k<m≤kα212𝑐𝑚𝛼when m≥kα2 . \mathbb{E}\left[Z(X_{1}^{m})\right]\leq\begin{cases}-\frac{1}{2}c\alpha^{2}\cdot\frac{m^{2}}{k},&\text{when $m\leq k$}\\-\frac{1}{2}c\alpha^{2}\cdot{\frac{m^{3/2}}{k^{1/2}}},&\text{when $k<m\leq\frac{k}{\alpha^{2}}$}\\-\frac{1}{2}cm\alpha,&\text{when $m\geq\frac{k}{\alpha^{2}}$ . }\end{cases}(4)
|
| 80 |
+
|
| 81 |
+
For X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} drawn from p𝑝p with dTV(p,u[k])≥αsubscript𝑑𝑇𝑉𝑝𝑢delimited-[]𝑘𝛼d_{TV}(p,u[{k}])\geq\alpha,𝔼[Z(X1m)]≥{12cα2⋅m2k,when m≤k12cα2⋅m3/2k1/2,when k<m≤kα212cmα,when m≥kα2 . 𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚cases⋅12𝑐superscript𝛼2superscript𝑚2𝑘when m≤k⋅12𝑐superscript𝛼2superscript𝑚32superscript𝑘12when k<m≤kα212𝑐𝑚𝛼when m≥kα2 . \mathbb{E}\left[Z(X_{1}^{m})\right]\geq\begin{cases}\frac{1}{2}c\alpha^{2}\cdot\frac{m^{2}}{k},&\text{when $m\leq k$}\\\frac{1}{2}c\alpha^{2}\cdot{\frac{m^{3/2}}{k^{1/2}}},&\text{when $k<m\leq\frac{k}{\alpha^{2}}$}\\\frac{1}{2}cm\alpha,&\text{when $m\geq\frac{k}{\alpha^{2}}$ . }\end{cases}(5)
|
| 82 |
+
|
| 83 |
+
In order to prove the privacy bounds, we need the following (weak) version of the result of Diakonikolas et al. (2017), which is sufficient to prove the sample complexity bound for constant error probability.
|
| 84 |
+
|
| 85 |
+
The proof of this result is in Section D.
|
| 86 |
+
|
| 87 |
+
We now prove that this algorithm is ε𝜀\varepsilon-DP. We need the following sensitivity result.
|
| 88 |
+
|
| 89 |
+
Proof Recall that S(X1m)=Δ12⋅∑x=1n|Mx(X1m)m−1k|superscriptΔ𝑆superscriptsubscript𝑋1𝑚⋅12superscriptsubscript𝑥1𝑛subscript𝑀𝑥superscriptsubscript𝑋1𝑚𝑚1𝑘S(X_{1}^{m})\stackrel{{\scriptstyle\Delta}}{{=}}\frac{1}{2}\cdot\sum_{x=1}^{n}\left|\frac{M_{x}(X_{1}^{m})}{m}-\frac{1}{k}\right|. Changing any one symbol changes at most two of the Mx(X1m)subscript𝑀𝑥superscriptsubscript𝑋1𝑚M_{x}(X_{1}^{m})’s. Therefore at most two of the terms change by at most 1m1𝑚\frac{1}{m}. Therefore, Δ(S(X1m)≤1m\Delta(S(X_{1}^{m})\leq\frac{1}{m}, for any m𝑚m. When m≤k𝑚𝑘m\leq k, this can be strengthened with observation that Mx(X1m)/m≥1ksubscript𝑀𝑥superscriptsubscript𝑋1𝑚𝑚1𝑘M_{x}(X_{1}^{m})/m\geq\frac{1}{k}, for all Mx(X1m)≥1subscript𝑀𝑥superscriptsubscript𝑋1𝑚1M_{x}(X_{1}^{m})\geq 1. Therefore,S(X1m)=12⋅(∑x:Mx(X1m)≥1(Mx(X1m)m−1k)+∑x:Mx(X1m)=01k)=Φ0(X1m)k,𝑆superscriptsubscript𝑋1𝑚⋅12subscript:𝑥subscript𝑀𝑥superscriptsubscript𝑋1𝑚1subscript𝑀𝑥superscriptsubscript𝑋1𝑚𝑚1𝑘subscript:𝑥subscript𝑀𝑥superscriptsubscript𝑋1𝑚01𝑘subscriptΦ0superscriptsubscript𝑋1𝑚𝑘S(X_{1}^{m})=\frac{1}{2}\cdot{\left({\sum_{x:M_{x}(X_{1}^{m})\geq 1}{\left({\frac{M_{x}(X_{1}^{m})}{m}-\frac{1}{k}}\right)}+\sum_{x:M_{x}(X_{1}^{m})=0}\frac{1}{k}}\right)}=\frac{\Phi_{0}(X_{1}^{m})}{k},where Φ0(X1m)subscriptΦ0superscriptsubscript𝑋1𝑚\Phi_{0}(X_{1}^{m}) is the number of symbols not appearing in X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}. This changes by at most one when one symbol is changed, proving the result.
|
| 90 |
+
|
| 91 |
+
Using this lemma, ε⋅Z(X1m)⋅𝜀𝑍superscriptsubscript𝑋1𝑚\varepsilon\cdot Z(X_{1}^{m}) changes by at most ε𝜀\varepsilon when X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} is changed at one location. Invoking Lemma 8, the probability of any output changes by a multiplicative exp(ε)𝜀\exp(\varepsilon), and the algorithm is ε𝜀\varepsilon-differentially private.
|
| 92 |
+
|
| 93 |
+
We now proceed to prove the sample complexity bounds. Assume that m>Ck/α2𝑚𝐶𝑘superscript𝛼2m>C\sqrt{k}/\alpha^{2}, so Lemma 16 holds. Suppose ε𝜀\varepsilon be any real number such that ε|𝔼[Z(X1m)]|>3log100𝜀𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3100\varepsilon|\mathbb{E}\left[Z(X_{1}^{m})\right]|>3\log{100}. Let 𝒜(X1m)𝒜superscriptsubscript𝑋1𝑚{\cal A}(X_{1}^{m}) be the output of Algorithm 1. Denote the output by 1 when 𝒜(X1m)𝒜superscriptsubscript𝑋1𝑚{\cal A}(X_{1}^{m}) is “p≠u[k]𝑝𝑢delimited-[]𝑘p\neq u[{k}]”, and 0 otherwise. Consider the case when X1m∼psimilar-tosuperscriptsubscript𝑋1𝑚𝑝X_{1}^{m}\sim p, and dTV(p,u[k])≥αsubscript𝑑𝑇𝑉𝑝𝑢delimited-[]𝑘𝛼d_{TV}(p,u[{k}])\geq\alpha. Then,Pr(𝒜(X1m)=1)≥Pr𝒜superscriptsubscript𝑋1𝑚1absent\displaystyle\Pr{\left({{\cal A}(X_{1}^{m})=1}\right)}\geqPr(𝒜(X1m)=1 and Z(X1m)>𝔼[Z(X1m)]3)Pr𝒜superscriptsubscript𝑋1𝑚1 and 𝑍superscriptsubscript𝑋1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3\displaystyle\Pr{\left({{\cal A}(X_{1}^{m})=1\text{ and }Z(X_{1}^{m})>\frac{\mathbb{E}\left[Z(X_{1}^{m})\right]}{3}}\right)}=Pr(Z(X1m)>𝔼[Z(X1m)]3)⋅Pr(𝒜(X1m)=1|Z(X1m)>𝔼[Z(X1m)]3)absent⋅Pr𝑍superscriptsubscript𝑋1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3Pr𝒜superscriptsubscript𝑋1𝑚1ket𝑍superscriptsubscript𝑋1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3\displaystyle=\Pr{\left({Z(X_{1}^{m})>\frac{\mathbb{E}\left[Z(X_{1}^{m})\right]}{3}}\right)}\cdot\Pr{\left({{\cal A}(X_{1}^{m})=1|Z(X_{1}^{m})>\frac{\mathbb{E}\left[Z(X_{1}^{m})\right]}{3}}\right)}≥0.99⋅Pr(B(σ(ε⋅𝔼[Z(X1m)]3))=1)absent⋅0.99Pr𝐵𝜎⋅𝜀𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚31\displaystyle\geq 0.99\cdot\Pr{\left({B{\left({\sigma{\left({\varepsilon\cdot\frac{\mathbb{E}\left[Z(X_{1}^{m})\right]}{3}}\right)}}\right)}=1}\right)}≥0.99⋅0.99≥0.9,absent⋅0.990.990.9\displaystyle\geq 0.99\cdot 0.99\geq 0.9,where the last step uses that ε𝔼[Z(X1m)]/3>log100𝜀𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3100\varepsilon\mathbb{E}\left[Z(X_{1}^{m})\right]/3>\log{100}, along with Lemma 8. The case of p=u[k]𝑝𝑢delimited-[]𝑘p=u[{k}] follows from the same argument.
|
| 94 |
+
|
| 95 |
+
Therefore, the algorithm is correct with probability at least 0.90.90.9, whenever, m>Ck/α2𝑚𝐶𝑘superscript𝛼2m>C\sqrt{k}/\alpha^{2}, and ε|𝔼[Z(X1m)]|>3log100𝜀𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3100\varepsilon|\mathbb{E}\left[Z(X_{1}^{m})\right]|>3\log{100}. By (5), note that ε|𝔼[Z(X1m)]|>3log100𝜀𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚3100\varepsilon|\mathbb{E}\left[Z(X_{1}^{m})\right]|>3\log{100} is satisfied when,cα2⋅m2/k≥⋅𝑐superscript𝛼2superscript𝑚2𝑘absent\displaystyle c\alpha^{2}\cdot{m^{2}}/{k}\geq(6log100)/ε, for m≤k,6100𝜀 for m≤k\displaystyle(6\log{100})/\varepsilon,\ \text{ for $m\leq k$},cα2⋅m3/2/k1/2≥⋅𝑐superscript𝛼2superscript𝑚32superscript𝑘12absent\displaystyle c\alpha^{2}\cdot{{m^{3/2}}/{k^{1/2}}}\geq(6log100)/ε, for k<m≤k/α2,6100𝜀 for k<m≤k/α2\displaystyle(6\log{100})/\varepsilon,\ \text{ for $k<m\leq{k}/{\alpha^{2}}$},cα⋅m≥⋅𝑐𝛼𝑚absent\displaystyle c\alpha\cdot m\geq(6log100)/ε, for m≥k/α2.6100𝜀 for m≥k/α2\displaystyle(6\log{100})/\varepsilon,\ \text{ for $m\geq{k}/{\alpha^{2}}$}.This gives the upper bounds for all the three regimes of m𝑚m.
|
| 96 |
+
|
| 97 |
+
In this section, we will show that for any value of k,α,ε𝑘𝛼𝜀k,\alpha,\varepsilon,S(𝙸𝚃,k,α,ε)=Ω(k1/2α2+max{k1/2αε1/2,k1/3α4/3ε2/3,1αε}),𝑆𝙸𝚃𝑘𝛼𝜀Ωsuperscript𝑘12superscript𝛼2superscript𝑘12𝛼superscript𝜀12superscript𝑘13superscript𝛼43superscript𝜀231𝛼𝜀S({\tt IT},k,\alpha,\varepsilon)=\Omega{\left({\frac{k^{1/2}}{\alpha^{2}}+\max\left\{\frac{k^{1/2}}{\alpha\varepsilon^{1/2}},\frac{k^{1/3}}{\alpha^{4/3}\varepsilon^{2/3}},\frac{1}{\alpha\varepsilon}\right\}}\right)},which can be rewritten as:S(𝙸𝚃,k,α,ε)={Ω(kα2+k1/2αε1/2),when m≤kΩ(kα2+k1/3α4/3ε2/3),when k<m≤kα2Ω(kα2+1αε)when m≥kα2. 𝑆𝙸𝚃𝑘𝛼𝜀casesΩ𝑘superscript���2superscript𝑘12𝛼superscript𝜀12when m≤kΩ𝑘superscript𝛼2superscript𝑘13superscript𝛼43superscript𝜀23when k<m≤kα2Ω𝑘superscript𝛼21𝛼𝜀when m≥kα2. S({\tt IT},k,\alpha,\varepsilon)=\begin{cases}\Omega{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{k^{1/2}}{\alpha\varepsilon^{1/2}}}\right)},&\text{when $m\leq k$}\\\Omega{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{k^{1/3}}{\alpha^{4/3}\varepsilon^{2/3}}}\right)},&\text{when $k<m\leq\frac{k}{\alpha^{2}}$}\\\Omega{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{1}{\alpha\varepsilon}}\right)}&\text{when $m\geq\frac{k}{\alpha^{2}}$. }\end{cases}The first term is the lower bound without privacy constraints, proved in Paninski (2008). In this section, we will prove the terms associated with privacy.
|
| 98 |
+
|
| 99 |
+
The simplest argument is for m≥kα2𝑚𝑘superscript𝛼2m\geq\frac{k}{\alpha^{2}}. From Theorem 12, 1αε1𝛼𝜀\frac{1}{\alpha\varepsilon} is a lower bound for binary identity testing, which is a special case of identity testing for distributions over [k]delimited-[]𝑘[k] (when k−2𝑘2k-2 symbols have probability zero). This proves the lower bound for this case.
|
| 100 |
+
|
| 101 |
+
We now consider the cases m≤k𝑚𝑘m\leq k and k<m≤kα2𝑘𝑚𝑘superscript𝛼2k<m\leq\frac{k}{\alpha^{2}}.
|
| 102 |
+
|
| 103 |
+
To this end, we invoke LeCam’s two point theorem, and design a hypothesis testing problem that will imply a lower bound on uniformity testing. The testing problem will be to distinguish between the following two cases.
|
| 104 |
+
|
| 105 |
+
Case 1: We are given m𝑚m independent samples from the uniform distribution u[k]𝑢delimited-[]𝑘u[{k}].
|
| 106 |
+
|
| 107 |
+
Case 2: Generate a distribution p𝑝p with dTV(p,u[k])≥αsubscript𝑑𝑇𝑉𝑝𝑢delimited-[]𝑘𝛼d_{TV}(p,u[{k}])\geq\alpha according to some prior over all such distributions. We are then given m𝑚m independent samples from this distribution p𝑝p.
|
| 108 |
+
|
| 109 |
+
Le Cam’s two point theorem Yu (1997) states that any lower bound for distinguishing between these two cases is a lower bound on identity testing problem.
|
| 110 |
+
|
| 111 |
+
We now describe the prior construction for Case 2, which is the same as considered by Paninski (2008) for lower bounds on identity testing without privacy considerations. For each z∈{±1}k/2zsuperscriptplus-or-minus1𝑘2\textbf{z}\in\{\pm 1\}^{k/2}, define a distribution pzsubscript𝑝zp_{\textbf{z}} over [k]delimited-[]𝑘[k] such thatpz(2i−1)=1+zi⋅2αk, and pz(2i)=1−zi⋅2αk.formulae-sequencesubscript𝑝z2𝑖11⋅subscriptz𝑖2𝛼𝑘 and subscript𝑝z2𝑖1⋅subscriptz𝑖2𝛼𝑘\displaystyle p_{\textbf{z}}(2i-1)=\frac{1+\textbf{z}_{i}\cdot 2\alpha}{k},\text{ and }p_{\textbf{z}}(2i)=\frac{1-\textbf{z}_{i}\cdot 2\alpha}{k}.Then for any z, dTV(Pz,u[k])=αsubscript𝑑𝑇𝑉subscript𝑃z𝑢delimited-[]𝑘𝛼d_{TV}(P_{\textbf{z}},u[{k}])=\alpha. For Case 2, choose p𝑝p uniformly from these 2k/2superscript2𝑘22^{k}/2 distributions. Let Q2subscript𝑄2Q_{2} denote the distribution on [k]msuperscriptdelimited-[]𝑘𝑚[k]^{m} by this process. In other words, Q2subscript𝑄2Q_{2} is a mixture of product distributions over [k]delimited-[]𝑘[k].
|
| 112 |
+
|
| 113 |
+
In Case 1, let Q1subscript𝑄1Q_{1} be the distribution of m𝑚m i.i.d.formulae-sequence𝑖𝑖𝑑i.i.d. samples from u[k]𝑢delimited-[]𝑘u[{k}].
|
| 114 |
+
|
| 115 |
+
To obtain a sample complexity lower bound for distinguishing the two cases, we will design a coupling between Q1subscript𝑄1Q_{1}, and Q2subscript𝑄2Q_{2}, and bound its expected Hamming distance. While it can be shown that the Hamming distance of the coupling between the uniform distribution with any one of the 2k/2superscript2𝑘22^{k/2} distributions grows as αm𝛼𝑚\alpha m, it can be significantly smaller, when we consider the mixtures. In particular, the following lemma shows that there exist couplings with bounded Hamming distance.
|
| 116 |
+
|
| 117 |
+
The lemma is proved in Appendix E. Now applying Theorem 11,1.For m≤k𝑚𝑘m\leq k, 8m2α2k=Ω(1ε)8superscript𝑚2superscript𝛼2𝑘Ω1𝜀8\frac{m^{2}\alpha^{2}}{k}=\Omega{\left({\frac{1}{\varepsilon}}\right)}, implying m=Ω(k1/2αε1/2)𝑚Ωsuperscript𝑘12𝛼superscript𝜀12m=\Omega{\left({\frac{k^{1/2}}{\alpha\varepsilon^{1/2}}}\right)}.2.For k<m≤kα2𝑘𝑚𝑘superscript𝛼2k<m\leq\frac{k}{\alpha^{2}}, C⋅α2m3/2k1/2=Ω(1ε)⋅𝐶superscript𝛼2superscript𝑚32superscript𝑘12Ω1𝜀C\cdot\alpha^{2}\frac{m^{3/2}}{{k}^{1/2}}=\Omega{\left({\frac{1}{\varepsilon}}\right)}, implying m=Ω(k1/3α4/3ε2/3)𝑚Ωsuperscript𝑘13superscript𝛼43superscript𝜀23m=\Omega{\left({\frac{k^{1/3}}{\alpha^{4/3}\varepsilon^{2/3}}}\right)}.
|
| 118 |
+
|
| 119 |
+
Recall the closeness testing problem from Section 2, and the tight non-private bounds from Table 1. Our main result in this section is the following theorem characterizing the sample complexity of differentially private algorithms for closeness testing.
|
| 120 |
+
|
| 121 |
+
This theorem shows that in the sparse regime, when m=O(k)𝑚𝑂𝑘m=O(k), our bounds are tight up to constant factors in all parameters.
|
| 122 |
+
|
| 123 |
+
In this section, we only consider the case when δ=0𝛿0\delta=0, which would suffice by lemma 5.
|
| 124 |
+
|
| 125 |
+
To prove the upper bounds, we privatize the closeness testing algorithm of Chan et al. (2014). To reduce the strain on the readers, we drop the sequence notations explicitly and letμi=ΔMi(X1m), and νi=ΔMi(Y1m).formulae-sequencesuperscriptΔsubscript𝜇𝑖subscript𝑀𝑖superscriptsubscript𝑋1𝑚superscriptΔ and subscript𝜈𝑖subscript𝑀𝑖superscriptsubscript𝑌1𝑚\mu_{i}\stackrel{{\scriptstyle\Delta}}{{=}}M_{i}(X_{1}^{m}),\text{ and }\nu_{i}\stackrel{{\scriptstyle\Delta}}{{=}}M_{i}(Y_{1}^{m}).
|
| 126 |
+
|
| 127 |
+
Variants of the chi-squared test have been used to test closeness of distributions in the recent years Acharya et al. (2012); Chan et al. (2014). In particular, the statistic used by Chan et al. (2014) isZ(X1m,Y1m)=Δ∑i∈[k](μi−νi)2−μi−νiμi+νi,superscriptΔ𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚subscript𝑖delimited-[]𝑘superscriptsubscript𝜇𝑖subscript𝜈𝑖2subscript𝜇𝑖subscript𝜈𝑖subscript𝜇𝑖subscript𝜈𝑖Z(X_{1}^{m},Y_{1}^{m})\stackrel{{\scriptstyle\Delta}}{{=}}\sum_{i\in[k]}\frac{(\mu_{i}-\nu_{i})^{2}-\mu_{i}-\nu_{i}}{\mu_{i}+\nu_{i}},where we assume that ((μi−νi)2−μi−νi)/(μi+νi)=0superscriptsubscript𝜇𝑖subscript𝜈𝑖2subscript𝜇𝑖subscript𝜈𝑖subscript𝜇𝑖subscript𝜈𝑖0((\mu_{i}-\nu_{i})^{2}-\mu_{i}-\nu_{i})/({\mu_{i}+\nu_{i}})=0, when μi+νi=0subscript𝜇𝑖subscript𝜈𝑖0\mu_{i}+\nu_{i}=0.
|
| 128 |
+
|
| 129 |
+
The results in Chan et al. (2014) were proved under Poisson sampling, and we also use Poisson sampling, with only a constant factor effect on the number of samples for the same error probability. They showed the following bounds:𝔼[Z(X1m,Y1m)]𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚\displaystyle\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]=0 when p=q,absent0 when 𝑝𝑞\displaystyle=0\text{ when }p=q,(7)Var(Z(X1m,Y1m))Var𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚\displaystyle{\rm Var}{\left({Z(X_{1}^{m},Y_{1}^{m})}\right)}≤2min{k,m} when p=q,absent2𝑘𝑚 when 𝑝𝑞\displaystyle\leq 2\min\{k,m\}\text{ when }p=q,(8)𝔼[Z(X1m,Y1m)]𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚\displaystyle\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]≥m2α24k+2m when dTV(p,q)≥α,absentsuperscript𝑚2superscript𝛼24𝑘2𝑚 when subscript𝑑𝑇𝑉𝑝𝑞𝛼\displaystyle\geq\frac{m^{2}\alpha^{2}}{4k+2m}\text{ when }d_{TV}(p,q)\geq\alpha,(9)Var(Z(X1m,Y1m))Var𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚\displaystyle{\rm Var}{\left({Z(X_{1}^{m},Y_{1}^{m})}\right)}≤11000𝔼[Z(X1m,Y1m)]2 when p≠q, and m=Ω(1α2).formulae-sequenceabsent11000𝔼superscriptdelimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚2 when 𝑝𝑞 and 𝑚Ω1superscript𝛼2\displaystyle\leq\frac{1}{1000}\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]^{2}\text{ when }p\neq q,\text{ and }m=\Omega{\left({\frac{1}{\alpha^{2}}}\right)}.(10)
|
| 130 |
+
|
| 131 |
+
We use the same approach with the test statistic as with binary testing and uniformity testing to obtain a differentially private closeness testing method, described in Algorithm 2.
|
| 132 |
+
|
| 133 |
+
We will show that Algorithm 2 satisfies sample complexity upper bounds described in theorem 19.
|
| 134 |
+
|
| 135 |
+
We first bound the sensitivity (Definition 6) of the test statistic to prove privacy bounds.
|
| 136 |
+
|
| 137 |
+
Proof Since Z(X1m,Y1m)𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚Z(X_{1}^{m},Y_{1}^{m}) is symmetric, without loss of generality assume that one of the symbols is changed in Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m}. This would cause at most two of the νisubscript𝜈𝑖\nu_{i}’s to change. Suppose νi≥1subscript𝜈𝑖1\nu_{i}\geq 1, and it changed to νi−1subscript𝜈𝑖1\nu_{i}-1. Suppose, μi+νi>1subscript𝜇𝑖subscript𝜈𝑖1\mu_{i}+\nu_{i}>1, the absolute change in the i𝑖ith term of the statistic is|(μi−νi)2μi+νi−(μi−νi+1)2μi+νi−1|=superscriptsubscript𝜇𝑖subscript𝜈𝑖2subscript𝜇𝑖subscript𝜈𝑖superscriptsubscript𝜇𝑖subscript𝜈𝑖12subscript𝜇𝑖subscript𝜈𝑖1absent\displaystyle\left|\frac{(\mu_{i}-\nu_{i})^{2}}{\mu_{i}+\nu_{i}}-\frac{(\mu_{i}-\nu_{i}+1)^{2}}{\mu_{i}+\nu_{i}-1}\right|=|(μi+νi)(2μi−2νi+1)+(μi−νi)2(μi+νi)(μi+νi−1)|subscript𝜇𝑖subscript𝜈𝑖2subscript𝜇𝑖2subscript𝜈𝑖1superscriptsubscript𝜇𝑖subscript𝜈𝑖2subscript𝜇𝑖subscript𝜈𝑖subscript𝜇𝑖subscript𝜈𝑖1\displaystyle\left|\frac{(\mu_{i}+\nu_{i})(2\mu_{i}-2\nu_{i}+1)+(\mu_{i}-\nu_{i})^{2}}{(\mu_{i}+\nu_{i})(\mu_{i}+\nu_{i}-1)}\right|≤\displaystyle\leq|2μi−2νi+1μi+νi−1|+|μi−νiμi+νi−1|2subscript𝜇𝑖2subscript𝜈𝑖1subscript𝜇𝑖subscript𝜈𝑖1subscript𝜇𝑖subscript𝜈𝑖subscript𝜇𝑖subscript𝜈𝑖1\displaystyle\left|\frac{2\mu_{i}-2\nu_{i}+1}{\mu_{i}+\nu_{i}-1}\right|+\left|\frac{\mu_{i}-\nu_{i}}{\mu_{i}+\nu_{i}-1}\right|≤\displaystyle\leq3|μi−νi|+1μi+νi−13subscript𝜇𝑖subscript𝜈𝑖1subscript𝜇𝑖subscript𝜈𝑖1\displaystyle\frac{3\left|\mu_{i}-\nu_{i}\right|+1}{\mu_{i}+\nu_{i}-1}≤\displaystyle\leq3+4μi+νi−1≤7.34subscript𝜇𝑖subscript𝜈𝑖17\displaystyle 3+\frac{4}{\mu_{i}+\nu_{i}-1}\leq 7.When μi+νi=1subscript𝜇𝑖subscript𝜈𝑖1\mu_{i}+\nu_{i}=1, the change can again be bounded by 7. Since at most two of the νisubscript𝜈𝑖\nu_{i}’s change, we obtain the desired bound.
|
| 138 |
+
|
| 139 |
+
Since the sensitivity of the statistic is at most 14, the input to the sigmoid changes by at most 14ε14𝜀14\varepsilon when any input sample is changed. Invoking Lemma 8, the probability of any output changes by a multiplicative exp(14ε)14𝜀\exp(14\varepsilon), and the algorithm is 14ε14𝜀14\varepsilon-differentially private.
|
| 140 |
+
|
| 141 |
+
We now prove the correctness of the algorithm:
|
| 142 |
+
|
| 143 |
+
Case 1: α2>1ksuperscript𝛼21𝑘\alpha^{2}>\frac{1}{\sqrt{k}}, and α2ε>1ksuperscript𝛼2𝜀1𝑘\alpha^{2}\varepsilon>\frac{1}{k}.In this case, we will show that S(𝙲𝚃,k,α,ε)=O(k2/3α4/3+k1/2αε)𝑆𝙲𝚃𝑘𝛼𝜀𝑂superscript𝑘23superscript𝛼43superscript𝑘12𝛼𝜀S({\tt CT},k,\alpha,\varepsilon)=O{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{k^{1/2}}{\alpha\sqrt{\varepsilon}}}\right)}. In this case, k2/3α4/3+k1/2αε≤2ksuperscript𝑘23superscript𝛼43superscript𝑘12𝛼𝜀2𝑘\frac{k^{2/3}}{\alpha^{4/3}}+\frac{k^{1/2}}{\alpha\sqrt{\varepsilon}}\leq 2k.
|
| 144 |
+
|
| 145 |
+
We consider the case when p=q𝑝𝑞p=q, then Var(Z(X1m,Y1m))≤2min{k,m}Var𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚2𝑘𝑚{\rm Var}{\left({Z(X_{1}^{m},Y_{1}^{m})}\right)}\leq 2\min\{k,m\}. Let Var(Z(X1m,Y1m))≤cmVar𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝑐𝑚{\rm Var}{\left({Z(X_{1}^{m},Y_{1}^{m})}\right)}\leq cm for some constant c𝑐c. By the Chebychev’s inequality,
|
| 146 |
+
|
| 147 |
+
Pr(Z′>−16⋅m2α24k+2m)≤Prsuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚absent\displaystyle\Pr{\left({Z^{\prime}>-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)}\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>13⋅m2α24k+2m)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅13superscript𝑚2superscript𝛼24𝑘2𝑚\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>\frac{1}{3}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)}≤\displaystyle\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>13⋅m2α28k)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅13superscript𝑚2superscript𝛼28𝑘\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>\frac{1}{3}\cdot\frac{m^{2}\alpha^{2}}{8k}}\right)}≤\displaystyle\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>(cm)1/2⋅m3/2α224c1/2k)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅superscript𝑐𝑚12superscript𝑚32superscript𝛼224superscript𝑐12𝑘\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>{\left({cm}\right)}^{1/2}\cdot\frac{m^{3/2}\alpha^{2}}{24c^{1/2}k}}\right)}≤\displaystyle\leq576c⋅k2m3α4,⋅576𝑐superscript𝑘2superscript𝑚3superscript𝛼4\displaystyle 576c\cdot\frac{k^{2}}{m^{3}\alpha^{4}},where we used that 4k+2m≤8k4𝑘2𝑚8𝑘4k+2m\leq 8k.
|
| 148 |
+
|
| 149 |
+
Therefore, there is a C1subscript𝐶1C_{1} such that if m≥C1k2/3/α4/3𝑚subscript𝐶1superscript𝑘23superscript𝛼43m\geq C_{1}k^{2/3}/\alpha^{4/3},then under p=q𝑝𝑞p=q, Pr(Z′>−16⋅m2α24k+2m)Prsuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚\Pr{\left({Z^{\prime}>-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)} is at most 1/100. Now furthermore, if ε⋅m2α2/48k>log(20)⋅𝜀superscript𝑚2superscript𝛼248𝑘20\varepsilon\cdot m^{2}\alpha^{2}/48k>\log(20), then for all Z′<−16⋅m2α24k+2msuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚Z^{\prime}<-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}, with probability at least 0.95, the algorithm outputs the p=q𝑝𝑞p=q. Combining the conditions, we obtain that there is a constant C2subscript𝐶2C_{2} such that for m=C2(k2/3α4/3+k1/2αε)𝑚subscript𝐶2superscript𝑘23superscript𝛼43superscript𝑘12𝛼𝜀m=C_{2}{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{k^{1/2}}{\alpha\sqrt{\varepsilon}}}\right)}, with probability at least 0.9, the algorithm outputs the correct answer when the input distributions satisfy p=q𝑝𝑞p=q. The case of dTV(p,q)>αsubscript𝑑𝑇𝑉𝑝𝑞��d_{TV}(p,q)>\alpha distribution is similar and is omitted.
|
| 150 |
+
|
| 151 |
+
Case 2: α2<1ksuperscript𝛼21𝑘\alpha^{2}<\frac{1}{\sqrt{k}}, or α2ε<1ksuperscript𝛼2𝜀1𝑘\alpha^{2}\varepsilon<\frac{1}{k}. In this case, we will prove a bound of O(kα2+1α2ε)𝑂𝑘superscript𝛼21superscript𝛼2𝜀O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{1}{\alpha^{2}\varepsilon}}\right)} on the sample complexity. We still consider the case when p=q𝑝𝑞p=q. We first note that when α2<1ksuperscript𝛼21𝑘\alpha^{2}<\frac{1}{\sqrt{k}}, or α2ε<1ksuperscript𝛼2𝜀1𝑘\alpha^{2}\varepsilon<\frac{1}{k}, then either kα2+1α2ε>k𝑘superscript𝛼21superscript𝛼2𝜀𝑘\frac{\sqrt{k}}{\alpha^{2}}+\frac{1}{\alpha^{2}\varepsilon}>k. Hence we can assume that the sample complexity bound we aim for is at least Ω(k)Ω𝑘\Omega(k). So Var(Z(X1m,Y1m))≤ckVar𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝑐𝑘{\rm Var}{\left({Z(X_{1}^{m},Y_{1}^{m})}\right)}\leq ck for constant c𝑐c. By the Chebychev’s inequality,
|
| 152 |
+
|
| 153 |
+
Pr(Z′>−16⋅m2α24k+2m)≤Prsuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚absent\displaystyle\Pr{\left({Z^{\prime}>-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)}\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>13⋅m2α24k+2m)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅13superscript𝑚2superscript𝛼24𝑘2𝑚\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>\frac{1}{3}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)}≤\displaystyle\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>13⋅mα26)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅13𝑚superscript𝛼26\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>\frac{1}{3}\cdot\frac{m\alpha^{2}}{6}}\right)}≤\displaystyle\leqPr(Z(X1m,Y1m)−𝔼[Z(X1m,Y1m)]>(ck)1/2⋅mα218c1/2k1/2)Pr𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚𝔼delimited-[]𝑍superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅superscript𝑐𝑘12𝑚superscript𝛼218superscript𝑐12superscript𝑘12\displaystyle\Pr{\left({Z(X_{1}^{m},Y_{1}^{m})-\mathbb{E}\left[Z(X_{1}^{m},Y_{1}^{m})\right]>{\left({ck}\right)}^{1/2}\cdot\frac{m\alpha^{2}}{18c^{1/2}k^{1/2}}}\right)}≤\displaystyle\leq144⋅c⋅km2α4.⋅144𝑐𝑘superscript𝑚2superscript𝛼4\displaystyle 144\cdot c\cdot\frac{k}{m^{2}\alpha^{4}}.
|
| 154 |
+
|
| 155 |
+
Therefore, there is a C1subscript𝐶1C_{1} such that if m≥C1k1/2/α2𝑚subscript𝐶1superscript𝑘12superscript𝛼2m\geq C_{1}k^{1/2}/\alpha^{2},then under p=q𝑝𝑞p=q, Pr(Z′>−16⋅m2α24k+2m)Prsuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚\Pr{\left({Z^{\prime}>-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}}\right)} is at most 1/100. In this situation, if ε⋅mα2/36>log(20)⋅𝜀𝑚superscript𝛼23620\varepsilon\cdot m\alpha^{2}/36>\log(20), then for all Z′<−16⋅m2α24k+2msuperscript𝑍′⋅16superscript𝑚2superscript𝛼24𝑘2𝑚Z^{\prime}<-\frac{1}{6}\cdot\frac{m^{2}\alpha^{2}}{4k+2m}, with probability at least 0.95, the algorithm outputs the p=q𝑝𝑞p=q. Combining with the previous conditions, we obtain that there also exists a constant C2subscript𝐶2C_{2} such that for m=C2(kα2+1α2ε)𝑚subscript𝐶2𝑘superscript𝛼21superscript𝛼2𝜀m=C_{2}{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{1}{\alpha^{2}\varepsilon}}\right)}, with probability at least 0.9, the algorithm outputs the correct answer when the input distribution is p=q𝑝𝑞p=q. The case of dTV(p,q)>αsubscript𝑑𝑇𝑉𝑝𝑞𝛼d_{TV}(p,q)>\alpha distribution is similar and is omitted.
|
| 156 |
+
|
| 157 |
+
To show the lower bound part of Theorem 19, we need the following simple result.
|
| 158 |
+
|
| 159 |
+
Proof Suppose we want to test identity with respect to q𝑞q. Given X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} from p𝑝p, generate Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m} independent samples from q𝑞q. If p=q𝑝𝑞p=q, then the two samples are generated by the same distribution, and otherwise they are generated by distributions that are at least ε𝜀\varepsilon far in total variation. Therefore, we can simply return the output of an (k,α,ε)𝑘𝛼𝜀(k,\alpha,\varepsilon)-closeness testing algorithm on X1msuperscriptsubscript𝑋1𝑚X_{1}^{m}, and Y1msuperscriptsubscript𝑌1𝑚Y_{1}^{m}.
|
| 160 |
+
|
| 161 |
+
By Lemma 21 we know that a lower bound for identity testing is also a lower bound on closeness testing.
|
| 162 |
+
|
| 163 |
+
We first consider the sparse case, when α2>1ksuperscript𝛼21𝑘\alpha^{2}>\frac{1}{\sqrt{k}}, and α2ε>1ksuperscript𝛼2𝜀1𝑘\alpha^{2}\varepsilon>\frac{1}{k}. In this case, we show thatS(𝙲𝚃,k,α,ε,δ)=Ω(k2/3α4/3+kαε).𝑆𝙲𝚃𝑘𝛼𝜀𝛿Ωsuperscript𝑘23superscript𝛼43𝑘��𝜀S({\tt CT},k,\alpha,\varepsilon,\delta)=\Omega{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}}\right)}.When α>1k1/4𝛼1superscript𝑘14\alpha>\frac{1}{k^{1/4}}, k2/3α4/3superscript𝑘23superscript𝛼43\frac{k^{2/3}}{\alpha^{4/3}} is the dominating term in the sample complexity S(𝙲𝚃,k,α)=Θ(k2/3α4/3+kα2)𝑆𝙲𝚃𝑘𝛼Θsuperscript𝑘23superscript𝛼43𝑘superscript𝛼2S({\tt CT},k,\alpha)=\Theta{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{\sqrt{k}}{\alpha^{2}}}\right)}, giving us the first term. By Lemma 21 we know that a lower bound for identity testing is also a lower bound on closeness testing giving the second term, and the lower bound of Theorem 13 contains the second term as a summand.
|
| 164 |
+
|
| 165 |
+
In the dense case, when α2<1ksuperscript𝛼21𝑘\alpha^{2}<\frac{1}{\sqrt{k}}, or α2ε<1ksuperscript𝛼2𝜀1𝑘\alpha^{2}\varepsilon<\frac{1}{k}, we show thatS(𝙲𝚃,k,α,ε,δ)=Ω(kα2+kαε+1αε).𝑆𝙲𝚃𝑘𝛼𝜀𝛿Ω𝑘superscript𝛼2𝑘𝛼𝜀1𝛼𝜀S({\tt CT},k,\alpha,\varepsilon,\delta)=\Omega{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}+\frac{1}{\alpha\varepsilon}}\right)}.
|
| 166 |
+
|
| 167 |
+
In the dense case, using the non-private lower bounds of Ω(k2/3α4/3+kα2)Ωsuperscript𝑘23superscript𝛼43𝑘superscript𝛼2\Omega{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{\sqrt{k}}{\alpha^{2}}}\right)} along with the identity testing bound of sample complexity lower bounds of note that kαε+1αε𝑘𝛼𝜀1𝛼𝜀\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}+\frac{1}{\alpha\varepsilon} gives a lower bound of Ω(k2/3α4/3+kα2+kαε+1αε)Ωsuperscript𝑘23superscript𝛼43𝑘superscript𝛼2𝑘𝛼𝜀1𝛼𝜀\Omega{\left({\frac{k^{2/3}}{\alpha^{4/3}}+\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}+\frac{1}{\alpha\varepsilon}}\right)}. However, in the dense case, it is easy to see that k2/3α4/3=O(kα2+kαε)superscript𝑘23superscript𝛼43𝑂𝑘superscript𝛼2𝑘𝛼𝜀\frac{k^{2/3}}{\alpha^{4/3}}=O{\left({\frac{\sqrt{k}}{\alpha^{2}}+\frac{\sqrt{k}}{\alpha\sqrt{\varepsilon}}}\right)} giving us the bound.
|
| 168 |
+
|
| 169 |
+
Before proving the lemma, we consider an example that will provide insights and tools to analyze the distributions Q1subscript𝑄1Q_{1}, and Q2subscript𝑄2Q_{2}.Let t∈ℕ𝑡ℕt\in\mathbb{N}. Let P2subscript𝑃2P_{2} be the following distribution over {0,1}tsuperscript01𝑡\{0,1\}^{t}:•Select b∈{12−α,12+α}𝑏12𝛼12𝛼b\in\{{\frac{1}{2}}-\alpha,{\frac{1}{2}}+\alpha\} with equal probability.•Output t𝑡t independent samples from B(b)𝐵𝑏B(b).Let P1subscript𝑃1P_{1} be the distribution over {0,1}tsuperscript01𝑡\{0,1\}^{t} that outputs t𝑡t independent samples from B(0.5)𝐵0.5B(0.5).
|
| 170 |
+
|
| 171 |
+
When t=1𝑡1t=1, P1subscript𝑃1P_{1} and P2subscript𝑃2P_{2} both become B(0.5)𝐵0.5B(0.5). For t=2, P1(00)=P1(11)=14+α2subscript𝑃100subscript𝑃11114superscript𝛼2P_{1}(00)=P_{1}(11)=\frac{1}{4}+\alpha^{2}, and P1(10)=P1(01)=14−α2subscript𝑃110subscript𝑃10114superscript𝛼2P_{1}(10)=P_{1}(01)=\frac{1}{4}-\alpha^{2}, and dTV(P1,P2)subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2d_{TV}(P_{1},P_{2}) is 2α22superscript𝛼22\alpha^{2}. A slightly general result is the following:
|
| 172 |
+
|
| 173 |
+
Proof Consider any sequence X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} that has t0subscript𝑡0t_{0} zeros, and t1=t−t0subscript𝑡1𝑡subscript𝑡0t_{1}=t-t_{0} ones. Then,P1(X1t)=(tt0)12t,subscript𝑃1superscriptsubscript𝑋1𝑡binomial𝑡subscript𝑡01superscript2𝑡\displaystyle P_{1}(X_{1}^{t})={t\choose t_{0}}\frac{1}{2^{t}},andP2(X1t)=(tt0)12t((1−2α)t0(1+2α)t1+(1+2α)t0(1−2α)t12).subscript𝑃2superscriptsubscript𝑋1𝑡binomial𝑡subscript𝑡01superscript2𝑡superscript12𝛼subscript𝑡0superscript12𝛼subscript𝑡1superscript12𝛼subscript𝑡0superscript12𝛼subscript𝑡12\displaystyle P_{2}(X_{1}^{t})={t\choose t_{0}}\frac{1}{2^{t}}{\left({\frac{(1-2\alpha)^{t_{0}}(1+2\alpha)^{t_{1}}+(1+2\alpha)^{t_{0}}(1-2\alpha)^{t_{1}}}{2}}\right)}.The term in the parantheses above is minimized when t0=t1=t/2subscript𝑡0subscript𝑡1𝑡2t_{0}=t_{1}=t/2. In this case,P2(X1t)≥subscript𝑃2superscriptsubscript𝑋1𝑡absent\displaystyle P_{2}(X_{1}^{t})\geqP1(X1t)⋅(1+2α)t/2(1−2α)t/2=P1(X1t)⋅(1−4α2)t/2.⋅subscript𝑃1superscriptsubscript𝑋1𝑡superscript12𝛼𝑡2superscript12𝛼𝑡2⋅subscript𝑃1superscriptsubscript𝑋1𝑡superscript14superscript𝛼2𝑡2\displaystyle P_{1}(X_{1}^{t})\cdot(1+2\alpha)^{t/2}(1-2\alpha)^{t/2}=P_{1}(X_{1}^{t})\cdot(1-4\alpha^{2})^{t/2}.Therefore,dTV(P1,P2)=∑P1>P2P1(X1t)−P2(X1t)≤∑P1>P2P1(X1t)(1−(1−4α2)t/2)≤2tα2,subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2subscriptsubscript𝑃1subscript𝑃2subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡subscriptsubscript𝑃1subscript𝑃2subscript���1superscriptsubscript𝑋1𝑡1superscript14superscript𝛼2𝑡22𝑡superscript𝛼2\displaystyle d_{TV}(P_{1},P_{2})=\sum_{P_{1}>P_{2}}P_{1}(X_{1}^{t})-P_{2}(X_{1}^{t})\leq\sum_{P_{1}>P_{2}}P_{1}(X_{1}^{t}){\left({1-(1-4\alpha^{2})^{t/2}}\right)}\leq 2t\alpha^{2},where we used the Weierstrass Product Inequality, which states that 1−tx≤(1−x)t1𝑡𝑥superscript1𝑥𝑡1-tx\leq(1-x)^{t} proving the total variation distance bound.
|
| 174 |
+
|
| 175 |
+
As a corollary this implies:
|
| 176 |
+
|
| 177 |
+
Proof Observe that ∑X1tmin{P1(X1t),P2(X1t)}=1−dTV(P1,P2)subscriptsuperscriptsubscript𝑋1𝑡subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2\sum_{X_{1}^{t}}\min\{P_{1}(X_{1}^{t}),P_{2}(X_{1}^{t})\}=1-d_{TV}(P_{1},P_{2}). Consider the following coupling between P1subscript𝑃1P_{1}, and P2subscript𝑃2P_{2}. Suppose X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} is generated by P1subscript𝑃1P_{1}, and let R𝑅R be a U[0,1]𝑈01U[0,1] random variable.1.R<1−dTV(P1,P2)𝑅1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2R<1-d_{TV}(P_{1},P_{2}) Generate X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} from the distribution that assigns probability min{P1(X1t),P2(X1t)}1−dTV(P1,P2)subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2\frac{\min\{P_{1}(X_{1}^{t}),P_{2}(X_{1}^{t})\}}{1-d_{TV}(P_{1},P_{2})} to X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t}. Output (X1t,X1t)superscriptsubscript𝑋1𝑡superscriptsubscript𝑋1𝑡(X_{1}^{t},X_{1}^{t}).2.R≥1−dTV(P1,P2)𝑅1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2R\geq 1-d_{TV}(P_{1},P_{2})Generate X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} from the distribution that assigns probability P1(X1t)−min{P1(X1t),P2(X1t)}dTV(P1,P2)subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2{\frac{P_{1}(X_{1}^{t})-\min\{P_{1}(X_{1}^{t}),P_{2}(X_{1}^{t})\}}{d_{TV}(P_{1},P_{2})}} to X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t}, and Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t} from the distribution that assigns probability P2(Y1t)−min{P1(Y1t),P2(Y1t)}dTV(P1,P2)subscript𝑃2superscriptsubscript𝑌1𝑡subscript𝑃1superscriptsubscript𝑌1𝑡subscript𝑃2superscriptsubscript𝑌1𝑡subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2{\frac{P_{2}(Y_{1}^{t})-\min\{P_{1}(Y_{1}^{t}),P_{2}(Y_{1}^{t})\}}{d_{TV}(P_{1},P_{2})}} to Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t} independently. Then output (X1t,Y1t)superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡(X_{1}^{t},Y_{1}^{t}).To prove the coupling, note that the probability of observing X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} is(1−dTV(P1,P2))⋅min{P1(X1t),P2(X1t)}1−dTV(P1,P2)+dTV(P1,P2)⋅P1(X1t)−min{P1(X1t),P2(X1t)}dTV(P1,P2)=P1(X1t).⋅1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡1subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2⋅subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃1superscriptsubscript𝑋1𝑡subscript𝑃2superscriptsubscript𝑋1𝑡subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃2subscript𝑃1superscriptsubscript𝑋1𝑡{\left({1-d_{TV}(P_{1},P_{2})}\right)}\cdot\frac{\min\{P_{1}(X_{1}^{t}),P_{2}(X_{1}^{t})\}}{1-d_{TV}(P_{1},P_{2})}+d_{TV}(P_{1},P_{2})\cdot{\frac{P_{1}(X_{1}^{t})-\min\{P_{1}(X_{1}^{t}),P_{2}(X_{1}^{t})\}}{d_{TV}(P_{1},P_{2})}}=P_{1}(X_{1}^{t}).A similar argument gives the probability of Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t} to be P2(Y1t)subscript𝑃2superscriptsubscript𝑌1𝑡P_{2}(Y_{1}^{t}).
|
| 178 |
+
|
| 179 |
+
Then 𝔼[d(X1t,Y1t)]≤t⋅dTV(P1,P2)=2t2α2≤4(t2−t)α2𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡⋅𝑡subscript𝑑𝑇𝑉subscript𝑃1subscript𝑃22superscript𝑡2superscript𝛼24superscript𝑡2𝑡superscript𝛼2\mathbb{E}\left[d(X_{1}^{t},Y_{1}^{t})\right]\leq t\cdot d_{TV}(P_{1},P_{2})=2t^{2}\alpha^{2}\leq 4(t^{2}-t)\alpha^{2} when t≥2𝑡2t\geq 2, and when t=1𝑡1t=1, the distributions are identical and the Hamming distance of the coupling is equal to zero.
|
| 180 |
+
|
| 181 |
+
We now have the tools to prove Lemma 18 for m≤k𝑚𝑘m\leq k.
|
| 182 |
+
|
| 183 |
+
Proof [Proof of Lemma 18 for m≤k𝑚𝑘m\leq k.]The following is a coupling between Q1subscript𝑄1Q_{1} and Q2subscript𝑄2Q_{2}:1.Generate m𝑚m samples Z1msuperscriptsubscript𝑍1𝑚Z_{1}^{m} from a uniform distribution over [k/2]delimited-[]𝑘2[k/2].2.For j∈[k/2]𝑗delimited-[]𝑘2j\in[k/2], let Tj⊆[m]subscript𝑇𝑗delimited-[]𝑚T_{j}\subseteq[m] be the set of locations where j𝑗j appears. Note that |Tj|=Mj(Z1m)subscript𝑇𝑗subscript𝑀𝑗superscriptsubscript𝑍1𝑚|T_{j}|=M_{j}(Z_{1}^{m}).3.To generate samples from Q1subscript𝑄1Q_{1}:•Generate |Tj|subscript𝑇𝑗|T_{j}| samples from a uniform distribution over {2j−1,2j}2𝑗12𝑗\{2j-1,2j\}, and replace the symbols in Tjsubscript𝑇𝑗T_{j} with these symbols.4.To generate samples from Q2subscript𝑄2Q_{2}:•Similar to the construction of P1subscript𝑃1P_{1} earlier in this section, consider two distributions over {2j−1,2j}2𝑗12𝑗\{2j-1,2j\} with bias 12−α12𝛼{\frac{1}{2}}-\alpha, and 12+α12𝛼{\frac{1}{2}}+\alpha.•Pick one of these distributions at random.•Generate |Tj|subscript𝑇𝑗|T_{j}| samples from it over {2j−1,2j}2𝑗12𝑗\{2j-1,2j\}, and replace the symbols in Tjsubscript𝑇𝑗T_{j} with these symbols.
|
| 184 |
+
|
| 185 |
+
From this process the coupling between Q1subscript𝑄1Q_{1}, and Q2subscript𝑄2Q_{2} is also clear:•Given X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} from Q2subscript𝑄2Q_{2}, for each j∈[k/2]𝑗delimited-[]𝑘2j\in[k/2] find all locations ℓℓ\ell such that Xℓ=2j−1subscript𝑋ℓ2𝑗1X_{\ell}=2j-1, or Xℓ=2jsubscript𝑋ℓ2𝑗X_{\ell}=2j. Call this set Tjsubscript𝑇𝑗T_{j}.•Perform the coupling between P2subscript𝑃2P_{2} and P1subscript𝑃1P_{1} from Lemma 25, after replacing {0,1}01\{0,1\} with {2j−1,2j}2𝑗12𝑗\{2j-1,2j\}.
|
| 186 |
+
|
| 187 |
+
Using the coupling defined above, by the linearity of expectations, we get:𝔼[d(X1m,Y1m)]=∑j=1k/2𝔼[d(X1|Tj|,Y1|Tj|)]=k2𝔼[d(X1R,Y1R)]≤k2⋅𝔼[4α2(R2−R)],𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚superscriptsubscript𝑗1𝑘2𝔼delimited-[]𝑑superscriptsubscript𝑋1subscript𝑇𝑗superscriptsubscript𝑌1subscript𝑇𝑗𝑘2𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑅superscriptsubscript𝑌1𝑅⋅𝑘2𝔼delimited-[]4superscript𝛼2superscript𝑅2𝑅\displaystyle\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]=\sum_{j=1}^{k/2}\mathbb{E}\left[d(X_{1}^{|T_{j}|},Y_{1}^{|T_{j}|})\right]=\frac{k}{2}\mathbb{E}\left[d(X_{1}^{R},Y_{1}^{R})\right]\leq\frac{k}{2}\cdot\mathbb{E}\left[4\alpha^{2}(R^{2}-R)\right],where R𝑅R is a binomial random variable with parameters m𝑚m and 2/k2𝑘2/k.Now, a simple exercise computing Binomial moments shows that for X∼Bin(n,s)similar-to𝑋𝐵𝑖𝑛𝑛𝑠X\sim Bin(n,s), 𝔼[X2−X]=s2(n2−n)≤n2s2.𝔼delimited-[]superscript𝑋2𝑋superscript𝑠2superscript𝑛2𝑛superscript𝑛2superscript𝑠2\mathbb{E}\left[X^{2}-X\right]=s^{2}(n^{2}-n)\leq n^{2}s^{2}. This implies that𝔼[R2−R]≤4m2k2.𝔼delimited-[]superscript𝑅2𝑅4superscript𝑚2superscript𝑘2\mathbb{E}\left[R^{2}-R\right]\leq\frac{4m^{2}}{k^{2}}.Plugging this, we obtain𝔼[d(X1m,Y1m)]≤k2⋅16α2m2k2=8m2α2k,𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅𝑘216superscript𝛼2superscript𝑚2superscript𝑘28superscript𝑚2superscript𝛼2𝑘\displaystyle\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]\leq\frac{k}{2}\cdot\frac{16\alpha^{2}m^{2}}{k^{2}}=\frac{8m^{2}\alpha^{2}}{k},proving the claim.
|
| 188 |
+
|
| 189 |
+
Lemma 24 holds for all values of t𝑡t, and α𝛼\alpha. The lemma can be strengthened for cases where α𝛼\alpha is small.
|
| 190 |
+
|
| 191 |
+
Given the coupling we defined in Section E.2.2 for proving Lemma 26, the coupling between Q1subscript𝑄1Q_{1}, and Q2subscript𝑄2Q_{2} uses the same technique in the last section for m≤k𝑚𝑘m\leq k.•Given X1msuperscriptsubscript𝑋1𝑚X_{1}^{m} from Q2subscript𝑄2Q_{2}, for each j∈[k/2]𝑗delimited-[]𝑘2j\in[k/2] find all locations ℓℓ\ell such that Xℓ=2j−1subscript𝑋ℓ2𝑗1X_{\ell}=2j-1, or Xℓ=2jsubscript𝑋ℓ2𝑗X_{\ell}=2j. Call this set Tjsubscript𝑇𝑗T_{j}.•Perform the coupling in Section E.2.2 between P2subscript𝑃2P_{2} and P1subscript𝑃1P_{1} on Tjsubscript𝑇𝑗T_{j}, after replacing {0,1}01\{0,1\} with {2j−1,2j}2𝑗12𝑗\{2j-1,2j\}.
|
| 192 |
+
|
| 193 |
+
Using the coupling defined above, by the linearity of expectations, we get:𝔼[d(X1m,Y1m)]𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚\displaystyle\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]=∑j=1k/2𝔼[d(X1|Tj|,Y1|Tj|)]absentsuperscriptsubscript𝑗1𝑘2𝔼delimited-[]𝑑superscriptsubscript𝑋1subscript𝑇𝑗superscriptsubscript𝑌1subscript𝑇𝑗\displaystyle=\sum_{j=1}^{k/2}\mathbb{E}\left[d(X_{1}^{|T_{j}|},Y_{1}^{|T_{j}|})\right]=k2𝔼[d(X1R,Y1R)]absent𝑘2𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑅superscriptsubscript𝑌1𝑅\displaystyle=\frac{k}{2}\mathbb{E}\left[d(X_{1}^{R},Y_{1}^{R})\right]≤k2⋅𝔼[64⋅(α4R5/2+α2R3/2+α5R3)],absent⋅𝑘2𝔼delimited-[]⋅64superscript𝛼4superscript𝑅52superscript𝛼2superscript𝑅32superscript𝛼5superscript𝑅3\displaystyle\leq\frac{k}{2}\cdot\mathbb{E}\left[64\cdot{\left({\alpha^{4}R^{5/2}+{\alpha^{2}R^{3/2}+\alpha^{5}R^{3}}}\right)}\right],where R∼Bin(m,2/k)similar-to𝑅Bin𝑚2𝑘R\sim{\rm Bin}(m,2/k).
|
| 194 |
+
|
| 195 |
+
We now bound the moments of Binomial random variables. The bound is similar in flavor to [1, Lemma 3] for Poisson random variables.
|
| 196 |
+
|
| 197 |
+
Proof For integer values of γ𝛾\gamma, this directly follows from the moment fomula for Binomial distribution [38], and for other γ≥1𝛾1\gamma\geq 1, by Jensen’s Inequality𝔼[Yγ]≤𝔼[(Y⌈γ⌉)γ⌈γ⌉]≤𝔼[(Y⌈γ⌉)]γ⌈γ⌉≤(C⌈γ⌉𝔼[Y]⌈γ⌉)γ⌈γ⌉=C′(𝔼[Y])γ,𝔼delimited-[]superscript𝑌𝛾𝔼delimited-[]superscriptsuperscript𝑌𝛾𝛾𝛾𝔼superscriptdelimited-[]superscript𝑌𝛾𝛾𝛾superscriptsubscript𝐶𝛾𝔼superscriptdelimited-[]𝑌𝛾𝛾𝛾superscript𝐶′superscript𝔼delimited-[]𝑌𝛾\mathbb{E}\left[Y^{\gamma}\right]\leq\mathbb{E}\left[{\left({Y^{{\lceil{\gamma}\rceil}}}\right)}^{\frac{\gamma}{{\lceil{\gamma}\rceil}}}\right]\leq\mathbb{E}\left[{\left({Y^{{\lceil{\gamma}\rceil}}}\right)}\right]^{\frac{\gamma}{{\lceil{\gamma}\rceil}}}\leq{\left({C_{{\lceil{\gamma}\rceil}}\mathbb{E}\left[Y\right]^{{\lceil{\gamma}\rceil}}}\right)}^{\frac{\gamma}{{\lceil{\gamma}\rceil}}}=C^{\prime}(\mathbb{E}\left[Y\right])^{\gamma},proving the lemma. Therefore, letting C=max{C5/2,C3,C3/2}𝐶subscript𝐶52subscript𝐶3subscript𝐶32C=\max\{C_{5/2},C_{3},C_{3/2}\}, we obtain𝔼[d(X1m,Y1m)]≤32kC⋅(α4(mk)5/2+α2(mk)3/2+α5(mk)3)𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚⋅32𝑘𝐶superscript𝛼4superscript𝑚𝑘52superscript𝛼2superscript𝑚𝑘32superscript𝛼5superscript𝑚𝑘3\displaystyle\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]\leq 32kC\cdot{\left({\alpha^{4}{\left({\frac{m}{k}}\right)}^{5/2}+{\alpha^{2}{\left({\frac{m}{k}}\right)}^{3/2}+{{\alpha^{5}{\left({\frac{m}{k}}\right)}}}^{3}}}\right)}Now, notice αmk<1𝛼𝑚𝑘1\alpha\sqrt{\frac{m}{k}}<1. Plugging this,𝔼[d(X1m,Y1m)]≤𝔼delimited-[]𝑑superscriptsubscript𝑋1𝑚superscriptsubscript𝑌1𝑚absent\displaystyle\mathbb{E}\left[d(X_{1}^{m},Y_{1}^{m})\right]\leq\ 32C⋅k⋅(α4(mk)5/2+α2(mk)3/2+α5(mk)3)⋅32𝐶𝑘superscript𝛼4superscript𝑚𝑘52superscript𝛼2superscript𝑚𝑘32superscript𝛼5superscript𝑚𝑘3\displaystyle 32C\cdot k\cdot{\left({\alpha^{4}{\left({\frac{m}{k}}\right)}^{5/2}+{\alpha^{2}{\left({\frac{m}{k}}\right)}^{3/2}+{{\alpha^{5}{\left({\frac{m}{k}}\right)}}}^{3}}}\right)}=\displaystyle=\ 32C⋅kα2⋅(α2mk⋅(mk)3/2+(mk)3/2+α3(mk)3/2(mk)3/2)⋅⋅32𝐶𝑘superscript𝛼2⋅superscript𝛼2𝑚𝑘superscript𝑚𝑘32superscript𝑚𝑘32superscript𝛼3superscript𝑚𝑘32superscript𝑚𝑘32\displaystyle 32C\cdot k\alpha^{2}\cdot{\left({\alpha^{2}\frac{m}{k}\cdot{\left({\frac{m}{k}}\right)}^{3/2}+{\left({\frac{m}{k}}\right)}^{3/2}+{{\alpha^{3}{\left({\frac{m}{k}}\right)}^{3/2}{\left({\frac{m}{k}}\right)}}}^{3/2}}\right)}≤\displaystyle\leq\ 96C⋅k(mk)3/2,⋅96𝐶𝑘superscript𝑚𝑘32\displaystyle 96C\cdot k{\left({\frac{m}{k}}\right)}^{3/2},completing the argument.
|
| 198 |
+
|
| 199 |
+
To prove Lemma 26, we need a few lemmas first:
|
| 200 |
+
|
| 201 |
+
Proof Pr(Z2≥l)=∑i=0t−l(ti)[(1+α2)i(1−α2)t−i+(1−α2)i(1+α2)t−i]Prsubscript𝑍2𝑙superscriptsubscript𝑖0𝑡𝑙binomial𝑡𝑖delimited-[]superscript1𝛼2𝑖superscript1𝛼2𝑡𝑖superscript1𝛼2𝑖superscript1𝛼2𝑡𝑖\Pr{\left({Z_{2}\geq l}\right)}=\sum_{i=0}^{t-l}{t\choose i}\left[{\left({\frac{1+\alpha}{2}}\right)}^{i}{\left({\frac{1-\alpha}{2}}\right)}^{t-i}+{\left({\frac{1-\alpha}{2}}\right)}^{i}{\left({\frac{1+\alpha}{2}}\right)}^{t-i}\right]Pr(Z1≥l)=2⋅∑i=0t−l(ti)(12)tPrsubscript𝑍1𝑙⋅2superscriptsubscript𝑖0𝑡𝑙binomial𝑡𝑖superscript12𝑡\Pr{\left({Z_{1}\geq l}\right)}=2\cdot\sum_{i=0}^{t-l}{t\choose i}{\left({\frac{1}{2}}\right)}^{t}Define F(l)=Pr(Z2≥l)−Pr(Z1≥l)𝐹𝑙Prsubscript𝑍2𝑙Prsubscript𝑍1𝑙F(l)=\Pr{\left({Z_{2}\geq l}\right)}-\Pr{\left({Z_{1}\geq l}\right)}. What we need to show is F(l)≥0,∀l≥t2formulae-sequence𝐹𝑙0for-all𝑙𝑡2F(l)\geq 0,\forall l\geq\frac{t}{2}. First we observe that Pr(Z2≥t2)=Pr(Z1≥t2)=1Prsubscript𝑍2𝑡2Prsubscript𝑍1𝑡21\Pr{\left({Z_{2}\geq\frac{t}{2}}\right)}=\Pr{\left({Z_{1}\geq\frac{t}{2}}\right)}=1 and Pr(Z2≥t)=(1+α2)t+(1−α2)t≥2(12)t=Pr(Z1≥t)Prsubscript𝑍2𝑡superscript1𝛼2𝑡superscript1𝛼2𝑡2superscript12𝑡Prsubscript𝑍1𝑡\Pr{\left({Z_{2}\geq t}\right)}=(\frac{1+\alpha}{2})^{t}+(\frac{1-\alpha}{2})^{t}\geq 2(\frac{1}{2})^{t}=\Pr{\left({Z_{1}\geq t}\right)}. Hence F(t2)=0,F(t)>0formulae-sequence𝐹𝑡20𝐹𝑡0F(\frac{t}{2})=0,F(t)>0.Letf(l)=F(l+1)−F(l)=−(tl)[(1+α2)l(1−α2)t−l+(1−α2)l(1+α2)t−l−2(12)t].𝑓𝑙𝐹𝑙1𝐹𝑙binomial𝑡𝑙delimited-[]superscript1𝛼2𝑙superscript1𝛼2𝑡𝑙superscript1𝛼2𝑙superscript1𝛼2𝑡𝑙2superscript12𝑡f(l)=F(l+1)-F(l)=-{{t\choose l}}\left[{\left({\frac{1+\alpha}{2}}\right)}^{l}{\left({\frac{1-\alpha}{2}}\right)}^{t-l}+{\left({\frac{1-\alpha}{2}}\right)}^{l}{\left({\frac{1+\alpha}{2}}\right)}^{t-l}-2{\left({\frac{1}{2}}\right)}^{t}\right].Let g(x)=(1+α2)x(1−α2)t−x+(1−α2)x(1+α2)t−x−2(12)t,x∈[t/2,t]formulae-sequence𝑔𝑥superscript1𝛼2𝑥superscript1𝛼2𝑡𝑥superscript1𝛼2𝑥superscript1𝛼2𝑡𝑥2superscript12𝑡𝑥𝑡2𝑡g(x)={\left({\frac{1+\alpha}{2}}\right)}^{x}{\left({\frac{1-\alpha}{2}}\right)}^{t-x}+{\left({\frac{1-\alpha}{2}}\right)}^{x}{\left({\frac{1+\alpha}{2}}\right)}^{t-x}-2{\left({\frac{1}{2}}\right)}^{t},x\in[t/2,t], thendg(x)dx=ln(1+α1−α)⋅[(1+α2)x(1−α2)t−x−(1−α2)x(1+α2)t−x]≥0𝑑𝑔𝑥𝑑𝑥⋅1𝛼1𝛼delimited-[]superscript1𝛼2𝑥superscript1𝛼2𝑡𝑥superscript1𝛼2𝑥superscript1𝛼2𝑡𝑥0\frac{dg(x)}{dx}=\ln{\left({\frac{1+\alpha}{1-\alpha}}\right)}\cdot\left[{\left({\frac{1+\alpha}{2}}\right)}^{x}{\left({\frac{1-\alpha}{2}}\right)}^{t-x}-{\left({\frac{1-\alpha}{2}}\right)}^{x}{\left({\frac{1+\alpha}{2}}\right)}^{t-x}\right]\geq 0
|
| 202 |
+
|
| 203 |
+
We know g(t/2)<0,g(t)>0formulae-sequence𝑔𝑡20𝑔𝑡0g(t/2)<0,g(t)>0, hence ∃x∗,s.t.g(x)≤0,∀x<x∗formulae-sequencesuperscript𝑥𝑠𝑡formulae-sequence𝑔𝑥0for-all𝑥superscript𝑥\exists x^{*},s.t.g(x)\leq 0,\forall x<x^{*} and g(x)≥0,∀x>x∗formulae-sequence𝑔𝑥0for-all𝑥superscript𝑥g(x)\geq 0,\forall x>x^{*}. Because f(l)=−(tl)g(l)𝑓𝑙binomial𝑡𝑙𝑔𝑙f(l)=-{t\choose l}g(l), hence ∃l∗,s.t.f(l)≤0,∀l≥l∗formulae-sequencesuperscript𝑙𝑠𝑡formulae-sequence𝑓𝑙0for-all𝑙superscript𝑙\exists l^{*},s.t.f(l)\leq 0,\forall l\geq l^{*} and f(l)≥0,∀l<l∗.formulae-sequence𝑓𝑙0for-all𝑙superscript𝑙f(l)\geq 0,\forall l<l^{*}.Therefore, F(l)𝐹𝑙F(l) first increases and then decreases, which means F(l)𝐹𝑙F(l) achieves its minimum at t2𝑡2\frac{t}{2} or t𝑡t. Hence F(l)≥0𝐹𝑙0F(l)\geq 0, completing the proof.
|
| 204 |
+
|
| 205 |
+
For stochastic dominance, the following definition [20] will be useful.
|
| 206 |
+
|
| 207 |
+
The following lemma states a nice relationship between stochastic dominance and monotone coupling, which is provided as Theorem 7.9 in [20]
|
| 208 |
+
|
| 209 |
+
By Lemma 31, there is a monotone coupling between Z1=max{N1,t−N1}subscript𝑍1subscript𝑁1𝑡subscript𝑁1Z_{1}=\max\{N_{1},t-N_{1}\} and Z2=max{N2,t−N2}subscript𝑍2subscript𝑁2𝑡subscript𝑁2Z_{2}=\max\{N_{2},t-N_{2}\}. Suppose the coupling is PZ1,Z2csubscriptsuperscript𝑃𝑐subscript𝑍1subscript𝑍2P^{c}_{Z_{1},Z_{2}}, we define the coupling between X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} and Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t} as following:
|
| 210 |
+
|
| 211 |
+
1.Generate X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} according to P2subscript𝑃2P_{2} and count the number of one’s in X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} as n1subscript𝑛1n_{1}.2.Generate n2subscript𝑛2n_{2} according to Pc[Z2|Z1=max{n1,t−n1}]superscript𝑃𝑐delimited-[]conditionalsubscript𝑍2subscript𝑍1subscript𝑛1𝑡subscript𝑛1P^{c}[Z_{2}|Z_{1}=\max\{n_{1},t-n_{1}\}].3.If n1>t−n1subscript𝑛1𝑡subscript𝑛1n_{1}>t-n_{1}, choose n2−n1subscript𝑛2subscript𝑛1n_{2}-n_{1} of the zero’s in X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} uniformly at random and change them to one’s to get Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t}4.If n1<t−n1subscript𝑛1𝑡subscript𝑛1n_{1}<t-n_{1}, choose n2−(t−n1)subscript𝑛2𝑡subscript𝑛1n_{2}-(t-n_{1}) of the one’s in X1tsuperscriptsubscript𝑋1𝑡X_{1}^{t} uniformly at random and change them to zero’s to get Y1tsuperscriptsubscript𝑌1𝑡Y_{1}^{t}5.If n1=t−n1subscript𝑛1𝑡subscript𝑛1n_{1}=t-n_{1}, break ties uniformly at random and do the corresponding action.6.Output (X1t,Y1t)superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡(X_{1}^{t},Y_{1}^{t})
|
| 212 |
+
|
| 213 |
+
Since the coupling is monotone, and dTV(X1t,Y1t)=Z2−Z1subscript𝑑𝑇𝑉superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡subscript𝑍2subscript𝑍1d_{TV}(X_{1}^{t},Y_{1}^{t})=Z_{2}-Z_{1} for every pair of (X1t,Y1t)superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡(X_{1}^{t},Y_{1}^{t}), we get:𝔼[dTV(X1t,Y1t)]=𝔼[max{N2,t−N2}]−𝔼[max{N1,t−N1}].𝔼delimited-[]subscript𝑑𝑇𝑉superscriptsubscript𝑋1𝑡superscriptsubscript𝑌1𝑡𝔼delimited-[]subscript𝑁2𝑡subscript𝑁2𝔼delimited-[]subscript𝑁1𝑡subscript𝑁1\mathbb{E}\left[d_{TV}(X_{1}^{t},Y_{1}^{t})\right]=\mathbb{E}\left[\max\{N_{2},t-N_{2}\}\right]-\mathbb{E}\left[\max\{N_{1},t-N_{1}\}\right].
|
| 214 |
+
|
| 215 |
+
Hence, to show lemma 26, it suffices to show the following lemma:
|
| 216 |
+
|
| 217 |
+
Proof 𝔼[max{N2,t−N2}]𝔼delimited-[]subscript𝑁2𝑡subscript𝑁2\displaystyle\mathbb{E}\left[\max\{N_{2},t-N_{2}\}\right]=\displaystyle=\ ∑0≤ℓ≤t/2(t/2+ℓ)(tt2−ℓ)((1−α2)t2−ℓ(1+α2)t2+ℓ+(1+α2)t2−ℓ(1−α2)t2+ℓ)subscript0ℓ𝑡2𝑡2ℓbinomial𝑡𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓ\displaystyle\sum_{0\leq\ell\leq t/2}(t/2+\ell){t\choose\frac{t}{2}-\ell}{\left({{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell}}\right)}=\displaystyle=\ t2+∑0≤ℓ≤t/2ℓ(tt2−ℓ)((1−α2)t2−ℓ(1+α2)t2+ℓ+(1+α2)t2−ℓ(1−α2)t2+ℓ).𝑡2subscript0ℓ𝑡2ℓbinomial𝑡𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓ\displaystyle\frac{t}{2}+\sum_{0\leq\ell\leq t/2}\ell{t\choose\frac{t}{2}-\ell}{\left({{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell}}\right)}.
|
| 218 |
+
|
| 219 |
+
Consider a fixed value of t𝑡t. Letf(α)=∑0≤ℓ≤t/2ℓ(tt2−ℓ)((1−α2)t2−ℓ(1+α2)t2+ℓ+(1+α2)t2−ℓ(1−α2)t2+ℓ).𝑓𝛼subscript0ℓ𝑡2ℓbinomial𝑡𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓf(\alpha)=\sum_{0\leq\ell\leq t/2}\ell{t\choose\frac{t}{2}-\ell}{\left({{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell}}\right)}.
|
| 220 |
+
|
| 221 |
+
The first claim is that this expression is minimized at α=0𝛼0\alpha=0. This is because of the monotone coupling between Z1subscript𝑍1Z_{1} and Z2subscript𝑍2Z_{2}, which makes 𝔼[Z2]≥𝔼[Z1]𝔼delimited-[]subscript𝑍2𝔼delimited-[]subscript𝑍1\mathbb{E}\left[Z_{2}\right]\geq\mathbb{E}\left[Z_{1}\right]. This implies that f′(0)=0superscript𝑓′00f^{\prime}(0)=0, and by intermediate value theorem, there is β∈[0,α]𝛽0𝛼\beta\in[0,\alpha], such thatf(α)=f(0)+12α2⋅f′′(β).𝑓𝛼𝑓0⋅12superscript𝛼2superscript𝑓′′𝛽\displaystyle f(\alpha)=f(0)+\frac{1}{2}\alpha^{2}\cdot f^{\prime\prime}(\beta).(21)We will now bound this second derivative.To further simplify, letg(α)=(1−α2)t2−ℓ(1+α2)t2+ℓ+(1+α2)t2−ℓ(1−α2)t2+ℓ.𝑔𝛼superscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓg(\alpha)={\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell}.Differentiating g(α)𝑔𝛼g(\alpha), twice with respect to α𝛼\alpha, we obtain, g′′(α)=superscript𝑔′′𝛼absent\displaystyle g^{\prime\prime}(\alpha)=116⋅(α2(t2−t)−4αℓ(t−1)+4ℓ2−t)(1−α2)t2−ℓ−2(1+α2)t2+ℓ−2⋅116superscript𝛼2superscript𝑡2𝑡4𝛼ℓ𝑡14superscriptℓ2𝑡superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2\displaystyle~{}\frac{1}{16}\cdot{\left({\alpha^{2}(t^{2}-t)-4\alpha\ell(t-1)+4\ell^{2}-t}\right)}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}+116⋅(α2(t2−t)+4αℓ(t−1)+4ℓ2−t)(1+α2)t2−ℓ−2(1−α2)t2+ℓ−2.⋅116superscript𝛼2superscript𝑡2𝑡4𝛼ℓ𝑡14superscriptℓ2𝑡superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2\displaystyle+\frac{1}{16}\cdot{\left({\alpha^{2}(t^{2}-t)+4\alpha\ell(t-1)+4\ell^{2}-t}\right)}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}.
|
| 222 |
+
|
| 223 |
+
For any ℓ≥0ℓ0\ell\geq 0,(1+α2)t2−ℓ−2(1−α2)t2+ℓ−2≤(1−α2)t2−ℓ−2(1+α2)t2+ℓ−2.superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}\leq{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}.
|
| 224 |
+
|
| 225 |
+
Therefore g′′(α)superscript𝑔′′𝛼g^{\prime\prime}(\alpha) can be bound by,g′′(α)≤116⋅(α2t2+4ℓ2)((1−α2)t2−ℓ−2(1+α2)t2+ℓ−2+(1−α2)t2−ℓ−2(1+α2)t2+ℓ−2).superscript𝑔′′𝛼⋅116superscript𝛼2superscript𝑡24superscriptℓ2superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2superscript1𝛼2𝑡2ℓ2\displaystyle g^{\prime\prime}(\alpha)\leq\frac{1}{16}\cdot{\left({\alpha^{2}t^{2}+4\ell^{2}}\right)}{\left({{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}+{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell-2}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell-2}}\right)}.
|
| 226 |
+
|
| 227 |
+
When α<14𝛼14\alpha<\frac{1}{4}, (1−α2)2>12superscript1superscript𝛼2212(1-\alpha^{2})^{2}>\frac{1}{2}, and we can further bound the above expression byg′′(α)≤2⋅(α2t2+4ℓ2)((1−α2)t2−ℓ(1+α2)t2+ℓ+(1−α2)t2−ℓ(1+α2)t2+ℓ).superscript𝑔′′𝛼⋅2superscript𝛼2superscript𝑡24superscriptℓ2superscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓsuperscript1𝛼2𝑡2ℓg^{\prime\prime}(\alpha)\leq 2\cdot{\left({\alpha^{2}t^{2}+4\ell^{2}}\right)}{\left({{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1-\alpha}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\alpha}{2}}\right)}^{\frac{t}{2}+\ell}}\right)}.
|
| 228 |
+
|
| 229 |
+
Suppose X𝑋X is a Bin(t,1+β2)Bin𝑡1𝛽2{\rm Bin}(t,\frac{1+\beta}{2}) distribution. Then, for any ℓ>0ℓ0\ell>0,Pr(|X−t2|=ℓ)=(tt2−ℓ)((1−β2)t2−ℓ(1+β2)t2+ℓ+(1+β2)t2−ℓ(1−β2)t2+ℓ).Pr𝑋𝑡2ℓbinomial𝑡𝑡2ℓsuperscript1𝛽2𝑡2ℓsuperscript1𝛽2𝑡2ℓsuperscript1𝛽2𝑡2ℓsuperscript1𝛽2𝑡2ℓ\Pr{\left({\left|X-\frac{t}{2}\right|=\ell}\right)}={t\choose\frac{t}{2}-\ell}{\left({{\left({\frac{1-\beta}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1+\beta}{2}}\right)}^{\frac{t}{2}+\ell}+{\left({\frac{1+\beta}{2}}\right)}^{\frac{t}{2}-\ell}{\left({\frac{1-\beta}{2}}\right)}^{\frac{t}{2}+\ell}}\right)}.Therefore, we can bound (21), byf′′(β)≤2⋅(β2t2𝔼[|X−t2|]+4𝔼[|X−t2|3]).superscript𝑓′′𝛽⋅2superscript𝛽2superscript𝑡2𝔼delimited-[]𝑋𝑡24𝔼delimited-[]superscript𝑋𝑡23f^{\prime\prime}(\beta)\leq 2\cdot{\left({\beta^{2}t^{2}\mathbb{E}\left[\left|X-\frac{t}{2}\right|\right]+4\mathbb{E}\left[\left|X-\frac{t}{2}\right|^{3}\right]}\right)}.For X∼Bin(m,r)similar-to𝑋Bin𝑚𝑟X\sim{\rm Bin}(m,r),𝔼[(X−mr)2]=𝔼delimited-[]superscript𝑋𝑚𝑟2absent\displaystyle\mathbb{E}\left[{\left({X-mr}\right)}^{2}\right]=mr(1−r)≤m4, and𝑚𝑟1𝑟𝑚4 and\displaystyle mr(1-r)\leq\frac{m}{4},\text{ and }𝔼[(X−mr)4]=𝔼delimited-[]superscript𝑋𝑚𝑟4absent\displaystyle\mathbb{E}\left[{\left({X-mr}\right)}^{4}\right]=mr(1−r)(3r(1−r)(m−2)+1)≤3m24.𝑚𝑟1𝑟3𝑟1𝑟𝑚213superscript𝑚24\displaystyle mr(1-r){\left({3r(1-r)(m-2)+1}\right)}\leq 3\frac{m^{2}}{4}.We bound each term using these moments,𝔼[|X−t2|]≤𝔼[(X−t2)2]1/2=𝔼delimited-[]𝑋𝑡2𝔼superscriptdelimited-[]superscript𝑋𝑡2212absent\displaystyle\mathbb{E}\left[\left|X-\frac{t}{2}\right|\right]\leq\mathbb{E}\left[{\left({X-\frac{t}{2}}\right)}^{2}\right]^{1/2}=(t(1−β2)4+(tβ2)2)1/2≤t+tβ.superscript𝑡1superscript𝛽24superscript𝑡𝛽2212𝑡𝑡𝛽\displaystyle{\left({t\frac{(1-\beta^{2})}{4}+{\left({\frac{t\beta}{2}}\right)}^{2}}\right)}^{1/2}\leq\sqrt{t}+{t\beta}.We similarly bound the next term,𝔼[|X−t2|3]≤𝔼[(X−t2)4]3/4≤𝔼delimited-[]superscript𝑋𝑡23𝔼superscriptdelimited-[]superscript𝑋𝑡2434absent\displaystyle\mathbb{E}\left[\left|X-\frac{t}{2}\right|^{3}\right]\leq\mathbb{E}\left[{\left({X-\frac{t}{2}}\right)}^{4}\right]^{3/4}\leq𝔼[(X−t(1+β)2+tβ2)4]3/4𝔼superscriptdelimited-[]superscript𝑋𝑡1𝛽2𝑡𝛽2434\displaystyle\mathbb{E}\left[{\left({X-\frac{t(1+\beta)}{2}+\frac{t\beta}{2}}\right)}^{4}\right]^{3/4}≤\displaystyle\leq8(𝔼[(X−t(1+β)2)4]3/4+(tβ2)3)8𝔼superscriptdelimited-[]superscript𝑋𝑡1𝛽2434superscript𝑡𝛽23\displaystyle 8{\left({\mathbb{E}\left[{\left({X-\frac{t(1+\beta)}{2}}\right)}^{4}\right]^{3/4}+{\left({\frac{t\beta}{2}}\right)}^{3}}\right)}≤\displaystyle\leq8(t3/2+(tβ2)3),8superscript𝑡32superscript𝑡𝛽23\displaystyle 8{\left({t^{3/2}+{\left({\frac{t\beta}{2}}\right)}^{3}}\right)},where we use (a+b)4≤8(a4+b4)superscript𝑎𝑏48superscript𝑎4superscript𝑏4(a+b)^{4}\leq 8(a^{4}+b^{4}).Therefore,f′′(β)≤64⋅(β2t5/2+t3/2+(tβ)3)≤64⋅(α2t5/2+t3/2+(tα)3)superscript𝑓′′𝛽⋅64superscript𝛽2superscript𝑡52superscript𝑡32superscript𝑡𝛽3⋅64superscript𝛼2superscript𝑡52superscript𝑡32superscript𝑡𝛼3f^{\prime\prime}(\beta)\leq 64\cdot{\left({\beta^{2}t^{5/2}+{t^{3/2}+{(t\beta)}^{3}}}\right)}\leq 64\cdot{\left({\alpha^{2}t^{5/2}+{t^{3/2}+{(t\alpha)}^{3}}}\right)}As a consequence,𝔼[max{N2,t−N2}]−𝔼[max{N1,t−N1}]=α2f′′(β)≤64⋅(α2t3/2+α4t5/2+α5t3).𝔼delimited-[]subscript𝑁2𝑡subscript𝑁2𝔼delimited-[]subscript𝑁1𝑡subscript𝑁1superscript𝛼2superscript𝑓′′𝛽⋅64superscript𝛼2superscript𝑡32superscript𝛼4superscript𝑡52superscript𝛼5superscript𝑡3\mathbb{E}\left[\max\{N_{2},t-N_{2}\}\right]-\mathbb{E}\left[\max\{N_{1},t-N_{1}\}\right]=\alpha^{2}f^{\prime\prime}(\beta)\leq 64\cdot(\alpha^{2}t^{3/2}+\alpha^{4}t^{5/2}+\alpha^{5}t^{3}).completing the proof.
|
1707.05495v3.txt
ADDED
|
@@ -0,0 +1,284 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Abstract}
|
| 2 |
+
\label{sec:abstract}
|
| 3 |
+
We propose a recurrent neural network (RNN) based model for image multi-label classification. Our model uniquely integrates and learning of visual attention and Long Short Term Memory (LSTM) layers, which jointly learns the labels of interest and their co-occurrences, while the associated image regions are visually attended. Different from existing approaches utilize either model in their network architectures, training of our model does not require pre-defined label orders. Moreover, a robust inference process is introduced so that prediction errors would not propagate and thus affect the performance. Our experiments on NUS-WISE and MS-COCO datasets confirm the design of our network and its effectiveness in solving multi-label classification problems.
|
| 4 |
+
\section{Introduction}
|
| 5 |
+
\label{sec:intro}
|
| 6 |
+
|
| 7 |
+
Multi-label classification has been an important and practical research topic, since it needs to assign more than one label to each observed instance. From machine learning, data mining, and computer vision, a variety of applications benefit from the development and success of multi-label classification algorithms~\cite{zhang2014review,boutell2004learning,schapire2000boostexter,godbole2004discriminative,lin2014microsoft,kang2016object,kang2016t,boutell2004learning,shao2016slicing}. A fundamental and challenging issue for multi-label classification is to identify and recover the co-occurrence of multiple labels, so that satisfactory prediction accuracy can be expected.
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
Recently, development of deep convolutional neural networks (CNN)~\cite{krizhevsky2012imagenet,szegedy2015going,simonyan2014very,he2016deep} have made a remarkable progress in several research fields. Due to its ability of representation learning with prediction guarantees, CNNs contribute to the recent success in image classification tasks and beyond~\cite{deng2009imagenet,fei2007learning,griffin2007caltech}.
|
| 11 |
+
Despite its effectiveness, how to extend CNNs for solving multi-label classification problems is still a research direction to explore.
|
| 12 |
+
|
| 13 |
+
While a number of research works~\cite{zhang2006multilabel,nam2014large,gong2013deep,wei2014cnn,wang2016cnn} start to advance the CNN architecture for multi-label classification, CNN-RNN~\cite{wang2016cnn} embeds image and semantic structures by projecting both features into a joint embedding space. By further utilizing the component of Long Short Term Memory (LSTM)~\cite{hochreiter1997long}, a recurrent neural network (RNN) structure is introduced to memorize long-term label dependency. As a result, CNN-RNN exhibits promising multi-label classification performance with cross-label correlation implicitly preserved.
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
\begin{figure*}[t!]
|
| 17 |
+
\centering
|
| 18 |
+
\includegraphics[width=0.95\textwidth]{./intro_fig.png}
|
| 19 |
+
\caption{Illustration of our proposed model for multi-label classification. Note that the joint learning of attention and LSTM layers allows us to identify the label dependency without using any predetermined label order, while the corresponding image regions of interest can be attended to accordingly.}
|
| 20 |
+
\label{fig:1}
|
| 21 |
+
\end{figure*}
|
| 22 |
+
|
| 23 |
+
Unfortunately, the above frameworks suffer from the following three different problems. First, due to the use of LSTM, a pre-defined label order is required during training. Take~\cite{wang2016cnn} for example, its label order is determined by the frequencies of labels observed from the training data. In practice, such pre-defined orders of label prediction might not reflect proper label dependency. For example, based on the number of label occurrences, one might obtain the label sequence as \{\emph{sea, sun, fish}\}. However, it is obvious that \emph{fish} is less semantically relevant to \emph{sun} than \emph{sea}. For better learning and prediction of such labels, the order of \{\emph{sea, fish, sun}\} should be considered. On the other hand,~\cite{jin2016annotation} consider four experimental settings with different label orders: alphabetical order, random order, frequency-first order and rare-first order (note that rare-first is exactly the reverse of frequency-first). It is concluded in~\cite{jin2016annotation} that the rare-first order results in the best performance. Later we will conduct thorough experiments for verification, and show that orders automatically learned by our model would be desirable.
|
| 24 |
+
|
| 25 |
+
The second concern of the above methods is that, labels of objects which are in smaller scales/sizes in images would often be more difficult to be recovered. As a possible solution, attention map~\cite{xu2015show} has been widely considered in image captioning \cite{xu2015show}, image question answering \cite{yang2016stacked}, and segmentation \cite{hong2016learning}. Extracted by different kernels from a certain convolutional layer in CNN, the corresponding feature maps contain rich information of different patterns from the input image. By further attending on such feature maps, the resulting attention map is able to identify important components or objects in an image. By exploiting the label co-occurrence between the associated objects in different scales or patterns, the above problem can be properly alleviated. However, this technique could not be easily applied to RNN-based methods for multi-label problems. As noted above, such methods determine the label order based on the occurrence frequency. For example, the class \emph{person} may appear more often than \emph{horse} in an image collection, and thus the label sequence would be derived as \{\emph{person, horse}\}. Even if the image region of \emph{horse} is typically larger than that of \emph{person}, it might not assist in identifying the rider on its back (i.e., requiring the prediction order as \{\emph{horse, person}\}).
|
| 26 |
+
|
| 27 |
+
Thirdly, inconsistency between training and testing procedures would often be undesirable for solving multi-label classification tasks. To be more precise, during the training phase, the labels to be produced at each recurrent layer is selected from the ground truth list during the training phase; however, the labels to be predicted during testing are selected from the entire label set. In other words, if a label is incorrectly predicted during a time step during prediction, such an error would propagate during the recurrent process and thus affect the results.
|
| 28 |
+
|
| 29 |
+
To resolve the above problems, we present a novel deep learning framework of visually attended RNN, which consists of visual attention and LSTM models as shown in Fig.~\ref{fig:1}. In particular, we propose a confidence-ranked LSTM which reflects the label dependency with the introduced visual attention model. Our joint learning framework with the introduced attention model allows us to identify the regions of interest associated with each label. As a result, the order of labels can be automatically learned without any prior knowledge or assumption. As verified later in the experiments, even the objects are presented in small scales in the input image, the corresponding image regions would still be visually attended. More importantly, our network architecture can be applied to both training and testing, and thus the aforementioned inconsistency issue is addressed.
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
The main contributions of this paper are listed below: %
|
| 33 |
+
\begin{itemize}
|
| 34 |
+
\item Without pre-determining the label order for prediction, our method is able to sequentially learn the label dependency using the introduced LSTM model.
|
| 35 |
+
\item The introduced attention model in our architecture allows us to focus on image regions of interests associated with each label, so that improved prediction can be expected even if the objects are in smaller sizes.
|
| 36 |
+
\item By jointly learning attention and LSTM models in a unified network architecture, our model performs favorably against state-of-the-art deep learning approaches on multi-label classification, even if the ground truth label might not be correctly presented during training.
|
| 37 |
+
\end{itemize}
|
| 38 |
+
\section{Related Work}
|
| 39 |
+
\label{sec:rewo}
|
| 40 |
+
We first review the development of multi-label classification approaches. Intuitively, the simplest way to deal with multi-label classification problems is to decompose them into multiple binary classification tasks~\cite{tsoumakas2006multi}. Despite its simplicity, such techniques cannot identify the relationship between labels.
|
| 41 |
+
|
| 42 |
+
To learn the interdependency between labels for multi-label classification, approaches based on classifier chains~\cite{read2011classifier} were proposed, which capture label dependency by conditional product of probabilities. However, in addition to high computation cost when dealing with a larger number of labels, classifier chains have limited ability to capture the high order correlations between labels. On the other hand, probabilistic graphical model based methods \cite{li2014multi,li2016conditional} learn label dependencies with graphical structure, and latent space methods \cite{yeh2017learning,bhatia2015sparse} choose to project features and labels into a common latent space. Approaches like \cite{yang2016exploit} further utilize additional information like bounding box annotations for learning their models.
|
| 43 |
+
|
| 44 |
+
\begin{figure*}[t!]
|
| 45 |
+
\centering
|
| 46 |
+
\includegraphics[width=0.95\textwidth]{./AAAI.png}
|
| 47 |
+
\caption{Architecture of our proposed network architecture for multi-label classification. Note that $\fcnn$, $\fatt$, and $\flstm$ indicate the layers for feature mapping, attention, and label prediction, respectively. $v_{feat}$ is a set of feature maps extracted from $\fcnn$, and the vector output $v_{prob}$ represents the preliminary label prediction of $\fcnn$ to initiate LSTM prediction. $z$ and $h$ are the attention context vector and the LSTM hidden state, respectively. Finally, $p$ denotes the vector output indicating the label probability, updated at every time step.}
|
| 48 |
+
|
| 49 |
+
\label{fig:2}
|
| 50 |
+
\end{figure*}
|
| 51 |
+
|
| 52 |
+
With the recent progress of neural networks and deep learning, BP-MLL~\cite{zhang2006multilabel} is among the first to utilize neural network architectures to solve multi-label classification. It views each output node as a binary classification task, and relies on the architecture and loss function to exploit the dependency across labels. It was later extended by~\cite{nam2014large} with state-of-the-art learning techniques such as dropout.
|
| 53 |
+
|
| 54 |
+
Furthermore, state-of-the-art DNN based multi-label algorithms have proposed different loss functions or architectures \cite{gong2013deep,wei2014cnn,hu2016learning}. For example, Gong et al.~\cite{gong2013deep} design a rank-based loss and compensate those with lowest ranks ones, Wei et al.~\cite{wei2014cnn} generate multi-label candidates on several grids and combine results with max-pooling, and Hu et al. propose structured inference NN \cite{hu2016learning}, which uses concept layers modeled with label graphs.
|
| 55 |
+
|
| 56 |
+
Recurrent neural networks (RNN) is a type of NN structure, which is able to learn the sequential connections and internal states. When RNN has been successfully applied to sequentially learn and predict multiple labels of the data, it typically requires a large number of parameters to observe the above association. Nevertheless RNN with LSTM \cite{hochreiter1997long} is an effective method to exploit label correlation. Researches in different fields also apply RNNs to deal with sequential prediction tasks which utilize the long-term dependency in a sequence, such as image captioning \cite{mao2014deep}, speech recognition \cite{graves2013speech}, language modeling \cite{sundermeyer2012lstm}, and word embedding learning \cite{le2015compositional}. Among multi-label classification, CNN-RNN~\cite{wang2016cnn} is a representative work with promising performance. However, CNN-RNN requires a pre-defined label order for learning, and its limitation to recognize labels corresponding to objects in smaller sizes would be the major concern.
|
| 57 |
+
\section{Our Proposed Method}
|
| 58 |
+
We first define the goal of the task in this paper. Let $\D=\{(\x_i,\y_i)\}_{i=1}^N = \{\X,\Y\}$ denote the training data, where $\X \in \R^{d\times N}$ indicates a set of $N$ training instances in a $d$ dimensional space. The matrix $\Y \in \R^{\C\times N}$ indicates the associated multi-label matrix, where $\C$ is the number of labels of interest. In other words, each dimension in $\y_c$ is a binary value indicating whether $\x_i$ belongs to the corresponded label~$\c$. For multi-label classification, the goal is to predict the multi-label vector $\hy$ for a test input $\hx$.
|
| 59 |
+
\subsection{A Brief Review of CNN-RNN}
|
| 60 |
+
CNN-RNN~\cite{wang2016cnn} is a recent deep learning based model for multi-label classification. Since our method can be viewed as an extension, it is necessary to briefly review this model and explain the potential limitations.
|
| 61 |
+
|
| 62 |
+
As noted earlier, exploiting label dependency would be the key to multi-label classification. Among the first CNN works for tackling this issue, CNN-RNN is composed of a CNN feature mapping layer and a Long Short-Term Memory (LSTM) inference layer. While such an architecture jointly projects the input image and its label vector into a common latent space, the LSTM particularly recovers the correlation between labels. As a result, outputs of multiple labels can be produced at the prediction layer via nearest neighbor search.
|
| 63 |
+
|
| 64 |
+
Despite its promising performance, CNN-RNN requires a predefined label order for training their models. In addition to the lack of robustness in learning optimal label orders, as confirmed in~\cite{wang2016cnn}, labels of objects in smaller sizes would be difficult to predict if their visual attention information is not properly utilized. Therefore, how to introduce the flexibility in learning optimal label order while jointly exploiting the associated visual information would be the focuses of our proposed work.
|
| 65 |
+
\subsection{Order-Free RNN with Visual Attention}
|
| 66 |
+
As illustrated in Fig.~\ref{fig:2}, our proposed model for multi-label classification has three major components: feature mapping layer $\fcnn$, attention layer $\fatt$, and LSTM inference layer $\flstm$. The feature mapping layer $\fcnn$ extracts the visual features from the input image $\x_i$ using a pre-trained CNN model. With the attention layer $\fatt$, we would observe a set of feature maps $v_{feat}$, in which each map is learned to describe the corresponding layer of image semantic information. The output of $\fatt$ then goes through the LSTM inference process via $\flstm$, followed by a final prediction layer for producing the label outputs.
|
| 67 |
+
|
| 68 |
+
During the LSTM inference process, the hidden state vector $\h$ would update the attention layer $\fatt$ with the label inference from the previous time step, guiding the network to visually attend the next region of interest in the input image. Thus, such network designs allow one to exploit \emph{label correlation} using the associated visual information. As a result, the optimal order of label sequences can be automatically observed. In the following subsections, we will detail each component of our proposed model.\\
|
| 69 |
+
\subsubsection{Feature Mapping Layer $\fcnn$}
|
| 70 |
+
The feature mapping layer $\fcnn$ first extracts visual features $v_{feat}$ by pre-trained CNN models. Following the design in~\cite{liu2016semantic}, we add a fully-connected layer with the output dimension of $c$ after the convolutional layers, which produces the predicted probability $\v_{prob}$ for each label as an additional feature vector. Therefore, the CNN probability outputs can be viewed as preliminary label prediction.
|
| 71 |
+
|
| 72 |
+
With the ground truth labels given during training (note that positive labels as 1 and negative ones as 0), the learning of $\fcnn$ would update the parameters of the fully-connected layer via observing log-likelihood cross-entropy, while the parameters of the pre-trained CNN remain fixed. By concatenating $m$ feature maps of dimension $k$ in $v_{feat}$, we convert $v_{feat}$ into a single input vector learning visual attention. As a result, the output probability vector of $\fcnn$ can be expressed as follows:
|
| 73 |
+
\begin{equation}
|
| 74 |
+
\label{eq:feats}
|
| 75 |
+
\begin{aligned}
|
| 76 |
+
\V = [\V_{feat}, \v_{prob}]
|
| 77 |
+
\end{aligned}
|
| 78 |
+
\end{equation}
|
| 79 |
+
|
| 80 |
+
\begin{equation}
|
| 81 |
+
\label{eq:V_feat}
|
| 82 |
+
\begin{aligned}
|
| 83 |
+
\V_{feat} = [\v_1, ..., \v_m], \v_i \in \R^k
|
| 84 |
+
\end{aligned}
|
| 85 |
+
\end{equation}
|
| 86 |
+
|
| 87 |
+
\begin{equation}
|
| 88 |
+
\label{eq:V_prob}
|
| 89 |
+
\begin{aligned} \v_{prob} \in [0, 1]^c.
|
| 90 |
+
\end{aligned}
|
| 91 |
+
\end{equation}
|
| 92 |
+
\subsubsection{Attention Layer $\fatt$}
|
| 93 |
+
When predicting multiple labels from an input image, one might suffer from the fact that labels of objects in smaller sizes are not properly identified. For example, \emph{person} typically occupies a significant portion of an input image, while \emph{birds} might appear in smaller sizes and around the corners.
|
| 94 |
+
|
| 95 |
+
In order to alleviate this problem, we introduce an attention layer $\fatt$ to our proposed architecture, with the goal of focusing on proper image regions when predicting the associated labels. Inspired by Xu et al.~\cite{xu2015show}, who advocated a soft attention-based image caption generator, we advance the same network component in our framework. For multi-label classification, this allows us to focus and describe the image regions of interest during prediction, while implicitly exploiting the label co-occurrence information. In our proposed framework, this attention layer would generate a context vector consisting of weights for each feature map, so that the attended image region can be obtained during each iteration. Later we will also explain that, with such network designs, we can observe optimal label order when learning our RNN-based multi-label classification model.
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
Following the structure of multi-layer perceptron~\cite{xu2015show}, our attention layer $\fatt$ is conditioned on the previous hidden state $\h_{t-1}$. For each $\v_i$ in Eq.~\ref{eq:V_feat}, the attention layer generates a weight $\alpha_i$, $\alpha_i \in [0, 1]$, which represents the importance weight of feature $i$ in the input image, and predicts the label at this time step. To be more specific, we have:
|
| 99 |
+
\begin{equation}
|
| 100 |
+
\label{eq:atten_weight}
|
| 101 |
+
\begin{aligned}
|
| 102 |
+
\epsilon_{i,t} = f_{att}(\v_i, \h_{t-1}) \\
|
| 103 |
+
\alpha_{i,t} = \frac{e^{\epsilon_{i,t}} }{ \sum_{j=1}^m e^{\epsilon_{j,t}}},
|
| 104 |
+
\end{aligned}
|
| 105 |
+
\end{equation}
|
| 106 |
+
where $f_{att}$ is the same as the model in~\cite{xu2015show}, and $\h_{t-1}$ would be detailed later in next section.
|
| 107 |
+
|
| 108 |
+
With $\alpha_{i,t}$, we derive the context vector $\z_t$ with the soft attention mechanism:
|
| 109 |
+
\begin{equation}
|
| 110 |
+
\label{eq:context}
|
| 111 |
+
\begin{aligned}
|
| 112 |
+
\z_t = \sum_{i=1}^m \alpha_{i,t}\v_i.
|
| 113 |
+
\end{aligned}
|
| 114 |
+
\end{equation}
|
| 115 |
+
|
| 116 |
+
Later, our experiments will visualize and evaluate the contribution of our attention model for multi-label classification.\\
|
| 117 |
+
|
| 118 |
+
{\color{blue}
|
| 119 |
+
\SetKwInOut{Parameter}{Parameter}
|
| 120 |
+
\begin{algorithm}[t]
|
| 121 |
+
\label{alg:training}
|
| 122 |
+
\DontPrintSemicolon
|
| 123 |
+
\caption{Training of Our Proposed Model}
|
| 124 |
+
\KwIn{Feature maps $\mathbf{\V}_{feat}$ = [$\mathbf{\v}_1$,...,$\mathbf{\v}_m$] and label vector $\mathbf{\y}$ of an image}
|
| 125 |
+
\Parameter{Resnet fully-connected layer $\mathbf{\theta}_R$, attention layer $\mathbf{\theta}_a$, LSTM layer $\mathbf{\theta}_L$ and prediction layer $\mathbf{\theta}_p$, iteration number $iter$}
|
| 126 |
+
\KwOut{Soft confidence vector $\mathbf{\ty}$}
|
| 127 |
+
|
| 128 |
+
\BlankLine
|
| 129 |
+
Randomly initialize parameters\\
|
| 130 |
+
Train $\mathbf{\theta}_R$ by log-likelihood cross-entropy loss and obtain $\mathbf{\v}_{prob}$\\
|
| 131 |
+
\Repeat{$\mathbf{\theta}_a$, $\mathbf{\theta}_L$ and $\mathbf{\theta}_p$ converge}{
|
| 132 |
+
\For{$t=1;t \le $iter$;t{+}{+}$}{
|
| 133 |
+
Obtain the context vector $\mathbf{\z}_t$ by \eqref{eq:atten_weight} and \eqref{eq:context}\\
|
| 134 |
+
Obtain the hidden state $\mathbf{\h}_t$ by \eqref{eq:hidden}\\
|
| 135 |
+
Obtain the soft confidence vector $\mathbf{\p}_t$ by \eqref{eq:prob}\\
|
| 136 |
+
Obtain the hard predicted label vector $\mathbf{\tilde{\y}_t}$ by \eqref{eq:max}\\
|
| 137 |
+
Update the candidate pool by \eqref{eq:cand_pool}\\
|
| 138 |
+
Compute the log-likelihood cross-entropy between $\mathbf{\v}_{prob}$ and $\mathbf{\y}$\\
|
| 139 |
+
Perform gradient descent on $\mathbf{\theta}_a$, $\mathbf{\theta}_L$ and $\mathbf{\theta}_p$
|
| 140 |
+
$\mathbf{\v}_{pred}$ = $\mathbf{\p}_t$
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
\end{algorithm}
|
| 144 |
+
}
|
| 145 |
+
\subsubsection{Confidence-Ranked LSTM $\flstm$}
|
| 146 |
+
\label{LSTM}
|
| 147 |
+
As an extension of recurrent neural network (RNN), LSTM additionally consists of three gate neurons: forget, input, and output gates. The forget gate is to learn proper weights for erasing the memory cell, the input gate is learned to describe the input data, while the output gate aims to control how the memory should be omitted.
|
| 148 |
+
|
| 149 |
+
In order to exploit and capture the dependency between labels, the LSTM model $\flstm$ in our network architecture needs to identify which label would exhibit a high confidence at each time step. Thus, we concatenate the soft confidence vector $\v_{pred}$ from the previous time step (note that $\v_{pred}$ = $\v_{prob}$ when t=1, and $\v_{pred}$ = $\p_{t-1}$ otherwise), the context vector $\z_t$ and the previous predicted hard label vector $\tilde{\y}_{t-1}$ for deriving the current hidden state vector $\h_t$. This state vector is thus controlled by the aforementioned three gate components. By observing the long-term dependency between labels via the above structure, we can exploit and utilize the resulting label correlation for improved multi-label classification.
|
| 150 |
+
|
| 151 |
+
We note that, to predict multi-label outputs using LSTM, we pass $\h_t$ through an additional prediction layer consisting of two fully-connected layers, and result in a soft confidence vector $\p_t \in \R^\c$ at time $t$. The hard predicted label $\tl_t = argmax~~\p_t$ indicates the most confident class at the time step $t$, which is then appended to the hard predicted label vector $\tilde{\y}_t$. In the testing phase, by collecting $\tl$ till the ultimate condition, which will be described later in the next section, the final predicted multi-label vector $\tilde{\y}$ can be obtained.
|
| 152 |
+
|
| 153 |
+
More specifically, we calculate:
|
| 154 |
+
\begin{equation}
|
| 155 |
+
\label{eq:hidden}
|
| 156 |
+
\h_t = f_{LSTM}(\v_{pred}, \z_t, \tilde{\y}_{t-1}, \h_{t-1}),
|
| 157 |
+
\end{equation}
|
| 158 |
+
where $f_{LSTM}$ denotes the LSTM model. In order to predict $\p_t$, we have:
|
| 159 |
+
\begin{equation}
|
| 160 |
+
\label{eq:prob}
|
| 161 |
+
\p_t = f_{pred}(\v_{pred}, \z_t, \tilde{\y}_{t-1}, \h_t),
|
| 162 |
+
\end{equation}
|
| 163 |
+
|
| 164 |
+
|
| 165 |
+
On the other hand, the cross-entropy loss function to minimize at the output layer at time $t$ is:
|
| 166 |
+
\begin{equation}
|
| 167 |
+
\label{eq:loss}
|
| 168 |
+
\L_t = -\sum^{\c}_{i=1} y_i log(\sigma(p_{t,i})) + (1 - y_i)log(1 - \sigma(p_{t,i})),
|
| 169 |
+
\end{equation}
|
| 170 |
+
where $y_i \in \y$ , $p_{t,i} \in \p_t$, and $\sigma$ is the sigmoid function.
|
| 171 |
+
|
| 172 |
+
It is worth noting that, the main difficulty of applying LSTM for multi-label classification is its requirement of the ground truth label order during the training process. By simply calculating the cross-entropy between the confidence vector $\p_t$ and the ground truth multi-label vector $\y$, one would not be able to define the order of label prediction for learning LSTM. Moreover, it would be desirable if the label order would reflect semantic dependency between labels presented in training image data.
|
| 173 |
+
|
| 174 |
+
With the above observation, we view our $\flstm$ in the proposed network architecture as \emph{confidence-ranked LSTM}. Once the previous soft confidence vector $\p_{t-1}$ and hard predicted label vector $\tilde{\y}_{t-1}$ are produced, our model would update $\h_t$ and the attention layer $\fatt$. As a result, we will be able to produce $\p_{t}$ accordingly. In other words, our model achieves the visually attention of objects of semantic interest in the input image, which does not require one to pre-define any specific label order. Therefore, unlike previous works like~\cite{wang2016cnn}, the training of our model does not require the selection of ground truth labels in a predetermined order. Instead, we calculate the loss by comparing the soft confidence vector with the ground truth label vector directly. With our visual attention plus LSTM components, the training process would be consistent with the testing stage. Since the above process relies on visual semantic information for multi-label prediction, one of the major advantages of our model that possible error propagation problems when applying RNN-based approaches can be alleviated.
|
| 175 |
+
\subsection{Order-Free Training and Testing}
|
| 176 |
+
|
| 177 |
+
\subsubsection{Training}
|
| 178 |
+
We now explain how our model achieves order-free learning and prediction. As shown in Fig.~\ref{fig:2}, our network design produces outputs of labels ${[\tl_1, ... \tl_T]}$ at time $T$, where each $\tl_i$ denotes the label with the highest confidence at the i-th time step. To avoid duplicate label outputs at different time steps, we apply the concept of candidate label pool as follows.
|
| 179 |
+
|
| 180 |
+
To initialize the inference process for multi-label learning using our model, the candidate label pool would simply be $\C$ containing all labels. At each time step, the most confident label $\tl_t$ would be selected from the candidate pool, and thus this candidate pool will be updated by removing $\tl_t$ from it. More specifically, for $\tl_t$, we denote it as:
|
| 181 |
+
\begin{equation}
|
| 182 |
+
\label{eq:max}
|
| 183 |
+
\begin{aligned}
|
| 184 |
+
\tl_t = arg\max_{\pC_t}~~\p_t, \\
|
| 185 |
+
\tilde{\y}_t = \tilde{\y}_{t-1} + \tl_t
|
| 186 |
+
\end{aligned}
|
| 187 |
+
\end{equation}
|
| 188 |
+
|
| 189 |
+
\begin{equation}
|
| 190 |
+
\label{eq:cand_pool}
|
| 191 |
+
\pC_t = \pC_{t-1} - \{\tl_{t-1}\}.
|
| 192 |
+
\end{equation}
|
| 193 |
+
where $\pC_0$ denotes the full set of labels $\C$, and $\pC_t$ is the set of candidate labels to be predicted at time $t$. From the above label update process, the cardinal of the candidate label set would be subtracted by one at each time step.
|
| 194 |
+
\subsubsection{Testing}
|
| 195 |
+
We note that, the labels to be predicted during the testing stage can be obtained sequentially using the learned model. However, even with the introduction of the attention layers, prediction error at a time step would be propagated and significantly degrade the prediction performance.
|
| 196 |
+
|
| 197 |
+
Inspired by~\cite{wang2016cnn}, we apply the technique of \emph{beam search} to alleviate the above problem, and thus the predicting process would be more robust to intermediate prediction errors. More precisely, beam search would keep the best-$K$ prediction paths at each time step. At time step $t+1$, it then searches from all $K\times \c$ successor paths generated from the $K$ previous paths, updates the path probability for all $K\times \c$ successor paths, and maintains the best-$K$ candidates for the following time steps.
|
| 198 |
+
|
| 199 |
+
In our work, a prediction path represents a sequence of predicted labels with a corresponding path probability, which can be calculated by multiplying the probabilities of all the nodes along the prediction path. At each time step $t$ given a prediction path $[l_1, l_2,\cdots, l_{t-1}]$ and image $I$, its path probability before predicting $l_t$ is calculated as:
|
| 200 |
+
\begin{equation}
|
| 201 |
+
\begin{aligned}
|
| 202 |
+
\label{eq:beam_search}
|
| 203 |
+
P_{path} = P(l_1|I) \times P(l_2|I, l_1) \times \cdots \\\times P(l_{t-1}|l_1, l_2, \cdots, l_{t-2}).
|
| 204 |
+
\end{aligned}
|
| 205 |
+
\end{equation}
|
| 206 |
+
|
| 207 |
+
Finally, the prediction process via beam search would terminate under the following two conditions:\\
|
| 208 |
+
1. The probability output of a particular prediction path is below a threshold (which is determined by cross-validation).\\
|
| 209 |
+
2. The length of the prediction path reaches a pre-defined maximum length (which is the largest number of labels in the training set).\\
|
| 210 |
+
\section{Experiments}
|
| 211 |
+
|
| 212 |
+
\subsection{Implementation}
|
| 213 |
+
\tabcolsep=1.5pt
|
| 214 |
+
\begin{table}[]
|
| 215 |
+
\centering
|
| 216 |
+
\caption{Evaluation of NUS-WIDE. Note that Macro/Micro P/R/F1 scores are abbreviated as O/C-P/R/F1, respectively. Ours (w/o attention) and Frequency/Rare-first (w/ atten) denote our method with the attention layer removed and using associated pre-defined label orders, respectively.\\}
|
| 217 |
+
|
| 218 |
+
\begin{tabular}{l||lll|lll}
|
| 219 |
+
\hline
|
| 220 |
+
Method & C-P & C-R & C-F1 & O-P & O-R & O-F1 \\ \hline
|
| 221 |
+
KNN & $32.6$ & $19.3$ & $24.3$ & $43.9$ & $53.4$ & $47.6$ \\
|
| 222 |
+
Softmax & $31.7$ & $31.2$ & $31.4$ & $47.8$ & $59.5$ & $53.0$ \\
|
| 223 |
+
WARP & $31.7$ & $35.6$ & $33.5$ & $48.6$ & $60.5$ & $53.9$ \\
|
| 224 |
+
CNN-RNN & $40.5$ & $30.4$ & $34.7$ & $49.9$ & $61.7$ & $55.2$ \\
|
| 225 |
+
Resnet-baseline & $46.5$ & $47.6$ & $47.1$ & $61.6$ & $68.1$ & $64.7$ \\
|
| 226 |
+
Frequency-first (w/ atten) & $48.9$ & $48.7$ & $48.8$ & $62.1$ & $69.4$ & $65.5$ \\
|
| 227 |
+
Rare-first (w/ atten) & $53.9$ & $51.8$ & $52.8$ & $55.1$ & $65.2$ & $59.8$ \\
|
| 228 |
+
Ours (w/o atten) & $60.8$ & $49.5$ & $54.5$ & $68.3$ & $72.4$ & $70.2$ \\
|
| 229 |
+
Ours & $59.4$ & $50.7$ & $\mathbf{54.7}$ & $69.0$ & $71.4$ & $\mathbf{70.2}$ \\ \hline
|
| 230 |
+
\end{tabular}
|
| 231 |
+
\label{table:nuswide}
|
| 232 |
+
\end{table}
|
| 233 |
+
|
| 234 |
+
To implement our proposed architecture, we apply a ResNet-152~\cite{he2016deep} network trained on Imagenet without fine-tuning, and use the bottom fourth convolution layer for visual feature extraction. We also add a fully-connected layer with dimension of $c$ after the convolutional layer. We employ the Adam optimizer with the learning rate at 0.0003, and the dropout rate at 0.8 for updating $f_{pred}$. We perform validation on the stopping threshold for beam search. As for the parameters for attention and LSTM models, we follow the settings of~\cite{xu2015show} for implementation.
|
| 235 |
+
|
| 236 |
+
To evaluate the performance of our method and to perform comparisons with state-of-the-art methods, we report results on the benchmark datasets of NUS-WIDE and MS-COCO as discussed in the following subsections.\\
|
| 237 |
+
\subsection{NUS-WIDE}
|
| 238 |
+
NUS-WIDE is a web image dataset which includes 269,648 images with a total of 5,018 tags collected from Flickr. The collected images are further manually labeled into 81 concepts, including objects and scenes. We follow the setting of WARP~\cite{gong2013deep} for experiments by removing images without any label, i.e., 150,000 images are considered for training, and the rest for testing.
|
| 239 |
+
|
| 240 |
+
We compare our result with state-of-the-art NN-based models: \textit{WARP}~\cite{gong2013deep} and \textit{CNN-RNN}~\cite{wang2016cnn}. We also also perform several controlled experiments: (1) removing the attention layer, and (2) fixing orders by different methods as suggested by~\cite{jin2016annotation} during training. Frequency-first indicates the labels are sorted by frequency, from high to low, and rare-first is exactly the reverse of frequency-first. The results are listed in Table \ref{table:nuswide}. From this table, we see that our model performed favorably against baseline and state-of-the art multi-label classification algorithms. This demonstrates the effectiveness of our method in learning proper label ordering for sequential label prediction. Finally, our full model achieved the best performance, which further supports the exploitation of visually attended regions for improved multi-label classification.
|
| 241 |
+
|
| 242 |
+
|
| 243 |
+
\begin{figure*}[t!]
|
| 244 |
+
\centering
|
| 245 |
+
\includegraphics[width=0.9\textwidth]{./Visualization.png}
|
| 246 |
+
|
| 247 |
+
\caption{Examples images with correct label prediction in NUS-WISE (a) and MS-COCO (c), those with incorrect prediction are shown in (b) and (d), respectively. For each image (with ground truth labels noted below), the associated attention maps are presented at the right hand side, showing the regions of interest visually attended to. Note that some incorrect predicted labels (in red) were expected and reasonable due to noisy ground truth labels, while the resulting visual attention maps successfully highlight the attended regions.}
|
| 248 |
+
\label{fig:visualization}
|
| 249 |
+
\end{figure*}
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
In Fig. \ref{fig:visualization}(a), we present example images with correct label prediction. We see that our model was able to predict labels depending on what it was actually attended to. For example, since `person' is a frequent label in the dataset, CNN-RNN framework tended to predict it first, because their label order was defined by label occurrence frequency observed during the training stage. In contrast, our model was able to predict animal and horses first, which were actually easier to be predicted based on their visual appearance in the input image. On the other hand, examples of \emph{incorrect} predictions are shown in Fig~\ref{fig:visualization}(b). It is worth pointing out that, as can be seen from these results, the prediction results were actually intuitive and reasonable, and the incorrect prediction was due to the noisy ground truth label. From the above observations, it can be successfully verified that our method is able to identify semantic ordering and visually adapt to objects with different sizes, even given noisy or incorrect label data during the training stage.
|
| 253 |
+
\subsection{MS-COCO}
|
| 254 |
+
\tabcolsep=1.5pt
|
| 255 |
+
\begin{table}[]
|
| 256 |
+
\centering
|
| 257 |
+
|
| 258 |
+
\caption{Performance comparisons on MS-COCO. Ours (w/o attention) and Ours Frequency/Rare-first (w/ atten) denote our method with the attention layer removed and using associated pre-defined label orders, respectively.\\}
|
| 259 |
+
|
| 260 |
+
\begin{tabular}{l||lll|lll}
|
| 261 |
+
\hline
|
| 262 |
+
Method & C-P & C-R & C-F1 & O-P & O-R & O-F1 \\ \hline
|
| 263 |
+
Softmax & $59.0$ & $57.0$ & $58.0$ & $60.2$ & $62.1$ & $61.1$ \\
|
| 264 |
+
WARP & $59.3$ & $52.5$ & $55.7$ & $59.8$ & $61.4$ & $60.7$ \\
|
| 265 |
+
CNN-RNN & $66.0$ & $55.6$ & $60.4$ & $69.2$ & $66.4$ & $\mathbf{67.8}$ \\
|
| 266 |
+
Resnet-baseline & $58.3$ & $49.3$ & $53.4$ & $63.9$ & $58.4$ & $61.0$ \\
|
| 267 |
+
Frequency-first (w/ atten) & $55.8$ & $54.7$ & $55.2$ & $61.4$ & $62.6$ & $62.0$ \\
|
| 268 |
+
Rare-first (w/ atten) & $59.5$ & $56.5$ & $58.0$ & $57.3$ & $56.7$ & $57.0$ \\
|
| 269 |
+
Ours (w/o atten) & $69.9$ & $52.6$ & $60.0$ & $73.4$ & $60.3$ & $66.2$ \\
|
| 270 |
+
Ours & $71.6$ & $54.8$ & $\mathbf{62.1}$ & $74.2$ & $62.2$ & $\mathbf{67.7}$ \\ \hline
|
| 271 |
+
\end{tabular}
|
| 272 |
+
\label{table:mscoco}
|
| 273 |
+
\end{table}
|
| 274 |
+
|
| 275 |
+
MS-COCO is the dataset typically considered for image recognition, segmentation and captioning. The training set consists of 82,783 images with up to 80 annotated object labels. The test set of this experiment utilizes the validation set of MS-COCO (40,504 images), since the ground truth labels of the original test set in MS-COCO are not provided.
|
| 276 |
+
,
|
| 277 |
+
In the experiments, we compare our model with the \textit{WARP}~\cite{gong2013deep} and \textit{CNN-RNN}~\cite{wang2016cnn} models in Table \ref{table:mscoco}. It can be seen that the full version of our model achieved performance improvements over the Resnet-based baseline by 4.1\% in C-F1 and by 5.6\% in O-F1.
|
| 278 |
+
|
| 279 |
+
In Figures \ref{fig:visualization}(c) and \ref{fig:visualization}(d), we also present example images with correct and incorrect prediction. It is worth noting that, in the upper left example in Fig. \ref{fig:visualization}(c), although the third attention map corresponded to the label prediction of surfboard, it did not properly focus on the object itself. Instead, it took the surrounding image regions into consideration. Combining the information provided by the hidden state, it still successfully predicted the correct label. This illustrates the ability of our model to utilize both \emph{local} and \emph{global} information in an image during multi-label prediction.
|
| 280 |
+
\section{Conclusion}
|
| 281 |
+
We proposed a deep learning model for multi-label classification, which consists of a visual attention model and a confidence-ranked LSTM. Unlike existing RNN-based methods requiring predetermined label orders for training, the joint learning of the above components in our proposed architecture allows us to observe proper label sequences with visually attended regions for performance guarantees. In our experiments, we provided quantitative results to support the effectiveness of our method. In addition, we also verified its robustness in label prediction, even if the training data are noisy and incorrectly annotated.
|
| 282 |
+
|
| 283 |
+
\bibliographystyle{aaai}
|
| 284 |
+
\bibliography{egbib}
|
1707.06261v2.txt
ADDED
|
@@ -0,0 +1,633 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
The $k$-nearest neighbor ($k$-NN) regression algorithm is a classical approach to nonparametric regression.
|
| 3 |
+
The value of the functional
|
| 4 |
+
is taken to be the unweighted average
|
| 5 |
+
observation of the $k$ closest samples.
|
| 6 |
+
Although this procedure has been known for a long time and has a deep practical significance,
|
| 7 |
+
there is still surprisingly much about its convergence properties yet to be understood.
|
| 8 |
+
|
| 9 |
+
We derive finite-sample high probability uniform bounds for $k$-NN regression under a standard additive model
|
| 10 |
+
$y = f(x) + \xi$ where $f$ is an unknown function, $\xi$ is sub-Gaussian white noise
|
| 11 |
+
and $y$ is the noisy observation. The samples $\{(x_i,y_i)\}_{i=1}^n$ are drawn i.i.d. as follows: $x_i$ is drawn according to an unknown density $p_X$, which shares the same support as $f$, and then observation $y_i$ is generated by the additive model based on $x_i$.
|
| 12 |
+
|
| 13 |
+
We then
|
| 14 |
+
give simple procedures to estimate the level sets and global maximas of a function given noisy observations and
|
| 15 |
+
apply the $k$-NN regression bounds to establish new Hausdorff recovery guarantees for these structures.
|
| 16 |
+
Each of these results are interesting on their own.
|
| 17 |
+
|
| 18 |
+
The bulk of the work on $k$-NN regression convergence theory is on its properties under various risk measures or asymptotic convergence.
|
| 19 |
+
Notions of consistency involving risk measures such as mean squared error are considerably weaker than the
|
| 20 |
+
sup-norm as the latter imposes a {\it uniform} guarantee
|
| 21 |
+
on the error $|f_k(x) - f(x)|$ where $f_k$ is the $k$-NN regression estimate of function $f$.
|
| 22 |
+
Existing work on studying $f_k$ under the sup-norm thus far are asymptotic.
|
| 23 |
+
We give the first sup-norm {\it finite-sample} result. This result matches the minimax optimal rate up to logarithmic factors.
|
| 24 |
+
|
| 25 |
+
We then discuss the setting where the data lies on a lower dimensional manifold. It is already known that $k$-NN regression
|
| 26 |
+
is able to automatically adapt to the intrinsic dimension under various risk measures: the rates depend only on the intrinsic dimension and independent of ambient dimension. We show that this is also the case in the sup-norm: we attain finite-sample bounds as if we were operating in the lower intrinsic dimension space without any modifications to the procedure.
|
| 27 |
+
|
| 28 |
+
We then show the utility of our $k$-NN regression results in recovering certain structures of an arbitrary function, namely the level-sets and global maximas.
|
| 29 |
+
The motivation can be traced back to the rich theory of density-based clustering.
|
| 30 |
+
There, one is given a finite sample from a probability density $p$.
|
| 31 |
+
The clusters can then be modeled based on certain structures in the underlying density $p$. Such structures include
|
| 32 |
+
the level-sets $\{ x : p(x) \ge \lambda\}$ for some density level $\lambda$ or the local maximas of $p$.
|
| 33 |
+
Then to estimate these, one typically uses a plug-in approach using a density estimator $\widehat{p}$
|
| 34 |
+
(e.g. for level-sets, $\{ x : \widehat{p}(x) \ge \lambda\}$ and for modes, $\argmax_x \widehat{p}(x)$).
|
| 35 |
+
It turns out that given uniform bounds on $\widehat{p}$, we can estimate these structures with strong guarantees.
|
| 36 |
+
|
| 37 |
+
In this paper, instead of estimating these structures in a density, we estimate these structures for a general function $f$.
|
| 38 |
+
This is possible because of our established finite-sample sup-norm bounds for nonparametric regression.
|
| 39 |
+
There are however some key differences in our setting.
|
| 40 |
+
In the density setting, one has access to i.i.d. samples drawn from the density.
|
| 41 |
+
Here, we have an i.i.d. sample $x$ drawn from some density $p_X$ not necessarily related to $f$, and then we obtain a noisy observation of the value $f(x)$. This
|
| 42 |
+
can be viewed as a noisy observation of the {\it feature} of $x$.
|
| 43 |
+
In other words, we estimate the stuctures based on the features of data, while in the density setting, there are no features
|
| 44 |
+
and the structures are instead based on the dense regions of the dataset.
|
| 45 |
+
\section{Related Works and Contributions}
|
| 46 |
+
|
| 47 |
+
\subsection{$k$-NN Regression Rates}
|
| 48 |
+
The consistency properties of $k$-NN regression have been studied for a long time and we highlight some of the work here.
|
| 49 |
+
\citet{biau2010rates} give guarantees under $L_2$ risk.
|
| 50 |
+
\citet{devroye1994strong} give consistency guarantees under the $L_1$ risk.
|
| 51 |
+
\citet{stone1977consistent} provides results under $L_p$ for $p \ge 1$.
|
| 52 |
+
All these notions of consistency so far are under some integrated risk, and thus are weaker than the sup-norm (i.e. $L_\infty$), which imposes a uniform
|
| 53 |
+
guarantee.
|
| 54 |
+
|
| 55 |
+
A number of works such as
|
| 56 |
+
\citet{mack1982weak, cheng1984strong,devroye1978uniform, lian2011convergence, kudraszow2013uniform} give strong uniform convergence rates. However,
|
| 57 |
+
these results are asymptotic. Our bounds explore the {\it finite-sample} consistency properties of $k$-NN regression, which we will demonstrate later can show strong results about $k$-NN based learning algorithms which were not possible with existing results.
|
| 58 |
+
To the best of our knowledge, this is
|
| 59 |
+
the first such finite-sample uniform consistency result for this procedure, which matches the minimax rate up to logarithmic factors.
|
| 60 |
+
|
| 61 |
+
We then extend our results to the setting where the data lies on a lower dimensional manifold.
|
| 62 |
+
This is of practical interest because the curse of dimensionality forces nonparametric methods such as $k$-NN to require
|
| 63 |
+
an exponential-in-dimension sample complexity; however as a concession, we can show that many of these methods can have sample complexity depending on the intrinsic dimension (e.g. doubling dimension, manifold dimension, covering number) and independent of the ambient dimension.
|
| 64 |
+
In modern data applications where the dimension can be arbitrarily high, oftentimes the number of degrees of freedom remains much lower. It thus becomes important
|
| 65 |
+
to understand these methods under this setting.
|
| 66 |
+
|
| 67 |
+
\citet{kulkarni1995rates} give results for $k$-NN regression based on the covering numbers of the support of the distribution.
|
| 68 |
+
\citet{kpotufe2011k} shows that $k$-NN regression actually adapts to the local intrinsic dimension without any modifications to the procedure or data in the $L_2$ norm. In this paper, we show that this holds in the sup-norm as well for a global intrinsic dimension.
|
| 69 |
+
\subsection{Level Set Estimation}
|
| 70 |
+
Density level-set estimation has been extensively studied and has significant implications to density-based clustering. Some works include
|
| 71 |
+
\citet{tsybakov1997nonparametric,singh2009adaptive}.%
|
| 72 |
+
It involves estimating $L_p(\lambda) := \{x : p(x) \ge \lambda\}$ given a finite i.i.d. sample $X$ from $p$, where $\lambda$ is some known density level and $p$ is the unknown density.
|
| 73 |
+
$L_p(\lambda)$ can be seen as the high density regions of the data and thus the connected components can be used as the core-sets in clustering.
|
| 74 |
+
It can be shown that given a density estimator $\widehat{p}_n$ with guarantees on $|\widehat{p}_n - p|_\infty$,
|
| 75 |
+
then taking $\widehat{L}_p(\lambda) := \{ x \in X : \widehat{p}_n (x) \ge \lambda\}$, the Hausdorff distance
|
| 76 |
+
between $L_p(\lambda)$ and $\widehat{L}_p(\lambda)$ can also be bounded.
|
| 77 |
+
|
| 78 |
+
In this paper, we extend this idea to functions $f$ which are not necessarily densities given noisy observations of $f$.
|
| 79 |
+
We obtain similar results to those familiar in the density setting, which are made possible by our established bounds for estimating $f$.
|
| 80 |
+
An advantage of this approach is that it can be applied to clustering where there are features where clusters are defined
|
| 81 |
+
as regions of similar feature value rather than similar density. In density-based clustering, it is typical that one does not assume access to the features and thus such procedures fail to readily take advantage of the features when performing clustering.
|
| 82 |
+
A similar approach was taken by \citet{willett2007minimax} by using nonparametric regression to estimate the level sets of a function; however our consistency results are instead under the Hausdorff metric.
|
| 83 |
+
\subsection{Global Maxima Estimation}
|
| 84 |
+
We next give an interesting result for estimating the global maxima of a function.
|
| 85 |
+
Given $n$ i.i.d. samples from some distribution on the input space and seeing a noisy observations of $f$ at the samples,
|
| 86 |
+
we show a guarantee on the distance between the sample point with the highest $k$-NN regression value and the (unique) point which maximizes $f$.
|
| 87 |
+
This gives us insight into how well a grid search or randomized search can estimate the maximum of a function.
|
| 88 |
+
|
| 89 |
+
This result can be compared to mode estimation in the density setting where the object is to find the point which maximizes the density function \cite{tsybakov1990recursive}. \citet{dasgupta2014optimal} show that given $n$ draws from a density, the sample point which maximizes the $k$-NN density estimator is close to the true maximizer of the density; moreover they give finite-sample rates. Earlier works such as \citet{romano1988weak} provide asymptotic rates.
|
| 90 |
+
\section{$k$-NN Regression}
|
| 91 |
+
Throughout the paper, we assume a function $f$ with compact support $\mathcal{X}\subseteq \mathbb{R}^D$
|
| 92 |
+
and that we have datapoints $(x_1,y_1),...,(x_n,y_n)$ drawn follows.
|
| 93 |
+
The $x_i$'s are drawn i.i.d. from density $p_X$ with support $\mathcal{X}$.
|
| 94 |
+
Then $y_i = f(x_i) + \xi_{x_i}$ where $\xi_{x_i}$ are i.i.d. drawn according to random variable $\xi$.
|
| 95 |
+
|
| 96 |
+
\begin{definition}
|
| 97 |
+
$f : \mathcal{X} \rightarrow \mathbb{R}$ where $\mathcal{X} \subseteq \mathbb{R}^D$ is compact.
|
| 98 |
+
\end{definition}
|
| 99 |
+
|
| 100 |
+
The first regularity assumption ensures that the support $\mathcal{X}$ does not become arbitrarily thin anywhere. Otherwise,
|
| 101 |
+
it becomes impossible to estimate the function in such areas from a random sample.
|
| 102 |
+
\begin{assumption}[Support Regularity] \label{a1}
|
| 103 |
+
There exists $\gamma > 0$ and $r_0 > 0$ such that $\text{Vol}(\mathcal{X} \cap B(x, r)) \ge \gamma \cdot \text{Vol}(B(x, r))$ for all $x \in \mathcal{X}$ and $0 < r < r_0$.
|
| 104 |
+
\end{assumption}
|
| 105 |
+
|
| 106 |
+
The next assumption ensures that with a sufficiently large sample, we will obtain a good covering of the input space.
|
| 107 |
+
\begin{assumption}
|
| 108 |
+
[$p_X$ bounded from below] \label{a2} $p_{X, 0} := \inf_{x \in \mathcal{X}} p_X(x) > 0$.
|
| 109 |
+
\end{assumption}
|
| 110 |
+
|
| 111 |
+
Finally, we have a standard sub-Gaussian white noise assumption in our additive model.
|
| 112 |
+
\begin{assumption} [Sub-Gaussian White noise] \label{a3}
|
| 113 |
+
$\xi$ satisfies
|
| 114 |
+
$E[\xi] = 0$ and sub-Gaussian with parameter $\sigma^2$ (i.e. $E[\exp(\lambda\xi)] \le \exp(\sigma^2\lambda^2/2)$ for all $\lambda \in \mathbb{R}$).
|
| 115 |
+
\end{assumption}
|
| 116 |
+
|
| 117 |
+
Then define $k$-NN regression as follows.
|
| 118 |
+
\begin{definition} [$k$-NN]
|
| 119 |
+
Let the $k$-NN radius of $x \in \mathcal{X}$ be $r_k(x) := \inf \{ r : |B(x, r) \cap X| \ge k \}$ where $B(x, r) := \{x' \in \mathcal{X} : |x - x'| \le r \}$ and the $k$-NN set of $x \in \mathcal{X}$ be $N_k(x) := B(x, r_k(x)) \cap X$.
|
| 120 |
+
Then for all $x \in \mathcal{X}$, the $k$-NN regression function with respect to the samples is defined as
|
| 121 |
+
\begin{align*}
|
| 122 |
+
f_k(x) := \frac{1}{|N_k(x)|} \sum_{i=1}^n y_i \cdot 1\left[ x_i \in N_k(x) \right].
|
| 123 |
+
\end{align*}
|
| 124 |
+
\end{definition}
|
| 125 |
+
|
| 126 |
+
Next, we define the following pointwise modulus of continuity, which will be used to express the bias for an arbitrary function in later result.
|
| 127 |
+
\begin{definition} [Modulus of continuity]
|
| 128 |
+
$u_f(x, r) := \sup_{x' \in B(x, r)} |f(x) - f(x')|$.
|
| 129 |
+
\end{definition}
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
We now state our main result about $k$-NN regression.
|
| 133 |
+
Informally, it says that under the mild assumptions described above, for $k \gtrsim \log n$,
|
| 134 |
+
$|f_k(x) - f(x)| \lesssim u_f(x, (k/n)^{1/D}) + \sqrt{(\log n)/k}$ uniformly in $x \in \mathcal{X}$ with high probability.
|
| 135 |
+
|
| 136 |
+
The first term correponds to the bias term. Using uniform VC-type concentration bounds, it can be shown that the $k$-NN radius
|
| 137 |
+
can be uniformly bounded by approximately distance $(k/n)^{1/D}$ and hence no point in the $k$-NN set will be that far. The bias can then be expressed
|
| 138 |
+
in terms of that distance and $u_f$.
|
| 139 |
+
|
| 140 |
+
The second term corresponds to the variance. The $1/\sqrt{k}$ factor is not surprising since the noise terms are averaged over $k$ observations
|
| 141 |
+
and the extra $\sqrt{\log n}$ factor comes from the cost of obtaining a uniform bound.
|
| 142 |
+
|
| 143 |
+
\begin{definition}
|
| 144 |
+
Let $v_D$ be the volume of a $D$-dimensional unit ball.
|
| 145 |
+
\end{definition}
|
| 146 |
+
|
| 147 |
+
\begin{theorem} [$k$-NN Regression Rate] \label{theo:knn}
|
| 148 |
+
Suppose that Assumptions~\ref{a1},~\ref{a2}, and~\ref{a3} hold and that
|
| 149 |
+
\begin{align*}
|
| 150 |
+
2^8 \cdot D \log^2(4/\delta) \cdot \log n \le k \le \frac{1}{2} \cdot \gamma \cdot p_{X,0} \cdot v_D \cdot r_0^D \cdot n.
|
| 151 |
+
\end{align*}
|
| 152 |
+
Then probability at least $1 - \delta$, the following holds uniformly in $x \in \mathcal{X}$.
|
| 153 |
+
\begin{align*}
|
| 154 |
+
|f(x) - f_k(x)| &\le u_f\left(x,\left(\frac{2k}{\gamma \cdot p_{X, 0}\cdot v_D\cdot n}\right)^{1/D}\right) \\
|
| 155 |
+
&+ 2\sigma \sqrt{\frac{D \log n + \log(2/\delta)}{k}}.
|
| 156 |
+
\end{align*}
|
| 157 |
+
\end{theorem}
|
| 158 |
+
|
| 159 |
+
Note that the above result is fairly general and makes no smoothness assumptions. In particular, $f$ need not even be continuous. It is also important to point out that $n$ must be sufficiently large in order for there to exist a $k$ that satisfies the conditions. We can then apply this to the class of H\"older continuous functions to obtain the following result.
|
| 160 |
+
|
| 161 |
+
\begin{corollary}[Rate for $\alpha$-H\"older continuous functions] \label{theo:knnholder}
|
| 162 |
+
Let $0 < \alpha \le 1$. Suppose that Assumptions~\ref{a1},~\ref{a2}, and~\ref{a3} hold and
|
| 163 |
+
\begin{align*}
|
| 164 |
+
2^8 \cdot D \log^2(4/\delta) \cdot \log n \le k \le \frac{1}{2} \cdot \gamma \cdot v_D \cdot p_{X,0}\cdot r_0^D \cdot n.
|
| 165 |
+
\end{align*}
|
| 166 |
+
If $f$ is H\"older continuous (i.e. $|f(x) - f(x')| \le C_\alpha |x-x'|^\alpha$), then the following holds:
|
| 167 |
+
\begin{align*}
|
| 168 |
+
\mathbb{P} \Bigg(\sup_{x \in \mathcal{X}} &|f(x) - f_k(x)| \le C_\alpha \left(\frac{2k}{\gamma\cdot p_{X, 0}\cdot v_D\cdot n}\right)^{\alpha/D} \\
|
| 169 |
+
&+ 2\sigma \sqrt{\frac{D \log n + \log(2/\delta)}{k}} \Bigg) \ge 1 - \delta.
|
| 170 |
+
\end{align*}
|
| 171 |
+
\end{corollary}
|
| 172 |
+
|
| 173 |
+
\begin{remark}
|
| 174 |
+
Taking $k = O(n^{2\alpha/(2\alpha + D)})$ gives us a rate of $$\sup_{x\in\mathcal{X}} |f(x) - f_k(x)|_\infty \lesssim \widetilde{O}(n^{-\alpha/(2\alpha + D)}),$$ which is the minimax optimal rate for estimating a H\"older function, up to logarithmic factors.
|
| 175 |
+
\end{remark}
|
| 176 |
+
|
| 177 |
+
|
| 178 |
+
\begin{remark}
|
| 179 |
+
It is understood that all our results will also hold under the assumption that the $x_i$'s are fixed and deterministic (e.g. on a grid) as long as there is a sufficient covering of the space.
|
| 180 |
+
\end{remark}
|
| 181 |
+
\section{Regression On Manifolds}
|
| 182 |
+
In this section, we show that if the data has a lower intrinsic dimension, then
|
| 183 |
+
$k$-NN will automatically attain rates as if it were in the lower dimensional space
|
| 184 |
+
and independent of the ambient dimension.
|
| 185 |
+
|
| 186 |
+
We make the following regularity assumptions which are standard among works
|
| 187 |
+
in manifold learning e.g. \citep{genovese2012minimax, balakrishnan2013cluster}.
|
| 188 |
+
\begin{assumption}\label{manifold}
|
| 189 |
+
$\mathcal{P}$ is supported on $M$ where:
|
| 190 |
+
\begin{itemize}
|
| 191 |
+
\itemsep0em
|
| 192 |
+
\item $M$ is a $d$-dimensional smooth compact Riemannian manifold without boundary embedded in compact subset $\mathcal{X} \subseteq \mathbb{R}^D$.
|
| 193 |
+
\item The volume of $M$ is bounded above by a constant.
|
| 194 |
+
\item $M$ has condition number $1/\tau$, which controls the curvature and prevents self-intersection.
|
| 195 |
+
\end{itemize}
|
| 196 |
+
Let $p_X$ be the density of $\mathcal{P}$ with respect to the uniform measure on $M$.
|
| 197 |
+
\end{assumption}
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
We now give the manifold analogues of Theorem~\ref{theo:knn} and Corollary~\ref{theo:knnholder}.
|
| 202 |
+
\begin{theorem} [$k$-NN Regression Rate] \label{theo:knnmanifold}
|
| 203 |
+
Suppose that Assumptions~\ref{a2},~\ref{a3}, and~\ref{manifold} hold and that
|
| 204 |
+
\begin{align*}
|
| 205 |
+
&k \ge 2^8 \cdot D \log^2(4/\delta) \cdot \log n \\
|
| 206 |
+
&k \le \frac{1}{4} \left(\min \left\{ \frac{\tau}{4d}, \frac{1}{\tau} \right\} \right)^d p_{X, 0}\cdot v_d \cdot n.
|
| 207 |
+
\end{align*}
|
| 208 |
+
Then with probability at least $1 - \delta$, the following holds uniformly in $x \in \mathcal{X}$.
|
| 209 |
+
\begin{align*}
|
| 210 |
+
|f(x) - f_k(x)| &\le u_f\left(x,\left( \frac{4k}{ v_d \cdot n \cdot p_{X, 0}}\right)^{1/d}\right) \\
|
| 211 |
+
&+ 2\sigma \sqrt{\frac{D \log n + \log(2/\delta)}{k}}.
|
| 212 |
+
\end{align*}
|
| 213 |
+
\end{theorem}
|
| 214 |
+
|
| 215 |
+
Similar to the full dimensional case, we can then apply this to the class of H\"older continuous functions.
|
| 216 |
+
\begin{corollary}[Rate for $\alpha$-H\"older continuous functions] \label{theo:knnholdermanifold}
|
| 217 |
+
Let $0 < \alpha \le 1$. Suppose that Assumptions~\ref{a2},~\ref{a3}, and~\ref{manifold} hold and
|
| 218 |
+
\begin{align*}
|
| 219 |
+
&k \ge 2^8 \cdot D \log^2(4/\delta) \cdot \log n \\
|
| 220 |
+
&k \le \frac{1}{4} \left(\min \left\{ \frac{\tau}{4d}, \frac{1}{\tau} \right\} \right)^d p_{X, 0}\cdot v_d \cdot n.
|
| 221 |
+
\end{align*}
|
| 222 |
+
If $f$ is H\"older continuous (i.e. $|f(x) - f(x')| \le C_\alpha |x-x'|^\alpha$), then the following holds
|
| 223 |
+
\begin{align*}
|
| 224 |
+
\mathbb{P} \Bigg(\sup_{x \in \mathcal{X}} &|f(x) - f_k(x)| \le C_\alpha \left( \frac{4k}{ v_d \cdot n \cdot p_{X, 0}}\right)^{\alpha/d} \\
|
| 225 |
+
&+ 2\sigma \sqrt{\frac{D \log n + \log(2/\delta)}{k}} \Bigg) \ge 1 - \delta.
|
| 226 |
+
\end{align*}
|
| 227 |
+
\end{corollary}
|
| 228 |
+
|
| 229 |
+
|
| 230 |
+
|
| 231 |
+
\begin{remark}
|
| 232 |
+
Taking $k = O(n^{2\alpha/(2\alpha + d)})$ gives us a rate of $\widetilde{O}(n^{-\alpha/(2\alpha + d)})$, which is more attractive than
|
| 233 |
+
the full dimensional version $\widetilde{O}(n^{-\alpha/(2\alpha + D)})$ when intrinsic dimension $d$ is lower than ambient dimension $D$. We note that the bound contains a constant factor depending on $D$ but the rate at which it decreases as $n$ grows does not.
|
| 234 |
+
\end{remark}
|
| 235 |
+
\section{Level Set Estimation}
|
| 236 |
+
The level set is the region of the input space that have value greater than a fixed threshold.
|
| 237 |
+
\begin{definition} [Level-Set]
|
| 238 |
+
\begin{align*}
|
| 239 |
+
L_f(\lambda) := \{ x \in \mathcal{X} : f(x) \ge \lambda \}.
|
| 240 |
+
\end{align*}
|
| 241 |
+
\end{definition}
|
| 242 |
+
|
| 243 |
+
In order to estimate the level-sets, we require the following regularity assumption.
|
| 244 |
+
It states that for each maximal connected component of the level-set, the change in the function around the boundary
|
| 245 |
+
has a Lipschitz form with smoothness and curvature $\beta > 0$ around some neighborhood of the boundary.
|
| 246 |
+
This notion of regularity at the boundaries of the level-sets is a standard one in density level-set estimation e.g. \citet{tsybakov1997nonparametric,singh2009adaptive}.
|
| 247 |
+
|
| 248 |
+
\begin{definition} [Level-Set Regularity]
|
| 249 |
+
Let $d(x, C) := \inf_{x' \in C} |x-x'|$, $\partial C$ be the boundary of $C$, and $C \oplus r := \{x' : d(x', C) \le r \}$.
|
| 250 |
+
A function $f$ satisfies $\beta$-regularity at level $\lambda$ if the following holds.
|
| 251 |
+
There exists $r_M , \check{C}, \hat{C} > 0$ such that
|
| 252 |
+
for each maximal connected subset $C \subseteq L_f(\lambda)$, we have
|
| 253 |
+
\begin{align*}
|
| 254 |
+
\check{C} \cdot d(x, \partial C)^\beta \le |\lambda - f(x)| \le \hat{C} \cdot d(x, \partial C)^\beta,
|
| 255 |
+
\end{align*}
|
| 256 |
+
for all $x \in \partial C \oplus r_M$.
|
| 257 |
+
\end{definition}
|
| 258 |
+
|
| 259 |
+
\begin{remark}
|
| 260 |
+
The upper bound on $|\lambda - f(x)|$ ensures that $f$ is sufficiently smooth so that $k$-NN regression will give us sufficiently accurate estimates near the boundaries. The lower bound on $|\lambda - f(x)|$ ensures that the level-set is salient enough to be detected.
|
| 261 |
+
\end{remark}
|
| 262 |
+
|
| 263 |
+
To recover $L_f(\lambda)$ based on the samples, we use the following estimator, where $X := \{x_1,...,x_n\}$.
|
| 264 |
+
\begin{align*}
|
| 265 |
+
\widehat{L}(\lambda) := \{ x \in X : f_k(x) \ge \lambda - \epsilon \},
|
| 266 |
+
\end{align*}
|
| 267 |
+
where $\epsilon := 4\hat{\sigma} \sqrt{\frac{D\log n + \log(2/\delta)}{k}}$ and $\hat{\sigma} := \sqrt{\frac{2}{n} \sum_{i=1}^m y_i^2}$. It will become clear later in the proofs that $\hat{\sigma}$ is meant to be an upper bound on $\sigma$ and thus $\epsilon$ is an upper bound on twice the variance of term of the $k$-NN bound.
|
| 268 |
+
|
| 269 |
+
There are three simple but key differences of our estimator when compared to
|
| 270 |
+
$L_f(\lambda)$. The first is that since we don't have access to the true function $f$, we use the $k$-NN regression estimate $f_k$. Next, instead of taking $x \in \mathcal{X}$, we instead restrict to the samples $X$. This makes our estimator feasible to compute since it will be a subset of the sample points. Finally, we have the $\epsilon$ to bound the uniform deviation of $|f_k - f|$ near the boundary of the level-set (as will be apparent in the proof).
|
| 271 |
+
The main difficulty is choosing $\epsilon$ large enough to bound this uniform deviation, but not too large to overestimate the level-set and finally ensuring that $\epsilon$ can be computed without knowledge of $f$ or any unknown constants (we only need confidence parameter $\delta$ and the dimension, as well as $k$).
|
| 272 |
+
Thus, our estimator is practical.
|
| 273 |
+
|
| 274 |
+
We provide consistency result under the Hausdorff metric. We note that this is a strong notion of consistency since it a uniform guarantee on the constituents of our estimator.
|
| 275 |
+
\begin{definition}[Hausdorff Distance]
|
| 276 |
+
\begin{align*}
|
| 277 |
+
d_H(X, Y) = \inf\{\epsilon \ge 0 : X \subseteq Y \oplus \epsilon, Y \subseteq X \oplus \epsilon \}.
|
| 278 |
+
\end{align*}
|
| 279 |
+
\end{definition}
|
| 280 |
+
|
| 281 |
+
The next result gives us finite-sample consistency rates for our estimator.
|
| 282 |
+
\begin{theorem}[Level Set Recovery]\label{theo:levelset}
|
| 283 |
+
Suppose that Assumptions~\ref{a1},~\ref{a2}, and~\ref{a3} hold.
|
| 284 |
+
Let $f$ be continuous and
|
| 285 |
+
satisfy $\beta$-regularity at level $\lambda$.
|
| 286 |
+
Define $M := \sqrt{\mathbb{E}[y_1^2]}$ where the expectation is taken over $p_X$ and $\xi$, and suppose that $n$ is sufficiently large depending on $\xi$, $f$ and $\delta$.
|
| 287 |
+
If $k$ satisfies
|
| 288 |
+
\begin{align*}
|
| 289 |
+
k &\ge 8\max\left\{1, \frac{40 M^2}{(2\min\{r_M, r_0\})^{2\beta} \check{C}^2} \right\}\log(4/\delta) D\cdot\log n,\\
|
| 290 |
+
k &\le (4\sigma^2/\hat{C})^{2D/(2\beta + D)} \cdot (D\log n + \log(4/\delta))^{\beta/(2\beta + D)} \\ &\hspace{1cm} \cdot (2\gamma \cdot p_{X, 0} \cdot v_D)^{2\beta/(2\beta+D)}\cdot n^{2\beta/(2\beta + D)},
|
| 291 |
+
\end{align*}
|
| 292 |
+
then with probability at least $1 - 2\delta$,
|
| 293 |
+
\begin{align*}
|
| 294 |
+
&d_H(L_f(\lambda), \widehat{L}_f(\lambda)) \\ &\le 2\cdot \left(\frac{24M}{\check{C}}\right)^{1/\beta}\cdot (D\log n\cdot \log(2/\delta))^{1/2\beta} \cdot k^{-1/2\beta}.
|
| 295 |
+
\end{align*}
|
| 296 |
+
\end{theorem}
|
| 297 |
+
\begin{remark}
|
| 298 |
+
Although the statement may appear obfuscated, it essentially says that as long as $f$ is a continuous function satisfying $\beta$-regularity at level $\lambda$, then if $k$ lies within the following range:
|
| 299 |
+
\begin{align*}
|
| 300 |
+
\log n \lesssim k \lesssim n^{2\beta/(2\beta + D)},
|
| 301 |
+
\end{align*}
|
| 302 |
+
then with high probability,
|
| 303 |
+
\begin{align*}
|
| 304 |
+
d_H(L_f(\lambda), \hat{L}_f(\lambda)) \lesssim k^{-1/(2\beta)}.
|
| 305 |
+
\end{align*}
|
| 306 |
+
\end{remark}
|
| 307 |
+
|
| 308 |
+
\begin{remark}
|
| 309 |
+
Choosing $k$ at the optimal setting $k \approx n^{2\beta/(2\beta + D)}$, we have $\epsilon = \widetilde{O}(n^{-\beta/(2\beta + D)})$.
|
| 310 |
+
Then it follows that we recover the level sets at a Hausdorff rate of $\widetilde{O}(n^{-1/(2\beta + D)})$.
|
| 311 |
+
This can be compared to the lower bound $O(n^{-1/(2\beta + D)})$ established by \citet{tsybakov1997nonparametric} for estimating the level sets of an unknown density.
|
| 312 |
+
\end{remark}
|
| 313 |
+
|
| 314 |
+
We can give a similar result when the data lies on a lower dimensional manifold. Interestingly, we can use the exact same estimator as before as if we were operating in the full dimensional space.
|
| 315 |
+
\begin{theorem}[Level Set Recovery on Manifolds]\label{theo:levelset-manifold}
|
| 316 |
+
Suppose that Assumptions~\ref{a1},~\ref{a2},~\ref{a3}, and~\ref{manifold} hold. Let $f$ be continuous and
|
| 317 |
+
satisfy $\beta$-regularity at level $\lambda$.
|
| 318 |
+
Define $M := \sqrt{\mathbb{E}[y_1^2]}$ where the expectation is taken over $p_X$ and $\xi$, and suppose that $n$ is sufficiently large depending on $\xi$, $f$, $\tau$, and $\delta$.
|
| 319 |
+
If $k$ satisfies
|
| 320 |
+
\begin{align*}
|
| 321 |
+
k &\ge 8\max\left\{1, \frac{40 M^2}{(2\min\{r_M, r_0\})^{2\beta} \check{C}^2} \right\}\log(4/\delta) D\cdot\log n,\\
|
| 322 |
+
k &\le (4\sigma^2/\hat{C})^{2d/(2\beta + d)} \cdot (D\log n + \log(4/\delta))^{\beta/(2\beta + d)} \\ &\hspace{1cm} \cdot ( p_{X, 0} \cdot v_D)^{2\beta/(2\beta+d)}\cdot n^{2\beta/(2\beta + d)},
|
| 323 |
+
\end{align*}
|
| 324 |
+
then with probability at least $1 - 2\delta$,
|
| 325 |
+
\begin{align*}
|
| 326 |
+
&d_H(L_f(\lambda), \widehat{L}_f(\lambda)) \\
|
| 327 |
+
&\le 2\cdot \left(\frac{24M}{\check{C}}\right)^{1/\beta}\cdot (D\log n\cdot \log(2/\delta))^{1/2\beta} \cdot k^{-1/2\beta}.
|
| 328 |
+
\end{align*}
|
| 329 |
+
\end{theorem}
|
| 330 |
+
\begin{remark}
|
| 331 |
+
The main difference from the full-dimensional version is that we need $k$ to satisfy
|
| 332 |
+
\begin{align*}
|
| 333 |
+
\log n \lesssim k \lesssim n^{2\beta/(2\beta + d)}.
|
| 334 |
+
\end{align*}
|
| 335 |
+
Choosing $k$ at the optimal setting $k \approx n^{2\beta/(2\beta + d)}$, we recover the level sets at a rate of $\widetilde{O}(n^{-1/(2\beta + d)})$.
|
| 336 |
+
\end{remark}
|
| 337 |
+
Remarkably, we obtain the rate as if we were operating on the lower dimensional space. This has not been shown for level-set estimation on manifolds for density functions (which is a different problem).
|
| 338 |
+
|
| 339 |
+
The rate for density functions under similar regularity assumptions is
|
| 340 |
+
$\widetilde{O}(n^{-1/(2\beta + d\cdot \max\{1, \beta\})})$ \cite{jiang2017density}, which is slower. In other words, we escape the curse of dimensionality with regression level-set estimation but do not escape it for density level-set estimation.
|
| 341 |
+
\section{Global Maxima Estimation}
|
| 342 |
+
In this section, we give guarantees on estimating the global maxima of $f$.
|
| 343 |
+
\begin{definition}
|
| 344 |
+
$x_0$ is a maxima of $f$ if $f(x) < f(x_0)$ for all $x \in B(x_0, r) \backslash \{ x_0 \}$ for some $r > 0$.
|
| 345 |
+
\end{definition}
|
| 346 |
+
We then make the following assumptions, which states that $f$ has a unique maxima, where it has a negative-definite Hessian.
|
| 347 |
+
\begin{assumption}\label{maximassumption}
|
| 348 |
+
$f$ has a unique maxima $x_0 := \argmax_{x \in \mathcal{X}} f(x)$ and
|
| 349 |
+
$f$ has a negative-definite Hessian at $x_0$.
|
| 350 |
+
\end{assumption}
|
| 351 |
+
|
| 352 |
+
These assumptions lead to the following, which states that $f$ has quadratic smoothness and decay around $x_0$.
|
| 353 |
+
\begin{lemma} [\citet{dasgupta2014optimal}] \label{maximaconditions} Let $f$ satisfy Assumption~\ref{maximassumption}.
|
| 354 |
+
Then there exists $\hat{C}, \check{C}, r_M, \lambda > 0$ such that the following holds.
|
| 355 |
+
\begin{align*}
|
| 356 |
+
\check{C} \cdot |x_0 - x|^2 \le f(x_0) - f(x) \le \hat{C} \cdot |x_0 - x|^2
|
| 357 |
+
\end{align*}
|
| 358 |
+
for all $x \in A_0$ where $A_0$ is a connected component of $\{ x : f(x) \ge \lambda \}$ and
|
| 359 |
+
$A_0$ contains $B(x_0, r_M)$.
|
| 360 |
+
\end{lemma}
|
| 361 |
+
|
| 362 |
+
|
| 363 |
+
We utilize the following estimator, which is the maximizer of $f_k$ amongst sample points $X = \{x_1,...,x_n\}$.
|
| 364 |
+
\begin{align*}
|
| 365 |
+
\widehat{x} := \argmax_{x \in X} f_k(x).
|
| 366 |
+
\end{align*}
|
| 367 |
+
We next give the result of the accuracy of $\widehat{x}$ in estimating $x_0$.
|
| 368 |
+
|
| 369 |
+
\begin{theorem} \label{theo:maxima}
|
| 370 |
+
Suppose that $f$ is continuous and that Assumptions~\ref{a1},~\ref{a2},~\ref{a3}, and~\ref{maximassumption} hold.
|
| 371 |
+
Let $k$ satisfy
|
| 372 |
+
\begin{align*}
|
| 373 |
+
& k \ge \frac{2^{10} \cdot D \log^2(4/\delta) \cdot \log n}{\min\{1, \check{C}^2\cdot r_M^4 / \sigma^2 \}} \\
|
| 374 |
+
& k \le
|
| 375 |
+
\frac{1}{2} \cdot \gamma \cdot p_{X,0}\cdot v_D \cdot \min\left\{r_0^D, \left(\frac{\check{C}\cdot r_M^2}{32\cdot \hat{C}}\right)^{D/2} \right\} \cdot n.
|
| 376 |
+
\end{align*}
|
| 377 |
+
Then the following holds with probability at
|
| 378 |
+
least $1 - \delta$.
|
| 379 |
+
\begin{align*}
|
| 380 |
+
|\hat{x} - x_0|^2 \le \max \bigg\{ &\frac{32 \sigma}{\check{C}} \sqrt{ \frac{D \log n + \log(2/\delta)}{k}}, \\ &\frac{32\hat{C}}{\check{C}} \bigg(\frac{2k}{\gamma\cdot p_{X, 0} \cdot v_D\cdot n}\bigg)^{2/D} \bigg\}.
|
| 381 |
+
\end{align*}
|
| 382 |
+
\end{theorem}
|
| 383 |
+
|
| 384 |
+
\begin{remark}
|
| 385 |
+
Taking $k \approx n^{4/(4+D)}$ optimizes the above expression so that $|\hat{x} - x_0| \lesssim \widetilde{O}(n^{-1/(4+D)})$. This can be
|
| 386 |
+
compared to the minimax rate for mode estimation $O(n^{-1/(4+D)})$ established by \citet{tsybakov1990recursive}. We stress however that estimating the mode of density function is a different problem.
|
| 387 |
+
\end{remark}
|
| 388 |
+
|
| 389 |
+
\begin{remark}
|
| 390 |
+
An analogue for global minima also holds. Moreover, in the manifold setting, we can obtain a rate of $\widetilde{O}(n^{-1/(4+d)})$, which has not been shown for mode estimation in densities.
|
| 391 |
+
\end{remark}
|
| 392 |
+
\section{Proofs}
|
| 393 |
+
|
| 394 |
+
\subsection{Proof of Theorem~\ref{theo:knn}}
|
| 395 |
+
The follow bounds $r_k(x)$ uniformly in $x \in \mathcal{X}$.
|
| 396 |
+
\begin{lemma} \label{rkbound}
|
| 397 |
+
The following holds with probability at least $1 - \delta/2$.
|
| 398 |
+
If
|
| 399 |
+
|
| 400 |
+
\begin{align*}
|
| 401 |
+
2^8 \cdot D \log^2(4/\delta) \cdot \log n \le k \le \frac{1}{2} \cdot \gamma \cdot p_{X,0}\cdot v_D \cdot r_0^D \cdot n,
|
| 402 |
+
\end{align*}
|
| 403 |
+
then
|
| 404 |
+
$\sup_{x \in \mathcal{X}} r_k(x) \le \left( \frac{2k}{\gamma \cdot v_D \cdot n \cdot p_{X, 0}}\right)^{1/D}$.
|
| 405 |
+
\end{lemma}
|
| 406 |
+
\begin{proof}
|
| 407 |
+
Let $r = \left( \frac{2k}{\gamma \cdot v_D \cdot n \cdot p_{X, 0}}\right)^{1/D}$. We have
|
| 408 |
+
$\mathcal{P}(B(x, r)) \ge \gamma \inf_{x' \in B(x, r) \cap \mathcal{X}} p_X(x') \cdot v_D r^D \ge \gamma p_{X, 0} v_D r^D = \frac{2k}{n}$.
|
| 409 |
+
By Lemma 7 of \cite{chaudhuri2010rates} and the condition on $k$, it follows that with probability $1 - \delta/2$, uniformly in $x \in \mathcal{X}$,
|
| 410 |
+
$\mathcal{P}_n(B(x, r)) \ge \frac{k}{n}$. Hence, $r_k(x) < r$ and the result follows immediately.
|
| 411 |
+
\end{proof}
|
| 412 |
+
|
| 413 |
+
The next result bounds the number of distinct $k$-NN sets over $\mathcal{X}$.
|
| 414 |
+
\begin{lemma} \label{knncount}
|
| 415 |
+
Let $M$ be the number of distinct $k$-NN sets over $\mathcal{X}$, that is, $M := |\{ N_k(x) : x \in \mathcal{X} \}|$.
|
| 416 |
+
Then $M \le D\cdot n^D$.
|
| 417 |
+
\end{lemma}
|
| 418 |
+
|
| 419 |
+
\begin{proof}
|
| 420 |
+
First, let $\mathcal{A}$ be the partitioning of $\mathcal{X}$ induced by the $\binom{n}{2}$ hyperplanes defined as the perpendicular bisectors
|
| 421 |
+
of each pair of points $x_i$, $x_j$ for $i \neq j$. Let us denote this set of hyperplanes as $\mathcal{H}$.
|
| 422 |
+
We have that if $x, x'$ are in the same partition of $\mathcal{A}$, then $N_k(x) = N_k(x')$. If not, then any path from $x$ to $x'$ must cross some perpendicular bisector in $N_k(x') - N_k(x)$, which would be a contradiction.
|
| 423 |
+
Thus, $M \le |\mathcal{A}|$.
|
| 424 |
+
|
| 425 |
+
Now we will bound $|\mathcal{A}|$. Since $\mathcal{H}$ is finite, choose vectors $e_1,...,e_D$ such that they form an orthogonal basis of $\mathbb{R}^D$ and none of these vectors are perpendicular to any $H \in \mathcal{H}$.
|
| 426 |
+
Let $e_1,...,e_D$ induce hyperplanes $H_1,...,H_D$, respectively (i.e. $H_i$ being the orthogonal complement of $e_i$).
|
| 427 |
+
Without loss of generality, orient the space such that $e_1$ is the vertical direction (i.e. so that we can use descriptions such as 'above' and 'below').
|
| 428 |
+
For each region in $\mathcal{A}$ that is bounded below, associate such a region to its lowest point. Then it follows that there are at most $\binom{n}{D}$ of these regions since they are the intersection of $D$ hyperplanes.
|
| 429 |
+
|
| 430 |
+
We next count the regions unbounded below. Place $H_1$ below the lowest point corresponding the regions in $\mathcal{A}$ that were bounded below.
|
| 431 |
+
Then we have that the regions unbounded below are $\{ A \in \mathcal{A} : A \cap H_1 \neq \emptyset\}$. It thus remains now to count
|
| 432 |
+
$\mathcal{A}_{1} := \{ A\cap H_1 : A \in \mathcal{A}, A \cap H_1 \neq \emptyset\}$.
|
| 433 |
+
|
| 434 |
+
We now orient the space so that $e_2$ corresponds to the vertical direction. Then we can repeat the same procedure and for each region in $\mathcal{A}_1$that is bounded below with the lowest point. There are at most $\binom{n}{D - 1}$ since they are an intersection of $D-1$ hyperplanes in $\mathcal{H}$ along with $H_1$, and then placing $e_2$ sufficiently low, the remaining regions correspond to
|
| 435 |
+
$\mathcal{A}_{2} := \{ A\cap H_1 \cap H_2 : A \in \mathcal{A}, A \cap H_1 \cap H_2 \neq \emptyset\}$.
|
| 436 |
+
|
| 437 |
+
|
| 438 |
+
Continuing this process, it follows that when we orient $e_i$ to be the vertical direction,
|
| 439 |
+
in order to count $\mathcal{A}_{i} := \{ A\cap H_1 \cap \cdots \cap H_i : A \in \mathcal{A}, A\cap H_1 \cap \cdots \cap H_i \neq \emptyset\}$, the number of regions in $\mathcal{A}_i$ bounded below is at most $\binom{n}{D-i}$ and the remaining ones are correspond to $\mathcal{A}_{i+1}$.
|
| 440 |
+
|
| 441 |
+
It thus follows that
|
| 442 |
+
$|\mathcal{A}| \le \sum_{j=0}^D \binom{n}{j} \le D \cdot n^D$,
|
| 443 |
+
as desired.
|
| 444 |
+
\end{proof}
|
| 445 |
+
|
| 446 |
+
\begin{proof} [Proof of Theorem~\ref{theo:knn}]
|
| 447 |
+
We have
|
| 448 |
+
\begin{align*}
|
| 449 |
+
&|f_k(x) - f(x)|%
|
| 450 |
+
\le \left|\frac{1}{|N_k(x)|}\sum_{i=1}^n (f(x_i)- f(x)) \cdot 1\left[ x_i \in N_k(x) \right] \right| \\ &\hspace{1cm} + \left|\frac{1}{|N_k(x)|}\sum_{i=1}^n \xi_{x_i} \cdot 1\left[ x_i \in N_k(x) \right] \right|\\
|
| 451 |
+
&\le u_f(x, r_k(x)) + \left|\frac{1}{N_k(x)}\sum_{i=1}^n \xi_{x_i} \cdot 1\left[ x_i \in N_k(x) \right] \right|.
|
| 452 |
+
\end{align*}
|
| 453 |
+
The first term can be viewed as the bias term and the second can be viewed as variance term.
|
| 454 |
+
|
| 455 |
+
By Lemma~\ref{rkbound}, we can bound the first term as follows with probability at least $1 - \delta/2$ uniformly
|
| 456 |
+
in $x \in \mathcal{X}$: $u_f(x, r_k(x)) \le u_f\left(x,\left(\frac{2k}{\gamma \cdot p_{X, 0} \cdot v_D\cdot n}\right)^{1/D}\right)$.
|
| 457 |
+
For the variance term, we have by Hoeffding's inequality that if
|
| 458 |
+
$A_x := \left|\frac{1}{k}\sum_{i=1}^n \xi_{x_i} \cdot 1\left[ x_i \in N_k(x) \right] \right|$
|
| 459 |
+
then
|
| 460 |
+
$\mathbb{P}\left(A_x > \frac{\sqrt{2} \sigma \cdot t}{\sqrt{k}}\right) \le \exp \left( - t^2 \right)$.
|
| 461 |
+
|
| 462 |
+
Taking $t = \sqrt{D\log n + \log(2D/\delta)}$, then we have
|
| 463 |
+
$\mathbb{P}\left(A_x > \frac{\sqrt{2} \sigma \cdot t}{\sqrt{k}}\right) \le \delta/ (2 D \cdot n^D)$.
|
| 464 |
+
|
| 465 |
+
By Lemma~\ref{knncount} and union bound, it follows that
|
| 466 |
+
$\mathbb{P}\left(\sup_{x \in \mathcal{X}} A_x > \frac{\sqrt{2} \sigma \cdot t}{\sqrt{k}}\right) \le \delta/2$.
|
| 467 |
+
Hence, we have with probability at least $1 - \delta$,
|
| 468 |
+
\begin{align*}
|
| 469 |
+
|f(x) - f_k(x)| &\le u_f\left(x,\left(\frac{2k}{\gamma \cdot p_{X, 0}\cdot v_d\cdot n}\right)^{1/D}\right) \\
|
| 470 |
+
&+ 2\sigma \sqrt{\frac{D \log n + \log(2/\delta)}{k}}.
|
| 471 |
+
\end{align*}
|
| 472 |
+
uniformly in $x \in \mathcal{X}$.
|
| 473 |
+
\end{proof}
|
| 474 |
+
|
| 475 |
+
It is easy to see that a simple modification to the proof of Theorem~\ref{theo:knn} will yield the following.
|
| 476 |
+
\begin{corollary} [$k$-NN Regression Upper and Lower Bounds] \label{corr:knnbounds}
|
| 477 |
+
Let
|
| 478 |
+
\begin{align*}
|
| 479 |
+
\hat{u}_f(x, r) &:= \sup_{x' \in B(x, r)} f(x') - f(x) \\
|
| 480 |
+
\check{u}_f(x, r) &:= \sup_{x' \in B(x, r)} f(x) - f(x')\\
|
| 481 |
+
\varepsilon_{\text{var}} &:= 2\sigma \sqrt{ \frac{D \log n + \log(2/\delta)}{k}} \\
|
| 482 |
+
\varepsilon_k &:= \left(\frac{2k}{\gamma p_{X, 0} v_D\cdot n}\right)^{1/D}.
|
| 483 |
+
\end{align*}
|
| 484 |
+
Suppose that Assumptions~\ref{a1},~\ref{a2}, and~\ref{a3} hold and that
|
| 485 |
+
\begin{align*}
|
| 486 |
+
k \ge 2^8 \cdot D \log^2(4/\delta) \cdot \log n.
|
| 487 |
+
\end{align*}
|
| 488 |
+
Then probability at least $1 - \delta$, the following holds uniformly in $x \in \mathcal{X}$.
|
| 489 |
+
\begin{align*}
|
| 490 |
+
f_k(x) &\le f(x) + \hat{u}_f(x, \varepsilon_k) + \varepsilon_{\text{var}}\\
|
| 491 |
+
f_k(x) &\ge f(x) - \check{u}_f (x, \varepsilon_k) - \varepsilon_{\text{var}}.
|
| 492 |
+
\end{align*}
|
| 493 |
+
\end{corollary}
|
| 494 |
+
\subsection{Proof of Theorem~\ref{theo:knnmanifold}}
|
| 495 |
+
We need the following guarantee on the volume of the intersection of a Euclidean ball and $M$; this is required to get a handle on the true mass of the ball under
|
| 496 |
+
$\mathcal{P}$ in later arguments. The proof can be found in \cite{jiang2017density}.
|
| 497 |
+
|
| 498 |
+
\begin{lemma} [Ball Volume] \label{ballvolume}
|
| 499 |
+
If $0 < r < \min\{\tau/(4d), 1/\tau\}$, and $x \in M$ then
|
| 500 |
+
\begin{align*}
|
| 501 |
+
1 - \tau^2 r^2 &\le \frac{\text{vol}_{d} (B(x, r) \cap M)}{v_{d} r^{d}} \le 1 + 4d\cdot r/\tau,
|
| 502 |
+
\end{align*}
|
| 503 |
+
where $\text{vol}_{d}$ is the volume w.r.t. the uniform measure on $M$.
|
| 504 |
+
\end{lemma}
|
| 505 |
+
|
| 506 |
+
The next is the manifold analogue of Lemma~\ref{rkbound}.
|
| 507 |
+
\begin{lemma} \label{rkboundmanifold}
|
| 508 |
+
Suppose that Assumptions~\ref{a2},~\ref{a3}, and~\ref{manifold} hold.
|
| 509 |
+
The following holds with probability at least $1 - \delta/2$.
|
| 510 |
+
If
|
| 511 |
+
\begin{align*}
|
| 512 |
+
2^8 \cdot D \log^2(4/\delta) \cdot \log n \le k \le \frac{1}{4} \left(\min \left\{ \frac{\tau}{4d}, \frac{1}{\tau} \right\} \right)^d p_{X, 0}\cdot v_d \cdot n.
|
| 513 |
+
\end{align*}
|
| 514 |
+
then for all $x \in M$,
|
| 515 |
+
$r_k(x) \le \left( \frac{4k}{ v_d \cdot n \cdot p_{X, 0}}\right)^{1/d}$.
|
| 516 |
+
\end{lemma}
|
| 517 |
+
\begin{proof}
|
| 518 |
+
Let $r =\left( \frac{4k}{ v_d \cdot n \cdot p_{X, 0}}\right)^{1/d}$. We have
|
| 519 |
+
\begin{align*}
|
| 520 |
+
\mathcal{P}(B(x, r)) &\ge \inf_{x' \in B(x, r) \cap M} p_X(x') \cdot \text{Vol}_d (B(x, r) \cap M) \\
|
| 521 |
+
&\ge p_{X, 0} \cdot (1 - \tau^2 r^2)\cdot v_d r^d \ge \frac{1}{2} p_{X, 0} v_d r^d \ge \frac{2k}{n}.
|
| 522 |
+
\end{align*}
|
| 523 |
+
By Lemma 7 of \cite{chaudhuri2010rates} and the condition on $k$, it follows that with probability $1 - \delta/2$, uniformly in $x \in \mathcal{X}$,
|
| 524 |
+
$\mathcal{P}_n(B(x, r)) \ge \frac{k}{n}$. Hence, $r_k(x) < r$ and the result follows immediately.
|
| 525 |
+
\end{proof}
|
| 526 |
+
|
| 527 |
+
Theorem~\ref{theo:knnmanifold} now follows by replacing the usage of Lemma~\ref{rkbound} with Lemma~\ref{rkboundmanifold}. We also note that an analogous result to Corollary~\ref{corr:knnbounds} can also be established.
|
| 528 |
+
|
| 529 |
+
|
| 530 |
+
|
| 531 |
+
It is easy to see that a simple modification to the proof of Theorem~\ref{theo:knn} will yield the following.
|
| 532 |
+
\begin{corollary} [$k$-NN Regression Upper and Lower Bounds] \label{corr:knnbounds}
|
| 533 |
+
Let
|
| 534 |
+
\begin{align*}
|
| 535 |
+
\hat{u}_f(x, r) &:= \sup_{x' \in B(x, r)} f(x') - f(x) \\
|
| 536 |
+
\check{u}_f(x, r) &:= \sup_{x' \in B(x, r)} f(x) - f(x')\\
|
| 537 |
+
\varepsilon_{\text{var}} &:= 2\sigma \sqrt{ \frac{D \log n + \log(2/\delta)}{k}} \\
|
| 538 |
+
\varepsilon_k &:= \left(\frac{2k}{\gamma p_{X, 0} v_D\cdot n}\right)^{1/D}.
|
| 539 |
+
\end{align*}
|
| 540 |
+
Suppose that Assumptions~\ref{a1},~\ref{a2}, and~\ref{a3} hold and that
|
| 541 |
+
\begin{align*}
|
| 542 |
+
k \ge 2^8 \cdot D \log^2(4/\delta) \cdot \log n.
|
| 543 |
+
\end{align*}
|
| 544 |
+
Then probability at least $1 - \delta$, the following holds uniformly in $x \in \mathcal{X}$.
|
| 545 |
+
\begin{align*}
|
| 546 |
+
f_k(x) &\le f(x) + \hat{u}_f(x, \varepsilon_k) + \varepsilon_{\text{var}}\\
|
| 547 |
+
f_k(x) &\ge f(x) - \check{u}_f (x, \varepsilon_k) - \varepsilon_{\text{var}}.
|
| 548 |
+
\end{align*}
|
| 549 |
+
\end{corollary}
|
| 550 |
+
\subsection{Proofs of Theorem~\ref{theo:levelset} and~\ref{theo:levelset-manifold}}
|
| 551 |
+
\begin{proof}[Proof of Theorem~\ref{theo:levelset}]
|
| 552 |
+
We have that $E[\hat{\sigma}^2] = 2M^2 \ge 2\text{Var}(\xi^2) =2\sigma^2$. Thus, when $n$ is sufficiently large depending on $\xi$, $f$, and $\delta$, we have by Bernstein-type concentration inequalities that with probability at least $1 - \delta$, $2\sigma \le \hat{\sigma} \le \sqrt{5}M$.
|
| 553 |
+
|
| 554 |
+
Let $\tilde{r} := 2(2\epsilon/\check{C})^{1/\beta}$ and let us use the notation introduced in Corollary~\ref{corr:knnbounds}. It suffices to show that (1)
|
| 555 |
+
$\widehat{L}_f(\lambda) \subseteq L_f(\lambda) \oplus \tilde{r}$ and
|
| 556 |
+
(2) $L_f(\lambda) \subseteq \widehat{L}_f(\lambda) \oplus \tilde{r}$.
|
| 557 |
+
We begin with (1). We have
|
| 558 |
+
\begin{align*}
|
| 559 |
+
\sup_{x \in \mathcal{X} \backslash (L_f(\lambda) \oplus \tilde{r})} f_k(x)
|
| 560 |
+
&\le \sup_{x \in \mathcal{X} \backslash (L_f(\lambda) \oplus \tilde{r})} (f(x)
|
| 561 |
+
+ \hat{u}_f(x, \epsilon_k)) + \varepsilon_{\text{var}} \\
|
| 562 |
+
&\le \sup_{x \in \mathcal{X} \backslash (L_f(\lambda) \oplus \tilde{r})} \sup_{x' \in B(x, \epsilon_k)} f(x') + \varepsilon_{\text{var}} \\
|
| 563 |
+
&= \sup_{x \in \mathcal{X} \backslash (L_f(\lambda) \oplus (\tilde{r} - \epsilon_k))} f(x) + \varepsilon_{\text{var}} \\
|
| 564 |
+
&\le \lambda - \check{C} (\tilde{r} - \epsilon_k)^\beta + \varepsilon_{\text{var}} \le \lambda - \epsilon,
|
| 565 |
+
\end{align*}
|
| 566 |
+
where the first inequality holds by Corollary~\ref{corr:knnbounds},
|
| 567 |
+
the second-to-last inequality holds by $\beta$-regularity and that $\tilde{r} < r_M$, and the last inequality holds by the conditions on $k$ (which in particular imply $\epsilon \ge 2\varepsilon_{\text{var}}$ and $\epsilon_k < (2\epsilon/\check{C})^{1/\beta}$).
|
| 568 |
+
Thus, if $x \not\in L_f(\lambda) \oplus \tilde{r}$, then $f_k(x) < \lambda - \epsilon$. Therefore, $\widehat{L}_f(\lambda) \subseteq L_f(\lambda) \oplus \tilde{r}$, which establishes (1).
|
| 569 |
+
|
| 570 |
+
We now show (2). Let $\bar{r} = \epsilon_k$. Since $\bar{r} < \tilde{r}$, it suffices to show that $L_f(\lambda) \subseteq \widehat{L}_f(\lambda) \oplus \bar{r}$. For any $x \in L_f(\lambda)$, we have
|
| 571 |
+
\begin{align*}
|
| 572 |
+
\mathcal{P}(B(x, \bar{r}))
|
| 573 |
+
\ge \frac{2k}{n} \ge \frac{16 \log(4/\delta) D \log n}{n},
|
| 574 |
+
\end{align*}
|
| 575 |
+
where the last inequality holds by the conditions on $k$.
|
| 576 |
+
Hence, by Lemma 7 of \cite{chaudhuri2010rates}, we have $\mathcal{P}_n(B(x, \bar{r})) > 0$.
|
| 577 |
+
Thus, for any $x \in L_f(\lambda)$, there exists a sample point in $B(x, \bar{r})$. Furthermore, we have
|
| 578 |
+
\begin{align*}
|
| 579 |
+
\inf_{x' \in B(x, \bar{r})} f_k(x') &\ge \inf_{x' \in B(x, \bar{r})} f(x) - \check{u}_f(x, \epsilon_k) - \varepsilon_{\text{var}}\\
|
| 580 |
+
&\ge \inf_{x' \in B(x, \bar{r})} \inf_{x'' \in B(x', \epsilon_k)} f(x'') - \varepsilon_{\text{var}}\\
|
| 581 |
+
&= \inf_{x' \in B(x, \bar{r} + \epsilon_k)} f(x') - \varepsilon_{\text{var}}\\
|
| 582 |
+
&\ge \lambda - \hat{C}(\bar{r} + \epsilon_k)^{\beta} - \varepsilon_{\text{var}} \ge \lambda - \epsilon.
|
| 583 |
+
\end{align*}
|
| 584 |
+
where the first inequality holds by Corollary~\ref{corr:knnbounds}, the second last inequality holds by $\beta$-regularity, and the final inequality holds by the conditions on $k$.
|
| 585 |
+
|
| 586 |
+
Thus, for any $x \in L_f(\lambda)$, not only does there exists a sample point in $B(x, \bar{r})$, but any such sample point will have $f_k$ value at least $\lambda - \epsilon$ and thus is in $\widehat{L}_f(\lambda)$. Therefore, $L_f(\lambda) \subseteq \widehat{L}_f(\lambda) \oplus \bar{r}$,
|
| 587 |
+
as desired.
|
| 588 |
+
\end{proof}
|
| 589 |
+
|
| 590 |
+
\begin{proof}[Proof of Theorem~\ref{theo:levelset-manifold}]
|
| 591 |
+
The proof is the same as that of Theorem~\ref{theo:levelset} but with the full-dimensional $k$-NN regression bounds replaced by the manifold versions, and is omitted here.
|
| 592 |
+
\end{proof}
|
| 593 |
+
\subsection{Proof of Theorem~\ref{theo:maxima}}
|
| 594 |
+
\begin{proof} [Proof of Theorem~\ref{theo:maxima}]
|
| 595 |
+
Define the following.
|
| 596 |
+
\begin{align*}
|
| 597 |
+
\varepsilon_{\text{var}} &:= 2\sigma \sqrt{ \frac{D \log n + \log(2/\delta)}{k}},
|
| 598 |
+
\varepsilon_k := \left(\frac{2k}{\gamma \cdot p_{X, 0} v_D\cdot n}\right)^{1/D}\\
|
| 599 |
+
\tilde{r}^2 &:= \max \{ 16 \varepsilon_{\text{var}} / \hat{C}, (2\epsilon_k/c)^2 \},
|
| 600 |
+
\end{align*}
|
| 601 |
+
where $c^2 = \check{C}/8\hat{C}$. The goal is now to show $|x - x_0| \le \tilde{r}$.
|
| 602 |
+
The proof now mirrors that of Theorem 1 of \citet{dasgupta2014optimal}.
|
| 603 |
+
It suffices to show that
|
| 604 |
+
\begin{align*}
|
| 605 |
+
\sup_{x \in \mathcal{X} \backslash B(x_0, \tilde{r})} f_k(x) < \inf_{x \in B(x_0, r_n)} f_k(x),
|
| 606 |
+
\end{align*}
|
| 607 |
+
where $r_n = d(x_0, X)$.
|
| 608 |
+
We have by Corollary~\ref{corr:knnbounds}:
|
| 609 |
+
\begin{align*}
|
| 610 |
+
\sup_{x \in \mathcal{X} \backslash B(x_0, \tilde{r})} f_k(x)
|
| 611 |
+
&\le \sup_{x \in \mathcal{X} \backslash B(x_0, \tilde{r})} f(x) + \hat{u}_f(x, \varepsilon_k) + \varepsilon_{\text{var}}\\
|
| 612 |
+
&\le \sup_{x \in \mathcal{X} \backslash B(x_0, \tilde{r})} f(x) + \hat{u}_f(x, \tilde{r}/2) + \varepsilon_{\text{var}}\\
|
| 613 |
+
&\le \sup_{x \in \mathcal{X} \backslash B(x_0, \tilde{r}/2)} f(x) + \varepsilon_{\text{var}} \\
|
| 614 |
+
&\le f(x_0) - \check{C}(\tilde{r}/2)^2 + \varepsilon_{\text{var}}.
|
| 615 |
+
\end{align*}
|
| 616 |
+
On the other hand,
|
| 617 |
+
\begin{align*}
|
| 618 |
+
\inf_{x \in B(x_0, r_n)} f_k(x)
|
| 619 |
+
&\ge \inf_{x \in B(x_0, r_n)} f(x) - \check{u}_f(x, \varepsilon_k) - \varepsilon_{\text{var}} \\
|
| 620 |
+
&\ge \inf_{x \in B(x_0, c \tilde{r}/2)} f(x) - \check{u}_f(x, c\tilde{r}/2) - \varepsilon_{\text{var}}\\
|
| 621 |
+
&\ge \inf_{x \in B(x_0, c\tilde{r})} f(x) - \varepsilon_{\text{var}} \\
|
| 622 |
+
&\ge f(x_0) - \hat{C} (c\tilde{r})^2 - \varepsilon_{\text{var}}.
|
| 623 |
+
\end{align*}
|
| 624 |
+
The result now follows from our choice of $\tilde{r}$.
|
| 625 |
+
\end{proof}
|
| 626 |
+
{\bf Conclusion: }
|
| 627 |
+
We provided finite-sample sup-norm bounds for $k$-NN regression under standard nonparametric assumptions for both the full-dimensional and manifold setting.
|
| 628 |
+
We then applied our results to level-set and global maxima estimation.
|
| 629 |
+
|
| 630 |
+
\newpage{
|
| 631 |
+
\bibliography{paper}
|
| 632 |
+
\bibliographystyle{plainnat}
|
| 633 |
+
}
|
1707.06320v2.txt
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Following the word embedding upheaval of the past few years, one of NLP’s next big challenges has become the hunt for universal sentence representations: generic representations of sentence meaning that can be “plugged into” any kind of system or pipeline. Examples include Paragraph2Vec Le and Mikolov (2014), C-Phrase Pham et al. (2015), SkipThought Kiros et al. (2015) and FastSent Hill et al. (2016a). These representations tend to be learned from large corpora in an unsupervised setting, much like word embeddings, and effectively “transferred” to the task at hand.
|
| 2 |
+
|
| 3 |
+
Purely text-based semantic models, which represent wordmeaning as a distribution over other wordsHarris (1954); Turney and Pantel (2010); Clark (2015), suffer from the grounding problem Harnad (1990). It has been shown that grounding leads to improved performance on a variety of word-level tasks Baroni (2016); Kiela (2017). Unsupervised sentence representation models are often doubly exposed to the grounding problem, especially if they represent sentence meanings as a distribution over other sentences, as in SkipThought Kiros et al. (2015).
|
| 4 |
+
|
| 5 |
+
Here, we examine whether grounding also leads to improved sentence representations. In short, the grounding problem is characterized by the lack of an association between symbols and external information. We address this problem by aligning text with paired visual data and hypothesize that sentence representations can be enriched with external information—i.e., grounded—by forcing them to capture visual semantics. We investigate the performance of these representations and the effect of grounding on a variety of semantic benchmarks.
|
| 6 |
+
|
| 7 |
+
There has been much recent interest in generating actual images from text Goodfellow et al. (2014); van den Oord et al. (2016); Mansimov et al. (2016). Our method takes a slightly different approach: instead of predicting actual images, we train a deep recurrent neural network to predict the latent feature representation of images. That is, we are specifically interested in the semantic content of visual representations and how useful that information is for learning sentence representations. One can think of this as trying to imagine, or form a “mental picture”, of a sentence’s meaning Chrupała et al. (2015). Much like a sentence’s meaning in classical semantics is given by its model-theoretic ground truth Tarski (1944), our ground truth is provided by images.
|
| 8 |
+
|
| 9 |
+
Grounding is likely to be more useful for concrete words and sentences: a sentence such as “democracy is a political system” does not yield any coherent mental picture. In order to accommodate the fact that much of language is abstract, we take sentence representations obtained using text-only data (which are better for representing abstract meaning) and combine them with the grounded representations that our system learns (which are good for representing concrete meaning), leading to multi-modal sentence representations.
|
| 10 |
+
|
| 11 |
+
In what follows, we introduce a system for grounding sentence representations by learning to predict visual content. Although it is not the primary aim of this work, it is important to first examine how well this system achieves what it is trained to do, by evaluating on the COCO5K image and caption retrieval task. We then analyze the performance of grounded representations on a variety of sentence-level semantic transfer tasks, showing that grounding increases performance over text-only representations. We then investigate an important open question in multi-modal semantics: to what extent are improvements in semantic performance due to grounding, rather than to having more data or data from a different distribution? In the remainder, we analyze the role that concreteness plays in representation quality and show that our system learns grounded word embedding projections that outperform non-grounded ones. To the best of our knowledge, this is the first work to comprehensively study grounding for distributed sentence representations on such a wide set of semantic benchmark tasks.
|
| 12 |
+
|
| 13 |
+
Although there appears to be a consensuswith regard to the methodology for learning word representations, this is muchmore of an open problem for sentence representations. Recent work has rangedfrom trying to learn to compose word embeddingsLe and Mikolov (2014); Pham et al. (2015); Wieting et al. (2016); Arora et al. (2017), to neuralarchitectures for predicting the previous and next sentencesKiros et al. (2015) or learning representations via large-scale supervised tasks Conneau et al. (2017). In particular, SkipThought Kiros et al. (2015) led to an increased interest in learning sentence representations. Hill et al. (2016a) compare a wide selection ofunsupervised and supervised methods, including a basic captionprediction system that is similar to ours. That study finds that “different learning methods arepreferable for different intended applications”, i.e., that the matter ofoptimal universal sentence representations is as of yet far from decided.
|
| 14 |
+
|
| 15 |
+
InferSent Conneau et al. (2017) recently showed that supervised sentence representations can be of very high quality. Here, we learn grounded sentence representations in a supervised setting, combine them with standard unsupervised sentence representations, and show how grounding can help for a variety of sentence-level tasks.
|
| 16 |
+
|
| 17 |
+
Language grounding in semantics has been motivated by evidence that human meaning representations are grounded in perceptual experience Jones et al. (1991); Perfetti (1998); Andrews et al. (2009); Riordan and Jones (2011). That is, despite ample evidence of humans representing meaning with respect to an external environment and sensorimotor experience Barsalou (2008); Louwerse (2008), standard semantic models rely solely on textual data. This gives rise to an infinite regress in text-only semantic representations, i.e., words are defined in terms of other words, ad infinitum.
|
| 18 |
+
|
| 19 |
+
The field of multi-modal semantics, which aims to address this issue by enriching textual representations with information from other modalities, has mostly been concerned with word representations (Bruni et al., 2014; Baroni, 2016; Kiela, 2017, and references therein). Learning multi-modal representations that ground text-only representations has been shown to improve performance on a variety of core NLP tasks. This work is most closely related to that of Chrupała et al. (2015), who also aim to ground language by relating images to captions: here, we additionally address abstract sentence meaning; have a different architecture, loss function and fusion strategy; and explicitly focus on grounded universal sentence representations.
|
| 20 |
+
|
| 21 |
+
There is a large body of work that involves jointly embedding images and text, at the word level Frome et al. (2013); Joulin et al. (2016), the phrase level Karpathy et al. (2014); Li et al. (2016), and the sentence level Karpathy and Fei-Fei (2015); Klein et al. (2015); Kiros et al. (2015); Chen and Zitnick (2015); Reed et al. (2016). Our model similarly learns to map sentence representations to be consistent with a visual semantic space, and we focus on studying how these grounded text representations transfer to NLP tasks.
|
| 22 |
+
|
| 23 |
+
Moreover, there has been a lot of work in recent years on the task of image caption generation Bernardi et al. (2016); Vinyals et al. (2015); Mao et al. (2015); Fang et al. (2015). Here, we do the opposite: we predict the correct image (features) from the caption, rather than the caption from the image (features). Similar ideas were recently successfully applied to multi-modal machine translation Elliott and Kádár (2017); Gella et al. (2017); Lee et al. (2017). Recently, Das et al. (2017) trained dialogue agents to communicate about images, trying to predict image features as well.
|
| 24 |
+
|
| 25 |
+
In the following, let 𝒟={(Ik,𝒞k)}k=1N𝒟superscriptsubscriptsubscript𝐼𝑘subscript𝒞𝑘𝑘1𝑁\mathcal{D}=\left\{(I_{k},\mathcal{C}_{k})\right\}_{k=1}^{N} be a dataset where each imageIksubscript𝐼𝑘I_{k} is associated with one or more captions 𝒞k={C1,…,C|𝒞|k}subscript𝒞𝑘subscript𝐶1…subscript𝐶subscript𝒞𝑘\mathcal{C}_{k}=\{C_{1},\ldots,C_{|\mathcal{C}|_{k}}\}.A prominent example of such a dataset is COCO Lin et al. (2014), whichconsists of images with up to 5 corresponding captions for each image.The objective of our approach is to encode a given sentence, i.e., a caption C𝐶C,and learn to ground it in the corresponding image I𝐼I. To encode the sentence, we train a bidirectional LSTM(BiLSTM) on the caption, where the input is a sequence of projected word embeddings. We combine the final left-to-right and right-to-left hidden states of the LSTM and take the element-wise maximum to obtain a sentence encoding. We then examine three distinct methods for grounding the sentence encoding.
|
| 26 |
+
|
| 27 |
+
In the first method, we try to predict the image features (Cap2Img). That is, we learn to map the caption to the same space as the image features that represent the correct image. We call this strong perceptual grounding, where we take the visual input directly into account.
|
| 28 |
+
|
| 29 |
+
An alternative method is to exploit the fact that one image in COCO has multiple captions (Cap2Cap), and to learn to predict which other captions are valid descriptions of the same image. This approach is strictly speaking not perceptually grounded, but exploits the fact that there is an implicit association between the captions and the shared underlying image, and so could be considered a weaker version of grounding.
|
| 30 |
+
|
| 31 |
+
Finally, we experiment with a model that optimizes both these objectives jointly: that is, we predict both images and alternative captions for the same image (Cap2Both). Thus, Cap2Both incorporates both strong perceptual and weak implicit grounding. Please see Figure 1 for an illustration of the various models. In what follows, we discuss them in more technical detail.
|
| 32 |
+
|
| 33 |
+
To learn sentence representations, we employ a bidirectional LSTM architecture. In particular, let x=(x1,…,xT)𝑥subscript𝑥1…subscript𝑥𝑇{x=(x_{1},\ldots,x_{T})} be an input sequence whereeach word is represented via an embedding 𝐱t∈ℝnsubscript𝐱𝑡superscriptℝ𝑛{\mathbf{x}_{t}\in\mathbb{R}^{n}}. Using a standard LSTM Hochreiter and Schmidhuber (1997), the hidden state at time t𝑡t, denoted 𝐡t∈ℝmsubscript𝐡𝑡superscriptℝ𝑚\mathbf{h}_{t}\in\mathbb{R}^{m}, is computed via
|
| 34 |
+
|
| 35 |
+
𝐡t+1,𝐜t+1=LSTM(𝐱t,𝐡t,𝐜t|Θ)subscript𝐡𝑡1subscript𝐜𝑡1LSTMsubscript𝐱𝑡subscript𝐡𝑡conditionalsubscript𝐜𝑡Θ\mathbf{h}_{t+1},\mathbf{c}_{t+1}=\text{LSTM}(\mathbf{x}_{t},\mathbf{h}_{t},\mathbf{c}_{t}\ |\ \Theta)
|
| 36 |
+
|
| 37 |
+
where 𝐜tsubscript𝐜𝑡\mathbf{c}_{t} denotes the cell state of the LSTM and where ΘΘ\Theta denotes its parameters.
|
| 38 |
+
|
| 39 |
+
To exploit contextual information in both input directions, we process inputsentences using a bidirectional LSTM, that reads an input sequence in both normal and reverse order. In particular, for an input sequence x𝑥x oflength T𝑇T, we compute the hidden state at time t𝑡t, 𝐡t∈ℝ2msubscript𝐡𝑡superscriptℝ2𝑚\mathbf{h}_{t}\in\mathbb{R}^{2m} via𝐡t+1fsubscriptsuperscript𝐡𝑓𝑡1\displaystyle\mathbf{h}^{f}_{t+1}=LSTM(𝐱t,𝐡tf,𝐜tf|Θf)absentLSTMsubscript𝐱𝑡subscriptsuperscript𝐡𝑓𝑡conditionalsubscriptsuperscript𝐜𝑓𝑡superscriptΘ𝑓\displaystyle=\text{LSTM}(\mathbf{x}_{t},\mathbf{h}^{f}_{t},\mathbf{c}^{f}_{t}\ |\ \Theta^{f})𝐡t+1bsubscriptsuperscript𝐡𝑏𝑡1\displaystyle\mathbf{h}^{b}_{t+1}=LSTM(𝐱T−t,𝐡tb,𝐜tb|Θb)absentLSTMsubscript𝐱𝑇𝑡subscriptsuperscript𝐡𝑏𝑡conditionalsubscriptsuperscript𝐜𝑏𝑡superscriptΘ𝑏\displaystyle=\text{LSTM}(\mathbf{x}_{T-t},\mathbf{h}^{b}_{t},\mathbf{c}^{b}_{t}\ |\ \Theta^{b})
|
| 40 |
+
|
| 41 |
+
Here, the two LSTMs process x𝑥x in a forward and a backward order, respectively. We subsequently use max:ℝd×ℝd→ℝd:→superscriptℝ𝑑superscriptℝ𝑑superscriptℝ𝑑{\max:\mathbb{R}^{d}\times\mathbb{R}^{d}\to\mathbb{R}^{d}} to combine them into their element-wise maximum, yielding the representation of a caption after it has been processed with the BiLSTM:
|
| 42 |
+
|
| 43 |
+
𝐡Tsubscript𝐡𝑇\displaystyle\mathbf{h}_{T}=max(𝐡tf,𝐡tb)absentsubscriptsuperscript𝐡𝑓𝑡subscriptsuperscript𝐡𝑏𝑡\displaystyle=\max(\mathbf{h}^{f}_{t},\mathbf{h}^{b}_{t})
|
| 44 |
+
|
| 45 |
+
We use GloVe vectors Pennington et al. (2014) for our word embeddings. The embeddings are kept fixed during training, which allows a trained sentence encoder to transfer to tasks (and a vocabulary) that it has not yet seen, provided GloVe embeddings are available. Since GloVe representations are not tuned to represent grounded information, we learn a global transformation of GloVe space to grounded word space. Specifically, let 𝐱¯∈ℝn¯𝐱superscriptℝ𝑛\overline{\mathbf{x}}\in\mathbb{R}^{n} be the original GloVe embeddings.We then learn a linear map U∈ℝn×n𝑈superscriptℝ𝑛𝑛U\in\mathbb{R}^{n\times n} such that 𝐱=U𝐱¯𝐱𝑈¯𝐱\mathbf{x}=U\overline{\mathbf{x}} and use 𝐱𝐱\mathbf{x} as input to the BiLSTM. The linear map U𝑈U and the BiLSTM are trained jointly.
|
| 46 |
+
|
| 47 |
+
Let 𝐯∈ℝI𝐯superscriptℝ𝐼\mathbf{v}\in\mathbb{R}^{I} be the latent representation of an image (e.g.the final layer of a ResNet). To ground captions in the images that they describe, we map 𝐡Tsubscript𝐡𝑇\mathbf{h}_{T} into thelatent space of image representations such that their similarity is maximized.In other words, we aim to predict the latent features of an image from its caption.The mapping of caption to image space is performed via a series of projections𝐩0subscript𝐩0\displaystyle\mathbf{p}_{0\phantom{+1}}=𝐡Tabsentsubscript𝐡𝑇\displaystyle=\mathbf{h}_{T}𝐩ℓ+1subscript𝐩ℓ1\displaystyle\mathbf{p}_{\ell+1}=ψ(Pℓ𝐩ℓ)absent𝜓subscript𝑃ℓsubscript𝐩ℓ\displaystyle=\psi(P_{\ell}\mathbf{p}_{\ell})where ψ𝜓\psi denotes a non-linearity such as ReLUs or tanh.
|
| 48 |
+
|
| 49 |
+
By jointly training the BiLSTM with these latent projections, we canthen ground the language model in its visual counterpart.In particular, let Θ=ΘBiLSTM∪{Pℓ}ℓ=1LΘsubscriptΘBiLSTMsuperscriptsubscriptsubscript𝑃ℓℓ1𝐿\Theta=\Theta_{\text{BiLSTM}}\cup\{P_{\ell}\}_{\ell=1}^{L} be theparameters of the BiLSTM as well as the projection layers.We then minimize the following ranking loss:ℒC2I(Θ)=∑(I,C)∈𝒟frank(I,C)+frank(C,I)subscriptℒC2IΘsubscript𝐼𝐶𝒟subscript𝑓rank𝐼𝐶subscript𝑓rank𝐶𝐼\mathcal{L}_{\text{C2I}}(\Theta)=\smashoperator[]{\sum_{(I,C)\in\mathcal{D}}^{}}f_{\text{rank}}(I,C)+f_{\text{rank}}(C,I)(1)wherefrank(a,b)=∑b′∈𝒩a[γ−sim(a,b)+sim(a,b′)]+subscript𝑓rank𝑎𝑏subscriptsuperscript𝑏′subscript𝒩𝑎subscriptdelimited-[]𝛾sim𝑎𝑏sim𝑎superscript𝑏′f_{\text{rank}}(a,b)=\sum_{b^{\prime}\in\mathcal{N}_{a}}\left[\gamma-\operatorname{sim}(a,b)+\operatorname{sim}(a,b^{\prime})\right]_{+}
|
| 50 |
+
|
| 51 |
+
where [x]+=max(0,x)subscriptdelimited-[]𝑥0𝑥[x]_{+}=\max(0,x) denotes the thresholdfunction at zero and γ𝛾\gamma defines the margin. Furthermore, 𝒩asubscript𝒩𝑎\mathcal{N}_{a} denotes the set of negative samples for an image orcaption and sim(⋅,⋅)sim⋅⋅\operatorname{sim}(\cdot,\cdot) denotes a similarity measure between vectors.In the following, we employ the cosine similarity, i.e.,sim(a,b)=⟨𝐚,𝐛⟩‖𝐚‖‖𝐛‖.sim𝑎𝑏𝐚𝐛norm𝐚norm𝐛\operatorname{sim}(a,b)=\frac{\langle\mathbf{a},\mathbf{b}\rangle}{\|\mathbf{a}\|\|\mathbf{b}\|}.
|
| 52 |
+
|
| 53 |
+
Although this loss is not smooth at zero, it can be trained end-to-end using subgradient methods. Compared to e.g. an l2subscript𝑙2l_{2} regression loss, Equation 1 is less susceptible to error incurred by subspaces of the visual representation that are irrelevant to the high level visual semantics. Empirically, we found it to be more robust to overfitting.
|
| 54 |
+
|
| 55 |
+
Let x=(x1,…,xT)𝑥subscript𝑥1…subscript𝑥𝑇x=(x_{1},\ldots,x_{T}), y=(y1,…,yS)𝑦subscript𝑦1…subscript𝑦𝑆y=(y_{1},\ldots,y_{S}) be a caption pairthat describes the same image. To learn weakly groundedrepresentations, weemploy a standard sequence-to-sequence model Sutskever et al. (2014), whose task is to predict y𝑦yfrom x𝑥x. As in the Cap2Cap model, let 𝐡Tsubscript𝐡𝑇\mathbf{h}_{T} be the representationof the input sentence after it has been processed with a BiLSTM. Wethen model the joint probability of y𝑦y given x𝑥x asp(y|x)=∏s=1Sp(ys|𝐡T,y1,…,ys−1,Θ).𝑝conditional𝑦𝑥superscriptsubscriptproduct𝑠1𝑆𝑝conditionalsubscript𝑦𝑠subscript𝐡𝑇subscript𝑦1…subscript𝑦𝑠1Θp\left(y\ |\ x\right)=\prod_{s=1}^{S}p\left(y_{s}\ |\ \mathbf{h}_{T},y_{1},\ldots,y_{s-1},\Theta\right).To model the conditional probability of yssubscript𝑦𝑠y_{s} we use the usual multiclass classification approachover the vocabulary of the corpus 𝒱𝒱\mathcal{V} such thatp(ys=k|𝐡T,y1,…,ys−1,Θ)=e⟨𝐯k,𝐲s⟩∑j=1|𝒱|e⟨𝐯j,𝐲s⟩.𝑝subscript𝑦𝑠conditional𝑘subscript𝐡𝑇subscript𝑦1…subscript𝑦𝑠1Θsuperscript𝑒subscript𝐯𝑘subscript𝐲𝑠superscriptsubscript𝑗1𝒱superscript𝑒subscript𝐯𝑗subscript𝐲𝑠p(y_{s}=k\ |\ \mathbf{h}_{T},y_{1},\ldots,y_{s-1},\Theta)=\frac{e^{\langle\mathbf{v}_{k},\mathbf{y}_{s}\rangle}}{\sum_{j=1}^{|\mathcal{V}|}e^{\langle\mathbf{v}_{j},\mathbf{y}_{s}\rangle}}.Here, 𝐲s=ψ(WV𝐠s+𝐛)subscript𝐲𝑠𝜓subscript𝑊𝑉subscript𝐠𝑠𝐛\mathbf{y}_{s}=\psi(W_{V}\mathbf{g}_{s}+\mathbf{b}) and 𝐠ssubscript𝐠𝑠\mathbf{g}_{s} is hiddenstate of the decoder LSTM at time s𝑠s.
|
| 56 |
+
|
| 57 |
+
To learn the model parameters, we minimize the negative log-likelihoodover all caption pairs, i.e.,
|
| 58 |
+
|
| 59 |
+
ℒC2C(θ)=−∑x,y∈𝒟∑s=1|y|logp(ys|𝐡T,y1,…,ys−1,Θ).subscriptℒC2C𝜃subscript𝑥𝑦𝒟superscriptsubscript𝑠1𝑦𝑝conditionalsubscript𝑦𝑠subscript𝐡𝑇subscript𝑦1…subscript𝑦𝑠1Θ\mathcal{L}_{\text{C2C}}(\theta)=-\smashoperator[l]{\sum_{x,y\in\mathcal{D}}^{}}\sum_{s=1}^{|y|}\log p(y_{s}|\ \mathbf{h}_{T},y_{1},\ldots,y_{s-1},\Theta).
|
| 60 |
+
|
| 61 |
+
Finally, we also integrate both concepts of grounding into a joint model, where we optimize the following loss function:
|
| 62 |
+
|
| 63 |
+
ℒC2B(Θ)=ℒC2I(Θ)+ℒC2C(Θ).subscriptℒC2BΘsubscriptℒ𝐶2𝐼Θsubscriptℒ𝐶2𝐶Θ\mathcal{L}_{\text{C2B}}(\Theta)=\mathcal{L}_{C2I}(\Theta)+\mathcal{L}_{C2C}(\Theta).
|
| 64 |
+
|
| 65 |
+
On their own, features from this system are likely to suffer from the fact that training on COCO introduces biases: aside from the inherent dataset bias in COCO itself, the system will only have coverage for concrete concepts. COCO is also a much smaller dataset than e.g. the Toronto Books Corpus often used in purely text-based methods Kiros et al. (2015). As such, grounded representations are potentially less “universal” than text-based alternatives, which also cover abstract concepts.
|
| 66 |
+
|
| 67 |
+
There is evidence that meaning is dually coded in the human brain: while abstract concepts are processed in linguistic areas, concrete concepts are processed in both linguistic and visual areas Paivio (1990). Anderson et al. (2017) recently corroborated this hypothesis using semantic representations and fMRI studies. In our case, we want to be able to accommodate concrete sentence meanings, for which our vision-centric system is likely to help; as well as abstract sentence meanings, where trying to “imagine” what “democracy is a political system” might look like will probably only introduce noise.
|
| 68 |
+
|
| 69 |
+
Hence, we optionally complement our systems’ representations with more abstract universal sentence representations trained on language-only data (specifically, the Toronto Books Corpus). Although it would be interesting to examine multitask scenarios where these representations are jointly learned, we leave this for future work. Here, instead, we combine grounded and language-only representations using simple concatenation, i.e., rgs=rgrounded∣∣rling−onlyr_{gs}=r_{grounded}\mid\mid r_{ling-only}. Concatenation has been proven to be a strong and straightforward mid-level multi-modal fusion method, previously explored in multi-modal semantics for word representations Bruni et al. (2014); Kiela and Bottou (2014). We call the combined system GroundSent (GS), and distinguish between sentences perceptually grounded in images (GroundSent-Img), weakly grounded in captions (GroundSent-Cap) or grounded in both (GroundSent-Both).
|
| 70 |
+
|
| 71 |
+
We use 300-dimensional GloVe Pennington et al. (2014) embeddings, trained on WebCrawl, for the initial word representations and optimize using Adam Kingma and Ba (2015). We use ELU Clevert et al. (2016) for the non-linearity in projection layers, set dropout to 0.5 and use a dimensionality of 1024 for the LSTM. The network was initialized with orthogonal matrices for the recurrent layers Saxe et al. (2014) and He initialization He et al. (2015) for all other layers. The learning rate and margin were tuned on the validation set using grid search.
|
| 72 |
+
|
| 73 |
+
We use the same COCO splits as Karpathy and Fei-Fei (2015) for training (113,287 images), validation (5000 images) and testing (5000 images). Image features for COCO were obtained by transferring the final layer from a ResNet-101 He et al. (2016) trained on ImageNet (ILSVRC 2015).
|
| 74 |
+
|
| 75 |
+
We are specifically interested in how well (grounded) universal sentence representations transfer to different tasks. To evaluate this, we perform experiments for a variety of tasks. In all cases, we compare against layer-normalized Skip-Thought vectors, a well-known high-performing sentence encoding method Ba et al. (2016). To ensure that we use the exact same evaluations, with identical hyperparameters and settings, we evaluate all systems with the same evaluation pipeline, namely SentEval Conneau and Kiela (2018)222See https://github.com/facebookresearch/SentEval. The aim of SentEval is to encompass a comprehensive set of benchmarks that has been loosely established in the research community as the standard for evaluating sentence representations.. Following previous work in the field, the idea is to take universal sentence representations and to learn a simple classifier on top for each of the transfer tasks—the higher the quality of the sentence representation, the better the performance on these transfer tasks should be.
|
| 76 |
+
|
| 77 |
+
We evaluate on the following well-known and widely used evaluations: movie review sentiment (MR) Pang and Lee (2005), product reviews (CR) Hu and Liu (2004), subjectivity classification (SUBJ) Pang and Lee (2004), opinion polarity (MPQA) Wiebe et al. (2005), paraphrase identification (MSRP) Dolan et al. (2004) and sentiment classification (SST, binary version) Socher et al. (2013). Accuracy is measured in all cases, except for MRPC, which measures accuracy and the F1-score.
|
| 78 |
+
|
| 79 |
+
Recent years have seen an increased interest in entailment classification as an appropriate evaluation of sentence representation quality. We evaluate representations on two well-known entailment, or natural language inference, datasets: the large-scale SNLI dataset Bowman et al. (2015) and the SICK dataset Marelli et al. (2014).
|
| 80 |
+
|
| 81 |
+
We implement a simple logistic regression on top of the sentence representation. In the cases of SNLI and SICK, as is the standard for these datasets, the representations for the individual sentences u𝑢u and v𝑣v are combined by using ⟨𝐮,𝐯,𝐮∗𝐯,|𝐮−𝐯|⟩𝐮𝐯𝐮𝐯𝐮𝐯\langle\mathbf{u},\mathbf{v},\mathbf{u}*\mathbf{v},|\mathbf{u}-\mathbf{v}|\rangle as the input features. We tune the seed and an l2subscript𝑙2l_{2} penalty on the validation sets for each, and train using Adam Kingma and Ba (2015), with a learning rate of 0.001 and a batch size of 32.
|
| 82 |
+
|
| 83 |
+
Although it is not the primary aim of this work to learn a state-of-the-art image and caption retrieval system, it is important to first establish the capability of our system to do what it is trained to do. Table 1 shows the results on the COCO5K caption and image retrieval tasks for the two models that predict image features. We compare our system against several well-known approaches, namely Deep Visual-Semantic Alignments (DVSA) Karpathy and Fei-Fei (2015), Fisher Vectors (FV) Klein et al. (2015) and Order Embeddings (OE) Vendrov et al. (2015).As the results show, Cap2Img performs very wellon this task, outperforming the compared models on caption retrieval and being very close to order embeddings on image retrieval333In fact, we found that we can achieve better performance on this task by reducing the dimensionality of the encoder. A lower dimensionality in the encoder also reduces the transferability of the features, unfortunately, so we leave a more thorough investigation of this phenomenon for future work.. The fact that the system outperforms Order Embeddings on caption retrieval suggests that it has a better sentence encoder. Cap2Both does not work as well on this task as the image-only case, probably because interference from the language signal makes the problem harder to optimize. The results indicate that the system has learned to predict image features from captions, and captions from images, at a level exceeding or close to the state-of-the-art on this task.
|
| 84 |
+
|
| 85 |
+
Having established that we can learn high-quality grounded sentence encodings, the core question we now wish to examine is how well grounded sentence representations transfer. In this section, we combine our grounded features with the high-quality layer-normalized SkipThought representations of Ba et al. (2016), leading to multi-modal sentence representations as described in Section 3.5. That is, we concatenate Cap2Cap, Cap2Img or Cap2Both and Skip-Thought with Layer Normalization (ST-LN) representations, yielding GroundSent-Cap, GroundSent-Img and GroundSent-Both representations, respectively. We report performance of ST-LN using SentEval, which led to slightly different numbers than what is reported in their paper444This is probably due to different seeds, optimization methods and other minor implementational details that differ between the original work and SentEval..
|
| 86 |
+
|
| 87 |
+
Table 2 shows the results for the semantic classification and entailment tasks. Note that all systems use the exact same evaluation pipeline, which makes them directly comparable. We can see that in all cases, grounding increases the performance. The question of which type of grounding works best is more difficult: generally, grounding with Cap2Cap and Cap2Both appears to do slightly better on most tasks, but on e.g. SST, Cap2Img works better. The entailment task results (SNLI and SICK in Table 2) show a similar picture: in all cases grounding improves performance.
|
| 88 |
+
|
| 89 |
+
It is important to note that, in this work, we are not necessarily concerned with replacing the state-of-the-art on these tasks: there are systems that perform better. We are primarily interested in whether grounding helps relative to text-only baselines. We find that it does.
|
| 90 |
+
|
| 91 |
+
An important open question is whether the increase in performance in multi-modal semantic models is due to qualitatively different information from grounding, or simply due to the fact that we have more parameters or data from a different distribution. In order to examine this, we implement a SkipThought-like model that also uses a bidirectional LSTM with element-wise max on the final hidden layer (henceforth referred to as STb). This model is architecturally identical to the sentence encoder used before: it can be thought of as Cap2Cap, but where the objective is not to predict an alternative caption, but to predict the previous and next sentence in the Toronto Books Corpus, just like SkipThought Kiros et al. (2015).
|
| 92 |
+
|
| 93 |
+
We train a 1024-dimensional and 2048-dimensional STb model (for one full iteration, with all other hyperparameters identical to Cap2Cap) to compare against: if grounding improves results because it introduces qualitatively different information, rather than just from having more parameters (i.e., a higher embedding dimensionality), we should expect the multi-modal GroundSent models to perform better not only than STb-1024, but also than STb-2048, which has the same number of parameters (recall that GroundSent models are combinations of grounded and linguistic-only representations). In addition, we compare against an “ensemble” of two different STb-1024 models (i.e., a concatenation of two separately trained STb-1024), to check that we are not (just) observing an ensemble effect.
|
| 94 |
+
|
| 95 |
+
As Table 3 shows, a more nuanced picture emerges in this comparison: grounding helps more for some datasets than for others. Grounded models outperform the STb-1024 model (which uses much more data—the Toronto Books Corpus is much larger than COCO) in all cases, often already without concatenating the textual modality. The ensemble of two STb-1024 models performs better than the individual one, and so does the higher-dimensional one. In the cases of CR and MRPC (F1), it appears that improved performance is due to having more data or ensemble effects. For the other datasets, grounding clearly yields better results. These results indicate that grounding does indeed capture qualitatively different information, yielding better universal sentence representations.
|
| 96 |
+
|
| 97 |
+
There are a few other important questions to investigate. The average abstractness or concreteness of the evaluation datasets may have a large impact on performance. In addition, word embeddings from the learned projection from GloVe input embeddings, which now provides a generic word-embedding grounding method even for words that are not present in the image-caption training data, can be examined.
|
| 98 |
+
|
| 99 |
+
As we have seen, performance across datasets and models can vary substantially. A dataset’s concreteness plays an important role in the relative merit of applying grounding: a dataset consisting mostly of abstract words is less likely to benefit from grounding than one that uses mostly concrete words. In order to examine this effect, we calculate the average concreteness of the evaluation datasets used in this study. Table 4 shows the average human-annotated concreteness ratings for all words (where available) in each dataset. The ratings were obtained by Brysbaert et al. (2014) in a large-scale study, yielding scores for 40,000 English words.
|
| 100 |
+
|
| 101 |
+
We observe that the two entailment datasets are more concrete, which is due to the fact that the premises are derived from caption datasets (Flickr30K in the case of SNLI; Flickr8K and video captions in the case of SICK). This explains why grounding can clearly be seen to help in these cases. For the semantic classification tasks, the more concrete datasets are MRPC and SST. The picture is less clear for the first, but in SST we see that the grounded representations definitely do work better. Concreteness values make it easier to analyze performance, but are apparently not always direct indicators of improvements with grounding.
|
| 102 |
+
|
| 103 |
+
Our models contain a projection layer that maps the GloVe word embeddings that they receive as inputs to a different embedding space. There has been a lot of interest in grounded word representations in recent years, so it is interesting to examine what kind of word representations our models learn. We omit Cap2Cap for reasons of space (it performs similarly to Cap2Both). As shown in Table 5, the grounded word projections that our network learns yield higher-quality word embeddings on four standard lexical semantic similarity benchmarks: MEN Bruni et al. (2014), SimLex-999 Hill et al. (2016b), Rare Words Luong et al. (2013) and WordSim-353 Finkelstein et al. (2001).
|
| 104 |
+
|
| 105 |
+
We have investigated grounding for universal sentence representations. We achieved good performance on caption and image retrieval tasks on the large-scale COCO dataset. We subsequently showed how the sentence encodings that the system learns can be transferred to various NLP tasks, and that grounded universal sentence representations lead to improved performance. We analyzed the source of improvements from grounding, and showed that the increased performance appears to be due to the introduction of qualitatively different information (i.e., grounding), rather than simply having more parameters or applying ensemble methods. Lastly, we showed that our systems learned high-quality grounded word embeddings that outperform non-grounded ones on standard semantic similarity benchmarks. It could well be that our methods are even more suited for more concrete tasks, such as visual question answering, visual storytelling, or image-grounded dialogue—an avenue worth exploring in future work. In addition, it would be interesting to explore multi-task learning for sentence representations where one of the tasks involves grounding.
|
1707.06422v3.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Predicting unknown values based on observed data is a problem central to many sciences, and well studied in statistics and machine learning. This problem becomes significantly harder if the training and test data do not have the same distribution, for example because they come from different domains. Such a distribution shift can happen whenever the circumstances under which the training data were gathered are different from those for which the predictions are to be made. A rich literature exists on this problem of domain adaptation, a particular task in the field of transfer learning; see e.g. Quiñonero-Candela et al. (2009); Pan and Yang (2010) for overviews.
|
| 2 |
+
|
| 3 |
+
When the domain changes, so may the relations between the different variables under consideration. While for some sets of variables 𝑨𝑨\bm{A}, a function f:𝓐→𝒴:𝑓→𝓐𝒴f:\bm{\mathcal{A}}\to\mathcal{Y} learned in one domain may continue to offer good predictions for Y∈𝒴𝑌𝒴Y\in\mathcal{Y} in a different domain, this may not be true of other sets 𝑨′superscript𝑨′\bm{A}^{\prime} of variables.Causal graphs (e.g., Pearl, 2009; Spirtes et al., 2000) allow us to reason about this in a principled way when the domains correspond to different external interventions on the system, or more generally, to different contexts in which a system has been measured. Knowledge of the causal graph that describes the data generating mechanism, and of which parts of the model are invariant across the different domains, allows one to transfer knowledge from one domain to the other in order to address the problem of domain adaptation (Spirtes et al., 2000; Storkey, 2009; Schölkopf et al., 2012; Bareinboim and Pearl, 2016).
|
| 4 |
+
|
| 5 |
+
Over the last years, various methods have been proposed to exploit the causal structure of the data generating process in order to address certain domain adaptation problems,each relying on different assumptions. For example, Bareinboim and Pearl (2016) providetheory for identifiability under transfer (“transportability”) assuming that the causal graph isknown, that interventions are perfect, and that the intervention targets are known.Hyttinen et al. (2015) also assume perfect interventions with known targets but do not rely on complete knowledge of the causal graph, instead inferring the relevant aspects of it from the data. Rojas-Carulla et al. (2018) make the assumption that if the conditional distribution of the target given some subset of covariates is invariant across different source domains, then this conditional distribution must also be the same in the target domain. The methods proposed in (Schölkopf et al., 2012; Zhang et al., 2013, 2015; Gong et al., 2016) all address challenging settings in which conditional independences that follow from the usual Markov and faithfulness assumptions alone do not suffice to solve the problem, but additional assumptions on the data generating process have to be made.
|
| 6 |
+
|
| 7 |
+
In this work, we will make no such additional assumptions, and address the setting in which both the causal graph and the intervention types and targets may be (partially) unknown.Our contributions are the following.We consider a set of relatively weak assumptions that make the problem well-posed.We propose an approach to solve this class of causal domain adaptation problems that can dealwith the presence of latent confounders. The main idea is to selectthe subset of features 𝑨𝑨\bm{A} that leads to the best predictions of Y𝑌Y in the source domains,while satisfying invariance (i.e., ℙ(Y|𝑨)ℙconditional𝑌𝑨\mathbb{P}(Y\,|\,\bm{A}) is the same in the source and target domains).To test whether the invariance condition is satisfied, we apply the recently proposed Joint Causal Inference(JCI) framework (Mooij et al., 2018) toexploit the information provided by multiple domainscorresponding to different interventions.The basic idea is as follows.First, a standard feature selection method isapplied to source domains data to find sets of features that are predictive of a target variable, trading off bias andvariance, but unaware of changes in the distribution across domains. A causal inference method thendraws conclusions from all given data about the possible causal graphs, avoiding sets of features for whichthe predictions would not transfer to the target domains.We propose a proof-of-concept implementation of our approach building on a causal discovery algorithm by Hyttinen et al. (2014).We evaluate the method on synthetic data and a real-world example.
|
| 8 |
+
|
| 9 |
+
Before giving a precise definition of the class of domain adaptation problems thatwe consider in this work, we begin with a motivating example.
|
| 10 |
+
|
| 11 |
+
This example provides an instance of a domain adaptation problem where feature selection methods that do not take into account the causal structure would pick a set of features that does not generalize to the target domain, and may lead to arbitrarily bad predictions (even asymptotically, as the number of data points tends to infinity). On the other hand, correctly taking into account the causal structure and the possible distribution shift from source to target domain allows to upper bound the prediction error in the target domain, as we will see in Section 2.3.
|
| 12 |
+
|
| 13 |
+
We now formalize the domain adaptation problems that we address in this paper.We will make use of the terminology of the recently proposedJoint Causal Inference (JCI) framework (Mooij et al., 2018).
|
| 14 |
+
|
| 15 |
+
Let us consider a system of interest described by a set of systemvariables {Xj}j∈𝒥subscriptsubscript𝑋𝑗𝑗𝒥\{X_{j}\}_{j\in\mathcal{J}}. In addition, we model the domain in which thesystem has been measured by context variables {Ci}i∈ℐsubscriptsubscript𝐶𝑖𝑖ℐ\{C_{i}\}_{i\in\mathcal{I}} (we willuse “context” as a synonym for “domain”).We will denote the tuple of all system and context variables as𝑽=((Xj)j∈𝒥,(Ci)i∈ℐ)𝑽subscriptsubscript𝑋𝑗𝑗𝒥subscriptsubscript𝐶𝑖𝑖ℐ\bm{V}=((X_{j})_{j\in\mathcal{J}},(C_{i})_{i\in\mathcal{I}}).System and context variables can be discrete or continuous. As a concreteexample, the system of interest could be a mouse. The system variables could beblood cell phenotypes such as the concentration of red blood cells, theconcentration of white blood cells, and the mean red blood cell volume. Thecontext variables could indicate for example whether a certain gene has beenknocked out, the dosage of a certain drug administered to the mice, the ageand gender of the mice, or the lab in which the measurements were done. Theimportant underlying assumption is that context variables are exogenousto the system, whereas system variables are endogenous. Theinterventions are not limited to the perfect (“surgical”) interventionsmodeled by the do-operator of Pearl (2009), but can also be other types ofinterventions such as mechanism changes (Tian and Pearl, 2001), soft interventions(Markowetz et al., 2005), fat-hand interventions (Eaton and Murphy, 2007),activity interventions (Mooij and Heskes, 2013), and stochastic versions of all these. Knowledge of the intervention targets is not necessary (but is certainly helpful).For example, administeringa drug to the mice may have a direct causal effect on an unknown subset of the system variables,but we can simply model it as a binary exogenous variable (indicating whether or not the drugwas administered) or a continuous exogenous variable (describingthe dosage of the administered drug) without specifying in advance on which variables it has a direct effect.We can now formally state the domain adaptation task that we address in this work:
|
| 16 |
+
|
| 17 |
+
An example is provided in Figure 2. In the next subsection, we will formalize our assumptionsto turn this task into a well-posed problem.
|
| 18 |
+
|
| 19 |
+
Our first main assumption is that the data generating process (on both systemand context variables) can be represented as a Structural Causal Model (SCM)(see e.g., (Pearl, 2009)):ℳ:{Ci=gi(𝑬pa(i)∩𝒦),i∈ℐXj=fj(𝑿pa(j)∩𝒥,𝑪pa(j)∩ℐ,𝑬pa(j)∩𝒦),j∈𝒥p(𝑬)=∏k∈𝒦p(Ek).:ℳcasessubscript𝐶𝑖formulae-sequenceabsentsubscript𝑔𝑖subscript𝑬pa𝑖𝒦𝑖ℐsubscript𝑋𝑗formulae-sequenceabsentsubscript𝑓𝑗subscript𝑿pa𝑗𝒥subscript𝑪pa𝑗ℐsubscript𝑬pa𝑗𝒦𝑗𝒥𝑝𝑬absentsubscriptproduct𝑘𝒦𝑝subscript𝐸𝑘\mathcal{M}:\begin{cases}C_{i}&=g_{i}(\bm{E}_{\text{pa}(i)\cap\mathcal{K}}),\qquad i\in\mathcal{I}\\X_{j}&=f_{j}(\bm{X}_{\text{pa}(j)\cap\mathcal{J}},\bm{C}_{\text{pa}(j)\cap\mathcal{I}},\bm{E}_{\text{pa}(j)\cap\mathcal{K}}),\qquad j\in\mathcal{J}\\p(\bm{E})&=\prod_{k\in\mathcal{K}}p(E_{k}).\end{cases}(1)Here, we introduced exogenous latent independent “noise” variables (Ek)k∈𝒦subscriptsubscript𝐸𝑘𝑘𝒦(E_{k})_{k\in\mathcal{K}} thatmodel latent causes of the context and system variables. The parents of each variable aredenoted by pa(⋅)pa⋅\text{pa}(\cdot). Each context and system variable is related to its parent variablesby a structural equation. In addition, we assume a factorizing probability distribution on theexogenous variables.There could be cyclic dependencies, for example due to feedback loops, but for simplicity of expositionwe will discuss only the acyclic case here, noting that the extension to the cycliccase is straightforward given recent theoretical advances on cyclic SCMs (Bongers et al., 2018).This SCM provides a causal model for the distributions of the various domains, and in particular,it induces a joint distribution ℙ(𝑽)ℙ𝑽\mathbb{P}(\bm{V}) on the context and system variables.Note that we will assume that the data generating process can be modeled by some model of this form,but we do not rely on knowing the precise model.
|
| 20 |
+
|
| 21 |
+
The SCM ℳℳ\mathcal{M} can be represented graphically by its causal graph 𝒢(ℳ)𝒢ℳ\mathcal{G}(\mathcal{M}), a graph withnodes ℐ∪𝒥ℐ𝒥\mathcal{I}\cup\mathcal{J} (i.e., the labels of both system and context variables), directed edgesl1→l2→subscript𝑙1subscript𝑙2l_{1}\to l_{2} for l1,l2∈ℐ∪𝒥subscript𝑙1subscript����2ℐ𝒥l_{1},l_{2}\in\mathcal{I}\cup\mathcal{J} iff l1∈pa(l2)subscript𝑙1pasubscript𝑙2l_{1}\in\text{pa}(l_{2}), and bidirected edgesl1↔l2↔subscript𝑙1subscript𝑙2l_{1}\leftrightarrow l_{2} for l1,l2∈ℐ∪𝒥subscript𝑙1subscript𝑙2ℐ𝒥l_{1},l_{2}\in\mathcal{I}\cup\mathcal{J} iff there exists a k∈pa(l1)∩pa(l2)∩𝒦𝑘pasubscript𝑙1pasubscript𝑙2𝒦k\in\text{pa}(l_{1})\cap\text{pa}(l_{2})\cap\mathcal{K}. In the acycliccase, this causal graph is an Acyclic Directed Mixed Graph (ADMG), and ℳℳ\mathcal{M} is also known as aSemi-Markov Causal Model (see e.g., (Pearl, 2009)). The directed edges represent direct causalrelationships, and the bidirected edges may represent hidden confounders (both relative to the set ofvariables in the ADMG).The (causal) Markov assumption holds (Richardson, 2003), i.e., any d-separation 𝑨⟂𝑩|𝑺[𝒢(ℳ)]perpendicular-to𝑨conditional𝑩𝑺delimited-[]𝒢ℳ\bm{A}\perp\bm{B}\,|\,\bm{S}\ [\mathcal{G}(\mathcal{M})] between sets of random variables 𝑨,𝑩,𝑺⊆𝑽𝑨𝑩𝑺𝑽\bm{A},\bm{B},\bm{S}\subseteq\bm{V} in the ADMG 𝒢(ℳ)𝒢ℳ\mathcal{G}(\mathcal{M}) implies a conditional independence 𝑨⟂⟂𝑩|𝑺[ℙ(𝑽)]\bm{A}{\,\perp\mkern-12.0mu\perp\,}\bm{B}\,|\,\bm{S}\ [\mathbb{P}(\bm{V})] in the distribution ℙ(𝑽)ℙ𝑽\mathbb{P}(\bm{V}) induced by the SCM ℳℳ\mathcal{M}.A standard assumption in causal discovery is that the joint distribution ℙ(𝑽)ℙ𝑽\mathbb{P}(\bm{V}) is faithful with respect to the ADMG 𝒢(ℳ)𝒢ℳ\mathcal{G}(\mathcal{M}), i.e., that there are no other conditional independences in the joint distribution than those implied by d-separation.
|
| 22 |
+
|
| 23 |
+
We will make the following assumptions on the causal structure(where henceforth we will simply write 𝒢𝒢\mathcal{G} instead of 𝒢(ℳ)𝒢ℳ\mathcal{G}(\mathcal{M})),which are discussed in detail by Mooij et al. (2018):
|
| 24 |
+
|
| 25 |
+
The first assumption is the most crucial one that captures what we meanby “context”. The other two assumptions are less crucial and could beomitted, depending on the application. For a more in-depth discussion ofthese modeling assumptions and on how they compare with other possible causalmodeling approaches, we refer the reader to (Mooij et al., 2018).Any causal discovery method can in principle be used in the JCIsetting, but identifiability greatly benefits from taking into account thebackground knowledge on the causal graph fromAssumption 1.
|
| 26 |
+
|
| 27 |
+
In addition, in order to be able to address the causal domain adaptation task, we will assume:
|
| 28 |
+
|
| 29 |
+
The Markov and faithfulness assumptions are standard in constraint-based causal discovery on a single domain; we apply them hereon the “meta-system” composed of system and context.
|
| 30 |
+
|
| 31 |
+
Assumption 2(2) may seem non-intuitive, but as we show in the Supplementary Material, it follows from more intuitive (but stronger) assumptions, for example if both the pooled source domains distribution ℙ(𝑽|C1=0)ℙconditional𝑽subscript𝐶10\mathbb{P}(\bm{V}\,|\,C_{1}=0) and the pooled target domains distribution ℙ(𝑽|C1=1)ℙconditional𝑽subscript𝐶11\mathbb{P}(\bm{V}\,|\,C_{1}=1) are Markov and faithful to the subgraph of 𝒢𝒢\mathcal{G} which excludes C1subscript𝐶1C_{1}. These stronger assumptions imply that the causal structure (i.e., presence or absence ofcausal relationships and confounders) of the other variables is invariant when going from source to target domains.Assumption 2(2) is a weakened version of these more natural assumptions, allowing additional independences to hold in the target domains compared to the source domains, e.g., when C1subscript𝐶1C_{1} models a perfect surgical intervention.
|
| 32 |
+
|
| 33 |
+
Assumption 2(iii) is strong, yet some assumption of that typeseems necessary to make the task well-defined. Without any informationat all aboutthe target(s) of C1subscript𝐶1C_{1}, orthe causal mechanism that determines the values of Y𝑌Y in the target domains, predicting the values of Y𝑌Y for the target domains seems generally impossible.Note that the assumption is more likely to be satisfied if the interventions are believed to be precisely targeted, and gets weaker the more relevant system variables are observed.333This assumption can be weakened further: in some circumstances one can infer from the data and the other assumptions that C1subscript𝐶1C_{1} cannot have a direct effect on Y𝑌Y.For example: if there exists a descendant D∈de(Y)𝐷de𝑌D\in\text{de}(Y), and if there exists a set 𝑺⊆𝑽∖({C1,Y}∪de(Y))𝑺𝑽subscript𝐶1𝑌de𝑌\bm{S}\subseteq\bm{V}\setminus(\{C_{1},Y\}\cup\text{de}(Y)), such that C1⟂⟂D|𝑺C_{1}{\,\perp\mkern-12.0mu\perp\,}D\,|\,\bm{S}, then C1subscript𝐶1C_{1} is not a direct cause of Y𝑌Y w.r.t. 𝑽𝑽\bm{V}. For some proposals on alternative assumptions that can be made when this assumption is violated, see e.g., (Schölkopf et al., 2012; Zhang et al., 2013, 2015; Gong et al., 2016).
|
| 34 |
+
|
| 35 |
+
As one example of a real-world setting in which these assumptions are reasonable, consider a genomics experiment, in which geneexpression levels of many different genes are measured in response to knockoutsof single genes. Given our present-day understanding of the biology of geneexpression, it is very reasonable to assume that the knockout of gene Xisubscript𝑋𝑖X_{i} onlyhas a direct effect on the expression level of gene Xisubscript𝑋𝑖X_{i} itself. As long as wedo not ask to predict the expression level of Xisubscript𝑋𝑖X_{i} under a knockout of Xisubscript𝑋𝑖X_{i},but only the expression level of other genes Y=Xj𝑌subscript𝑋𝑗Y=X_{j} with j≠i𝑗𝑖j\neq i,Assumption 2(iii) seems justified.It is also reasonable (based on present-day understanding of biology) to expect that a single gene knockout does not change the causal mechanisms in the rest of the system. This justifies Assumption 2(2) in this setting if one is willing to assume faithfulness.
|
| 36 |
+
|
| 37 |
+
In the next subsections, we will discuss how these assumptions enable us to address the domain adaptation task.
|
| 38 |
+
|
| 39 |
+
Our approach to addressing Task 1 is based on finding a separating set 𝑨⊆𝑽∖{C1,Y}𝑨𝑽subscript𝐶1𝑌\bm{A}\subseteq\bm{V}\setminus\{C_{1},Y\} of (context and system) variables that satisfies C1⟂Y|𝑨[𝒢]perpendicular-tosubscript𝐶1conditional𝑌𝑨delimited-[]𝒢C_{1}\perp Y\,|\,\bm{A}\ [\mathcal{G}].If such a separating set 𝑨𝑨\bm{A} can be found, then the distribution of Y𝑌Y conditional on 𝑨𝑨\bm{A} is invariant under transferring from the source domains to the target domains, i.e., ℙ(Y|𝑨,C1=0)=ℙ(Y|𝑨,C1=1)ℙconditional𝑌𝑨subscript𝐶10ℙconditional𝑌𝑨subscript𝐶11\mathbb{P}(Y\,|\,\bm{A},C_{1}=0)=\mathbb{P}(Y\,|\,\bm{A},C_{1}=1).As the former conditional distribution can be estimated from the source domains data, we directly obtain a prediction for the latter, which then enables us to predict the values of Y𝑌Y from the observed values of 𝑨𝑨\bm{A} in the target domains.444This trivial observation is not novel; see e.g. (Ch. 7, p. 164, Spirtes et al., 2000). It also follows as a special case of (Theorem 2, Pearl and Bareinboim, 2011). The main novelty of this work is the proposed strategy to identify such separating sets.
|
| 40 |
+
|
| 41 |
+
We will now discuss the effect of the choice of 𝑨𝑨\bm{A} on the quality of the predictions.For simplicity of the exposition, we make use of the squared loss function andlook at the asymptotic case, ignoring finite-sample issues. When predicting Y𝑌Y from a subset of features 𝑨⊆𝑽∖{Y,C1}𝑨𝑽𝑌subscript𝐶1\bm{A}\subseteq\bm{V}\setminus\{Y,C_{1}\} (that may or may not be separating), the optimal predictor is defined as the function Y^^𝑌\hat{Y} mapping from the range of possible valuesof 𝑨𝑨\bm{A} to the range of possible values of Y𝑌Y that minimizes the target domains risk𝔼((Y−Y^(𝑨))2|C1=1)𝔼conditionalsuperscript𝑌^𝑌𝑨2subscript𝐶11\mathbb{E}\big{(}(Y-\hat{Y}(\bm{A}))^{2}\,|\,C_{1}=1\big{)},and is given by theconditional expectation (regression function) Y^𝑨1(𝒂):=𝔼(Y|𝑨=𝒂,C1=1)\hat{Y}_{\bm{A}}^{1}(\bm{a})\vcentcolon\nolinebreak\mkern-1.2mu=\mathbb{E}(Y\,|\,\bm{A}=\bm{a},C_{1}=1).Since Y𝑌Y is not observed in the target domains, we cannot directly estimate this regression function from the data.
|
| 42 |
+
|
| 43 |
+
One approach that is often used in practice is to ignore the difference in distribution between source and target domains,and use instead the predictor Y^𝑨0(𝒂):=𝔼(Y|𝑨=𝒂,C1=0)\hat{Y}_{\bm{A}}^{0}(\bm{a})\vcentcolon\nolinebreak\mkern-1.2mu=\mathbb{E}(Y\,|\,\bm{A}=\bm{a},C_{1}=0),which minimizes thesource domains risk 𝔼((Y−Y^)2|C1=0)𝔼conditionalsuperscript𝑌^𝑌2subscript𝐶10\mathbb{E}\big{(}(Y-\hat{Y})^{2}\,|\,C_{1}=0\big{)}. This approximation introduces a biasY^𝑨1−Y^𝑨0superscriptsubscript^𝑌𝑨1superscriptsubscript^𝑌𝑨0\hat{Y}_{\bm{A}}^{1}-\hat{Y}_{\bm{A}}^{0}that we will refer to as the transfer bias (when predicting Y𝑌Y from 𝑨𝑨\bm{A}).When ignoring that source domains and target domains have different distributions, anystandard machine learning method can be used to predict Y𝑌Y from 𝑨𝑨\bm{A}. As thetransfer bias can become arbitrarily large (as we have seen in Example 1), the prediction accuracy ofthis solution strategy may be arbitrarily bad (even in the infinite-sample limit).
|
| 44 |
+
|
| 45 |
+
Instead, we propose to only predict Y𝑌Y from 𝑨𝑨\bm{A} when the set 𝑨𝑨\bm{A} offeatures satisfies the following separating set property:C1⟂Y|𝑨[𝒢],perpendicular-tosubscript𝐶1conditional𝑌𝑨delimited-[]𝒢C_{1}\perp Y\,|\,\bm{A}\ [\mathcal{G}],(2)i.e., it d-separates C1subscript𝐶1C_{1} from Y𝑌Y in 𝒢𝒢\mathcal{G}. By the Markov assumption, this implies C1⟂⟂Y|𝑨[ℙ(𝑽)]C_{1}{\,\perp\mkern-12.0mu\perp\,}Y\,|\,\bm{A}\ [\mathbb{P}(\bm{V})].In other words (as already mentioned above), for separating sets,the distribution of Y𝑌Y conditional on 𝑨𝑨\bm{A} is invariant under transferring from the source domains to the target domains, i.e., ℙ(Y|𝑨,C1=0)=ℙ(Y|𝑨,C1=1)ℙconditional𝑌𝑨subscript𝐶10ℙconditional𝑌𝑨subscript𝐶11\mathbb{P}(Y\,|\,\bm{A},C_{1}=0)=\mathbb{P}(Y\,|\,\bm{A},C_{1}=1).By virtue of this invariance, regression functions are identical for the source domains and target domains, i.e., Y^𝑨0=Y^𝑨1superscriptsubscript^𝑌𝑨0superscriptsubscript^𝑌𝑨1\hat{Y}_{\bm{A}}^{0}=\hat{Y}_{\bm{A}}^{1}, and hence also the source domains and target domains risks are identical when using the predictor Y^𝑨0superscriptsubscript^𝑌𝑨0\hat{Y}_{\bm{A}}^{0}:C1⟂Y|𝑨[𝒢]⟹𝔼((Y−Y^𝑨0)2|C1=1)=𝔼((Y−Y^𝑨0)2|C1=0).perpendicular-tosubscript𝐶1conditional𝑌𝑨delimited-[]𝒢𝔼conditionalsuperscript𝑌superscriptsubscript^𝑌𝑨02subscript𝐶11𝔼conditionalsuperscript𝑌superscriptsubscript^𝑌𝑨02subscript𝐶10C_{1}\perp Y\,|\,\bm{A}\ [\mathcal{G}]\implies\mathbb{E}\big{(}(Y-\hat{Y}_{\bm{A}}^{0})^{2}\,|\,C_{1}=1\big{)}=\mathbb{E}\big{(}(Y-\hat{Y}_{\bm{A}}^{0})^{2}\,|\,C_{1}=0\big{)}.(3)The r.h.s. can be estimated from the source domains data, and the l.h.s. equals the generalizationerror to the target domains when using the predictor Y^𝑨0superscriptsubscript^𝑌𝑨0\hat{Y}_{\bm{A}}^{0} trained on the source domains(which equals the predictor Y^𝑨1superscriptsubscript^𝑌𝑨1\hat{Y}_{\bm{A}}^{1} that one could obtain if all target domains data, includingthe values of Y𝑌Y, were observed).555Note that this equation only holds asymptotically; for finite samples, in addition to the transfer from source domainsto target domains, we have to deal with the generalization from empirical to population distributions and fromthe covariate shift if ℙ(𝑨|C1=1)≠ℙ(𝑨|C1=0)ℙconditional𝑨subscript𝐶11ℙconditional𝑨subscript𝐶10\mathbb{P}(\bm{A}\,|\,C_{1}=1)\neq\mathbb{P}(\bm{A}\,|\,C_{1}=0) (see e.g. Mansour et al., 2009).Although this approach leads to zero transfer bias, it introduces another bias: by using only a subset of the features 𝑨𝑨\bm{A},rather than all available features 𝑽∖{C1,Y}𝑽subscript𝐶1𝑌\bm{V}\setminus\{C_{1},Y\}, we may miss relevant information to predict Y𝑌Y.We refer to this bias as the incomplete information bias,Y^𝑽∖{Y,C1}1−Y^𝑨1superscriptsubscript^𝑌𝑽𝑌subscript𝐶11superscriptsubscript^𝑌𝑨1\hat{Y}_{\bm{V}\setminus\{Y,C_{1}\}}^{1}-\hat{Y}_{\bm{A}}^{1}.
|
| 46 |
+
|
| 47 |
+
The total bias when using Y^𝑨0superscriptsubscript^𝑌𝑨0\hat{Y}_{\bm{A}}^{0} to predict Y𝑌Y is the sum of the transfer bias and the incomplete information bias:Y^𝑽∖{Y,C1}1−Y^𝑨0⏟total bias=(Y^𝑨1−Y^𝑨0)⏟transfer bias+(Y^𝑽∖{Y,C1}1−Y^𝑨1)⏟incomplete information bias.subscript⏟superscriptsubscript^𝑌𝑽𝑌subscript𝐶11superscriptsubscript^𝑌𝑨0total biassubscript⏟superscriptsubscript^𝑌𝑨1superscriptsubscript^𝑌𝑨0transfer biassubscript⏟superscriptsubscript^𝑌𝑽𝑌subscript𝐶11superscriptsubscript^𝑌𝑨1incomplete information bias\underbrace{\hat{Y}_{\bm{V}\setminus\{Y,C_{1}\}}^{1}-\hat{Y}_{\bm{A}}^{0}}_{\text{total bias}}=\underbrace{(\hat{Y}_{\bm{A}}^{1}-\hat{Y}_{\bm{A}}^{0})}_{\text{transfer bias}}+\underbrace{(\hat{Y}_{\bm{V}\setminus\{Y,C_{1}\}}^{1}-\hat{Y}_{\bm{A}}^{1})}_{\text{incomplete information bias}}.For some problems, one may be better off by simply ignoring the transfer bias and minimizing the incomplete information bias, while for other problems, it is crucial to takethe transfer into account to obtain small generalization errors. In that situation, we could use any subset 𝑨𝑨\bm{A} for predictionthat satisfies the separating set property (2), implying zero transfer bias; obviously, the best predictions are then obtained by selecting a separating subset that also minimizes the source domains risk (i.e., minimizes the incomplete information bias).We conclude that this strategy of selecting a subset 𝑨𝑨\bm{A} to predict Y𝑌Y may yield an asymptotic guarantee on the prediction error by (3), whereas simply ignoring the shift in distribution may lead to unbounded prediction error, since the transfer bias could be arbitrarily large in the worst case scenario.
|
| 48 |
+
|
| 49 |
+
For the strategy of selecting the best separating sets of features as discussed in Section 2.3, we need to find one or more sets 𝑨⊆𝑽∖{C1,Y}𝑨𝑽subscript𝐶1𝑌\bm{A}\subseteq\bm{V}\setminus\{C_{1},Y\} that satisfy (2). Of course, the problem is that we cannot directly test this in the data, because the values of Y𝑌Y are missing for C1=1subscript𝐶11C_{1}=1. Note that also Assumption 2(2) cannot be directly used here, because it only applies when C1subscript𝐶1C_{1} is not in 𝑨∪𝑩𝑨𝑩\bm{A}\cup\bm{B}.When the causal graph 𝒢𝒢\mathcal{G} is known, it is easy to verify whether (2) holds directly using d-separation.Here we address the more challenging setting in which the causal graph and the targets of the interventions are (partially) unknown.666Another option, proposed by Rojas-Carulla et al. (2018), is to assume thatif p(Y|𝑨)��conditional𝑌𝑨p(Y\,|\,\bm{A}) is invariant across all source domains (i.e., p(Y|𝑨,C1=0,C∖1=c)=p(Y|𝑨,C1=0)𝑝formulae-sequenceconditional𝑌𝑨subscript𝐶10subscript𝐶1𝑐𝑝conditional𝑌𝑨subscript𝐶10p(Y\,|\,\bm{A},C_{1}=0,C_{\setminus 1}=c)=p(Y\,|\,\bm{A},C_{1}=0) for all c𝑐c), then the same holds across all source and target domains (i.e., p(Y|𝑨,C1=1)=p(Y|𝑨,C1=0,C∖1=c)𝑝conditional𝑌𝑨subscript𝐶11𝑝formulae-sequenceconditional𝑌𝑨subscript𝐶10subscript𝐶1𝑐p(Y\,|\,\bm{A},C_{1}=1)=p(Y\,|\,\bm{A},C_{1}=0,C_{\setminus 1}=c) for all c𝑐c). This assumption can be violated in some simple cases, e.g. see Example 2. Conceptually, one could estimate a set of possible causal graphs by using a causal discovery algorithm (for example, extending any standard method to deal with the missing conditional independence tests in C1=1subscript𝐶11C_{1}=1), and then read off separating sets from these graphs.In practice, it is not necessary to estimate completely these causal graphs: we only need to know enough about them to verify or falsify whether a given set of features separates C1subscript𝐶1C_{1} from Y𝑌Y.The following example (with details in the Supplementary Material) illustrates a case where such reasoning allows us to identify a separating set.
|
| 50 |
+
|
| 51 |
+
Rather than characterizing by hand all possible situations in which a separating set can be identified (like in Example 2), in this work we delegate the causal inference to an automatic theorem prover. Intuitively, the idea is to provide the automatic theorem prover with the conditional (in)dependences that hold in the data, in combination with an encoding of Assumptions 1 and 2 into logical rules, and ask the theorem prover whether it can prove that C1⟂Y|𝑨perpendicular-tosubscript𝐶1conditional𝑌𝑨C_{1}\perp Y\,|\,\bm{A} holds for a candidate set 𝑨𝑨\bm{A} from the assumptions and provided conditional (in)dependences. There are three possibilities: either it can prove the query (and then we can proceed to predict Y𝑌Y from 𝑨𝑨\bm{A} and get an estimate of the target domains risk), or it can disprove the query (and then we know 𝑨𝑨\bm{A} will generically give predictions that suffer from an arbitrarily large transfer bias), or it can do neither (in which case hopefully another subset 𝑨𝑨\bm{A} can be found that does provably satisfy (2)).
|
| 52 |
+
|
| 53 |
+
A simple (brute-force) algorithm that finds the best separating set as described in Section 2.3 is the following. By using a standard feature selection method, produce a ranked list of subsets 𝑨⊆𝑽∖{Y,C1}𝑨𝑽𝑌subscript𝐶1\bm{A}\subseteq\bm{V}\setminus\{Y,C_{1}\}, ordered ascendingly with respect to the empirical source domains risks. Going through this list of subsets (starting with the one with the smallest empirical source domains risk), test whether the separating set property can be inferred from the data by querying the automated theorem prover. If (2) can be shown to hold, use that subset 𝑨𝑨\bm{A} for prediction of Y𝑌Y and stop; if not, continue with the next candidate subset 𝑨𝑨\bm{A} in the list. If no subset satisfies (2), abstain from making a prediction.777Abstaining from predictions can be advantageous when trading off recall and precision. If a prediction has to be made, we can fall back on some other method or simply accept the risk that the transfer bias may be large.
|
| 54 |
+
|
| 55 |
+
An important consequence of Assumption 2(2) is that it enables us to transfer conditional independence involving the target variable from the source domains to the target domains (proof provided in the Supplementary Material):
|
| 56 |
+
|
| 57 |
+
To test the separating set condition (2),we use the approach proposed by Hyttinen et al. (2014), where we simply add the JCI assumptions (Assumption 1) as constraints on the optimization problem, in addition to the domain-adaptation specific assumption that C1→Y∉𝒢→subscript𝐶1𝑌𝒢C_{1}\to Y\notin\mathcal{G} (Assumption 2(iii)). As inputs we use all directly testable conditional independence test p-values p𝑨⟂⟂𝑩|𝑺subscript𝑝𝑨perpendicular-toperpendicular-toabsentconditional𝑩𝑺p_{\bm{A}{\,\perp\mkern-12.0mu\perp\,}\bm{B}\,|\,\bm{S}} in the pooled data (whenY∉𝑨∪𝑩∪𝑺𝑌𝑨𝑩𝑺Y\not\in\bm{A}\cup\bm{B}\cup\bm{S}) and all those resulting from Proposition 1 from the source domains data only (if Y∈𝑨∪𝑩∪𝑺𝑌𝑨𝑩𝑺Y\in\bm{A}\cup\bm{B}\cup\bm{S}). If background knowledge on intervention targets or the causal graph is available, it can easily be added as well.We use the method proposed by Magliacane et al. (2016) to query for the confidence of whether some statement (e.g., Y⟂⟂C1|𝑨Y{\,\perp\mkern-12.0mu\perp\,}C_{1}\,|\,\bm{A}) is true or false. The results of Magliacane et al. (2016) show that this approach is sound under oracle inputs, and asymptotically consistent whenever the statistical conditional independence tests used are asymptotically consistent. In other words, in this way the probability of wrongly deciding whether a subset 𝑨𝑨\bm{A} is a separating set converges to zero as the sample size increases.We chose this approach because it is simple to implement on top of existing open source code.888We build on the source code provided by Magliacane et al. (2016) which in turn extends the source code provided by Hyttinen et al. (2014). The full source code of our implementation and the experiments is available online at https://github.com/caus-am/dom_adapt. Note that the computational cost quickly increases with the number of variables, limiting the number of variables that can be considered simultaneously.
|
| 58 |
+
|
| 59 |
+
One remaining issue is how to predict Y𝑌Y when an optimal separating set 𝑨𝑨\bm{A} has been found. As the distribution of 𝑨𝑨\bm{A} may shift when transferring from source domains to target domains, this means that there is a covariate shift to be taken into account when predicting Y𝑌Y. Any method (e.g., least-squares regression) could in principle be used to predict Y𝑌Y from a given set of covariates, but it is advisable to use a prediction method that works well under covariate shift, e.g., (Sugiyama et al., 2008).
|
| 60 |
+
|
| 61 |
+
We perform an evaluation on both synthetic data and a real-world dataset based on a causal inference challenge.999Part of the CRM workshop on Statistical Causal Inference and Applications to Genetics, Montreal, Canada (2016). See also http://www.crm.umontreal.ca/2016/Genetics16/competition_e.php The latter dataset consists of hematology-related measurements from the International Mouse Phenotyping Consortium (IMPC), which collects measurements of phenotypes of mice with different single-gene knockouts.
|
| 62 |
+
|
| 63 |
+
In both evaluations we compare a standard feature selection method (which uses Random Forests) with our method that builds on top of it and selects from its output the best separating set. First, we score all possible subsets of features by their out-of-bag score using the implementation of Random Forest Regressor from scikit-learn (Pedregosa et al., 2011) with default parameters. For the baseline we then select the best performing subset and predict Y𝑌Y.Instead, for our proposed method we try to find a subset of features 𝑨𝑨\bm{A} that is also a separating set, starting from the subsets with the best scores. To test whether 𝑨𝑨\bm{A} is a separating set, we use the method described in Section 2.5, using the ASP solver clingo 4.5.4 (Gebser et al., 2014). We provide as inputs the independence test results from a partial correlation test with significance level α=0.05𝛼0.05\alpha=0.05 and combine it with the weighting scheme from Magliacane et al. (2016). We then use the first subset 𝑨𝑨\bm{A} in the ranked list of predictive sets of features found by the Random Forest method for which the confidence that C1⟂Y|𝑨perpendicular-tosubscript𝐶1conditional𝑌𝑨C_{1}\perp Y\,|\,\bm{A} holds is positive. If there is no set 𝑨𝑨\bm{A} that satisfies this criterion, then we abstain from making a prediction.
|
| 64 |
+
|
| 65 |
+
For the synthetic data, we generate randomly 200 linear acyclic models with latent variables and Gaussian noise, each with three system variables, and sample N𝑁N data points each for the observational and two experimental domains, where we simulate soft interventions on randomly selected targets, with different sizes of perturbations.We randomly select which of the two context variables will be C1subscript𝐶1C_{1} and which of the three system variables will be Y𝑌Y. We disallow direct effects of C1subscript𝐶1C_{1} on Y𝑌Y, and enforce that no intervention can directly affect all variables simultaneously. More details on how the data were simulated are provided in the Supplementary Material.Figure 3(a) shows a boxplot of the L2subscript𝐿2L_{2} loss of the predicted Y𝑌Y values with respect to the true values for both the baseline and our method, considering the 121 cases out of 200 in which our method does produce an answer. In particular, Figure 3(a) considers the case of N=1000𝑁1000N=1000 samples per regime and interventions that all produce a large perturbation. In the Supplementary Material we show that results improve with more samples, both for the baseline, but even more so for our method, since the quality of the conditional independence tests improves. We also show that, according to expectations, if the target distribution is very similar to the source distributions, i.e., the transfer bias is small, our method does not provide any benefit and seems to perform worse than the baseline. Conversely, the larger the intervention effect, the bigger the advantage of using our method.
|
| 66 |
+
|
| 67 |
+
For the real-world dataset, we select a subset of the variables considered in the CRM Causal Inference Challenge. Specifically, for simplicity we focus on 16 phenotypes that are not deterministically related to each other. The dataset contains measurements for 441 “wild type” mice and for about 10 “mutant” mice for each of 13 different single gene knockouts. We then generate 1000 datasets by randomly selecting subsets of 3 variables and 2 gene knockout contexts, and always include also “wild type” mice. For each dataset we randomly choose Y𝑌Y and C1subscript𝐶1C_{1}, and leave out the observed values of Y𝑌Y for C1=1subscript𝐶11C_{1}=1. Figure 3(b) shows a boxplot of the L2subscript𝐿2L_{2} loss of the predicted Y𝑌Y values with respect to the real values for the baseline and our method. Given the small size of the datasets, this is a very challenging problem. In this case, our method abstains from making a prediction for 170 cases out of 1000 but performs similarly to the baseline on the remaining cases.
|
| 68 |
+
|
| 69 |
+
We have defined a general class of causal domain adaptation problems and proposed a method that can identify sets of features that lead to transferable predictions. Our assumptions are quite general and in particular do not require the causal graph or the intervention targets to be known. The method gives promising results on simulated data. It is straightforward to extend our method to the cyclic case by making use of the results by Forré and Mooij (2018).More work remains to be done on the implementation side, for example, scaling up to more variables. Currently, our approach can handle about seven variables on a laptop computer, and with recent advances in exact causal discovery algorithms (e.g., Rantanen et al., 2018), a few more variables would be feasible. For scaling up to dozens of variables, we plan to adapt constraint-based causal discovery algorithms like FCI (Spirtes et al., 2000) to deal with the missing-data aspect of the domain adaptation task. We hope that this work will also inspire further research on the interplay between bias, variance and causality from a statistical learning theory perspective.
|
| 70 |
+
|
| 71 |
+
We thank Patrick Forré for proofreading a draft of this work. We thank Renée van Amerongen and Lucas van Eijk for sharing their domain knowledge about the hematology-related measurements from the International Mouse Phenotyping Consortium (IMPC).SM, TC, SB, and PV were supported by NWO, the Netherlands Organization for Scientific Research (VIDI grant 639.072.410).SM was also supported by the Dutch programme COMMIT/ under the Data2Semantics project.TC was also supported by NWO grant 612.001.202 (MoCoCaDi), and EU-FP7 grant agreement n.603016 (MATRICS).TvO and JMM were supported by the European Research Council (ERC) under the European Union’s Horizon 2020 research andinnovation programme (grant agreement 639466).
|
1707.06618v3.txt
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
We consider the following nonconvex finite-sum optimization problemmin𝐱Fn(𝐱):=1n∑i=1nfi(𝐱),assignsubscript𝐱subscript𝐹𝑛𝐱1𝑛superscriptsubscript𝑖1𝑛subscript𝑓𝑖𝐱\displaystyle\min_{\mathbf{x}}F_{n}(\mathbf{x}):=\frac{1}{n}\sum_{i=1}^{n}f_{i}(\mathbf{x}),(1.1)where fi(𝐱)subscript𝑓𝑖𝐱f_{i}(\mathbf{x})’s are called component functions, and both Fn(𝐱)subscript𝐹𝑛𝐱F_{n}(\mathbf{x}) and fi(⋅)subscript𝑓𝑖⋅f_{i}(\cdot)’s can be nonconvex. Various first-order optimization algorithms such as gradient descent [43], stochastic gradient descent [27] and more recently variance-reduced stochastic gradient descent [47, 3] have been proposed and analyzed for solving (1.1). However, all these algorithms are only guaranteed to converge to a stationary point, which can be a local minimum, a local maximum, or even a saddle point. This raises an important question in nonconvex optimization and machine learning: is there an efficient algorithm that is guaranteed to converge to the global minimum of (1.1)?
|
| 2 |
+
|
| 3 |
+
Recent studies by Dalalyan [17, 16] showed that sampling from a distribution which concentrates around the global minimum of Fn(𝐱)subscript𝐹𝑛𝐱F_{n}(\mathbf{x}) is a similar task as minimizing Fnsubscript𝐹𝑛F_{n} via certain optimization algorithms. This justifies the use of Langevin dynamics based algorithms for optimization. In detail, the first order Langevin dynamics is defined by the following stochastic differential equation (SDE)d𝑿(t)=−∇Fn(𝑿(t))dt+2β−1d𝑩(t),𝑑𝑿𝑡∇subscript𝐹𝑛𝑿𝑡𝑑𝑡2superscript𝛽1𝑑𝑩𝑡\displaystyle d\bm{X}(t)=-\nabla F_{n}(\bm{X}(t))dt+\sqrt{2\beta^{-1}}d\bm{B}(t),(1.2)where β>0𝛽0\beta>0 is the inverse temperature parameter that is treated as a constant throughout the analysis of this paper, and {𝑩(t)}t≥0subscript𝑩𝑡𝑡0\{\bm{B}(t)\}_{t\geq 0} is the standard Brownian motion in ℝdsuperscriptℝ𝑑\mathbb{R}^{d}.Under certain assumptions on the drift coefficient ∇Fn∇subscript𝐹𝑛\nabla F_{n}, it was showed that the distribution of diffusion 𝑿(t)𝑿𝑡\bm{X}(t) in (1.2) converges to its stationary distribution [14], a.k.a., the Gibbs measure π(d𝐱)∝exp(−βFn(𝐱))proportional-to𝜋𝑑𝐱𝛽subscript𝐹𝑛𝐱\pi(d\mathbf{x})\propto\exp(-\beta F_{n}(\mathbf{x})), which concentrates on the global minimum of Fnsubscript𝐹𝑛F_{n} [30, 26, 48]. Note that the above convergence result holds even when Fn(𝐱)subscript𝐹𝑛𝐱F_{n}(\mathbf{x}) is nonconvex. This motivates the use of Langevin dynamics based algorithms for nonconvex optimization [46, 54, 51, 50]. However, unlike first order optimization algorithms [43, 27, 47, 3], which have been extensively studied, the non-asymptotic theoretical guarantee of applying Langevin dynamics based algorithms for nonconvex optimization, is still under studied.In a seminal work, Raginsky et al. [46] provided a non-asymptotic analysis of stochastic gradient Langevin dynamics (SGLD) [53] for nonconvex optimization, which is a stochastic gradient based discretization of (1.2). They proved that SGLD converges to an almost minimizer up to d2/(σ1/4λ∗)log(1/ϵ)superscript𝑑2superscript𝜎14superscript𝜆1italic-ϵd^{2}/(\sigma^{1/4}\lambda^{*})\log(1/\epsilon) within O~(d/(λ∗ϵ4))~𝑂𝑑superscript𝜆superscriptitalic-ϵ4\widetilde{O}(d/(\lambda^{*}\epsilon^{4})) iterations, where σ2superscript𝜎2\sigma^{2} is the variance of stochastic gradient and λ∗superscript𝜆\lambda^{*} is called the uniform spectral gap of Langevin diffusion (1.2), and it is in the order of e−O~(d)superscript𝑒~𝑂𝑑e^{-\widetilde{O}(d)}. In a concurrent work, Zhang et al. [54] analyzed the hitting time of SGLD and proved its convergence to an approximate local minimum. More recently, Tzen et al. [51] studied the local optimality and generalization performance of Langevin algorithm for nonconvex functions through the lens of metastability and Simsekli et al. [50] developed an asynchronous-parallel stochastic L-BFGS algorithm for non-convex optimization based on variants of SGLD. Erdogdu et al. [23] further developed non-asymptotic analysis of global optimization based on a broader class of diffusions.
|
| 4 |
+
|
| 5 |
+
In this paper, we establish the global convergence for a family of Langevin dynamics based algorithms, including Gradient Langevin Dynamics (GLD) [17, 20, 16], Stochastic Gradient Langevin Dynamics (SGLD) [53] and Stochastic Variance Reduced Gradient Langevin Dynamics (SVRG-LD) [19] for solving the finite sum nonconvex optimization problem in (1.1). Our analysis is built upon the direct analysis of the discrete-time Markov chain rather than the continuous-time Langevin diffusion, and therefore avoid the discretization error.
|
| 6 |
+
|
| 7 |
+
The major contributions of our work are summarized as follows:•We provide a unified analysis for a family of Langevin dynamics based algorithms by a new decomposition scheme of the optimization error, under which we directly analyze the ergodicity of numerical approximations for Langevin dynamics (see Figure 1).•Under our unified framework, we establish the global convergence of GLD for solving (1.1). In detail, GLD requires O~(d/(λϵ))~𝑂𝑑𝜆italic-ϵ\widetilde{O}\big{(}d/(\lambda\epsilon)\big{)} iterations to converge to the almost minimizer of (1.1) up to precision ϵitalic-ϵ\epsilon, where λ𝜆\lambda is the spectral gap of the discrete-time Markov chain generated by GLD and is in the order of e−O~(d)superscript𝑒~𝑂𝑑e^{-\widetilde{O}(d)}. This improves the O~(d/(λ∗ϵ4))~𝑂𝑑superscript𝜆superscriptitalic-ϵ4\widetilde{O}\big{(}d/(\lambda^{*}\epsilon^{4})) iteration complexity of GLD implied by [46], where λ∗=e−O~(d)superscript𝜆superscript𝑒~𝑂𝑑\lambda^{*}=e^{-\widetilde{O}(d)} is the spectral gap of Langevin diffusion (1.2).•We establish a faster convergence of SGLD to the almost minimizer of (1.1). In detail, it converges to the almost minimizer up to ϵitalic-ϵ\epsilon precision within O~(d7/(λ5ϵ5))~𝑂superscript𝑑7superscript𝜆5superscriptitalic-ϵ5\widetilde{O}\big{(}{d^{7}}/{(\lambda^{5}\epsilon^{5})}\big{)} stochastic gradient evaluations.This also improves the O~(d17/(λ∗8ϵ8))~𝑂superscript𝑑17superscriptsuperscript𝜆8superscriptitalic-ϵ8\widetilde{O}\big{(}d^{17}/({\lambda^{*}}^{8}\epsilon^{8})\big{)} gradient complexity proved in [46].•We also analyze the SVRG-LD algorithm and investigate its global convergence property. We show that SVRG-LD is guaranteed to converge to the almost minimizer of (1.1) withinO~(nd5/(λ4ϵ5/2))~𝑂𝑛superscript𝑑5superscript𝜆4superscriptitalic-ϵ52\widetilde{O}\big{(}\sqrt{n}d^{5}/(\lambda^{4}\epsilon^{5/2})\big{)} stochastic gradient evaluations. It outperforms the gradient complexities of both GLD and SGLD when 1/ϵ3≤n≤1/ϵ51superscriptitalic-ϵ3𝑛1superscriptitalic-ϵ51/\epsilon^{3}\leq n\leq 1/\epsilon^{5}.To the best of our knowledge, this is the first global convergence guarantee of SVRG-LD for nonconvex optimization, while the original paper [19] only analyzed the posterior sampling property of SVRG-LD.
|
| 8 |
+
|
| 9 |
+
Stochastic gradient Langevin dynamics (SGLD) [53] and its extensions [2, 40, 19] have been widely used in Bayesian learning. A large body of work has focused on analyzing the mean square error of Langevin dynamics based algorithms. In particular, Vollmer et al. [52] analyzed the non-asymptotic bias and variance of the SGLD algorithm by using Poisson equations. Chen et al. [12] showed the non-asymptotic bias and variance of MCMC algorithms with high order integrators.Dubey et al. [19] proposed variance-reduced algorithms based on stochastic gradient Langevin dynamics, namely SVRG-LD and SAGA-LD, for Bayesian posterior inference, and proved that their method improves the mean square error upon SGLD. Li et al. [38] further improved the mean square error by applying the variance reductiontricks on Hamiltonian Monte Carlo, which is also called the underdamped Langevin dynamics.
|
| 10 |
+
|
| 11 |
+
Another line of research [17, 21, 16, 18, 22, 56] focused on characterizing the distance between distributions generated by Langevin dynamics based algorithms and (strongly) log-concave target distributions. In detail, Dalalyan [17] proved that the distribution of the last step in GLD converges to the stationary distribution in O~(d/ϵ2)~𝑂𝑑superscriptitalic-ϵ2\widetilde{O}(d/\epsilon^{2}) iterations in terms of total variation distance and Wasserstein distance respectively with a warm start and showed the similarities between posterior sampling and optimization. Later Durmus and Moulines [20] improved the results by showing this result holds for any starting point and established similar bounds for the Wasserstein distance. Dalalyan [16] further improved the existing results in terms of the Wasserstein distance and provide further insights on the close relation between approximate sampling and gradient descent. Cheng et al. [13] improved existing 2-Wasserstein results by reducing the discretization error using underdamped Langevin dynamics. To improve the convergence rates in noisy gradient settings, Chatterji et al. [11], Zou et al. [57] presented convergence guarantees in 2-Wasserstein distance for SAGA-LD and SVRG-LD using variance reduction techniques. Zou et al. [56] proposed the variance reduced Hamilton Monte Carlo to accelerate the convergence of Langevin dynamics based sampling algorithms. As to sampling from distribution with compact support, Bubeck et al. [8] analyzed sampling from log-concave distributions via projected Langevin Monte Carlo, and Brosse et al. [7] proposed a proximal Langevin Monte Carlo algorithm. This line of research is orthogonal to our work since their analyses are regarding to the convergence of the distribution of the iterates to the stationary distribution of Langevin diffusion in total variation distance or 2-Wasserstein distance instead of expected function value gap.
|
| 12 |
+
|
| 13 |
+
On the other hand, many attempts have been made to escape from saddle points in nonconvex optimization, such ascubic regularization [44, 55], trust region Newton method [15], Hessian-vector product based methods [1, 9, 10], noisy gradient descent [24, 32, 33] and normalized gradient [37]. Yet all these algorithms are only guaranteed to converge to an approximate local minimum rather than a global minimum. The global convergence for nonconvex optimization remains understudied.
|
| 14 |
+
|
| 15 |
+
In this section, we present notations used in this paper and some preliminaries for SDE. We use lower case bold symbol 𝐱𝐱\mathbf{x} to denote deterministic vector, and use upper case italicized bold symbol 𝑿𝑿\bm{X} to denote random vector. For a vector 𝐱∈ℝd𝐱superscriptℝ𝑑\mathbf{x}\in\mathbb{R}^{d}, we denote by ‖𝐱‖2subscriptnorm𝐱2\|\mathbf{x}\|_{2} its Euclidean norm. We use an=O(bn)subscript𝑎𝑛𝑂subscript𝑏𝑛a_{n}=O(b_{n}) to denote that an≤Cbnsubscript𝑎𝑛𝐶subscript𝑏𝑛a_{n}\leq Cb_{n} for some constant C>0𝐶0C>0 independent of n𝑛n. We also denote an≲bnless-than-or-similar-tosubscript𝑎𝑛subscript𝑏𝑛a_{n}\lesssim b_{n} (an≳bngreater-than-or-equivalent-tosubscript𝑎𝑛subscript𝑏𝑛a_{n}\gtrsim b_{n}) if ansubscript𝑎𝑛a_{n} is less than (larger than) bnsubscript𝑏𝑛b_{n} up to a constant.We also use O~(⋅)~𝑂⋅\widetilde{O}(\cdot) notation to hide both polynomials of logarithmic terms and constants.
|
| 16 |
+
|
| 17 |
+
Kolmogorov Operator and Infinitesimal GeneratorSuppose 𝑿(t)𝑿𝑡\bm{X}(t) is the solution to the diffusion process represented by the stochastic differential equation (1.2). For such a continuous time Markov process, let P={Pt}t>0𝑃subscriptsubscript𝑃𝑡𝑡0P=\{P_{t}\}_{t>0} be the corresponding Markov semi-group [4], and we define the Kolmogorov operator [4] Pssubscript𝑃𝑠P_{s} as followsPsg(𝑿(t))=𝔼[g(𝑿(s+t))|𝑿(t)],subscript𝑃𝑠𝑔𝑿𝑡𝔼delimited-[]conditional𝑔𝑿𝑠𝑡𝑿𝑡\displaystyle P_{s}g(\bm{X}(t))=\mathbb{E}[g(\bm{X}(s+t))|\bm{X}(t)],where g𝑔g is a smooth test function.We have Ps+t=Ps∘Ptsubscript𝑃𝑠𝑡subscript𝑃𝑠subscript𝑃𝑡P_{s+t}=P_{s}\circ P_{t} by Markov property.Further we define the infinitesimal generator [4] of the semi-group ℒℒ\mathcal{L} to describe the the movement of the process in an infinitesimal time interval:ℒg(𝑿(t))::ℒ𝑔𝑿𝑡absent\displaystyle\mathcal{L}g(\bm{X}(t)):=limh→0+𝔼[g(𝑿(t+h))|𝑿(t)]−g(𝑿(t))habsentsubscript→ℎsuperscript0𝔼delimited-[]conditional𝑔𝑿𝑡ℎ𝑿𝑡𝑔𝑿𝑡ℎ\displaystyle=\lim_{h\rightarrow 0^{+}}\frac{\mathbb{E}[g(\bm{X}(t+h))|\bm{X}(t)]-g(\bm{X}(t))}{h}=(−∇Fn(𝑿(t))⋅∇+β−1∇2)g(𝑿(t)),absent⋅∇subscript𝐹𝑛𝑿𝑡∇superscript𝛽1superscript∇2𝑔𝑿𝑡\displaystyle=\big{(}-\nabla F_{n}(\bm{X}(t))\cdot\nabla+\beta^{-1}\nabla^{2}\big{)}g(\bm{X}(t)),where β𝛽\beta is the inverse temperature parameter.
|
| 18 |
+
|
| 19 |
+
Poisson Equation and the Time AveragePoisson equations are widely used in the study of homogenization and ergodic theory to prove the desired limit of a time-average. Let ℒℒ\mathcal{L} be the infinitesimal generator and let ψ𝜓\psi be defined as followsℒψ=g−g¯,ℒ𝜓𝑔¯𝑔\displaystyle\mathcal{L}\psi=g-\bar{g},(1.3)where g𝑔g is a smooth test function and g¯¯𝑔\bar{g} is the expectation of g𝑔g over the Gibbs measure, i.e., g¯:=∫g(𝐱)π(d𝐱)assign¯𝑔𝑔𝐱𝜋𝑑𝐱\bar{g}:=\int g(\mathbf{x})\pi(d\mathbf{x}). Smooth function ψ𝜓\psi is called the solution of Poisson equation (1.3). Importantly, it has been shown [23] that the first and second order derivatives of the solution ψ𝜓\psi of Poisson equation for Langevin diffusion can be bounded by polynomial growth functions.
|
| 20 |
+
|
| 21 |
+
In this section, we briefly review three Langevin dynamics based algorithms proposed recently.
|
| 22 |
+
|
| 23 |
+
In practice, numerical methods (a.k.a., numerical integrators) are used to approximate the Langevin diffusion in (1.2). For example, by Euler-Maruyama scheme [35], (1.2) can be discretized as follows:𝑿k+1=𝑿k−η∇Fn(𝑿k)+2ηβ−1⋅ϵk,subscript𝑿𝑘1subscript𝑿𝑘𝜂∇subscript𝐹𝑛subscript𝑿𝑘⋅2𝜂superscript𝛽1subscriptbold-italic-ϵ𝑘\displaystyle\bm{X}_{k+1}=\bm{X}_{k}-\eta\nabla F_{n}(\bm{X}_{k})+\sqrt{2\eta\beta^{-1}}\cdot\bm{\epsilon}_{k},(2.1)where ϵk∈ℝdsubscriptbold-italic-ϵ𝑘superscriptℝ𝑑\bm{\epsilon}_{k}\in\mathbb{R}^{d} is standard Gaussian noise and η>0𝜂0\eta>0 is the step size. The update in (2.1) resembles gradient descent update except for an additional injected Gaussian noise. The magnitude of the Gaussian noise is controlled by the inverse temperature parameter β𝛽\beta. In our paper, we refer this update as Gradient Langevin Dynamics (GLD) [17, 20, 16]. The details of GLD are shown in Algorithm 1.
|
| 24 |
+
|
| 25 |
+
In the case that n𝑛n is large, the above Euler approximation can be infeasible due to the high computational cost of the full gradient ∇Fn(𝑿k)∇subscript𝐹𝑛subscript𝑿𝑘\nabla F_{n}(\bm{X}_{k}) at each iteration. A natural idea is to use stochastic gradient to approximate the full gradient, which gives rise to Stochastic Gradient Langevin Dynamics (SGLD) [53] and its variants [2, 40, 12]. However, the high variance brought by the stochastic gradient can make the convergence of SGLD slow. To reduce the variance of the stochastic gradient and accelerate the convergence of SGLD, we use a mini-batch of stochastic gradients in the following update form:𝒀k+1=𝒀k−ηB∑i∈Ik∇fi(𝒀k)+2ηβ−1⋅ϵk,subscript𝒀𝑘1subscript𝒀𝑘𝜂𝐵subscript𝑖subscript𝐼𝑘∇subscript𝑓𝑖subscript𝒀𝑘⋅2𝜂superscript𝛽1subscriptbold-italic-ϵ𝑘\displaystyle\bm{Y}_{k+1}=\bm{Y}_{k}-\frac{\eta}{B}\sum_{i\in I_{k}}\nabla f_{i}(\bm{Y}_{k})+\sqrt{2\eta\beta^{-1}}\cdot\bm{\epsilon}_{k},(2.2)where 1/B∑i∈Ik∇fi(𝒀k)1𝐵subscript𝑖subscript𝐼𝑘∇subscript𝑓𝑖subscript𝒀𝑘1/B\sum_{i\in I_{k}}\nabla f_{i}(\bm{Y}_{k}) is the stochastic gradient, which is an unbiased estimator for ∇Fn(𝒀k)∇subscript𝐹𝑛subscript𝒀𝑘\nabla F_{n}(\bm{Y}_{k}) and Iksubscript𝐼𝑘I_{k} is a subset of {1,…,n}1…𝑛\{1,\ldots,n\} with |Ik|=Bsubscript𝐼𝑘𝐵|I_{k}|=B. Algorithm 2 displays the details of SGLD.
|
| 26 |
+
|
| 27 |
+
Motivated by recent advances in stochastic optimization, in particular, the variance reduction based techniques [34, 47, 3],Dubey et al. [19] proposed the Stochastic Variance Reduced Gradient Langevin Dynamics (SVRG-LD) for posterior sampling.The key idea is to use semi-stochastic gradient to reduce the variance of the stochastic gradient. SVRG-LD takes the following update form:𝒁k+1=𝒁k−η∇~k+2ηβ−1⋅ϵk,subscript𝒁𝑘1subscript𝒁𝑘𝜂subscript~∇𝑘⋅2𝜂superscript𝛽1subscriptbold-italic-ϵ𝑘\displaystyle\bm{Z}_{k+1}=\bm{Z}_{k}-\eta\widetilde{\nabla}_{k}+\sqrt{2\eta\beta^{-1}}\cdot\bm{\epsilon}_{k},(2.3)where ∇~k=1/B∑ik∈Ik(∇fik(𝒁k)−∇fik(𝒁~(s))+∇Fn(𝒁~(s)))subscript~∇𝑘1𝐵subscriptsubscript𝑖𝑘subscript𝐼𝑘∇subscript𝑓subscript𝑖𝑘subscript𝒁𝑘∇subscript𝑓subscript𝑖𝑘superscript~𝒁𝑠∇subscript𝐹𝑛superscript~𝒁𝑠\widetilde{\nabla}_{k}=1/B\sum_{i_{k}\in I_{k}}\big{(}\nabla f_{i_{k}}(\bm{Z}_{k})-\nabla f_{i_{k}}(\widetilde{\bm{Z}}^{(s)})+\nabla F_{n}(\widetilde{\bm{Z}}^{(s)})\big{)} is the semi-stochastic gradient, 𝒁~(s)superscript~𝒁𝑠\widetilde{\bm{Z}}^{(s)} is a snapshot of 𝒁ksubscript𝒁𝑘\bm{Z}_{k} at every L𝐿L iteration such that k=sL+ℓ𝑘𝑠𝐿ℓk=sL+\ell for some ℓ=0,1,…,L−1ℓ01…𝐿1\ell=0,1,\ldots,L-1, and Iksubscript𝐼𝑘I_{k} is a subset of {1,…,n}1…𝑛\{1,\ldots,n\} with |Ik|=Bsubscript𝐼𝑘𝐵|I_{k}|=B.SVRG-LD is summarized in Algorithm 3.
|
| 28 |
+
|
| 29 |
+
Note that although all the three algorithms are originally proposed for posterior sampling or more generally, Bayesian learning, they can be applied for nonconvex optimization, as demonstrated in many previous studies [2, 46, 54].
|
| 30 |
+
|
| 31 |
+
Before we present our main results, we first lay out the following assumptions on the loss function.
|
| 32 |
+
|
| 33 |
+
Assumption 3.1 immediately implies that Fn(𝐱)=1/n∑i=1nfi(𝐱)subscript𝐹𝑛𝐱1𝑛superscriptsubscript𝑖1𝑛subscript𝑓𝑖𝐱F_{n}(\mathbf{x})=1/n\sum_{i=1}^{n}f_{i}(\mathbf{x}) is also M𝑀M-smooth.
|
| 34 |
+
|
| 35 |
+
Assumption 3.2 is a typical assumption for the convergence analysis of an SDE and diffusion approximation [41, 46, 54], which can be satisfied by enforcing a weight decay regularization [46]. It says that starting from a position that is sufficiently far away from the origin, the Markov process defined by (1.2) moves towards the origin on average. It can also be noted that all critical points are within the ball of radius O(b/m)𝑂𝑏𝑚O(\sqrt{b/m}) centered at the origin under this assumption.
|
| 36 |
+
|
| 37 |
+
Let 𝐱∗=argmin𝐱∈ℝdFn(𝐱)superscript𝐱subscriptargmin𝐱superscriptℝ𝑑subscript𝐹𝑛𝐱\mathbf{x}^{*}=\mathop{\mathrm{argmin}}_{\mathbf{x}\in\mathbb{R}^{d}}F_{n}(\mathbf{x}) be the global minimizer of Fnsubscript𝐹𝑛F_{n}. Our ultimate goal is to prove the convergence of the optimization error in expectation, i.e., 𝔼[Fn(𝑿k)]−Fn(𝐱∗)𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝑘subscript𝐹𝑛superscript𝐱\mathbb{E}[F_{n}(\bm{X}_{k})]-F_{n}(\mathbf{x}^{*}). In the sequel, we decompose the optimization error into two parts: (1) 𝔼[Fn(𝑿k)]−𝔼[Fn(𝑿π)]𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝑘𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋\mathbb{E}[F_{n}(\bm{X}_{k})]-\mathbb{E}[F_{n}(\bm{X}^{\pi})], which characterizes the gap between the expected function value at the k𝑘k-th iterate 𝑿ksubscript𝑿𝑘\bm{X}_{k} and the expected function value at 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi}, where 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} follows the stationary distribution π(d𝐱)𝜋𝑑𝐱\pi(d\mathbf{x}) of Markov process {𝑿(t)}t≥0subscript𝑿𝑡𝑡0\{\bm{X}(t)\}_{t\geq 0}, and (2) 𝔼[Fn(𝑿π)]−Fn(𝐱∗)𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋subscript𝐹𝑛superscript𝐱\mathbb{E}[F_{n}(\bm{X}^{\pi})]-F_{n}(\mathbf{x}^{*}). Note that the error in part (1) is algorithm dependent, while that in part (2) only depends on the diffusion itself and hence is identical for all Langevin dynamics based algorithms.
|
| 38 |
+
|
| 39 |
+
Now we are ready to present our main results regarding to the optimization error of each algorithm reviewed in Section 2. We first show the optimization error bound of GLD (Algorithm 1).
|
| 40 |
+
|
| 41 |
+
In the optimization error of GLD (3.1), we denote the upper bound of the error term 𝔼[Fn(𝑿π)]−Fn(𝐱∗)𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋subscript𝐹𝑛superscript𝐱\mathbb{E}[F_{n}(\bm{X}^{\pi})]-F_{n}(\mathbf{x}^{*}) by ℛMsubscriptℛ𝑀\mathcal{R}_{M}, which characterizes the distance between the expected function value at 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi}and the global minimum of Fnsubscript𝐹𝑛F_{n}. The stationary distribution of Langevin diffusion π∝e−βFn(𝐱)proportional-to𝜋superscript𝑒𝛽subscript𝐹𝑛𝐱\pi\propto e^{-\beta F_{n}(\mathbf{x})} is a Gibbs distribution, which concentrates around the minimizer 𝐱∗superscript𝐱\mathbf{x}^{*} of Fnsubscript𝐹𝑛F_{n}. Thus a random vector 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} following the law of π𝜋\pi is called an almost minimizer of Fnsubscript𝐹𝑛F_{n} within a neighborhood of 𝐱∗superscript𝐱\mathbf{x}^{*} with radius ℛMsubscriptℛ𝑀\mathcal{R}_{M} [46].
|
| 42 |
+
|
| 43 |
+
It is worth noting that the first term in (3.1) vanishes at a exponential rate due to the ergodicity of Markov chain {𝑿k}k=0,1…subscriptsubscript𝑿𝑘𝑘01…\{\bm{X}_{k}\}_{k=0,1\ldots}. Moreover, the exponential convergence rate is controlled by λ𝜆\lambda, the spectral gap of the discrete-time Markov chain generated by GLD, which is in the order of e−O~(d)superscript𝑒~𝑂𝑑e^{-\widetilde{O}(d)}.
|
| 44 |
+
|
| 45 |
+
By setting 𝔼[Fn(𝑿K)]−𝔼[Fn(𝑿π)]𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝐾𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋\mathbb{E}[F_{n}(\bm{X}_{K})]-\mathbb{E}[F_{n}(\bm{X}^{\pi})] to be less than a precision ϵitalic-ϵ\epsilon, and solving for K𝐾K, we have the following corollary on the iteration complexity for GLD to converge to the almost minimizer 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi}.
|
| 46 |
+
|
| 47 |
+
We now present the following theorem, which states the optimization error of SGLD (Algorithm 2).
|
| 48 |
+
|
| 49 |
+
Similar to Corollary 3.4, by setting 𝔼[Fn(𝒀k)]−𝔼[Fn(𝑿π)]≤ϵ𝔼delimited-[]subscript𝐹𝑛subscript𝒀𝑘𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋italic-ϵ\mathbb{E}[F_{n}(\bm{Y}_{k})]-\mathbb{E}[F_{n}(\bm{X}^{\pi})]\leq\epsilon, we obtain the following corollary.
|
| 50 |
+
|
| 51 |
+
In what follows, we proceed to present our result on the optimization error bound of SVRG-LD.
|
| 52 |
+
|
| 53 |
+
Similar to Corollaries 3.4 and 3.7, we have the following iteration complexity for SVRG-LD.
|
| 54 |
+
|
| 55 |
+
In large scale machine learning problems, the evaluation of full gradient can be quite expensive, in which case the iteration complexity is no longer appropriate to reflect the efficiency of different algorithms. To perform a comprehensive comparison among the three algorithms, we present their gradient complexities for converging to the almost minimizer 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} with ϵitalic-ϵ\epsilon precision in Table 1.Recall that gradient complexity is defined as the total number of stochastic gradient evaluations needed to achieve ϵitalic-ϵ\epsilon precision.It can be seen from Table 1 that the gradient complexity for GLD has worse dependence on the number of component functions n𝑛n and SVRG-LD has worse dependence on the optimization precision ϵitalic-ϵ\epsilon. More specifically, when the number of component functions satisfies n≤1/ϵ5𝑛1superscriptitalic-ϵ5n\leq 1/\epsilon^{5}, SVRG-LD achieves better gradient complexity than SGLD. Additionally, if n≥1/ϵ3𝑛1superscriptitalic-ϵ3n\geq 1/\epsilon^{3}, SVRG-LD is better than both GLD and SGLD, therefore is more favorable.
|
| 56 |
+
|
| 57 |
+
In this section, we highlight our high level idea in the analysis of GLD, SGLD and SVRG-LD.
|
| 58 |
+
|
| 59 |
+
Recall the problem in (1.1) and denote the global minimizer as 𝐱∗=argmin𝐱Fn(𝐱)superscript𝐱subscriptargmin𝐱subscript𝐹𝑛𝐱\mathbf{x}^{*}=\mathop{\mathrm{argmin}}_{\mathbf{x}}F_{n}(\mathbf{x}). {𝑿(t)}t≥0subscript𝑿𝑡𝑡0\{\bm{X}(t)\}_{t\geq 0} and {𝑿k}k=0,…,Ksubscriptsubscript𝑿𝑘𝑘0…𝐾\{\bm{X}_{k}\}_{k=0,\ldots,K} are the continuous-time and discrete-time Markov processes generated by Langevin diffusion (1.2) and GLD respectively. We propose to decompose the optimization error as follows:𝔼[Fn(𝑿k)]−Fn(𝐱∗)𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝑘subscript𝐹𝑛superscript𝐱\displaystyle\mathbb{E}[F_{n}(\bm{X}_{k})]-F_{n}(\mathbf{x}^{*})=𝔼[Fn(𝑿k)]−𝔼[Fn(𝑿μ)]⏟I1+𝔼[Fn(𝑿μ)]−𝔼[Fn(𝑿π)]⏟I2+𝔼[Fn(𝑿π)]−Fn(𝐱∗)⏟I3,absentsubscript⏟𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝑘𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜇subscript𝐼1subscript⏟𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜇𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋subscript𝐼2subscript⏟𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋subscript𝐹𝑛superscript𝐱subscript𝐼3\displaystyle=\underbrace{\mathbb{E}[F_{n}(\bm{X}_{k})]-\mathbb{E}[F_{n}(\bm{X}^{\mu})]}_{I_{1}}+\underbrace{\mathbb{E}[F_{n}(\bm{X}^{\mu})]-\mathbb{E}[F_{n}(\bm{X}^{\pi})]}_{I_{2}}+\underbrace{\mathbb{E}[F_{n}(\bm{X}^{\pi})]-F_{n}(\mathbf{x}^{*})}_{I_{3}},(4.1)where 𝑿μsuperscript𝑿𝜇\bm{X}^{\mu} follows the stationary distribution μ(d𝐱)𝜇𝑑𝐱\mu(d\mathbf{x}) of Markov process {𝑿k}k=0,1,…,Ksubscriptsubscript𝑿𝑘𝑘01…𝐾\{\bm{X}_{k}\}_{k=0,1,\ldots,K}, and 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} follows the stationary distribution π(d𝐱)𝜋𝑑𝐱\pi(d\mathbf{x}) of Markov process {𝑿(t)}t≥0subscript𝑿𝑡𝑡0\{\bm{X}(t)\}_{t\geq 0}, a.k.a., the Gibbs distribution.Following existing literature [41, 42, 12], here we assume the existence of stationary distributions, i.e., the ergodicity, of Langevin diffusion (1.2) and its numerical approximation (2.2). Note that the ergodicity property of an SDE is not trivially guaranteed in general and establishing the existence of the stationary distribution is beyond the scope of our paper. Yet we will discuss the circumstances when geometric ergodicity holds in the Appendix.
|
| 60 |
+
|
| 61 |
+
We illustrate the decomposition (4.1) in Figure 1. Unlike existing optimization analysis of SGLD such as [46], which measure the approximation error between 𝑿ksubscript𝑿𝑘\bm{X}_{k} and 𝑿(t)𝑿𝑡\bm{X}(t) (blue arrows in the chart), we directly analyze the geometric convergence of discretized Markov chain 𝑿ksubscript𝑿𝑘\bm{X}_{k} to its stationary distribution (red arrows in the chart). Since the distance between 𝑿ksubscript𝑿𝑘\bm{X}_{k} and 𝑿(t)𝑿𝑡\bm{X}(t) is a slow-convergence term in [46], and the distance between 𝑿(t)𝑿𝑡\bm{X}(t) and 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} depends on the uniform spectral gap, our new roadmap of proof will bypass both of these two terms, hence leads to a faster convergence rate.
|
| 62 |
+
|
| 63 |
+
Bounding I1subscript𝐼1I_{1}: Geometric Ergodicity of GLD
|
| 64 |
+
|
| 65 |
+
To bound the first term in (4.1), we need to analyze the convergence of the Markov chain generated by Algorithm 1 to its stationary distribution, namely, the ergodic property of the numerical approximation of Langevin dynamics. In probability theory, ergodicity describes the long time behavior of Markov processes. For a finite-state Markov Chain, this is also closely related to the mixing time and has been thoroughly studied in the literature of Markov processes [29, 36, 4]. Note that Durmus and Moulines [21] studied the convergence of the Euler-Maruyama discretization (also referred to as the unadjusted Langevin algorithm) towards its stationary distribution in total variation. Nevertheless, they only focus on strongly convex functions which are less challenging than our nonconvex setting.
|
| 66 |
+
|
| 67 |
+
The following lemma ensures the geometric ergodicity of gradient Langevin dynamics.
|
| 68 |
+
|
| 69 |
+
Lemma 4.1 establishes the exponential decay of function gap between Fn(𝑿k)subscript𝐹𝑛subscript𝑿𝑘F_{n}(\bm{X}_{k}) and Fn(𝑿π)subscript𝐹𝑛superscript𝑿𝜋F_{n}(\bm{X}^{\pi}) using coupling techniques. Note that the exponential dependence on dimension d𝑑d is consistent with the result from [46] using entropy methods. The contraction parameter ρβsubscript𝜌𝛽\rho_{\beta} is a lower bound of the minorization condition for the Markov chain 𝑿ksubscript𝑿𝑘\bm{X}_{k}, which is established in [41]. Nonetheless, we would like to point out that the exact computation of ρβsubscript𝜌𝛽\rho_{\beta} requires additionally nontrivial efforts, which is beyond the scope of this work.
|
| 70 |
+
|
| 71 |
+
Bounding I2subscript𝐼2I_{2}: Convergence to Stationary Distribution of Langevin Diffusion
|
| 72 |
+
|
| 73 |
+
Now we are going to bound the distance between two invariant measures μ𝜇\mu and π𝜋\pi in terms of their expectations over the objective function Fnsubscript𝐹𝑛F_{n}. Our proof is inspired by that of Vollmer et al. [52], Chen et al. [12].The key insight here is that after establishing the geometric ergodicity of GLD, by the stationarity of μ𝜇\mu, we have∫Fn(𝐱)μ(d𝐱)=∫𝔼[Fn(𝑿k)|𝑿0=𝐱]⋅μ(d𝐱).subscript𝐹𝑛𝐱𝜇𝑑𝐱⋅𝔼delimited-[]conditionalsubscript𝐹𝑛subscript𝑿𝑘subscript𝑿0𝐱𝜇𝑑𝐱\displaystyle\int F_{n}(\mathbf{x})\mu(d\mathbf{x})=\int\mathbb{E}[F_{n}(\bm{X}_{k})|\bm{X}_{0}=\mathbf{x}]\cdot\mu(d\mathbf{x}).This property says that after reaching the stationary distribution, any further transition (GLD update) will not change the distribution. Thus we can bound the difference between two invariant measures.
|
| 74 |
+
|
| 75 |
+
Lemma 4.2 suggests that the bound on the difference between the two invariant measures depends on the numerical approximation step size η𝜂\eta, the inverse temperature parameter β𝛽\beta and the upper bound Cψsubscript𝐶𝜓C_{\psi}. We emphasize that the dependence on β𝛽\beta is reasonable since different β𝛽\beta results in different diffusion, and further leads to different stationary distributions of the SDE and its numerical approximations.
|
| 76 |
+
|
| 77 |
+
Bounding I3subscript𝐼3I_{3}: Gap between Langevin Diffusion and Global Minimum
|
| 78 |
+
|
| 79 |
+
Most existing studies [53, 49, 12] on Langevin dynamics based algorithms focus on the convergence of the averaged sample path to the stationary distribution. The property of Langevin diffusion asymptotically concentrating on the global minimum of Fnsubscript𝐹𝑛F_{n} is well understood [14, 26] , which makes the convergence to a global minimum possible, even when the function Fnsubscript𝐹𝑛F_{n} is nonconvex.
|
| 80 |
+
|
| 81 |
+
We give an explicit bound between the stationary distribution of Langevin diffusion and the global minimizer of Fnsubscript𝐹𝑛F_{n}, i.e., the last term 𝔼[Fn(𝑿π)]−Fn(𝐱∗)𝔼delimited-[]subscript𝐹𝑛superscript𝑿𝜋subscript𝐹𝑛superscript𝐱\mathbb{E}[F_{n}(\bm{X}^{\pi})]-F_{n}(\mathbf{x}^{*}) in (4.1). For nonconvex objective function, this has been proved in [46] using the concept of differential entropy and smoothness of Fnsubscript𝐹𝑛F_{n}. We formally summarize it as the following lemma:
|
| 82 |
+
|
| 83 |
+
Lemma 4.3 suggests that Gibbs density concentrates on the global minimizer of objective function. Therefore, the random vector 𝑿πsuperscript𝑿𝜋\bm{X}^{\pi} following the Gibbs distribution π𝜋\pi is also referred to as an almost minimizer of the nonconvex function Fnsubscript𝐹𝑛F_{n} in [46].
|
| 84 |
+
|
| 85 |
+
Now we integrate the previous lemmas to prove our main theorems in Section 3. First, submitting the results in Lemmas 4.1, 4.2 and 4.3 into (4.1), we immediately obtain the optimization error bound in (3.1) for GLD, which proves Theorem 3.3.Second, consider the optimization error of SGLD (Algorithm 2),we only need to bound the error between 𝔼[Fn(𝒀K)]𝔼delimited-[]subscript𝐹𝑛subscript𝒀𝐾\mathbb{E}[F_{n}(\bm{Y}_{K})] and 𝔼[Fn(𝑿K)]𝔼delimited-[]subscript𝐹𝑛subscript𝑿𝐾\mathbb{E}[F_{n}(\bm{X}_{K})] and then apply the results for GLD, which is given by the following lemma.
|
| 86 |
+
|
| 87 |
+
Combining Lemmas 4.1, 4.2, 4.3 and 4.4 yields the desired result in (3.6) for SGLD, which completes the proof of Theorem 3.6.Third, similar to the proof of SGLD, we require an additional bound between Fn(𝒁K)subscript𝐹𝑛subscript𝒁𝐾F_{n}(\bm{Z}_{K}) and Fn(𝑿K)subscript𝐹𝑛subscript𝑿𝐾F_{n}(\bm{X}_{K}) for the proof of SVRG-LD, which is stated by the following lemma.
|
| 88 |
+
|
| 89 |
+
The optimization error bound in (3.10) for SVRG-LD follows from Lemmas 4.1, 4.2, 4.3 and 4.5.
|
| 90 |
+
|
| 91 |
+
In this work, we present a new framework for analyzing the convergence of Langevin dynamics based algorithms, and provide non-asymptotic analysis on the convergence for nonconvex finite-sum optimization.By comparing the Langevin dynamics based algorithms and standard first-order optimization algorithms, we may see that the counterparts of GLD and SVRG-LD are gradient descent (GD) and stochastic variance-reduced gradient (SVRG) methods. It has been proved that SVRG outperforms GD universally for nonconvex finite-sum optimization [47, 3]. This poses a natural question that whether SVRG-LD can be universally better than GLD for nonconvex optimization? We will attempt to answer this question in the future.
|
1707.08325v1.txt
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Approximate nearest neighbor (ANN) search [1, 25, 2] has attracted much attention from machine learning community, with a lot of applications in information retrieval, computer vision and so on. As a widely used technique for ANN search, hashing [29, 12, 27, 21, 8, 22, 19, 17, 25, 2, 3, 23] aims to encode the data points into compact binary hash codes. Due to its storage and search efficiency, hashing has attracted more and more attention for large-scale ANN search.
|
| 2 |
+
|
| 3 |
+
As the pioneering work, locality sensitive hashing (LSH) [6, 1] tries to utilize random projections as hash functions. LSH-like methods are always called data-independent methods, because the random projections are typically independent of training data. On the contrary, data-dependent methods [17], which are also called learning to hash (L2H) methods, aim to learn the hash functions from training data. Data-dependent methods usually achieve more promising performance than data-independent methods with shorter binary codes. Hence, data-dependent methods have become more popular than data-independent methods in recent years. Based on whether supervised information is used or not, data-dependent methods can be further divided into two categories [17, 14]: unsupervised hashing and supervised hashing. Unsupervised hashing does not use supervised information for hash function learning. On the contrary, supervised hashing tries to learn the hash function by utilizing supervised information. In recent years, supervised hashing has attracted more and more attention because it can achieve better accuracy than unsupervised hashing [18, 20, 14].
|
| 4 |
+
|
| 5 |
+
Most traditional supervised hashing methods are non-deep methods which cannot perform feature learning from scratch. Representative non-deep supervised hashing methods includes asymmetric hashing with two variants Lin:Lin and Lin:V [20], fast supervised hashing (FastH) [15], supervised discrete hashing (SDH) [24] and column-sampling based discrete supervised hashing (COSDISH) [9]. Recently, deep supervised hashing, which adopts deep learning [11] to perform feature learning for hashing, has been proposed by researchers. Representative deep supervised hashing methods include convolutional neural networks based hashing (CNNH) [30], deep pairwise supervised hashing (DPSH) [14], deep hashing network (DHN) [33] and deep supervised hashing (DSH) [16]. By integrating feature learning and hash-code learning into the same end-to-end architecture, deep supervised hashing can significantly outperform non-deep supervised hashing in many applications.
|
| 6 |
+
|
| 7 |
+
Most existing deep supervised hashing methods, including those mentioned above, adopt a symmetric strategy to learn one hash function for both query points and database points. The training of these symmetric deep supervised hashing methods is typically time-consuming. For example, the storage and computational cost for these hashing methods with pairwise supervised information is 𝒪(n2)𝒪superscript𝑛2{\mathcal{O}}(n^{2}) where n𝑛n is the number of database points. The training cost for methods with triplet supervised information [32] is even higher. To make the training practicable, most existing deep supervised hashing methods have to sample only a small subset from the whole database to construct a training set for hash function learning, and many points in database may be discarded during training. Hence, it is hard for these symmetric deep supervised hashing methods to effectively utilize the supervised information for cases with large-scale database, which makes the search performance unsatisfactory.
|
| 8 |
+
|
| 9 |
+
In this paper, we propose a novel deep supervised hashing method, called asymmetric deep supervised hashing (ADSH), for large-scale nearest neighbor search. The main contributions of ADSH are outlined as follows: (1). ADSH treats the query points and database points in an asymmetric way. More specifically, ADSH learns a deep hash function only for query points, while the binary hash codes for database points are directly learned by adopting a bit by bit method. To the best of our knowledge, ADSH is the first deep supervised hashing method which treats query points and database points in an asymmetric way. (2). The training of ADSH is much more efficient than that of traditional symmetric deep supervised hashing methods. Hence, the whole set of database points can be used for training even if the database is large. (3). ADSH can directly learn the binary hash codes for database points, which will be empirically proved to be more accurate than the strategies adopted by traditional symmetric deep supervised hashing methods which use the learned hash function to generate hash codes for database points. (4). Experiments on two large-scale datasets show that ADSH can achieve state-of-the-art performance in real applications.
|
| 10 |
+
|
| 11 |
+
Boldface lowercase letters like 𝐛𝐛{\bf b} denote vectors, and boldface uppercase letters like 𝐁𝐁{\bf B} denote matrices. 𝐁∗jsubscript𝐁absent𝑗{\bf B}_{*j} denotes the j𝑗jth column of ����𝐁{\bf B}. Bijsubscript𝐵𝑖𝑗B_{ij} denotes the (i,j)𝑖𝑗(i,j)th element of matrix 𝐁𝐁{\bf B}. Furthermore, ‖𝐁‖Fsubscriptnorm𝐁𝐹\|{\bf B}\|_{F} and 𝐁Tsuperscript𝐁𝑇{\bf B}^{T} are used to denote the Frobenius norm and the transpose of matrix 𝐁𝐁{\bf B}, respectively. The symbol ⊙direct-product\odot is used to denote the Hadamard product. We use 𝕀(⋅)𝕀⋅{\mathbb{I}}(\cdot) to denote an indicator function, i.e., 𝕀(true)=1𝕀𝑡𝑟𝑢𝑒1{\mathbb{I}}(true)=1 and 𝕀(false)=0𝕀𝑓𝑎𝑙𝑠𝑒0{\mathbb{I}}(false)=0.
|
| 12 |
+
|
| 13 |
+
For supervised hashing methods, supervised information can be point-wise labels [24], pairwise labels [9, 14, 16] or triplet labels [28, 32]. In this paper, we only focus on pairwise-label based supervised hashing which is a common application scenario.
|
| 14 |
+
|
| 15 |
+
Assume that we have m𝑚m query data points which are denoted as 𝐗={𝐱i}i=1m𝐗superscriptsubscriptsubscript𝐱𝑖𝑖1𝑚{\bf X}=\{{\bf x}_{i}\}_{i=1}^{m} and n𝑛n database points which are denoted as 𝐘={𝐲j}j=1n𝐘superscriptsubscriptsubscript𝐲𝑗𝑗1𝑛{\bf Y}=\{{\bf y}_{j}\}_{j=1}^{n}. Furthermore, pairwise supervised information, denoted as 𝐒∈{−1,+1}m×n𝐒superscript11𝑚𝑛{\bf S}\in\{-1,+1\}^{m\times n}, is also available for supervised hashing. If Sij=1subscript𝑆𝑖𝑗1S_{ij}=1, it means that point 𝐱isubscript𝐱𝑖{\bf x}_{i} and point 𝐲jsubscript𝐲𝑗{\bf y}_{j} are similar. Otherwise, 𝐱isubscript𝐱𝑖{\bf x}_{i} and 𝐲jsubscript𝐲𝑗{\bf y}_{j} are dissimilar. The goal of supervised hashing is to learn binary hash codes for both query points and database points from 𝐗𝐗{\bf X}, 𝐘𝐘{\bf Y} and 𝐒𝐒{\bf S}, and the hash codes try to preserve the similarity between query points and database points. More specifically, if we use 𝐔={𝐮i}i=1m∈{−1,+1}m×c𝐔superscriptsubscriptsubscript𝐮𝑖𝑖1𝑚superscript11𝑚𝑐{\bf U}=\{{\bf u}_{i}\}_{i=1}^{m}\in\{-1,+1\}^{m\times c} and 𝐕={𝐯j}j=1n∈{−1,+1}n×c𝐕superscriptsubscriptsubscript𝐯𝑗𝑗1𝑛superscript11𝑛𝑐{\bf V}=\{{\bf v}_{j}\}_{j=1}^{n}\in\{-1,+1\}^{n\times c} to denote the learned binary hash codes for query points and database points respectively, the Hamming distance distH(𝐮i,𝐯j)subscriptdist𝐻subscript𝐮𝑖subscript𝐯𝑗\text{dist}_{H}({\bf u}_{i},{\bf v}_{j}) should be as small as possible if Sij=1subscript𝑆𝑖𝑗1S_{ij}=1 and vice versa. Here, c𝑐c denotes the binary code length. Moreover, we should also learn a hash function h(𝐱q)∈{−1,+1}cℎsubscript𝐱𝑞superscript11𝑐h({\bf x}_{q})\in\{-1,+1\}^{c} so that we can generate binary code for any unseen query point 𝐱qsubscript𝐱𝑞{\bf x}_{q}.
|
| 16 |
+
|
| 17 |
+
Please note that in many cases, we are only given a set of database points 𝐘={𝐲j}j=1n𝐘superscriptsubscriptsubscript𝐲𝑗𝑗1𝑛{\bf Y}=\{{\bf y}_{j}\}_{j=1}^{n} and the pairwise supervised information between them. We can also learn the hash codes and hash function by sampling a subset or the whole set of 𝐘𝐘{\bf Y} as the query set for training. In these cases, 𝐗⊆𝐘𝐗𝐘{\bf X}\subseteq{\bf Y}.
|
| 18 |
+
|
| 19 |
+
In this section, we introduce our asymmetric deep supervised hashing (ADSH) in detail, including model formulation and learning algorithm.
|
| 20 |
+
|
| 21 |
+
Figure 1 shows the model architecture of ADSH, which contains two important components: feature learning part and loss function part. The feature learning part tries to learn a deep neural network which can extract appropriate feature representation for binary hash code learning. The loss function part aims to learn binary hash codes which preserve the supervised information (similarity) between query points and database points. ADSH integrates these two components into the same end-to-end framework. During training procedure, each part can give feedback to the other part.
|
| 22 |
+
|
| 23 |
+
Please note that the feature learning is only performed for query points but not for database points. Furthermore, based on the deep neural network for feature learning, ADSH adopts a deep hash function to generate hash codes for query points, but the binary hash codes for database points are directly learned. Hence, ADSH treats the query points and database points in an asymmetric way. This asymmetric property of ADSH is different from traditional deep supervised hashing methods. Traditional deep supervised hashing methods adopt the same deep neural network to perform feature learning for both query points and database points, and then use the same deep hash function to generate binary codes for both query points and database points.
|
| 24 |
+
|
| 25 |
+
In this paper, we adopt a convolutional neural network (CNN) model from [4], i.e., CNN-F model, to perform feature learning. This CNN-F model has also been adopted in DPSH [14] for feature learning. The CNN-F model contains five convolutional layers and three fully-connected layers, the details of which can be found at [4, 14]. In ADSH, the last layer of CNN-F model is replaced by a fully-connected layer which can project the output of the first seven layers into ℝcsuperscriptℝ𝑐{\mathbb{R}}^{c} space. Please note that the framework of ADSH is general enough to adopt other deep neural networks to replace the CNN-F model for feature learning. Here, we just adopt CNN-F for illustration.
|
| 26 |
+
|
| 27 |
+
To learn the hash codes which can preserve the similarity between query points and database points, one common way is to minimize the L2subscript𝐿2L_{2} loss between the supervised information (similarity) and inner product of query-database binary code pairs. This can be formulated as follows:min𝐔,𝐕subscript𝐔𝐕\displaystyle\min_{{\bf U},{\bf V}}\;J(𝐔,𝐕)=∑i=1m∑j=1n(𝐮iT𝐯j−cSij)2𝐽𝐔𝐕superscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛superscriptsuperscriptsubscript𝐮𝑖𝑇subscript𝐯𝑗𝑐subscript𝑆𝑖𝑗2\displaystyle J({\bf U},{\bf V})=\sum_{i=1}^{m}\sum_{j=1}^{n}\big{(}{\bf u}_{i}^{T}{\bf v}_{j}-cS_{ij}\big{)}^{2}(1)s.t.𝐔∈{−1,+1}m×c,𝐕∈{−1,+1}n×c,𝐮i=h(𝐱i),∀i∈{1,2,…,m}.formulae-sequence𝐔superscript11𝑚𝑐formulae-sequence𝐕superscript11𝑛𝑐formulae-sequencesubscript𝐮𝑖ℎsubscript𝐱𝑖for-all𝑖12…𝑚\displaystyle{\bf U}\in\{-1,+1\}^{m\times c},{\bf V}\in\{-1,+1\}^{n\times c},{\bf u}_{i}=h({\bf x}_{i})\;,\forall i\in\{1,2,\dots,m\}.
|
| 28 |
+
|
| 29 |
+
However, it is difficult to learn h(𝐱i)ℎsubscript𝐱𝑖h({\bf x}_{i}) due to the discrete output. We can set h(𝐱i)=sign(F(𝐱i;Θ))ℎsubscript𝐱𝑖sign𝐹subscript𝐱𝑖Θh({\bf x}_{i})=\text{sign}(F({\bf x}_{i};\Theta)), where F(𝐱i;Θ)∈ℝc𝐹subscript𝐱𝑖Θsuperscriptℝ𝑐F({\bf x}_{i};\Theta)\in{\mathbb{R}}^{c}. Then, the problem in (1) is transformed to the following problem:minΘ,𝐕J(Θ,𝐕)=∑i=1m∑j=1n[sign(F(𝐱i;Θ))T𝐯j−cSij]2,s.t.𝐕∈{−1,+1}n×c.formulae-sequencesubscriptΘ𝐕𝐽Θ𝐕superscriptsubscript𝑖1𝑚superscriptsubscript𝑗1𝑛superscriptdelimited-[]signsuperscript𝐹subscript𝐱𝑖Θ𝑇subscript𝐯𝑗𝑐subscript𝑆𝑖𝑗2s.t.𝐕superscript11𝑛𝑐\displaystyle\min_{\Theta,{\bf V}}\;J(\Theta,{\bf V})=\sum_{i=1}^{m}\sum_{j=1}^{n}\big{[}\text{sign}(F({\bf x}_{i};\Theta))^{T}{\bf v}_{j}-cS_{ij}\big{]}^{2},\;\hskip 14.22636pt\text{s.t.}\quad{\bf V}\in\{-1,+1\}^{n\times c}.(2)In (2), we set F(𝐱i;Θ)𝐹subscript𝐱𝑖ΘF({\bf x}_{i};\Theta) to be the output of the CNN-F model in the feature learning part, and ΘΘ\Theta is the parameter of the CNN-F model. Through this way, we seamlessly integrate the feature learning part and the loss function part into the same framework.
|
| 30 |
+
|
| 31 |
+
There still exists a problem for the formulation in (2), which is that we cannot back-propagate the gradient to ΘΘ\Theta due to the sign(F(𝐱i;Θ))sign𝐹subscript𝐱𝑖Θ\text{sign}(F({\bf x}_{i};\Theta)) function. Hence, in ADSH we adopt the following objective function:minΘ,𝐕J(Θ,\displaystyle\min_{\Theta,{\bf V}}\;J(\Theta,𝐕)=∑i=1m∑j=1n[tanh(F(𝐱i;Θ))T𝐯j−cSij]2,s.t.𝐕∈{−1,+1}n×c\displaystyle{\bf V})=\sum_{i=1}^{m}\sum_{j=1}^{n}\big{[}\text{tanh}(F({\bf x}_{i};\Theta))^{T}{\bf v}_{j}-cS_{ij}\big{]}^{2},\;\hskip 14.22636pt\text{s.t.}\quad{\bf V}\in\{-1,+1\}^{n\times c}(3)where we use tanh(⋅)tanh⋅\text{tanh}(\cdot) to approximate the sign(⋅)sign⋅\text{sign}(\cdot) function.
|
| 32 |
+
|
| 33 |
+
In practice, we might be given only a set of database points 𝐘={𝐲j}j=1n𝐘superscriptsubscriptsubscript𝐲𝑗𝑗1𝑛{\bf Y}=\{{\bf y}_{j}\}_{j=1}^{n} without query points. In this case, we can randomly sample m𝑚m data points from database to construct the query set. More specifically, we set 𝐗=𝐘Ω𝐗superscript𝐘Ω{\bf X}={\bf Y}^{\Omega} where 𝐘Ωsuperscript𝐘Ω{\bf Y}^{\Omega} denotes the database points indexed by ΩΩ\Omega. Here, we use Γ={1,2,…,n}Γ12…𝑛\Gamma=\{1,2,\dots,n\} to denote the indices of all the database points and Ω={i1,i2,…,im}⊆ΓΩsubscript𝑖1subscript𝑖2…subscript𝑖𝑚Γ\Omega=\{i_{1},i_{2},\dots,i_{m}\}\subseteq\Gamma to denote the indices of the sampled query points. Accordingly, we set 𝐒=𝒮Ω𝐒superscript𝒮Ω{\bf S}={\mathcal{S}}^{\Omega}, where 𝒮∈{−1,+1}n×n𝒮superscript11𝑛𝑛{\mathcal{S}}\in\{-1,+1\}^{n\times n} denotes the supervised information (similarity) between pairs of all database points and 𝒮Ω∈{−1,+1}m×nsuperscript𝒮Ωsuperscript11𝑚𝑛{\mathcal{S}}^{\Omega}\in\{-1,+1\}^{m\times n} denotes the sub-matrix formed by the rows of 𝒮𝒮{\mathcal{S}} indexed by ΩΩ\Omega. Then, we can rewrite J(Θ,𝐕)𝐽Θ𝐕J(\Theta,{\bf V}) as: J(Θ,𝐕)=∑i∈Ω∑j∈Γ[tanh(F(𝐲i;Θ))T𝐯j−cSij]2𝐽Θ𝐕subscript𝑖Ωsubscript𝑗Γsuperscriptdelimited-[]tanhsuperscript𝐹subscript𝐲𝑖Θ𝑇subscript𝐯𝑗𝑐subscript𝑆𝑖𝑗2J(\Theta,{\bf V})=\sum_{i\in\Omega}\sum_{j\in\Gamma}\big{[}\text{tanh}(F({\bf y}_{i};\Theta))^{T}{\bf v}_{j}-cS_{ij}\big{]}^{2}.
|
| 34 |
+
|
| 35 |
+
Because ��⊆ΓΩΓ\Omega\subseteq\Gamma, there are two representations for 𝐲isubscript𝐲𝑖{\bf y}_{i}, ∀i∈Ωfor-all𝑖Ω\forall i\in\Omega. One is the binary hash code 𝐯isubscript𝐯𝑖{\bf v}_{i} in database, and the other is the query representation tanh(F(𝐲i;Θ))tanh𝐹subscript𝐲𝑖Θ\text{tanh}(F({\bf y}_{i};\Theta)). We add an extra constraint to keep 𝐯isubscript𝐯𝑖{\bf v}_{i} and tanh(F(𝐲i;Θ))tanh𝐹subscript𝐲𝑖Θ\text{tanh}(F({\bf y}_{i};\Theta)) as close as possible, ∀i∈Ωfor-all𝑖Ω\forall i\in\Omega. This is intuitively reasonable, because tanh(F(𝐲i;Θ))tanh𝐹subscript𝐲𝑖Θ\text{tanh}(F({\bf y}_{i};\Theta)) is the approximation of the binary code of 𝐲isubscript𝐲𝑖{\bf y}_{i}. Then we get the final formulation of ADSH with only database points 𝐘𝐘{\bf Y} for training:minΘ,𝐕J(Θ,𝐕)subscriptΘ𝐕𝐽Θ𝐕\displaystyle\min_{\Theta,{\bf V}}\;J(\Theta,{\bf V})=∑i∈Ω∑j∈Γ[tanh(F(𝐲i;Θ))T𝐯j−cSij]2+γ∑i∈Ω[𝐯i−tanh(F(𝐲i;Θ))]2absentsubscript𝑖Ωsubscript𝑗Γsuperscriptdelimited-[]tanhsuperscript𝐹subscript𝐲𝑖Θ𝑇subscript𝐯𝑗𝑐subscript𝑆𝑖𝑗2𝛾subscript𝑖Ωsuperscriptdelimited-[]subscript𝐯𝑖tanh𝐹subscript𝐲𝑖Θ2\displaystyle=\sum_{i\in\Omega}\sum_{j\in\Gamma}\big{[}\text{tanh}(F({\bf y}_{i};\Theta))^{T}{\bf v}_{j}-cS_{ij}\big{]}^{2}+\gamma\sum_{i\in\Omega}[{\bf v}_{i}-\text{tanh}(F({\bf y}_{i};\Theta))]^{2}s.t.𝐕∈{−1,+1}n×c𝐕superscript11𝑛𝑐\displaystyle\;{\bf V}\in\{-1,+1\}^{n\times c}(4)where γ𝛾\gamma is a hyper-parameter.
|
| 36 |
+
|
| 37 |
+
In real applications, if we are given both 𝐘𝐘{\bf Y} and 𝐗𝐗{\bf X}, we use the problem in (3) for training ADSH. If we are only given 𝐘𝐘{\bf Y}, we use the problem in (4) for training ADSH. After training ADSH, we can get the binary hash codes for database points, and a deep hash function for query points. We can use the trained deep hash function to generate the binary hash codes for any query points including newly coming query points which are not seen during training. One simple way to generate binary codes for query points is to set 𝐮q=h(𝐱q)=sign(F(𝐱q;Θ))subscript𝐮𝑞ℎsubscript𝐱𝑞sign𝐹subscript𝐱𝑞Θ{\bf u}_{q}=h({\bf x}_{q})=\text{sign}(F({\bf x}_{q};\Theta)).
|
| 38 |
+
|
| 39 |
+
From (3) and (4), we can find that ADSH treats query points and database points in an asymmetric way. More specifically, the feature learning is only performed for query points but not for database points. Furthermore, ADSH adopts a deep hash function to generate hash codes for query points, but the binary hash codes for database points are directly learned. This is different from traditional deep supervised hashing methods which adopt the same deep hash function to generate binary hash codes for both query points and database points. Because m≪nmuch-less-than𝑚𝑛m\ll n in general, ADSH can learn the deep neural networks efficiently, and is much faster than traditional symmetric deep supervised hashing methods. This will be verified in our experiments.
|
| 40 |
+
|
| 41 |
+
Here, we only present the learning algorithm for problem (4), which can be easily adapted for problem (3). We design an alternating optimization strategy to learn the parameters ΘΘ\Theta and 𝐕𝐕{\bf V} in problem (4). More specifically, in each iteration we learn one parameter with the other fixed, and this process will be repeated for many iterations.
|
| 42 |
+
|
| 43 |
+
When 𝐕𝐕{\bf V} is fixed, we use back-propagation (BP) algorithm to update the neural network parameter ΘΘ\Theta. Specifically, we sample a mini-batch of the query points, then update the parameter ΘΘ\Theta based on the sampled data. For the sake of simplicity, we define 𝐳i=F(𝐲i;Θ)subscript𝐳𝑖𝐹subscript𝐲𝑖Θ{\bf z}_{i}=F({\bf y}_{i};\Theta) and 𝐮~i=tanh(F(𝐲i;Θ))subscript~𝐮𝑖tanh𝐹subscript𝐲𝑖Θ\widetilde{\bf u}_{i}=\text{tanh}(F({\bf y}_{i};\Theta)). Then we can compute the gradient of 𝐳isubscript𝐳𝑖{\bf z}_{i} as follows:∂J∂𝐳i=𝐽subscript𝐳𝑖absent\displaystyle\frac{\partial J}{\partial{\bf z}_{i}}=2{∑j∈Γ[(𝐮~iT𝐯j−cSij)𝐯j]+2γ(𝐮~i−𝐯i)}⊙(1−𝐮~i2)direct-product2subscript𝑗Γdelimited-[]superscriptsubscript~𝐮𝑖𝑇subscript𝐯𝑗𝑐subscript𝑆𝑖𝑗subscript𝐯𝑗2𝛾subscript~𝐮𝑖subscript𝐯𝑖1superscriptsubscript~𝐮𝑖2\displaystyle 2\Big{\{}\sum_{j\in\Gamma}\big{[}(\widetilde{\bf u}_{i}^{T}{\bf v}_{j}-cS_{ij}){\bf v}_{j}\big{]}+2\gamma(\widetilde{\bf u}_{i}-{\bf v}_{i})\Big{\}}\odot(1-\widetilde{\bf u}_{i}^{2})(5)Then we can use chain rule to compute ∂J∂Θ𝐽Θ\frac{\partial J}{\partial\Theta} based on ∂J∂𝐳i𝐽subscript𝐳𝑖\frac{\partial J}{\partial{\bf z}_{i}}, and the BP algorithm is used to update ΘΘ\Theta.
|
| 44 |
+
|
| 45 |
+
When ΘΘ\Theta is fixed, we rewrite the problem (4) in matrix form:min𝐕J(𝐕)=‖𝐔~𝐕T−c𝐒‖F2+γ‖𝐕Ω−𝐔~‖F2s.t.𝐕∈{−1,+1}n×c,formulae-sequencesubscript𝐕𝐽𝐕subscriptsuperscriptnorm~𝐔superscript𝐕𝑇𝑐𝐒2𝐹𝛾subscriptsuperscriptnormsuperscript𝐕Ω~𝐔2𝐹s.t.𝐕superscript11𝑛𝑐\displaystyle\min_{{\bf V}}\;J({\bf V})=\|\widetilde{\bf U}{\bf V}^{T}-c{\bf S}\|^{2}_{F}+\gamma\|{\bf V}^{\Omega}-\widetilde{\bf U}\|^{2}_{F}\hskip 14.22636pt\text{s.t.}\quad{\bf V}\in\{-1,+1\}^{n\times c},(6)where 𝐔~=[𝐮~i1,𝐮~i2,…,𝐮~im]T∈[−1,+1]m×c~𝐔superscriptsubscript~𝐮subscript𝑖1subscript~𝐮subscript𝑖2…subscript~𝐮subscript𝑖𝑚𝑇superscript11𝑚𝑐\widetilde{\bf U}=[\widetilde{\bf u}_{i_{1}},\widetilde{\bf u}_{i_{2}},\dots,\widetilde{\bf u}_{i_{m}}]^{T}\in[-1,+1]^{m\times c}, 𝐕Ωsuperscript𝐕Ω{\bf V}^{\Omega} denotes the binary codes for the database points indexed by ΩΩ\Omega, i.e., 𝐕Ω=[𝐯i1,𝐯i2,…,𝐯im]Tsuperscript𝐕Ωsuperscriptsubscript𝐯subscript𝑖1subscript𝐯subscript𝑖2…subscript𝐯subscript𝑖𝑚𝑇{\bf V}^{\Omega}=[{\bf v}_{i_{1}},{\bf v}_{i_{2}},\dots,{\bf v}_{i_{m}}]^{T}.
|
| 46 |
+
|
| 47 |
+
We define 𝐔¯={𝐮¯j}j=1n¯𝐔superscriptsubscriptsubscript¯𝐮𝑗𝑗1𝑛\bar{\bf U}=\{\bar{\bf u}_{j}\}_{j=1}^{n}, where 𝐮¯jsubscript¯𝐮𝑗\bar{\bf u}_{j} is defined as: 𝐮¯j=𝕀(j∈Ω)⋅𝐮~j+𝕀(j∉Ω)⋅𝟎subscript¯𝐮𝑗⋅𝕀𝑗Ωsubscript~𝐮𝑗⋅𝕀𝑗Ω0\bar{\bf u}_{j}={\mathbb{I}}(j\in\Omega)\cdot\widetilde{\bf u}_{j}+{\mathbb{I}}(j\notin\Omega)\cdot{\bf 0}. Then we can rewrite the problem (6) as follows:min𝐕J(𝐕)=subscript𝐕𝐽𝐕absent\displaystyle\min_{{\bf V}}\;J({\bf V})=‖𝐕𝐔~T‖F2−2tr(𝐕[c𝐔~T𝐒+γ𝐔¯T])+const=‖𝐕𝐔~T‖F2+tr(𝐕𝐐T)+constsubscriptsuperscriptnorm𝐕superscript~𝐔𝑇2𝐹2tr𝐕delimited-[]𝑐superscript~𝐔𝑇𝐒𝛾superscript¯𝐔𝑇constsubscriptsuperscriptnorm𝐕superscript~𝐔𝑇2𝐹trsuperscript𝐕𝐐𝑇const\displaystyle\|{\bf V}\widetilde{\bf U}^{T}\|^{2}_{F}-2\mathrm{tr}\big{(}{\bf V}[c\widetilde{\bf U}^{T}{\bf S}+\gamma\bar{\bf U}^{T}]\big{)}+\text{const}=\|{\bf V}\widetilde{\bf U}^{T}\|^{2}_{F}+\mathrm{tr}({\bf V}{\bf Q}^{T})+\text{const}s.t.𝐕∈{−1,+1}n×c𝐕superscript11𝑛𝑐\displaystyle{\bf V}\in\{-1,+1\}^{n\times c}(7)where 𝐐=−2c𝐒T𝐔~−2γ𝐔¯𝐐2𝑐superscript𝐒𝑇~𝐔2𝛾¯𝐔{\bf Q}=-2c{\bf S}^{T}\widetilde{\bf U}-2\gamma\bar{\bf U}, const is a constant independent of 𝐕𝐕{\bf V}.
|
| 48 |
+
|
| 49 |
+
Then, we update 𝐕𝐕{\bf V} bit by bit. That is to say, each time we update one column of 𝐕𝐕{\bf V} with other columns fixed. Let 𝐕∗ksubscript𝐕absent𝑘{\bf V}_{*k} denote the k𝑘kth column of 𝐕𝐕{\bf V} and 𝐕^ksubscript^𝐕𝑘\widehat{\bf V}_{k} denote the matrix of 𝐕𝐕{\bf V} excluding 𝐕∗ksubscript𝐕absent𝑘{\bf V}_{*k}. Let 𝐐∗ksubscript𝐐absent𝑘{\bf Q}_{*k} denote the k𝑘kth column of 𝐐𝐐{\bf Q} and 𝐐^ksubscript^𝐐𝑘\widehat{\bf Q}_{k} denote the matrix of 𝐐𝐐{\bf Q} excluding 𝐐∗ksubscript𝐐absent𝑘{\bf Q}_{*k}. Let 𝐔~∗ksubscript~𝐔absent𝑘\widetilde{\bf U}_{*k} denote the k𝑘kth column of 𝐔~~𝐔\widetilde{\bf U} and 𝐔^ksubscript^𝐔𝑘\widehat{\bf U}_{k} denote the matrix of 𝐔~~𝐔\widetilde{\bf U} excluding 𝐔~∗ksubscript~𝐔absent𝑘\widetilde{\bf U}_{*k}. To optimize 𝐕∗ksubscript𝐕absent𝑘{\bf V}_{*k}, we can get the objective function: J(𝐕∗k)=‖𝐕𝐔~T‖F2+tr(𝐕𝐐T)+const=tr(𝐕∗k[2𝐔~∗kT𝐔^k𝐕^kT+𝐐∗kT])+const𝐽subscript𝐕absent𝑘subscriptsuperscriptnorm𝐕superscript~𝐔𝑇2𝐹trsuperscript𝐕𝐐𝑇consttrsubscript𝐕absent𝑘delimited-[]2superscriptsubscript~𝐔absent𝑘𝑇subscript^𝐔𝑘superscriptsubscript^𝐕𝑘𝑇subscriptsuperscript𝐐𝑇absent𝑘constJ({\bf V}_{*k})=\|{\bf V}\widetilde{\bf U}^{T}\|^{2}_{F}+\mathrm{tr}({\bf V}{\bf Q}^{T})+\text{const}=\mathrm{tr}\big{(}{\bf V}_{*k}[2\widetilde{\bf U}_{*k}^{T}\widehat{\bf U}_{k}\widehat{\bf V}_{k}^{T}+{\bf Q}^{T}_{*k}]\big{)}+\text{const}. Then, we need to solve the following problem:min𝐕∗kJ(𝐕∗k)=tr(𝐕∗k[2𝐔~∗kT𝐔^k𝐕^kT+𝐐∗kT])+consts.t.𝐕∗k∈{−1,+1}n.formulae-sequencesubscriptsubscript𝐕absent𝑘𝐽subscript𝐕absent𝑘trsubscript𝐕absent𝑘delimited-[]2superscriptsubscript~𝐔absent𝑘𝑇subscript^𝐔𝑘superscriptsubscript^𝐕𝑘𝑇subscriptsuperscript𝐐𝑇absent𝑘consts.t.subscript𝐕absent𝑘superscript11𝑛\displaystyle\min_{{\bf V}_{*k}}\;J({\bf V}_{*k})=\mathrm{tr}({\bf V}_{*k}[2\widetilde{\bf U}_{*k}^{T}\widehat{\bf U}_{k}\widehat{\bf V}_{k}^{T}+{\bf Q}^{T}_{*k}]\big{)}+\text{const}\hskip 14.22636pt\text{s.t.}\quad{\bf V}_{*k}\in\{-1,+1\}^{n}.(8)Then, we can get the optimal solution of problem (8) as follows:𝐕∗k=−sign(2𝐕^k𝐔^kT𝐔~∗k+𝐐∗k),subscript𝐕absent𝑘sign2subscript^𝐕𝑘superscriptsubscript^𝐔𝑘𝑇subscript~𝐔absent𝑘subscript𝐐absent𝑘\displaystyle{\bf V}_{*k}=-\text{sign}(2\widehat{\bf V}_{k}\widehat{\bf U}_{k}^{T}\widetilde{\bf U}_{*k}+{\bf Q}_{*k}),(9)which can be used to update 𝐕∗ksubscript𝐕absent𝑘{\bf V}_{*k}.
|
| 50 |
+
|
| 51 |
+
We summarize the whole learning algorithm for ADSH in Algorithm 1. Here, we repeat the learning for several times, and each time we can sample a query set indexed by ΩΩ\Omega.
|
| 52 |
+
|
| 53 |
+
After training ADSH, the learned deep neural network can be applied for generating binary codes for query points including unseen query points during training. More specifically, we can use the equation: 𝐮q=h(𝐱q;Θ)=sign(F(𝐱q;Θ))subscript𝐮𝑞ℎsubscript𝐱𝑞Θsign𝐹subscript𝐱𝑞Θ{\bf u}_{q}=h({\bf x}_{q};\Theta)=\text{sign}(F({\bf x}_{q};\Theta)),to generate binary code for 𝐱qsubscript𝐱𝑞{\bf x}_{q}.
|
| 54 |
+
|
| 55 |
+
The total computational complexity for training ADSH is 𝒪(ToutTin[(n+2)mc+(m+1)nc2+(c(n+m)−m)c])𝒪subscript𝑇𝑜𝑢𝑡subscript𝑇𝑖𝑛delimited-[]𝑛2𝑚𝑐𝑚1𝑛superscript𝑐2𝑐𝑛𝑚𝑚𝑐{\mathcal{O}}(T_{out}T_{in}[(n+2)mc+(m+1)nc^{2}+(c(n+m)-m)c]). In practice, Toutsubscript𝑇𝑜𝑢𝑡T_{out}, Tinsubscript𝑇𝑖𝑛T_{in}, m𝑚m and c𝑐c will be much less than n𝑛n. Hence, the computational cost of ADSH is 𝒪(n)𝒪𝑛{\mathcal{O}}(n). For traditional symmetric deep supervised hashing methods, if all database points are used for training, the computational cost is at least 𝒪(n2)𝒪superscript𝑛2{\mathcal{O}}(n^{2}). Furthermore, the training for deep neural network is typically time-consuming. For traditional symmetric deep supervised hashing methods, they need to scan n𝑛n points in an epoch of the neural network training. On the contrary, only m𝑚m points are scanned in an epoch of the neural network training for ADSH. Typically, m≪nmuch-less-than𝑚𝑛m\ll n. Hence, ADSH is much faster than traditional symmetric deep supervised hashing methods.
|
| 56 |
+
|
| 57 |
+
To make the training practicable, most existing symmetric deep supervised hashing methods have to sample only a small subset from the whole database to construct a training set for deep hash function learning, and many points in database may be discarded during training. On the contrary, ASDH is much more efficient to utilize more database points for training.
|
| 58 |
+
|
| 59 |
+
We carry out experiments to evaluate our ADSH and baselines which are implemented with the deep learning toolbox MatConvNet [26] on a NVIDIA K40 GPU server.
|
| 60 |
+
|
| 61 |
+
We evaluate ADSH on two widely used datasets: CIFAR-10 [10] and NUS-WIDE [5].
|
| 62 |
+
|
| 63 |
+
The CIFAR-10 dataset is a single-label dataset which contains 60,000 32 ×\times 32 color images. Each image belongs to one of the ten classes. Two images will be treated as a ground-truth neighbor (similar pair) if they share one common label.
|
| 64 |
+
|
| 65 |
+
The NUS-WIDE dataset is a multi-label dataset which consists of 269,648 web images associated with tags. Following the setting of DPSH [14], we only select 195,834 images that belong to the 21 most frequent concepts. For NUS-WIDE, two images will be defined as a ground-truth neighbor (similar pair) if they share at least one common label.
|
| 66 |
+
|
| 67 |
+
To evaluate our ADSH, ten start-of-the-art methods, including ITQ [7], Lin:Lin [20], Lin:V [20], LFH [31], FastH [15], SDH [24], COSDISH [9], DSH [16], DHN [33] and DPSH [14], are selected as baselines for comparison.
|
| 68 |
+
|
| 69 |
+
For non-deep hashing methods, we utilize 4,096-dim deep features which are extracted by the pre-trained CNN-F model on ImageNet dataset for fair comparison. For FastH, LFH and COSDISH, we use boosted decision tree for out-of-sample extension by following the setting of FastH. For DSH and DHN, although the authors provide source code, for fair comparison we carefully re-implement their methods on MatConvNet to remove effect on training time caused by different platforms. For deep hashing methods, we resize all images to 224 ×\times 224 and use the raw pixels as the inputs for all datasets. In addition, some deep hashing methods adopt other neural networks for feature learning. We find that the deep baselines with CNN-F network can outperform the counterparts with the original networks (refer to Appendix C in the supplementary material). For fair comparison, we adopt the same deep neural networks for all deep hashing methods, i.e., the CNN-F network. We initialize CNN-F with the pre-trained model on ImageNet. Following the suggestions of the authors, we set the mini-batch size to be 128 and tune the learning rate among [10−6,10−2]superscript106superscript102[10^{-6},10^{-2}]. For ADSH method, we set γ=200𝛾200\gamma=200, Tout=50subscript𝑇𝑜𝑢𝑡50T_{out}=50 by using a validation strategy. Furthermore, we set Tin=3,5subscript𝑇𝑖𝑛35T_{in}=3,5, |Ω|=1000,2000Ω10002000|\Omega|=1000,2000 for CIFAR-10 and NUS-WIDE, respectively 111We report the effect of hyper-parameters γ𝛾\gamma and |Ω|Ω|\Omega| in Appendix D of the supplementary materials.. To avoid effect caused by class-imbalance problem between positive and negative similarity information, inspired by [13], we empirically set the weight of the element -1 in 𝐒𝐒{\bf S} as the ratio between the number of element 1 and the number of element -1 in 𝐒𝐒{\bf S}.
|
| 70 |
+
|
| 71 |
+
For CIFAR-10 dataset, we randomly select 1,000 images for validation set and 1,000 images for test set, with the remaining images as database points. For NUS-WIDE dataset, we randomly choose 2,100 images as validation set and 2,100 images as test set, with the rest of the images as database points. Because the deep hashing baselines are very time-consuming for training, similar to existing works like [14] we randomly sample 5,000 (500 per class) and 10,500 images from database for training all baselines except Lin:V for CIFAR-10 and NUS-WIDE, respectively. The necessity of random sampling for training set will also be empirically verified in Section 4.4.
|
| 72 |
+
|
| 73 |
+
We report Mean Average Precision (MAP), Top-k precision curve to evaluate ADSH and baselines. For NUS-WIDE dataset, the MAP results are calculated based on the top-5000 returned samples. We also compare the training time between different deep hashing methods. Furthermore, we also report the precision-recall curve and case study, which are moved to the supplementary material due to the space limitation. All experiments are run five times, and the average values are reported.
|
| 74 |
+
|
| 75 |
+
The MAP results are presented in Table 1. We can find that in most cases the supervised methods can outperform the unsupervised methods, and the deep methods can outperform the non-deep methods. Furthermore, we can find that ADSH can outperform all the other baselines, including deep hashing baselines, non-deep supervised hashing baselines and unsupervised hashing baselines.
|
| 76 |
+
|
| 77 |
+
Some baselines, including Lin:Lin, LFH, SDH, COSDISH, can also be adapted to learn binary hash codes for database directly due to their training efficiency. We also carry out experiments to evaluate the adapted counterparts of these methods which can learn binary codes for database directly, and denote the counterparts of these methods as Lin:V, LFH-D, SDH-D, COSDISH-D, respectively. It also means that Lin:V, LFH-D, SDH-D, COSDISH-D adopt all database points for training. We report the corresponding MAP results in Table 2. We can find that Lin:V, LFH-D, SDH-D, COSDISH-D can outperform Lin:Lin, LFH, SDH, COSDISH, respectively. This means that directly learning the binary hash codes for database points is more accurate than the strategies which use the learned hash function to generate hash codes for database points. We can also find that ADSH can outperform all the other baselines.
|
| 78 |
+
|
| 79 |
+
We also report top-2000 precision in Figure 3 on two datasets. Once again, we can find that ADSH can significantly outperform other baselines in all cases especially for large code length.
|
| 80 |
+
|
| 81 |
+
We compare the training time of ADSH to that of other deep supervised hashing baselines on CIFAR-10 by changing the number of training points. The results are shown in Figure 3 (a). We can find that ADSH is much faster than other deep hashing methods in all cases. We can also find that as the number of training points increases, the computation cost for traditional deep hashing baselines increases dramatically. On the contrary, the computation cost for ADSH increases slowly as the size of training set increases. For example, we can find that ADSH with 58,000 training points is still much faster than all the other deep baselines with 5,000 training points. Hence, we can find that ADSH can achieve higher accuracy with much faster training speed.
|
| 82 |
+
|
| 83 |
+
Furthermore, we compare ADSH to deep hashing baselines by adopting the whole database as the training set on NUS-WIDE with 12 bits. The results are shown in Figure 3 (b). Here, DSH, DHN and DPSH denote the deep hashing baselines with 10,500 sampled points for training. DSH-D, DHN-D and DPSH-D denote the counterparts of the corresponding deep hashing baselines which adopt the whole database for training. We can find that to achieve similar accuracy (MAP), DSH, DHN and DPSH need much less time than their counterparts with whole database for training. Moreover, if the whole database is used for training, it need more than 10 hours for most baselines to converge for the case of 12 bits. For longer code with more bits, the time cost will be even higher. Hence, we have to sample a subset for training. From Figure 3 (b), we can also find that to achieve similar accuracy, our ADSH is much faster than all the baselines, either with sampled training points or with the whole database. In addition, ADSH can achieve a higher accuracy than all baselines with much less time.
|
| 84 |
+
|
| 85 |
+
In this paper, we propose a novel deep supervised hashing method, called ADSH, for large-scale nearest neighbor search. To the best of our knowledge, this is the first work to adopt an asymmetric strategy for deep supervised hashing. Experiments show that ADSH can achieve the state-of-the-art performance in real applications.
|
1707.08608v3.txt
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Suppose we have trained a sequence-to-sequence (seq2seq) network (?; ?; ?) to perform a structured prediction task such as syntactic constituency parsing (?). We would like to apply this trained network to novel, unseen examples, but still require that the network’s outputs obey an appropriate set of problem specific hard-constraints; for example, that the output sequence encodes a valid parse tree. Enforcing these constraints is important because down-stream tasks, such as relation extraction or coreference resolution typically assume that the constraints hold. Moreover, the constraints impart informative hypothesis-limiting restrictions about joint assignments to multiple output units, and thus enforcing them holistically might cause a correct prediction for one subset of the outputs tobeneficially influence another.
|
| 2 |
+
|
| 3 |
+
Unfortunately, there is no guarantee that the neural network will learn these constraints from the training data alone, especially if the training data volume is limited. Although in some cases, the outputs of state-of-the-art systems mostly obey the constraints for the test-set of the data on which they are tuned, in other cases they do not. In practice, the quality of neural networks are much lower when run on data in the wild (e.g., because small shifts in domain or genre change the underlying data distribution). In such cases, the problem of constraint violations becomes more significant.
|
| 4 |
+
|
| 5 |
+
This raises the question: how should we enforce hard constraints on the outputs of a neural network? We could perform expensive combinatorial discrete search over a large output space, or manually construct a list of post-processing rules for the particular problem domain of interest. Though, we might do even better if we continue to “train” the neural network at test-time to learn how to satisfy the constraints on each input. Such a learning procedure is applicable at test-time because learning constraintsrequires no labeled data: rather, we only require a function thatmeasures the extent to which a predicted output violates a constraint.
|
| 6 |
+
|
| 7 |
+
In this paper, we present gradient-based inference (GBI), an inference method for neural networks that strongly favors respecting output constraints by adjusting the network’s weights at test-time, for each input. Given an appropriate function that measures the extent of a constraint violation, we can express the hard constraints as an optimization problem over the continuous weights and apply back-propagation to tune them. That is, by iteratively adjusting the weights so that the neural network becomes increasingly likely to produce an output configuration that obeys the desired constraints. Much like scoped-learning, the algorithm customizes the weights for each example at test-time (?), but does so in a wayto satisfy the constraints.
|
| 8 |
+
|
| 9 |
+
We study GBI on three tasks: semantic role labeling (SRL), syntactic constituency parsing and a synthetic sequence transduction problem and findthat the algorithm performs favorably on all three tasks. In summary, our contributions are that we:1.Propose a novel Gradient-Based Inference framework.2.Verify that GBI performs well on various applications, thus providing strong evidence for the generality of the method.3.Examine GBI across wide range of reference model performances and report its consistency.4.Show that GBI also perform well on out-of-domain data.For all the tasks, we find that GBI satisfies a large percentage of the constraints (up to 98%) and that in almost every case (out-of-domain data, state-of-the art networks, and even for the lower-quality networks), enforcing the constraints improves the accuracy. On SRL, for example, the method successfully injects truth-conveying side-information via constraints, improving SOTA network 111Since our submission, the previous SOTA (?) in SRL on which we apply our technique has been advanced by 1.7 F1 points (?). However, this is a training time improvement which is orthogonal to our work.by 1.03 F1 (?). This improvement happens to surpass a A*algorithm for incorporating constraints while also being robust, in a way thatA*is not, to cases for which the side constraints are inconsistent with the labeled ground-truth.
|
| 10 |
+
|
| 11 |
+
Our goal is to design an approximate optimization algorithm that is similar in spirit to Lagrangian relaxation in that we replace a complex constrained decoding objective with a simpler unconstrained objective that we can optimize with gradient descent (?; ?; ?), but is better suited for non-linear non-convex optimization with global constraints that do not factorize over the outputs. Although the exposition in this section revolves around Lagrangian relaxation, we emphasize that the purpose is merely to provide intuition and motivate design choices.
|
| 12 |
+
|
| 13 |
+
Typically, a neural network parameterized by weights W𝑊W is afunction from an input 𝐱𝐱{\mathbf{x}} to an output 𝐲𝐲{\mathbf{y}}. The network hasan associated compatibility function Ψ(𝐲;𝐱,W)→ℝ+→Ψ𝐲𝐱𝑊subscriptℝ\Psi({\mathbf{y}};{\mathbf{x}},W)\rightarrow\mathbb{R}_{+} that measures howlikely an output 𝐲𝐲{\mathbf{y}} is given an input 𝐱𝐱{\mathbf{x}} under weightsW𝑊W. The goal of inference is to find an output that maximizesthe compatibility function and this is usually accomplishedefficiently with feed-forward greedy-decoding. In this work, wewant to additionally enforce that the output values belong to afeasible set or grammar ℒ𝐱superscriptℒ𝐱\mathcal{L}^{\mathbf{x}} that in general depends on theinput. We are thus interested in the following optimization problem:max𝐲Ψ(𝐱,𝐲,W) s.t. 𝐲∈ℒ𝐱\begin{array}[]{ll@{}ll}\underset{{\mathbf{y}}}{\max}&\displaystyle\Psi({\mathbf{x}},{\mathbf{y}},W)\text{ }\operatorname{s.t.}&\text{ }\displaystyle{\mathbf{y}}\in\mathcal{L}^{\mathbf{x}}\end{array}(1)Simple greedy inference are no longer sufficient since theoutputs might violate the global constraints (i.e.,𝐲∉ℒ𝐱𝐲superscriptℒ𝐱{\mathbf{y}}\notin\mathcal{L}^{\mathbf{x}}). Instead, suppose we had a functiong(𝐲,ℒ𝐱)→ℝ+→𝑔𝐲superscriptℒ𝐱subscriptℝg({\mathbf{y}},\mathcal{L}^{\mathbf{x}})\rightarrow\mathbb{R}_{+} that measures a loss between output 𝐲𝐲{\mathbf{y}} and a grammar ℒ𝐱superscriptℒ𝐱\mathcal{L}^{\mathbf{x}} such thatg(𝐲,ℒ𝐱)=0𝑔𝐲superscriptℒ𝐱0g({\mathbf{y}},\mathcal{L}^{\mathbf{x}})=0 if and only if there are no grammatical errors in 𝐲𝐲{\mathbf{y}}. That is, g(𝐲,ℒ𝐱)=0𝑔𝐲superscriptℒ𝐱0g({\mathbf{y}},\mathcal{L}^{\mathbf{x}})=0 for the feasible region and is strictly positive everywhere else. For example, if the feasible region is a CFL, g𝑔g could be the least errors count function (?). We could then express the constraints as an equality constraint and minimize the Lagrangian:min𝜆max𝐲Ψ(𝐱,𝐲,W)+λg(𝐲,ℒ𝐱)missing-subexpression𝜆𝐲Ψ𝐱𝐲𝑊𝜆𝑔𝐲superscriptℒ𝐱missing-subexpression\begin{array}[]{ll@{}ll}&\underset{\lambda}{\min}\;\underset{{\mathbf{y}}}{\max}&\displaystyle\Psi({\mathbf{x}},{\mathbf{y}},W)+\lambda g({\mathbf{y}},\mathcal{L}^{\mathbf{x}})&\\\end{array}(2)However, this leads to optimization difficulties because there is justa single dual variable for our global constraint, resultingintractable problem and thus leading tobrute-force trial and error search.
|
| 14 |
+
|
| 15 |
+
Instead, we might circumvent these issues if we optimize over amodel parameters rather than a single dual variable.Intuitively, the purpose of the dual variables is to simply penalizethe score of infeasible outputs that otherwise have a high score in the network, but happen to violate constraints. Similarly, network’s weights can control the compatibility of the output configurations with the input. By properly adjusting the weights, we can affect the outcome of inference by removing mass from invalid outputs—in much the same way a dual variable affects the outcome of inference. Unlike a single dual variable however, the network expresses a different penalty weight for each output. And, because the weights are typically tied across space (e.g., CNNs) or time (e.g., RNNs) the weights are likely to generalize across related outputs. As a result, lowering the compatibility function for a single invalid output has the potential effect of lowering the compatibility for an entire family of related, invalid outputs; enabling faster search. In the next subsection, we propose a novel approach that utilizes the amount of constraint violation as part of the objective function so that we can adjust the model parameters to search for a constraint-satisfying output efficiently.
|
| 16 |
+
|
| 17 |
+
Instead of solving the aforementioned impractical optimizationproblem, we propose to optimize a “dual” set of model parametersWλsubscript𝑊𝜆W_{\lambda} over the constraint function while regularizing Wλsubscript𝑊𝜆W_{\lambda} to stay close to the originally learnedweights W𝑊W. The objective function is as follows:minWλΨ(𝐱,𝐲^,Wλ)g(𝐲^,ℒ𝐱)+α‖W−Wλ‖2where𝐲^=argmax𝐲Ψ(𝐱,𝐲,Wλ)subscript𝑊𝜆Ψ𝐱^𝐲subscript𝑊𝜆𝑔^𝐲superscriptℒ𝐱𝛼subscriptnorm𝑊subscript𝑊𝜆2missing-subexpressionmissing-subexpressionwhere^𝐲𝐲argmaxΨ𝐱𝐲subscript𝑊𝜆missing-subexpressionmissing-subexpression\begin{array}[]{ll@{}ll}\underset{W_{\lambda}}{\min}&\displaystyle\Psi({\mathbf{x}},\hat{{\mathbf{y}}},W_{\lambda})g(\hat{{\mathbf{y}}},\mathcal{L}^{\mathbf{x}})+\alpha\|W-W_{\lambda}\|_{2}\\\text{where}&\hat{{\mathbf{y}}}=\displaystyle\underset{{\mathbf{y}}}{\operatorname{argmax}}\;\Psi({\mathbf{x}},{\mathbf{y}},W_{\lambda})\end{array}(3)Although this objective deviates from the original optimizationproblem, it is reasonable because by definition of the constraintloss g(⋅)𝑔⋅g(\cdot), the global minima must correspond to outputsthat satisfy all constraints. Further, we expect to findhigh-probability optima if we initialize Wλ=Wsubscript𝑊𝜆𝑊W_{\lambda}=W.Moreover, the objective is intuitive: if there is a constraintviolation in 𝐲^^𝐲\hat{{\mathbf{y}}} then g(⋅)>0𝑔⋅0g(\cdot)>0 and the gradientwill lower the compatibility of 𝐲^^𝐲\hat{{\mathbf{y}}} to make it less likely.Otherwise, g(⋅)=0𝑔⋅0g(\cdot)=0 and the gradient of the energy is zeroand we leave the compatibility of 𝐲^^𝐲\hat{{\mathbf{y}}} unchanged. Crucially,the optimization problem yields computationally efficient subroutinesthat we exploit in the optimization algorithm.
|
| 18 |
+
|
| 19 |
+
To optimize the objective, the algorithm alternates maximization tofind 𝐲^^𝐲\hat{{\mathbf{y}}} and minimization w.r.t. Wλsubscript𝑊𝜆W_{\lambda}(Algorithm 1). In particular, we first approximatethe maximization step by employing the neural network’s inferenceprocedure (e.g., greedy decoding, beam-search, or Viterbi decoding) to find the𝐲^^𝐲\hat{{\mathbf{y}}} that approximately maximizes ΨΨ\Psi, which ignores theconstraint loss g𝑔g. Then, given a fixed 𝐲^^𝐲\hat{{\mathbf{y}}}, we minimize theobjective with respect to the Wλsubscript𝑊𝜆W_{\lambda} by performingstochastic gradient descent (SGD). Since 𝐲^^𝐲\hat{{\mathbf{y}}} is fixed, theconstraint loss term becomes a constant in the gradient; thus, makingit easier to employ external black-box constraint losses (such asthose based on compilers) that may not be differentiable. As aremark, note the similarity to REINFORCE (?): the decoder outputs as actions and the constraint-loss as a negative reward. However, GBIdoes not try to reduce expected reward andterminates upon discovery of an output that satisfies all constraints.Furthermore, GBI also works on sequence-tagging problem, SRL (Section 4.1), wherenext output does not depend on the current output, which is far from REINFORCE setting.
|
| 20 |
+
|
| 21 |
+
There are multiple applications that involve hard-constraints and weprovide two illustrative examples that we later employ as case-studiesin our experiments: SRL and syntactic parsing. The former exemplifiesa case in which external knowledge encoded as hard constraints conveysbeneficial side information to the original task of interest while thelatter studies a case in which hard constraints are inherent to thetask of interest. Finally, we briefly mention sequence transduction asframework in which constraints may arise. Of course, constraints mayin general arise for a variety of different reasons, depending on thesituation. We provide example-based case studies for each application in Appendix A, B.
|
| 22 |
+
|
| 23 |
+
As a first illustrative example, consider SRL. SRL focuses on identifying shallow semantic information about phrases. For example, in the sentence “it is really like this, just look at the bus sign” the goal is to tag the arguments given “is” as the verb predicate: “it” as its first argument and the prepositional phrase “like this” as its second argument. Traditionally SRL is addressed as a sequence labeling problem, in which the input is the sequence of tokens and the output are BIO-encoded class labels representing both the regimentation of tokens into contiguous segments and their semantic roles.
|
| 24 |
+
|
| 25 |
+
Note that the parse tree for the sentence might provide constraints that could assist with the SRL task. In particular, each node of the parse tree represents a contiguous segment of tokens that could be a candidate for a semantic role. Therefore, we can include as side-information constraints that force the BIO-encoded class labeling to produce segments of text that each agree with some segment of text expressed by a node in the parse tree.222The ground-truth parse spans do not always agree with the SRL spans, leading to imperfect side information.To continue with our example, the original SRL sequence-labeling might incorrectly label “really like this” as the second argument rather than “like this.” Since according to the parse tree “really” is part of the verb phrase, thus while the tree contains the spans “is really like this” and “like this” it does not contain the span “really like this.” The hope is that enforcing the BIO labeling to agree with the actual parse spans would benefit SRL. Based on the experiments, this is indeed the case, and our hypothetical example is actually a real data-case from our experiments, which we describe later.The g(𝐲,ℒx)𝑔𝐲superscriptℒ𝑥g({\mathbf{y}},\mathcal{L}^{x}) for SRL factorizes into per-span constraints gisubscript𝑔𝑖g_{i}.For i𝑖ith span sisubscript𝑠𝑖s_{i}, if sisubscript𝑠𝑖s_{i} is consistent with any node in the parse tree,gi(si,ℒx)=0subscript𝑔𝑖subscript𝑠𝑖superscriptℒ𝑥0g_{i}(s_{i},\mathcal{L}^{x})=0, otherwise gi(si,ℒx)=1/nsisubscript𝑔𝑖subscript𝑠𝑖superscriptℒ𝑥1subscript𝑛subscript𝑠𝑖g_{i}(s_{i},\mathcal{L}^{x})=1/n_{s_{i}} where nsisubscript𝑛subscript𝑠𝑖n_{s_{i}} is defined as the number of tokens in sisubscript𝑠𝑖s_{i}.Overall,Ψ(𝐱,𝐲^,Wλ)g(𝐲^,ℒx)=∑i=1kg(si,ℒx)Ψ(𝐱,si,Wλ)Ψ𝐱^𝐲subscript𝑊𝜆𝑔^𝐲superscriptℒ𝑥superscriptsubscript𝑖1𝑘𝑔subscript𝑠𝑖superscriptℒ𝑥Ψ𝐱subscript𝑠𝑖subscript𝑊𝜆\Psi({\mathbf{x}},\hat{{\mathbf{y}}},W_{\lambda})g(\hat{{\mathbf{y}}},\mathcal{L}^{x})=\sum_{i=1}^{k}g(s_{i},\mathcal{L}^{x})\Psi({\mathbf{x}},s_{i},W_{\lambda}) where k𝑘k is number of spans on output 𝐲^^𝐲\hat{{\mathbf{y}}}.
|
| 26 |
+
|
| 27 |
+
As a second illustrative example, consider a structured prediction problemof syntactic parsing in which the goal is to input a sentencecomprising a sequence of tokens and output a tree describing thegrammatical parse of the sentence.Syntactic parsing is a separate but complementary task to SRL.While SRL focuses on semantic information, syntactic parsing focuses on identifying relatively deep syntax tree structures.One way to model the problem withneural networks is to linearize the representation of the parse treeand then employ the familiar seq2seq model(?). Let us suppose we linearize the tree usinga sequence of shift (s) and reduce (r,r!) commandsthat control an implicit shift reduce parser. Intuitively, thesecommands describe the exact instructions for converting the inputsentence into a complete parse tree: the interpretation of the symbols is that we shift an input token onto the stack and theinterpretation of the symbol r is that we start (or continue)reducing (popping) the top elements of the stack, the interpretationof a third symbol ! is that we stop reducing and push thereduced result back onto the stack. Thus, given an input sentence andan output sequence of shift-reduce commands, we can deterministicallyrecover the tree by simulating a shift reduce parser. For example, thesequence ssrr!ssr!rr!rr! encodes a type-free version of theparse tree (S (NP the ball) (VP is (NP red))) for the inputsentence “the ball is red”. It is easy to recover the tree structurefrom the input sentence and the output commands by simulating the shiftreduce parser. Of course in practice, reduce commandsinclude the standard parts of speech as types (NP, VP, etc).
|
| 28 |
+
|
| 29 |
+
Note that for output sequences to form a valid tree over the input,the sequence must satisfy a number of constraints. First, the numberof shifts must equal the number of input tokens m𝐱subscript𝑚𝐱m_{\mathbf{x}}, otherwiseeither the tree would not cover the entire input sentence or the treemust contain spurious symbols. Second, the parser cannotissue a reduce command if the stack is empty. Third,at the end of the parser commands,the stack must have just a single item,the root node.The constraint loss g(𝐲,ℒx)𝑔𝐲superscriptℒ𝑥g({\mathbf{y}},\mathcal{L}^{x}) for this task simply counts the errors of eachof the three types. (Appendix C.2)
|
| 30 |
+
|
| 31 |
+
As a minor remark, note that other encodings of trees, such asbracketing (of which the Penn Tree Bank’s S-expressions are anexample), are more commonly used as output representations for seq2seqparsing (ibid). However, the shift-reduce representationdescribed in the above paragraphs is isomorphic to the bracketingrepresentations and as we get similar model performance to singleseq2seq mode on the same data (ibid.), we chose the formerrepresentation to facilitate constraint analysis. Although outputrepresentations sometimes matter, for example, BIO vs BILOU encodingof sequence labelings, the difference is usually minor(?), and breakthroughs in sequence labeling havebeen perennially advanced under both representations.Thus, for now, we embrace the shift reduce representation as a legitimate alternative to bracketing, pari passu.
|
| 32 |
+
|
| 33 |
+
Finally, although not a specific application per se, we also consider sequence transduction as it provides a framework conducive to studying simple artificial languages with appropriately designed properties. A sequence transducer T:ℒS→ℒT:𝑇→subscriptℒ𝑆subscriptℒ𝑇T:\mathcal{L}_{S}\rightarrow\mathcal{L}_{T} is a function from a source sequence to a target sequence. As done in previous work, we consider a known T𝑇T to generate input/output training examples and train a seq2seq network to learn T𝑇T on that data (?).The constraint is simply that the output must belong to ℒTsubscriptℒ𝑇\mathcal{L}_{T} and also respect problem-specific conditions that may arise from the application of T𝑇T on the input sentence.We study a simple case in Section 4.3.
|
| 34 |
+
|
| 35 |
+
In this section we study our algorithm on three different tasks: SRL, syntactic constituency parsing and a synthetic sequence transduction task.All tasks require hard constraints, but they play a different role in each.In the transduction task they force theoutput to belong to a particular input-dependent regular expression,in SRL, constraints provide side-information about possibletrue-spans and in parsing,constraints ensure that the outputs encode valid trees.While the SRL task involves moretraditional recurrent neural networks that haveexactly one output per input token,the parsing and transduction tasksprovide an opportunity to study the algorithmon various seq2seq networks .
|
| 36 |
+
|
| 37 |
+
We are interested in answering the following questions (Q1) how welldoes the neural network learn the constraints from data (Q2) for casesin which the network is unable to learn the constraints perfectly,can GBI actually enforce the constraints(Q3) does GBI enforce constraints without compromising the quality of thenetwork’s output. To more thoroughly investigate Q2 and Q3, we alsoconsider: (Q4) is the behavior of the method sensitive to thereference network performance,and (Q5) does GBI also work on out-of-domain data.Q3 is particularly important because we adjust the weights ofthe network at test-time and this may lead to unexpected behavior.Q5 deals with our original motivation of using structured predictionto enhance performance on the out-of-domain data.
|
| 38 |
+
|
| 39 |
+
To address these various questions, we first define some terminology to measurehow well the model is doing in terms of constraints.To address (Q1) wemeasure the failure-rate (i.e., the ratio of test sentences forwhich the network infers an output that fails to fully satisfy theconstraints). To address (Q2) we evaluate our method on thefailure-set (i.e., the set of output sentences for which theoriginal network produces constraint-violating outputs) andmeasure our method’s conversion rate; that is, the percentage offailures for which our method is able to completely satisfy theconstraints (or “convert”). Finally, to address (Q3), we evaluatethe quality (e.g., accuracy or F1) of the output predictions on thenetwork’s failure-set both before and after applying our method.
|
| 40 |
+
|
| 41 |
+
We employ the AllenNLP (?) SRL networkwith ELMo embeddings, which is a multi-layer highwaybi-LSTM that produces BIO output predictions for each input token(?). For data we use OntoNotes v5.0, which hasground-truth for both SRL and syntactic parsing(?). We evaluate GBI on the test-set(25.6k examples), out of which consistent parse information is available for81.25% examples (we only include side-information in terms of constraints for this subset).
|
| 42 |
+
|
| 43 |
+
We repeat the same experimental procedure over multiple networks,SRL-X, while varying the portion (X%) of the training dataset.In Table 1, we see that GBI is able to convert 42.25 % of failure set, and this booststhe overall F1 measure by 1.23 point over the SOTA network (SRL-100) which does not incorporate theconstraints (they report 84.6 F1, we obtain a similar 84.4 F1 with theirnetwork, and achieve 85.63 after enforcing constraints with ourinference). Further, to address (Q1) we measure the sentence-level failure rate as well as span-leveldisagreement rate (i.e., the ratio of predicted spans ina sentence that disagree with the spans implied by the true syntacticparse of the sentence). To address (Q2) we evaluate our method on thefailure set (i.e., the set of sentences for whichdisagreement rate is nonzero) and measure our method’savgerage disagreement rate. Finally, to address (Q3), we evaluate thequality (F1 and exact match) of the output predictions on the network’sfailure-set both before and after applying our method. FromTable 1, we can see that by applying GBI on SRL-100,the avgerage disagreement rate on the failure set goes downfrom 44.85% to 24.92% which results in animprovement of 11.7 F1 and 19.90% in terms of exact match on the sameset.These improvements answer Q1-3 favorably.
|
| 44 |
+
|
| 45 |
+
To enforce constraints during inference, ?proposed to employ constrained-A*decoding. For the sake of afair comparison with GBI, we consider A*decoding as used in(?) and report results for the SRL-X networks. We seefrom Table 1, that the GBI procedure consistentlyoutperforms A*decoding on all evaluation metrics, thusdemonstrating the superiority of the approach.
|
| 46 |
+
|
| 47 |
+
We now turn to a different task and network: syntactic constituency parsing.We investigate the behavior of the constraint inference algorithmon the shift-reduce parsing task described inSection 3. We transform the Wall Street Journal (WSJ)portion of the Penn Tree Bank (PTB) into shift-reduce commands inwhich each reduce command has a phrase-type (e.g., noun-phrase orverb-phrase) (?). We employ the traditional split ofthe data with section 22 for dev, section 23 for test, and remainingsections 01-21 for training. We evaluate on the test set withevalb333http://nlp.cs.nyu.edu/evalb/ F1. In each experiment, we learn a seq2seq network on atraining set and then evaluate the network directly on the test setusing a traditional inference algorithm to perform the decoding(either greedy decoding or beam-search).
|
| 48 |
+
|
| 49 |
+
In order to study our algorithm on a wide range of accuracy regimes (section 4.4),we train many networks with differenthyper-parameters producing models of various quality, from high tolow, using the standard split of the WSJ portion of the PTB.In total, we train five networks Net1-5 for this study, that wedescribe below. We train our two best baseline models (Net1,2) using ahighly competitive seq2seq architecture for machinetranslation, GNMT (?) with F1 scores, 86.78 and 87.33, respectively. And, to study a wider range of accuracies, we train a simpler architecture with different hyper parameters andobtain nets (Net3-5). For all models, we employ Glorot initialization, and basic attention (?).See Table 2 for a summary of the networks,hyper-parameters, and their performance.
|
| 50 |
+
|
| 51 |
+
We report the behavior of the constraint-satisfaction methodin Table 3 for Net1-2,and in Table 4 for Net3-5.Across all theexperimental conditions (Table 3, 4), the conversion rates are high, often above 80and sometimes above 90 supporting Q2.Note that beam search alone can also increase constraint satisfactionwith conversion rates reaching as high as 51.74% (164/317) in thecase of Net3 with beam size 9. However, as the quality of the modelincreases, the conversion rate becomes minuscule; in the case ofNet1,2 the conversion rate is less than 14% with beam 9; in Net1converting 26 out of 187 and in Net2 converting just 1 out of 287 instances from failure set.
|
| 52 |
+
|
| 53 |
+
In order to address question Q3—the ability of our approach tosatisfy constraints without negatively affecting output quality—wemeasure the F1 scores on the failure-sets both before and afterapplying the constraint satisfaction algorithm.Since F1 is only defined on valid trees,we employ heuristic post-processing to ensure all outputs are valid.
|
| 54 |
+
|
| 55 |
+
Note that an improvement on the failure-setguarantees an improvement on the entire test-set since our methodproduces the exact same outputs as the baseline for examples that donot initially violate any constraints.Consequently, for example, theGNMT network improves (Net2) on the failure-set from 73.54 to 79.68F1, resulting in an overall improvement from 86.54 to 87.57 F1 (entire test-set).These improvements are similar to those we observe in the SRL task, andprovide additional evidence for answering Q1-3 favorably.We also measure how many iterationsof our algorithmit takes toconvert the examples that have constraint-violations. Across allconditions, it takes 5–7 steps to convert 25% of the outputs, 6–20steps to convert 50%, 15–57 steps to convert 80%, and 55–84 steps to convert 95%.
|
| 56 |
+
|
| 57 |
+
In our final experiment we focus on a simple sequence transductiontask in which we find that despite learning the training dataperfectly, the network fails to learn the constraint in a way thatgeneralizes to the test set.
|
| 58 |
+
|
| 59 |
+
For our task, we choose a simple transducer, similar to those studiedin recent work (?). The source languageℒSsubscriptℒ𝑆\mathcal{L}_{S} is (az|bz)⋆ and the target languageℒTsubscriptℒ𝑇\mathcal{L}_{T} is (aaa|zb)⋆. The transducer is defined tomap occurrences of az in the source string to aaa inthe target string, and occurrences of bz in the source stringto zb in the target string. For example,T(bzazbz)↦zbaaazbmaps-to𝑇bzazbzzbaaazbT(\texttt{bzazbz})\mapsto\texttt{zbaaazb}. The training setcomprises 1934 sequences of length 2–20 and the test set containsentences of lengths 21-24. We employ shorter sentences for trainingto require generalization to longer sentences at test time.
|
| 60 |
+
|
| 61 |
+
We employ a 32 hidden unit single-layered, attention-less,seq2seq LSTM in which thedecoder LSTM inputs the final encoder state at each decoder time-step.The network achieves perfect train accuracy while learning the rules ofthe target grammar ℒTsubscriptℒ𝑇\mathcal{L}_{T} perfectly, even on the test-set.However, the network fails to learn the input-specific constraint thatthe number of a’s in the output should be three times thenumber of a’s in the input. This illustrates how a networkmight rote-memorize constraints rather than learn the rule in a waythat generalizes. Thus, enforcing constraints at test-time isimportant.To satisfy constraints, we employ GBI with aconstraint loss g𝑔g, a length-normalized quadratic(3xa−ya)2/(m+n)superscript3subscript𝑥𝑎subscript𝑦𝑎2𝑚𝑛(3x_{a}-y_{a})^{2}/(m+n) that is zero when the number of a’s inthe output (yasubscript𝑦𝑎y_{a}) is exactly three times the number in the input(xasubscript𝑥𝑎x_{a}) with m𝑚m,n𝑛n denoting input, output, respectively. GBI achieves a conversion rate of65.2% after 100 iterations, while also improving the accuracy on thefailure-set from 75.2% to 82.4%. This synthetic experiment providesadditional evidence in support of Q2 and Q3, on a simplersmall-capacity network.
|
| 62 |
+
|
| 63 |
+
The foregoing experimental results provide evidence that GBI is a viable method for enforcing constraints. However, we hitherto study GBI on high quality reference networks such as SRL-100. To further bolster our conclusions, we now direct our investigation towards lower quality networks to understand GBI’s viability under a broader quality spectrum. We ask, how sensitive is GBI to the reference network’s performance (Q4)? To this end, we train poorer quality networks by restricting the amount of available training data or employing simpler architectures.
|
| 64 |
+
|
| 65 |
+
For SRL, we simulate low-resource models by limiting the training data portion to 1%, 10%, 40%, and 70% resulting in F1 score range of 67.28-83.55.Similarly, for syntactic parsing, we train additional low-quality models Net3-5 with a simpler uni-directional encoders/decoders, and on different training data portions of 25%, 75%, and 100% (Table 2).We evaluate GBI on each of them in Table 1, 4 and find further evidence in support of favorable answers toQ2 (satisfying constraints) and Q3 (improving F1 accuracy) by favorably answering Q4.Moreover, while not reported fully due to page limits, we examined both tasks with over 20 experiments and different baseline networks in combination with different inference strategies, and we found GBI favorable in all but one case (but by just 0.04 comparing without GBI).
|
| 66 |
+
|
| 67 |
+
We also study whether GBI is compatible with better underlying discrete search algorithms, in particular beam search for seq2seq. As we seen in column 2 of Table 4, that although beam-search improves the F1 score and reduces the percentage of violating constraints, GBI further improves over beam-search when using the latter in the inner-loop as the decoding procedure. In conclusion, improving the underlying inference procedure has the effect of decreasing the number of violating outputs, but GBI is still very much effective on this increasingly small set, despite it intuitively representing more difficult cases that even eludes constraint satisfaction via beam search inference.
|
| 68 |
+
|
| 69 |
+
Previously, we saw how GBI performs well even when the underlying network is of lower quality.We now investigate GBI on actual out-of-domain data for which the model quality can suffer.For SRL, we train a SOTA network with ELMo embedding on theNewsWire (NW) section of the OntoNotes v5.0 English PropBank corpus and then test on the other genres provided in the corpus:BC, BN, PT, TC, WB.The failure rate on the within genre data (test set of NW) is18.10%. We can see from Table 5, the failurerate for the NW trained SRL network in general is higher for out-of-genre data with the highest being 26.86% for BC (vs. 18.10% NW). Further, by enforcing constraints, we see significant gains on the failure set in terms of F1 score across all genres (ranging from 9.39-16.5 F1), thus, providing additional evidences for answering Q5.
|
| 70 |
+
|
| 71 |
+
As we did for SRL, we train a GMNT seq2seq model on the WSJ NW section in OntoNotes v5.0 Treebank 444The PTB (40k instances) and OntoNotes (30k instances) coverage of WSJ are slightly different. which shares the same genre classification with PropBank.The F1 on the within-genre data (test set of WSJ) is 85.03, but the F1 onthese genres is much lower, ranging from the mid-forties on BC (46.2–78.5 depending on the subcategory)to the low-eighties on BN (68.3–81.3. depending on the subcategory).Indeed, we find that overall the F1 is lower and in some cases, like WB, the failure rate is much higher (17.6% for WB vs. 11.9% for WSJ). Following the same experimental protocol as on the PTB data, we report the results in Table 5 (aggregating over all subcategories in each genre). We see that across all genres, the algorithm has high conversion rates (sometimes close to 100%), and that in each case, enforcing the constraints improves the F1. Again, we find support for Q2, Q3 and Q5.
|
| 72 |
+
|
| 73 |
+
We perform additional experiments to analyze the robustness andruntime of GBI. First, to measure robustness, we consider a variantof the SRL task in which we include noisy constraints, and compare GBIto A*(Appendix D). We find that in this case,A*performs significantly worse than the baseline, while GBI improves over the same baseline, thus showing the robustness of GBI.
|
| 74 |
+
|
| 75 |
+
In terms of runtime, GBI is generally faster than A*, though, thedifference is less clear on smaller evaluation sets (Appendix E).In the case study with noisy constraints, the runtimes are similar;however, GBI has much better accuracy, showing similar gains as thenoise-free setting. Lastly, in appendix E, wediscuss GBI’s trade off between runtime and accuracy by varying the max epoch M𝑀M.
|
| 76 |
+
|
| 77 |
+
Recent work has considered applying neural networks to structured prediction; for example,structured prediction energy networks (SPENs) (?). SPENs incorporate soft-constraints via back-propagating an energy function into “relaxed” output variables.In contrast, we focus on hard-constraints and back-propagate into the weights that subsequently control the original non-relaxed output variables via inference. Separately, there has been interest in employing hard constraints to harness unlabeled data intraining-time for simple classifications (?).Our work instead focuses on enforcing constraints at inference-time. More specifically, for SRL, previous work for enforcing constraints have focused on constrained A*decoding (?) or integer linear programming (?). For parsing, previous work in enforcing hard constraints has focused on post-processing (?) or building them into the decoder transitions (?)or search constraints (?).
|
| 78 |
+
|
| 79 |
+
Finally, as previously mentioned, our method highly resembles dualdecomposition and more generally Lagrangian relaxation for structuredprediction (?; ?; ?). In suchtechniques, it is assumed that a computationally efficient inferencealgorithm can maximize over a superset of the feasible region (thisassumption parallels our case because unconstrained inference in theneural network is efficient, but might violate constraints). Then, themethod employs gradient descent to concentrate this superset onto thefeasible region. However, these techniques are not directlyapplicable to our non-linear problem with global constraints.
|
| 80 |
+
|
| 81 |
+
We presented an algorithm for satisfying constraints in neuralnetworks that avoids combinatorial search, but employs the network’sefficient unconstrained procedure as a black box to coax weightstowards well-formed outputs. We evaluated thealgorithm on three tasks including SOTA SRL, seq2seq parsing andfound that GBI can successfully convert failure sets while also boosting the task performance.Accuracy in each of the three tasks was improved by respecting constraints. Additionally, for SRL, we employed GBI on a model trained with similar constraint enforcing loss as GBI’s (?),and observe that the additional test-time optimization of GBI still significantly improves the model output whereas A*does not.We believe this is because GBI searches in the proximity of theprovided model weights; however, theoretical analysis of this hypothesis is left as a future work.
|
1707.09627v5.txt
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Human vision is rich – we infer shape, objects, parts of objects,and relations between objects – and vision is also abstract:we can perceive the radial symmetry of a spiral staircase,the iterated repetition in the Ising model,see the forest for the trees, and also the recursion within the trees.How could we build an agent with similar visual inference abilities?As a small step in this direction,we cast this problem as program learning,and take as our goal to learn high–levelgraphics programs from simple 2D drawings.The graphics programs we consider make figures like those found in machine learning papers(Fig. 1),and capture high-level features like symmetry, repetition, and reuse of structure.
|
| 2 |
+
|
| 3 |
+
{myverbbox}[]\firstFirstPageCodefor (i < 3)rectangle(3*i,-2*i+4,3*i+2,6)for (j < i + 1)circle(3*i+1,-2*j+5){myverbbox}[]\secondFirstPageCodereflect(y=8)for(i<3)if(i>0)rectangle(3*i-1,2,3*i,3)circle(3*i+1,3*i+1)
|
| 4 |
+
|
| 5 |
+
The key observation behind our work is that going from pixels to programs involves two distinct steps, each requiring different technical approaches. The first step involves inferring what objects make up an image – for diagrams, these are things like as rectangles, lines and arrows. The second step involves identifying the higher-level visual concepts that describe how the objects were drawn. In Fig. 1(b), it means identifying a pattern in how the circles and rectangles are being drawn that is best described with two nested loops, and which can easily be extrapolated to a bigger diagram.
|
| 6 |
+
|
| 7 |
+
This two-step factoring can be framed as probabilistic inference in a generative model where a latent programis executed to produce a set of drawing commands,which are then rendered to form an image (Fig. 2).We refer to this set of drawing commands as a specification (spec) because it specifies what the graphics program drew while lacking the high-level structure determining how the program decided to draw it.We infer a spec from an image using stochastic search (Sequential Monte Carlo)and infer a program from a spec using constraint-based program synthesis [1] –synthesizing structures like symmetries, loops, or conditionals.In practice, both stochastic search and program synthesis areprohibitively slow,and so we learn models that accelerate inference for both programs and specs,in the spirit of “amortized inference” [2],training a neural network to amortize the cost of inferring specs from images and usinga variant of Bias–Optimal Search [3]to amortize the cost of synthesizing programs from specs.
|
| 8 |
+
|
| 9 |
+
The new contributions of this work are (1) a working model that can infer high-level symbolic programs from perceptual input, and (2) a technique for using learning to amortize the cost of program synthesis, described in Section 3.1.
|
| 10 |
+
|
| 11 |
+
We developed a deep network architecture for efficiently inferring aspec, S𝑆S, from a hand-drawn image, I𝐼I.Our model combines ideas fromNeurally-Guided Procedural Models [4]and Attend-Infer-Repeat [5], butwe wish to emphasizethat one could usemany different approaches from the computer vision toolkit toparse an image in to primitive drawing commands (in our terminology, a “spec”) [6].Our network constructs thespec one drawing command at a time, conditioned on what it has drawn so far (Fig. 3).We firstpass a 256×256256256256\times 256 target image and a rendering of the drawing commands sofar (encoded as a two-channel image) to a convolutional network. Giventhe features extracted by the convnet, a multilayer perceptron thenpredicts a distribution over the next drawing command to execute(see Tbl. 1).We also use adifferentiable attention mechanism (Spatial TransformerNetworks: [7]) to let the model attend todifferent regions of the image while predicting drawing commands.We currently constraincoordinates to lie on a discrete 16×16161616\times 16 grid,but the grid could be made arbitrarily fine. Appendix A.1 gives full architectural detail.
|
| 12 |
+
|
| 13 |
+
For the model in Fig. 3, the distribution over the next drawing command factorizes as:ℙθ[t1t2⋯tK|I,S]=∏k=1Kℙθ[tk|aθ(fθ(I,render(S))|{tj}j=1k−1),{tj}j=1k−1]\mathds{P}_{\theta}[t_{1}t_{2}\cdots t_{K}|I,S]=\prod_{k=1}^{K}\mathds{P}_{\theta}\left[t_{k}|a_{\theta}\left(f_{\theta}(I,\text{render}(S))|\{t_{j}\}_{j=1}^{k-1}\right),\{t_{j}\}_{j=1}^{k-1}\right](1)where t1t2⋯tKsubscript𝑡1subscript𝑡2⋯subscript𝑡𝐾t_{1}t_{2}\cdots t_{K} are the tokens in the drawing command, I𝐼I isthe target image, S𝑆S is a spec, θ𝜃\theta are theparameters of the neural network, fθ(⋅,⋅)subscript𝑓𝜃⋅⋅f_{\theta}(\cdot,\cdot) is theimage feature extractor (convolutional network), and aθ(⋅|⋅)a_{\theta}(\cdot|\cdot) is an attention mechanism. The distribution overspecs factorizes as:ℙθ[S|I]=∏n=1|S|ℙθ[Sn|I,S1:(n−1)]×ℙθ[𝚂𝚃𝙾𝙿|I,S]subscriptℙ𝜃delimited-[]conditional𝑆𝐼superscriptsubscriptproduct𝑛1𝑆subscriptℙ𝜃delimited-[]conditionalsubscript𝑆𝑛𝐼subscript𝑆:1𝑛1subscriptℙ𝜃delimited-[]conditional𝚂𝚃𝙾𝙿𝐼𝑆\mathds{P}_{\theta}[S|I]=\prod_{n=1}^{|S|}\mathds{P}_{\theta}[S_{n}|I,S_{1:(n-1)}]\times\mathds{P}_{\theta}[\verb|STOP||I,S](2)where |S|𝑆|S| is the length of spec S𝑆S, the subscriptson S𝑆S index drawing commands within the spec (so Snsubscript𝑆𝑛S_{n} is a sequence of tokens: t1t2⋯tKsubscript𝑡1subscript𝑡2⋯subscript𝑡𝐾t_{1}t_{2}\cdots t_{K}), and the STOPtoken is emitted by the network to signal that the specexplains the image.We trained our network by sampling specs S𝑆S and targetimages I𝐼I for randomly generated scenes111Because the rendering process ignores the ordering of drawing commands in the spec, the mapping from spec to image is many-to-one. When generating random training data for the neural network, we put the drawing commands into a canonical order (left-to-right, top-to-bottom, first drawing circles, then rectangles, and finally lines/arrows.)and maximizing ℙθ[S|I]subscriptℙ𝜃delimited-[]conditional𝑆𝐼\mathds{P}_{\theta}[S|I],the likelihood of S𝑆S given I𝐼I, with respect tomodel parameters θ𝜃\theta, by gradient ascent.We trained on 105superscript10510^{5} scenes, which takes a day on an Nvidia TitanX GPU.
|
| 14 |
+
|
| 15 |
+
Our network can “derender” random synthetic imagesby doing a beam search torecover specs maximizing ℙθ[S|I]subscriptℙ𝜃delimited-[]conditional𝑆𝐼\mathds{P}_{\theta}[S|I]. But, if the network predicts an incorrectdrawing command, it has no way of recovering from that error.For added robustness we treat thenetwork outputs as proposals for a Sequential Monte Carlo (SMC) sampling scheme [8].Our SMC sampler draws samplesfrom the distribution ∝L(I|render(S))ℙθ[S|I]proportional-toabsent𝐿conditional𝐼render𝑆subscriptℙ𝜃delimited-[]conditional𝑆𝐼\propto L(I|\text{render}(S))\mathds{P}_{\theta}[S|I], where L(⋅|⋅)L(\cdot|\cdot)uses the pixel-wise distance between two images as a proxy for alikelihood.Here, the network is learning a proposal distribution to amortize the cost of inverting a generative model (the renderer) [2].Unconventionally, the target distribution of the SMC samplerincludes the likelihood under the proposal distribution.Intuitively, both the proposaldistribution and the distance function offer complementary signals forwhether a drawing command is correct,and we found that combining these signals gave higher accuracy.
|
| 16 |
+
|
| 17 |
+
Experiment 1: Figure 4.To evaluate which components of the model are necessary to parse complicated scenes,we compared the neural networkwith SMC against the neural network byitself (using beam search) or SMC by itself. Only the combination of the two passes acritical test of generalization: when trained on images with ≤12absent12\leq 12objects, it successfully parses scenes with many more objects than thetraining data.We also compare with a baseline that produces the spec in one shot byusing the CNN to extract features of the input which are passed to an LSTM which finally predictsthe spec token-by-token (LSTM in Fig. 4; Appendix A.2).This architecture is used in several successful neural models of image captioning (e.g., [9]),but, for this domain, cannot parse cluttered scenes with many objects.
|
| 18 |
+
|
| 19 |
+
We trained the modelto generalize to hand drawings by introducing noise into therenderings of the training target images, where the noise process mimics the kinds of variations found in hand drawings (Fig. 5).While our neurally-guided SMC procedureused pixel-wise distance as a surrogate for a likelihood function (L(⋅|⋅)L(\cdot|\cdot) in Sec. 2),pixel-wise distance fares poorly on hand drawings, which never exactly matchthe model’s renders.So, for hand drawings,we learn a surrogate likelihood function,Llearned(⋅|⋅)L_{\text{learned}}(\cdot|\cdot).The density Llearned(⋅|⋅)L_{\text{learned}}(\cdot|\cdot) is predicted by a convolutional network that we train to predictthe distance between two specs conditioned upon their renderings.We train Llearned(⋅|⋅)L_{\text{learned}}(\cdot|\cdot) to approximate the symmetric difference,which is the number of drawing commands by which two specs differ:−logLlearned(render(S1)|render(S2))≈|S1−S2|+|S2−S1|subscript𝐿learnedconditionalrendersubscript𝑆1rendersubscript𝑆2subscript𝑆1subscript𝑆2subscript𝑆2subscript𝑆1-\log L_{\text{learned}}(\text{render}(S_{1})|\text{render}(S_{2}))\approx|S_{1}-S_{2}|+|S_{2}-S_{1}|(3)Appendix A.3 details the architecture and training of Llearnedsubscript𝐿learnedL_{\text{learned}}.
|
| 20 |
+
|
| 21 |
+
Experiment 2: Figures 7–8.We evaluated, but did not train, our system on 100 real hand-drawn figures; see Fig. 7–7.These were drawn carefully but not perfectly with the aid of graph paper.For each drawing we annotated a ground truth spec and had the neurally guided SMC samplerproduce 103superscript10310^{3} samples. For 63% of the drawings, the Top-1 most likely sample exactly matches theground truth; with more samples, the model finds specsthat are closer to the ground truth annotation (Fig. 8).We will show that the program synthesizercorrects some of these small errors (Sec. 4.1).Because the model sometimes makes mistakes on hand drawings,we envision it working as follows:a user sketches a diagram,and the system responds by proposing a few candidate interpretations.The user could then select the one closest to their intention and edit it if necessary.
|
| 22 |
+
|
| 23 |
+
Although the spec describes the contentsof a scene, it does not encode higher-level features of an imagesuch as repeated motifs or symmetries, which are more naturally captured by a graphics program.We seek to synthesize graphics programs from their specs.
|
| 24 |
+
|
| 25 |
+
Although it might seem desirable to synthesize programs in a Turing-complete language such as Lisp or Python, a more tractable approach is to specifywhat in the programlanguages community is called a Domain Specific Language (DSL) [11]. Our DSL (Tbl. 2)encodes prior knowledge of what graphics programs tend to look like.
|
| 26 |
+
|
| 27 |
+
Given the DSL and a spec S𝑆S, we want a program that both satisfies S𝑆Sand, at the same time, is the “best” explanation of S𝑆S.For example, we might prefer more general programs or, in the spirit of Occam’s razor,prefer shorter programs.We wrap these intuitions up into a cost function over programs,and seek the minimum cost program consistent with S𝑆S:program(S)=argmaxp∈DSL𝟙[p consistent w/ S]exp(−cost(p))program𝑆subscriptargmax𝑝DSL1delimited-[]𝑝 consistent w/ 𝑆cost𝑝\text{program}(S)=\operatorname*{arg\,max}_{p\in\text{DSL}}\mathds{1}\left[p\text{ consistent w/ }S\right]\exp\left(-\text{cost}(p)\right)(4)We define thecost of a program to be the number of Statement’s it contains (Tbl. 2).We also penalize using many different numerical constants; see Appendix A.5.Returning to the generative model in Fig. 2,this setup is the same as saying that the prior probability of a program p𝑝p is ∝exp(−cost(p))proportional-toabsentcost𝑝\propto\exp\left(-\text{cost}(p)\right) and the likelihood of a spec S𝑆S given a program p𝑝p is 𝟙[p consistent w/ S]1delimited-[]𝑝 consistent w/ 𝑆\mathds{1}[p\text{ consistent w/ }S].
|
| 28 |
+
|
| 29 |
+
The constrained optimization problem inEq. 4 is intractable in general, but thereexist efficient-in-practice tools for finding exact solutions to suchprogram synthesis problems. We use the state-of-the-art Sketchtool [1].Sketch takes as input a space of programs, along witha specification of the program’s behavior and optionally a costfunction. It translates the synthesis problem into a constraintsatisfaction problem and then uses a SAT solver to find a minimum-costprogram satisfying the specification. Sketch requires afinite program space, which here means that the depth of theprogram syntax tree is bounded (we set the bound to 3),but has the guarantee that italways eventually finds a globally optimal solution.In exchange for this optimality guaranteeit comes with no guaranteeson runtime.For our domain synthesis times vary from minutes to hours,with 27% of the drawings timing out the synthesizer after 1 hour.Tbl. 3 shows programs recovered by our system.A main impediment to our use of these general techniques isthe prohibitively high cost of searching for programs.We next describe how to learn to synthesize programs much faster (Sec. 3.1),timing out on 2% of the drawings and solving 58% of problems within a minute.
|
| 30 |
+
|
| 31 |
+
We want to leverage powerful, domain-general techniques from the program synthesis community,but make them much faster bylearning a domain-specific search policy.A search policy poses search problemslike those in Eq. 4,but also offers additional constraints on the structure of the program (Tbl. 4).For example, a policy might decide to first try searching over small programs before searching over large programs,or decide to prioritize searching over programs that have loops.
|
| 32 |
+
|
| 33 |
+
Formally, our search policy, πθ(σ|S)subscript𝜋𝜃conditional𝜎𝑆\pi_{\theta}(\sigma|S), takes as input a spec S𝑆S and predicts a distribution over search problems, each of which is written σ𝜎\sigma and corresponds to a set of possible programs to search over (so σ⊆DSL𝜎DSL\sigma\subseteq\text{DSL}).We assume a finite222It is not strictly necessary that ΣΣ\Sigma be a finite set, only that it be recursively enumerable.For example, Levin Search considers the setting where the infinite set of all Turing machines serves as ΣΣ\Sigma. family ofsearch problems, which we write ΣΣ\Sigma,and require that every program in the DSLis contained in at least one σ∈Σ𝜎Σ\sigma\in\Sigma.
|
| 34 |
+
|
| 35 |
+
Good policies will prefer tractable program spaces,so that the search procedure will terminate early,but should also prefer program spaces likely to containprograms that concisely explain the data.These two desiderata are in tension:tractable synthesis problems involve searching over smaller spaces,but smaller spaces are less likely to contain good programs.Our goal now is to find the parameters of the policy, written θ𝜃\theta, that best navigate this trade-off.
|
| 36 |
+
|
| 37 |
+
Given a search policy, what is the best way of using it to quickly find minimum cost programs?We use a bias-optimal search algorithm (c.f. Schmidhuber 2004 [3]):
|
| 38 |
+
|
| 39 |
+
Definition: Bias-optimality.A search algorithm is n𝑛n-bias optimalwith respect to a distribution ℙbias[⋅]subscriptℙbiasdelimited-[]⋅\mathds{P}_{\text{bias}}[\cdot] if it isguaranteed to find a solution in σ𝜎\sigma after searching for at least timen×t(σ)ℙbias[σ]𝑛𝑡𝜎subscriptℙbiasdelimited-[]𝜎n\times\frac{t(\sigma)}{\mathds{P}_{\text{bias}}[\sigma]}, where t(σ)𝑡𝜎t(\sigma) is the time ittakes to verify that σ𝜎\sigma contains a solution to thesearch problem.
|
| 40 |
+
|
| 41 |
+
Bias-optimal search over program spaces is known as Levin Search [12]; an example of a 111-bias optimal search algorithm is an ideal time-sharing system that allocates ℙbias[σ]subscriptℙbiasdelimited-[]𝜎\mathds{P}_{\text{bias}}[\sigma] of its time to trying σ𝜎\sigma. We construct a 111-bias optimal search algorithm by identifying ℙbias[σ]=πθ(σ|S)subscriptℙbiasdelimited-[]𝜎subscript𝜋𝜃conditional𝜎𝑆\mathds{P}_{\text{bias}}[\sigma]=\pi_{\theta}(\sigma|S) and t(σ)=t(σ|S)𝑡𝜎𝑡conditional𝜎𝑆t(\sigma)=t(\sigma|S), where t(σ|S)𝑡conditional𝜎𝑆t(\sigma|S) is how long the synthesizer takes to search σ𝜎\sigma for a program for S𝑆S. Intuitively, this means that the search algorithm explores the entire program space, but spends most of its time in the regions of the space that the policy judges to be most promising.Concretely,this means that oursynthesis strategy is torun many differentprogram searches in parallel (i.e., run in parallel different instances of the synthesizer, one for each σ∈Σ𝜎Σ\sigma\in\Sigma),but to allocatecompute time to a σ𝜎\sigma in proportion to πθ(σ|S)subscript𝜋𝜃conditional𝜎𝑆\pi_{\theta}(\sigma|S).
|
| 42 |
+
|
| 43 |
+
Now in theory any πθ(⋅|⋅)\pi_{\theta}(\cdot|\cdot) is a bias-optimal searcher.But the actual runtime of the algorithm depends strongly uponthe bias ℙbias[⋅]subscriptℙbiasdelimited-[]⋅\mathds{P}_{\text{bias}}[\cdot].Our new approach is to learn ℙbias[⋅]subscriptℙbiasdelimited-[]⋅\mathds{P}_{\text{bias}}[\cdot]by picking the policy minimizing theexpected bias-optimal time to solve a training corpus, 𝒟𝒟\mathcal{D}, of graphics program synthesis problems:333This loss is differentiable but nonconvex even if πθ(⋅|⋅)−1\pi_{\theta}(\cdot|\cdot)^{-1} is convex.Loss(θ;𝒟)Loss𝜃𝒟\displaystyle\textsc{Loss}(\theta;\mathcal{D})=𝔼S∼𝒟[minσ∈Best(S)t(σ|S)πθ(σ|S)]+λ‖θ‖22absentsubscript𝔼similar-to𝑆𝒟delimited-[]subscript𝜎Best𝑆𝑡conditional𝜎𝑆subscript𝜋𝜃conditional𝜎𝑆𝜆superscriptsubscriptnorm𝜃22\displaystyle=\mathds{E}_{S\sim\mathcal{D}}\left[\min_{\sigma\in\text{{Best}}(S)}\frac{t(\sigma|S)}{\pi_{\theta}(\sigma|S)}\right]+\lambda\|\theta\|_{2}^{2}(5)where σ∈Best(S)where 𝜎Best𝑆\displaystyle\text{where }\sigma\in\text{{Best}}(S)if a minimum cost program for S is in σ.if a minimum cost program for 𝑆 is in 𝜎\displaystyle\text{ if a minimum cost program for }S\text{ is in }\sigma.
|
| 44 |
+
|
| 45 |
+
To generate a training corpus for learning a policy,we synthesized minimum cost programs for each of our hand drawingsand for each σ𝜎\sigma,then minimized Eq. 12 using gradient descent while annealing a softened minimum to the hard minimization in Eq. 12 (see Appendix A.6).Because we want to learn a policy from only 100100100 drawings,we parameterize π𝜋\pi with a low-capacity bilinear model:πθ(σ|S)∝exp(ϕparams(σ)⊤θϕspec(S))proportional-tosubscript𝜋𝜃conditional𝜎𝑆subscriptitalic-ϕparamssuperscript𝜎top𝜃subscriptitalic-ϕspec𝑆\pi_{\theta}(\sigma|S)\propto\exp\left(\phi_{\text{params}}(\sigma)^{\top}\theta\phi_{\text{spec}}(S)\right)(6)where ϕparams(σ)subscriptitalic-ϕparams𝜎\phi_{\text{params}}(\sigma) is a one-hot encoding ofthe parameter settings of σ𝜎\sigma (see Tbl. 4)and ϕspec(S)subscriptitalic-ϕspec𝑆\phi_{\text{spec}}(S) extracts a vector of counts of the drawing primitives in S𝑆S;thus θ𝜃\theta has only 96 real-valued parameters.444θ𝜃\theta has only 96 parameters because itis a matrix mapping a 4-dimensional feature vector into a 24-dimensional output space.The output space is 24-dimensional because σ𝜎\sigma assumes one of 24 different values,and the input space is 4-dimensional because we have three different drawing primitives,along with an extra dimension for a ‘bias’ term.
|
| 46 |
+
|
| 47 |
+
Experiment 3: Table 5; Figure 10.We compare synthesis times for our learned search policywith 4 alternatives:Sketch, which poses theentire problem wholesale to the Sketch program synthesizer;DC, a DeepCoder–style model that learns to predict which program components (loops, reflections)are likely to be useful [13] (Appendix A.7.1);End–to-End,which trains a recurrent neural network to regress directly from images to programs (Appendix A.7.2);and an Oracle,a policy which always picks the quickest to search σ𝜎\sigmaalso containing a minimum cost program.Our approach improves upon Sketch by itself,and comes close to the Oracle’s performance.One could never construct this Oracle,because the agent does not know ahead of time whichσ𝜎\sigma’s contain minimum cost programs nor does it know how long eachσ𝜎\sigma will take to search.With this learned policy in hand we can synthesize 58% of programs within a minute.
|
| 48 |
+
|
| 49 |
+
The program synthesizer can help correct errors from the execution spec proposal network by favoring specs which lead to more concise or general programs.For example, one generally prefers figures with perfectly aligned objects over figures whose parts are slightly misaligned – and precise alignment lends itself to short programs.Similarly, figures often have repeated parts,which the program synthesizer might be able to model as a loop or reflectional symmetry.So, in considering several candidate specs proposed by the neural network,we might prefer specs whose best programs have desirable features such being short or having iterated structures.Intuitively,this is like the ‘top down’ influence of cognition upon perception:a reasoning engine (the program synthesizer)can influence the agent’s perceptthrough higher-level considerations like symmetry and alignment.
|
| 50 |
+
|
| 51 |
+
Concretely, we implemented the following scheme: for an image I𝐼I, the neurally guided sampling scheme (Section 2) samples a set of candidate specs, written ℱ(I)ℱ𝐼\mathcal{F}(I).Instead of predicting the most likely spec in ℱ(I)ℱ𝐼\mathcal{F}(I) according to the neural network,we can take into account the programs that best explain the specs.Writing S^(I)^𝑆𝐼\hat{S}(I) for the spec the model predicts for image I𝐼I,S^(I)=argmaxS∈ℱ(I)Llearned(I|render(S))×ℙθ[S|I]×ℙβ[program(S)]^𝑆𝐼subscriptargmax𝑆ℱ𝐼subscript𝐿learnedconditional𝐼render𝑆subscriptℙ𝜃delimited-[]conditional𝑆𝐼subscriptℙ𝛽delimited-[]program𝑆\hat{S}(I)=\operatorname*{arg\,max}_{S\in\mathcal{F}(I)}L_{\text{learned}}(I|\text{render}(S))\times\mathds{P}_{\theta}[S|I]\times\mathds{P}_{\beta}[\text{program}(S)](7)where ℙβ[⋅]subscriptℙ𝛽delimited-[]⋅\mathds{P}_{\beta}[\cdot] is a prior probabilitydistribution over programs parameterized by β𝛽\beta.This is equivalent to doingMAP inference in a generative model where the program is first drawnfrom ℙβ[⋅]subscriptℙ𝛽delimited-[]⋅\mathds{P}_{\beta}[\cdot], then the program is executed deterministically,and then we observe a noisy version of the program’s output, where Llearned(I|render(⋅))×ℙθ[⋅|I]L_{\text{learned}}(I|\text{render}(\cdot))\times\mathds{P}_{\theta}[\cdot|I]is our observation model.
|
| 52 |
+
|
| 53 |
+
Given a corpus of graphics program synthesis problems with annotated ground truth specs (i.e. (I,S)𝐼𝑆(I,S) pairs),we find a maximum likelihood estimate of β𝛽\beta:β∗=argmaxβ𝔼[logℙβ[program(S)]×Llearned(I|render(S))×ℙθ[S|I]∑S′∈ℱ(I)ℙβ[program(S′)]×Llearned(I|render(S′))×ℙθ[S′|I]]superscript𝛽subscriptargmax𝛽𝔼delimited-[]subscriptℙ𝛽delimited-[]program𝑆subscript𝐿learnedconditional𝐼render𝑆subscriptℙ𝜃delimited-[]conditional𝑆𝐼subscriptsuperscript𝑆′ℱ𝐼subscriptℙ𝛽delimited-[]programsuperscript𝑆′subscript𝐿learnedconditional𝐼rendersuperscript𝑆′subscriptℙ𝜃delimited-[]conditionalsuperscript𝑆′𝐼\beta^{*}=\operatorname*{arg\,max}_{\beta}\mathds{E}\left[\log\frac{\mathds{P}_{\beta}[\text{program}(S)]\times L_{\text{learned}}(I|\text{render}(S))\times\mathds{P}_{\theta}[S|I]}{\sum_{S^{\prime}\in\mathcal{F}(I)}\mathds{P}_{\beta}[\text{program}(S^{\prime})]\times L_{\text{learned}}(I|\text{render}(S^{\prime}))\times\mathds{P}_{\theta}[S^{\prime}|I]}\right](8)where the expectation is taken both over the model predictions and the(I,S)𝐼𝑆(I,S) pairs in the training corpus. We define ℙβ[⋅]subscriptℙ𝛽delimited-[]⋅\mathds{P}_{\beta}[\cdot] to be a log linear distribution ∝exp(β⋅ϕ(program))proportional-toabsent⋅𝛽italic-ϕprogram\propto\exp(\beta\cdot\phi(\text{program})), where ϕ(⋅)italic-ϕ⋅\phi(\cdot) is a featureextractor for programs. We extract a few basic features of aprogram, such as its size and how many loops it has, and use thesefeatures to help predict whether a spec is the correct explanationfor an image.
|
| 54 |
+
|
| 55 |
+
We synthesized programs for the top 10 specsoutput by the deep network. Learning this prior over programs canhelp correct mistakes made by the neural network, and alsooccasionally introduces mistakes of its own; seeFig. 11 for a representativeexample of the kinds of corrections that it makes. On the wholeit modestly improves our Top-1 accuracy from 63% to 67%. Recall thatfrom Fig. 8 that the best improvementin accuracy we could possibly get is 70% by looking at the top 10 specs.
|
| 56 |
+
|
| 57 |
+
Modeling drawings using programs opens up new ways to measure similarity between them.For example, we might say that two drawings are similar if they both contain loops of length 4,or if they share a reflectional symmetry,or if they are both organized according to a grid-like structure.
|
| 58 |
+
|
| 59 |
+
We measure the similarity between two drawings by extracting featuresof the lowest-cost programs that describe them. Our features are counts of the number of times that different components in theDSL were used (Tbl. 2).We then find drawings which are either close together or far apart in program feature space.One could use manyalternative similarity metrics between drawings which would capture pixel-level similarities while missing high-level geometric similarities.We used our learned distance metric between specs, Llearned(⋅|⋅)L_{\text{learned}}(\cdot|\cdot),to find drawings that are either close together or far apart according to the learneddistance metric over images.Fig. 12 illustrates the kinds of drawings that these different metrics put closely together.
|
| 60 |
+
|
| 61 |
+
Having access to the source code of a graphics program facilitates coherent, high-level image editing.For example we can extrapolate figuresby increasing the number of times that loops are executed.Extrapolating repetitive visuals patterns comes naturally to humans,and is a practical application:imagine hand drawing a repetitive graphical model structureand having our system automatically induce and extend the pattern.Fig. 13 shows extrapolations produced by our system.
|
| 62 |
+
|
| 63 |
+
Program Induction:Our approach to learning to search for programs draws theoreticalunderpinnings from Levinsearch [12, 14] andSchmidhuber’s OOPS model [3].DeepCoder [13] is a recent model which, like ours, learns to predict likely program components.Our work differs by identifying and modelingthe trade-off between tractability and probability of success.TerpreT [15]systematically compares constraint-based program synthesis techniquesagainst gradient-based search methods, like those used to trainDifferentiable Neural Computers [16]. The TerpreTexperiments motivate our use of constraint-based techniques.
|
| 64 |
+
|
| 65 |
+
Deep Learning: Our neural network combines the architectural ideas of Attend-Infer-Repeat [5] – which learns to decompose an image into its constituent objects – with the training regime and SMC inference of Neurally Guided Procedural Modeling [4] – which learns to control procedural graphics programs.IM2LATEX [17] is a recent work thatderenders LaTeX equations,recovering a markup language representation.Our goal is to go fromnoisy input to a high-level program,which goes beyond markup languages by supportingprogramming constructs like loops and conditionals.
|
| 66 |
+
|
| 67 |
+
Hand-drawn sketches: Sketch-n-Sketch is a bi-directional editing system where direct manipulations to a program’s output automatically propagate to the program source code [18]. This work compliments our own: programs produced by our method could be provided to a Sketch-n-Sketch-like system as a starting point for further editing.Other systems in the computer graphics literature convert sketches to procedural representations, using a convolutional network to match a sketch to the output of a parametric 3D modeling system in [19] or supporting interactive sketch-based instantiation of procedural primitives in [20]. In contrast, we seek to automatically infer a programmatic representation capturing higher-level visual patterns.The CogSketch system [21] also aims to have a high-level understanding of hand-drawn figures. Their goal is cognitive modeling, whereas we are interested in building an automated AI application.
|
| 68 |
+
|
| 69 |
+
We have presented a system for inferring graphics programs which generate LaTeX-style figures from hand-drawn images. The system uses a combination of deep neural networks and stochastic search to parse drawings into symbolic specifications; it then feeds these specs to a general-purpose program synthesis engine to infer a structured graphics program. We evaluated our model’s performance at parsing novel images, and we demonstrated its ability to extrapolate from provided drawings.In the near future, we believe it will be possible to produce professional-looking figures just by drawing them and then letting an artificially-intelligent agent write the code.More generally, we believe the problem of inferring visual programs is a promising direction for research in machine perception.
|
| 70 |
+
|
| 71 |
+
We are grateful for advice from Will Grathwohl and Jiajun Wu on the neural architecture. Funding from NSF GRFP, NSF Award#1753684, the MUSE program (DARPA grant FA8750-14-2-0242),and AFOSR award FA9550-16-1-0012.
|
1707.09870v2.txt
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
These years have witnessed the success of convolutional neural networks (CNNs) in a wide range computer vision tasks, such as image classification, object detection and segmentation. The success of deep learning largely owes to the fast development of computing resources. Most of the deep learning models are trained on high-ended GPUs or CPU clusters. On the other hand, deeper networks impose heavy storage footprint due to the enormous amount of network parameters. For example, the 16-layers VGG involves 528 MBytes of model parameters. Both the high computational and storage cost become impediments to popularize the deep neural networks to scenarios where either memory or computational resources are limited. The great interest to deploy deep learning systems on low-ended devices motives the research in compressing deep models to have smaller computation cost and memory footprints.
|
| 2 |
+
|
| 3 |
+
Considerable efforts have been mounted to reduce the model size and speed up the inference of deep models. Denil et al. pointed out that network weights have a significant redundancy, and proposed to reduce the number of parameters by exploiting the linear structure of network [1], which motivated a series of low-rank matrix/tensor factorization based compression algorithms, e.g. [2, 3, 4]. Alternatively, multiple studies were devoted to discritizing network weights using vector quantization methods [5, 6], which often outperformed the matrix/tensor factorization based methods [6]. Han et al. presented the deep compression method that integrates multiple compression methods to achieve a large reduction in model size [7]. Another line of work for model compression is to restrict network weights to low precision with a few bits. The advantage of this restriction is that an expensive floating-point multiplication operation can now be replaced by a sequence of cheaper and faster binary bit shift operations. This not only reduces the memory footprints but also accelerates the computation of the network. These approaches work well when pretrained weights are quantized into 4-12 bits [8, 9, 10, 11]. When coming to extremely low bit networks, i.e. only one or two bits are used to represent weights [12, 13, 14], they only work well on simple datasets (e.g. MNIST and CIFAR10), and usually incur a large loss on challenging datasets like ImageNet.
|
| 4 |
+
|
| 5 |
+
In this work, we focus on compressing and accelerating deep neural networks with extremely low bits weights, and present a unified strategy for learning such low bits networks. We overcome the limitation of the existing approaches by formulating it as a discretely constrained non-convex optimization problem, which is usually referred to as mixed integer programs (MIP). Given the NP hard nature of MIPs, we proposed a framework for learning extremely low bit neural network using the technique of alternating direction method of multipliers (ADMM) [15].
|
| 6 |
+
|
| 7 |
+
The main idea behind our method is to decouple the continuous variables from the discrete constraints using an auxiliary variable in the discrete space. This leads to a convenient form of the objective which is amenable to existing nonconvex optimization algorithms. Unlike previous low bit quantization methods [12, 16, 17] that incorporate an ad-hoc modification of the gradients for continuous weights, we simultaneously optimize in both continuous and discrete spaces, and connect the two solutions using an augmented Lagrangian. This is consistent with the previous observation from [18] that, by decoupling discrete constraints in MIP, one can use the information from the dual problem through ADMM to obtain a better upper bound. As a result of this reformulation, we can divide the problem of low bits quantized neural network into multiple subproblems which are significantly easier to solve. The main contributions of this paper are summarized as follows:
|
| 8 |
+
|
| 9 |
+
•We model the low bits neural network as a discretely constrained nonconvex optimization problem, and introduce auxiliary variables to decouple the continuous weights from the discrete constraints. With the use of ADMM, the originally hard problem are decomposed into several subproblems including proximal step, projection step and dual update.•We show how the resulting subproblems can be efficiently solved. We utilize extragradient method to accelerate the convergence of proximal step, and propose an iterative quantization algorithm to solve the projection step. The proposed algorithm enjoys a fast convergence in practice.•We apply the proposed method to various well-known convolutional neural networks. Extensive experiments on multiple vision tasks including image classification and object detection demonstrate that the proposed method significantly outperforms the state-of-the-art approaches.
|
| 10 |
+
|
| 11 |
+
Due to the high efficiency in both computation and memory footprints, low bits quantization of deep neural networks have received much attention in the literature. In this section, we have a brief review of the representative techniques. We also give a brief introduction to ADMM algorithm and its nonconvex extension.
|
| 12 |
+
|
| 13 |
+
The research of low bits quantization of neural network can be traced back to 1990s [19, 20]. Most of the benefits of low bits quantization, such as memory efficiency and multiplication free, had already been explored in these papers. However, the networks are shallow at that age so these approaches do not verify their validity in deep networks and large scale datasets.
|
| 14 |
+
|
| 15 |
+
In recent years, with the explosion of deep learning in various tasks, low bits quantization techniques have been revisited. Some early works quantize the pretrained weights with 4-12 bits and find such approximations do not decrease predictive performance [10, 8, 9, 11]. More recent works focus on training extremely low bits network from scratch with binary or ternary weights. Among these works, BinaryConnect [12] is the most representative one. BinaryConnect directly optimizes the loss of the network with weights W𝑊W replaced by sign(W)sign𝑊\text{sign}(W). In order to avoid the zero-gradient problem of sign function, the authors approximate it with the “hard tanh” function in the backward process. This simple idea inspired many following works. BinaryConnect only achieves good results on simple datasets such as MNIST, CIFAR10 and SVHN, but suffers a large degradation on challenging datasets like ImageNet.
|
| 16 |
+
|
| 17 |
+
Many efforts have been devoted to improve the performance of BinaryConnect. For example, Binary Weight Network (BWN) [16] proposes to improve the performance of BinaryConnect with a better approximation by introducing scale factors for the weights during binarization. Ternary Weight Network (TWN) [17] extends the idea of BWN to network with ternary weights and achieves a better performance. Inspired by BinaryConnect, in order to avoid the zero-gradient problem, both BWN and TWN modify the backward process by applying the gradients of the loss at the quantized weights.
|
| 18 |
+
|
| 19 |
+
Unlike previous works, we mathematically formulated the low bits quantization problem as a discretely constrained problem and present a unified framework based on ADMM to solve it in an efficient way. We simultaneously optimize the problem in both continuous and discrete space, and the two solutions are closely connected in the learning process.
|
| 20 |
+
|
| 21 |
+
Alternating Direction Method of Multipliers (ADMM) [15] is an algorithm that is intended to blend the decomposability of dual ascent with the superior convergence properties of the method of multipliers. The algorithm solves problems in the form:min\displaystyle\minf(𝐱)+g(𝐳)𝑓𝐱𝑔𝐳\displaystyle\ f(\mathbf{x})+g(\mathbf{z})(1)s.t.A𝐱+B𝐳=𝐜𝐴𝐱𝐵𝐳𝐜\displaystyle A\mathbf{x}+B\mathbf{z}=\mathbf{c}with variables 𝐱∈ℝn𝐱superscriptℝ𝑛\mathbf{x}\in\mathbb{R}^{n} and 𝐳∈ℝm𝐳superscriptℝ𝑚\mathbf{z}\in\mathbb{R}^{m}, where A∈ℝp×n𝐴superscriptℝ𝑝𝑛A\in\mathbb{R}^{p\times n}, B∈ℝp×m𝐵superscriptℝ𝑝𝑚B\in\mathbb{R}^{p\times m} and 𝐜∈ℝp𝐜superscriptℝ𝑝\mathbf{c}\in\mathbb{R}^{p}.
|
| 22 |
+
|
| 23 |
+
The augmented Lagrangian of Eq.(1) can be formed as:Lρ(𝐱,𝐳,𝐲)=f(𝐱)+g(𝐳)+𝐲T(A𝐱+B𝐳−𝐜)+(ρ/2)‖A𝐱+B𝐳−𝐜‖22subscript𝐿𝜌𝐱𝐳𝐲𝑓𝐱𝑔𝐳superscript𝐲𝑇𝐴𝐱𝐵𝐳𝐜𝜌2subscriptsuperscriptnorm𝐴𝐱𝐵𝐳𝐜22L_{\rho}(\mathbf{x},\mathbf{z},\mathbf{y})=f(\mathbf{x})+g(\mathbf{z})+\mathbf{y}^{T}(A\mathbf{x}+B\mathbf{z}-\mathbf{c})+(\rho/2)\|A\mathbf{x}+B\mathbf{z}-\mathbf{c}\|^{2}_{2}(2)where 𝐲𝐲\mathbf{y} is the Lagrangian multipliers, and ADMM consists of three step iterations:𝐱k+1:=assignsuperscript𝐱𝑘1absent\displaystyle\mathbf{x}^{k+1}:=argmin𝐱Lρ(𝐱,𝐳k,𝐲k)subscript𝐱subscript𝐿𝜌𝐱superscript𝐳𝑘superscript𝐲𝑘\displaystyle\mathop{\arg\min}_{\mathbf{x}}L_{\rho}(\mathbf{x},\mathbf{z}^{k},\mathbf{y}^{k})𝐳k+1:=assignsuperscript𝐳𝑘1absent\displaystyle\mathbf{z}^{k+1}:=argmin𝐳Lρ(𝐱k+1,𝐳,𝐲k)subscript𝐳subscript𝐿𝜌superscript𝐱𝑘1𝐳superscript𝐲𝑘\displaystyle\mathop{\arg\min}_{\mathbf{z}}L_{\rho}(\mathbf{x}^{k+1},\mathbf{z},\mathbf{y}^{k})𝐲k+1:=assignsuperscript𝐲𝑘1absent\displaystyle\mathbf{y}^{k+1}:=𝐲k+ρ(A𝐱k+1+B𝐳k+1−𝐜)superscript𝐲𝑘𝜌𝐴superscript𝐱𝑘1𝐵superscript𝐳𝑘1𝐜\displaystyle\mathbf{y}^{k}+\rho(A\mathbf{x}^{k+1}+B\mathbf{z}^{k+1}-\mathbf{c})
|
| 24 |
+
|
| 25 |
+
Even though ADMM was originally introduced as a tool for convex optimization problems, it turns out to be a powerful heuristic method even for NP-hard nonconvex problems. Recently, this tool has successfully been used as a heuristic to find approximate solutions to nonconvex mixed program problems [18, 21], which is very similar to our problem as noted later.
|
| 26 |
+
|
| 27 |
+
Let us first define the notion in this paper. Denote f(W)𝑓𝑊f(W) as the loss function of a normal neural network, whereW={W1,W2,⋯,WL}𝑊subscript𝑊1subscript𝑊2⋯subscript𝑊𝐿W=\{W_{1},W_{2},\cdots,W_{L}\}. Wisubscript𝑊𝑖W_{i} denotes the weights of the i𝑖i-th layer inthe network, which for example can be a 4-dimension tensor in convolutional layer or a 2-dimension matrix in fully connected layer. For the simplicity of notation, we regard all the entries in Wisubscript𝑊𝑖W_{i} as a disubscript𝑑𝑖d_{i}-dimension vector in ℝdisuperscriptℝsubscript𝑑𝑖\mathbb{R}^{d_{i}}, and take W𝑊W as the concatenation of these vectors so that W∈ℝd𝑊superscriptℝ𝑑W\in\mathbb{R}^{d} with d=∑idi.𝑑subscript𝑖subscript𝑑𝑖d=\sum_{i}d_{i}.
|
| 28 |
+
|
| 29 |
+
In this work, we concentrate on training extremely low bits quantized neural networks. In specific, the weights of the network are restricted to be either zero or powers of two so that the expensive floating-point multiplication operation can be replaced by cheaper and faster bit shift operation. In this section, we aim to mathematically model this problem and efficiently solve it.
|
| 30 |
+
|
| 31 |
+
Intuitively, training a low bits neural network can be modeled as discretely constrained optimization, or in particular, mixed integer programs. For example, the weights in a ternary neural network are restricted to be −1,010-1,0 or +11+1. Training such network can be mathematically formulated as mixed integer programs:minWf(W)s.t.W∈𝒞={−1,0,+1}dsubscript𝑊𝑓𝑊s.t.𝑊𝒞superscript101𝑑\min\limits_{W}\ \ f(W)\quad\quad\text{s.t.}\ \ W\in\mathcal{C}=\{-1,0,+1\}^{d}
|
| 32 |
+
|
| 33 |
+
Since the weights are restricted to be zero or powers of two, we have constraints of this form𝒞={−2N,⋯,−21,−20,0,+20,+21,⋯,+2N}𝒞superscript2𝑁⋯superscript21superscript200superscript20superscript21⋯superscript2𝑁\mathcal{C}=\{-2^{N},\cdots,-2^{1},-2^{0},0,+2^{0},+2^{1},\cdots,+2^{N}\}where N𝑁N is an integer which determines the number of bits. As in [16], we further introduce a scaling factor α𝛼\alpha to the constraints, i.e., instead of requiring 𝒞={⋯,−2,−1,0,+1,+2.⋯}\mathcal{C}=\{\cdots,-2,-1,0,+1,+2.\cdots\}, we simply restrict 𝒞𝒞\mathcal{C} to 𝒞={⋯,−2α,−α,0,+α,+2α,⋯}𝒞⋯2𝛼𝛼0𝛼2𝛼⋯\mathcal{C}=\{\cdots,-2\alpha,-\alpha,0,+\alpha,+2\alpha,\cdots\} with an arbitrary scaling factor α>0𝛼0\alpha>0 that is strictly positive. It is worthy noting that the scale factor α𝛼\alpha in various layers can be different. In other words, for a neural network with L𝐿L layers, we actually introduce L𝐿L different scaling factors {α1,α2,⋯,αL}subscript𝛼1subscript𝛼2⋯subscript𝛼𝐿\{\alpha_{1},\alpha_{2},\cdots,\alpha_{L}\}. Formally, the objective function of low bits quantized neural networks can be formulated as:minWsubscript𝑊\displaystyle\min\limits_{W}f(W)𝑓𝑊\displaystyle f(W)(3)s.t.W∈𝒞=𝒞1×𝒞2×⋯×𝒞L𝑊𝒞subscript𝒞1subscript𝒞2⋯subscript𝒞𝐿\displaystyle W\in\mathcal{C}=\mathcal{C}_{1}\times\mathcal{C}_{2}\times\cdots\times\mathcal{C}_{L}where 𝒞i={0,±αi,±2αi,⋯,±2Nαi}subscript𝒞𝑖0plus-or-minussubscript𝛼𝑖plus-or-minus2subscript𝛼𝑖⋯plus-or-minussuperscript2𝑁subscript𝛼𝑖\mathcal{C}_{i}=\{0,\pm\alpha_{i},\pm 2\alpha_{i},\cdots,\pm 2^{N}\alpha_{i}\} and αi>0subscript𝛼𝑖0\alpha_{i}>0. We emphasize that the scaling factor αisubscript𝛼𝑖\alpha_{i} in each layer doesn’t incur more computation to the convolutional operator, because it can be multiplied after the efficient convolution with {0,±1,±2,⋯,±2N}0plus-or-minus1plus-or-minus2⋯plus-or-minussuperscript2𝑁\{0,\pm 1,\pm 2,\cdots,\pm 2^{N}\} done.
|
| 34 |
+
|
| 35 |
+
From the perspective of constrained optimization, the scaling factor αisubscript𝛼𝑖\alpha_{i} helps to expand the constraint space. As an example, Fig.1 gives an illustration of how it works for ternary network. In two dimensional space, for constraint {−1,0,+1}101{\{-1,0,+1\}}, the possible solutions of ternary neural network are nine discrete points in the space. In contrast, with the scaling factor added, the constrained space is expanded to be four lines in the space. This large expansion of the constrained space will make the optimization easier.
|
| 36 |
+
|
| 37 |
+
The optimization in Eq.(3) is NP-hard in general because the weights are constrained in a discrete space. Most previous works try to directly train low bits models to minimize the loss. For example, BinaryConnect [12] replace the weights W𝑊W with sign(W)sign𝑊\text{sign}(W) in the forward process so that the constraints will be automatically satisfied. Since the gradients of sign(W)sign𝑊\text{sign}(W) to W𝑊W is zero everywhere, the authors replace the sign function with “hard tanh” in the backward process. The same idea is also adopted by BWN [16] and TWN [17]. However, as indicated in [22], the use of different forward and backward approximations causes the mismatch of gradient, which makes the optimization instable.
|
| 38 |
+
|
| 39 |
+
We overcome the limitation of previous approaches by converting the problem into a form which is suitable to existing nonconvex optimization techniques. We introduce an auxiliary variable which is subject to the discrete restriction and equal to original variable. This is used with ADMM, which will result in the effect that the discrete variables being decoupled when we consider their minimization. Our basic idea is largely inspired by recent successful application of ADMM in mixed integer programs [18, 21].
|
| 40 |
+
|
| 41 |
+
First of all, defining an indicator function I𝒞subscript𝐼𝒞I_{\mathcal{C}} for whether W∈𝒞𝑊𝒞W\in\mathcal{C}, the objective in Eq.(3) can be written asminWf(W)+I𝒞(W)subscript𝑊𝑓𝑊subscript𝐼𝒞𝑊{\min\limits_{W}}\quad f(W)+I_{\mathcal{C}}(W)(4)where I𝒞(W)=0subscript𝐼𝒞𝑊0I_{\mathcal{C}}(W)=0 if W∈𝒞𝑊𝒞W\in\mathcal{C}, otherwise I𝒞(W)=+∞subscript𝐼𝒞𝑊I_{\mathcal{C}}(W)=+\infty.
|
| 42 |
+
|
| 43 |
+
By introducing an auxiliary variable G𝐺G, we can rewrite the optimization in Eq.(4) with an extra equality constraint so that the weights is constrained to be equal to the discrete variable, but not subject to that restriction. In detail, the objective can be reformulated as:minW,Gsubscript𝑊𝐺\displaystyle{\min\limits_{W,G}}f(W)+I𝒞(G)𝑓𝑊subscript𝐼𝒞𝐺\displaystyle\ f(W)+I_{\mathcal{C}}(G)(5)s.t.W=G𝑊𝐺\displaystyle\ W=G
|
| 44 |
+
|
| 45 |
+
Now we are considering a nonconvex optimization with convex linear constraints. Problems of such form can be conveniently solved with ADMM. The augmented Lagrange of Eq.(5), for parameter ρ>0𝜌0\rho>0, can be formulated as:Lρ(W,G,μ)=f(W)+I𝒞(G)+ρ2‖W−G‖2+⟨μ,W−G⟩subscript𝐿𝜌𝑊𝐺𝜇𝑓𝑊subscript𝐼𝒞𝐺𝜌2superscriptnorm𝑊𝐺2𝜇𝑊𝐺L_{\rho}(W,G,\mu)=f(W)+I_{\mathcal{C}}(G)+\frac{\rho}{2}\|W-G\|^{2}+\left<\mu,W-G\right>(6)where μ𝜇\mu denotes the Lagrangian multipliers and ⟨⋅,⋅⟩⋅⋅\left<\cdot,\cdot\right> denotes the inner product of two vectors. With some basic collection of terms and a change of variable λ=(1/ρ)μ𝜆1𝜌𝜇\lambda=(1/\rho)\mu, Eq.(6) can be equivalently formed as:Lρ(W,G,λ)=f(W)+I𝒞(G)+ρ2‖W−G+λ‖2−ρ2‖λ‖2subscript𝐿𝜌𝑊𝐺𝜆𝑓𝑊subscript𝐼𝒞𝐺𝜌2superscriptnorm𝑊𝐺𝜆2𝜌2superscriptnorm𝜆2L_{\rho}(W,G,\lambda)=f(W)+I_{\mathcal{C}}(G)+\frac{\rho}{2}\|W-G+\lambda\|^{2}-\frac{\rho}{2}\|\lambda\|^{2}(7)
|
| 46 |
+
|
| 47 |
+
Following the standard process of ADMM, this problem can be solved by repeating the following iterations:Wk+1:=assignsuperscript𝑊𝑘1absent\displaystyle W^{k+1}:=argminWLρ(W,Gk,λk)subscript𝑊subscript𝐿𝜌𝑊superscript𝐺𝑘superscript𝜆𝑘\displaystyle\mathop{\arg\min}_{W}\ L_{\rho}(W,G^{k},\lambda^{k})(8)Gk+1:=assignsuperscript𝐺𝑘1absent\displaystyle G^{k+1}:=argminGLρ(Wk+1,G,λk)subscript𝐺subscript𝐿𝜌superscript𝑊𝑘1𝐺superscript𝜆𝑘\displaystyle\mathop{\arg\min}_{G}\ L_{\rho}(W^{k+1},G,\lambda^{k})(9)λk+1:=assignsuperscript𝜆𝑘1absent\displaystyle\lambda^{k+1}:=λk+Wk+1−Gk+1superscript𝜆𝑘superscript𝑊𝑘1superscript𝐺𝑘1\displaystyle\lambda^{k}+W^{k+1}-G^{k+1}(10)which is respectively the proximal step, projection step and dual update.
|
| 48 |
+
|
| 49 |
+
Unlike previous works, we simultaneously optimize the problem in both continuous space (i.e., proximal step) and discrete space (i.e., projection step), and the two solutions are brought together by ADMM in the learning process.
|
| 50 |
+
|
| 51 |
+
In this section, we elaborate on how the consequent subproblems in the above algorithm can be efficiently solved.
|
| 52 |
+
|
| 53 |
+
For the proximal step, we optimize in the continuous space. Formally, we need to find the weights that minimizeLρ(W,Gk,λk)=f(W)+ρ2‖W−Gk+λk‖2subscript𝐿𝜌𝑊superscript𝐺𝑘superscript𝜆𝑘𝑓𝑊𝜌2superscriptnorm𝑊superscript𝐺𝑘superscript𝜆𝑘2L_{\rho}(W,G^{k},\lambda^{k})=f(W)+\frac{\rho}{2}\|W-G^{k}+\lambda^{k}\|^{2}(11)
|
| 54 |
+
|
| 55 |
+
Due to the decouple of ADMM, we are dealing with an unconstrained objective here. The loss can be interpreted as a normal neural network with a special regularization. Naturally, this problem can be solved with standard gradient decent method. It is easy to obtain the gradient with respect to the weights W𝑊W:∂WL=∂Wf+ρ(W−Gk+λk)subscript𝑊𝐿subscript𝑊𝑓𝜌𝑊superscript𝐺𝑘superscript𝜆𝑘\partial_{W}L=\partial_{W}f+\rho(W-G^{k}+\lambda^{k})
|
| 56 |
+
|
| 57 |
+
However, we find the vanilla gradient descent method converges slowly in this problem. Since the second quadratic term occupies a large proportion of the whole lost, SGD will quickly pull the optimizer to the currently quantized weights so that the second term vanishes, and stack in that point. This results in a suboptimal solution since the loss of neural network is not sufficiently optimized.
|
| 58 |
+
|
| 59 |
+
To overcome this challenge, we resort to the extragradient method [23]. An iteration of the extragradient method consists of two very simple steps, prediction and correction:W(p)superscript𝑊𝑝\displaystyle W^{(p)}:=W−βp∂WL(W),assignabsent𝑊subscript𝛽𝑝subscript𝑊𝐿𝑊\displaystyle:=W-\beta_{p}\partial_{W}L(W),W(c)superscript𝑊𝑐\displaystyle W^{(c)}:=W−βc∂WL(W(p))assignabsent𝑊subscript𝛽𝑐subscript��𝐿superscript𝑊𝑝\displaystyle:=W-\beta_{c}\partial_{W}L(W^{(p)})where βpsubscript𝛽𝑝\beta_{p} and βcsubscript𝛽𝑐\beta_{c} are the learning rates. A distinguished feature of the extragradient method is the use of an additional gradient step which can be seen as a guide during the optimization process. Particularly, this additional iteration allows to foresee the geometry of the problem and take the curvature information into account, which leads to a better convergency than standard gradient descent [24]. Specific to our problem, there is a more intuitive understanding of the above iterations. For the prediction step, the algorithm will quickly move to a point close to Gk−λksuperscript𝐺𝑘superscript𝜆𝑘G^{k}-\lambda^{k} so that the loss of quadratic regularization vanishes. Then in the correction step, the algorithm moves another step which tries to minimize the loss of neural network f(W)𝑓𝑊f(W). These two steps avoid the algorithm stacking into a less valuable local minima. In practice, we find this extragradient method largely accelerate the convergence of the algorithm.
|
| 60 |
+
|
| 61 |
+
A key observation of (LABEL:eq12) is that while minimizing over G𝐺G, all the components Gisubscript𝐺𝑖G_{i} are decoupled, therefore the auxiliary variables of each layer can be optimized independently. Recall that Wi,Gi,λi,𝒞isubscript𝑊𝑖subscript𝐺𝑖subscript𝜆𝑖subscript𝒞𝑖W_{i},G_{i},\lambda_{i},\mathcal{C}_{i} denote the weights, auxiliary variables, Lagrangian multipliers and constraints of the i𝑖i-th layer respectively. We are essentially looking for the Euclidean projection of (Wik+1+λik)subscriptsuperscript𝑊𝑘1𝑖subscriptsuperscript𝜆𝑘𝑖(W^{k+1}_{i}+\lambda^{k}_{i}) onto a discrete set 𝒞isubscript𝒞𝑖\mathcal{C}_{i}. Since the constraint is discrete and nonconvex, this optimization is nontrivial.
|
| 62 |
+
|
| 63 |
+
For convenience, we denote (Wik+1+λik)subscriptsuperscript𝑊𝑘1𝑖subscriptsuperscript𝜆𝑘𝑖(W^{k+1}_{i}+{\lambda^{k}_{i}}) as Visubscript𝑉𝑖V_{i}. The projection of Visubscript𝑉𝑖V_{i} onto 𝒞isubscript𝒞𝑖\mathcal{C}_{i} can be formulated asminGi,αisubscriptsubscript𝐺𝑖subscript𝛼𝑖\displaystyle\min\limits_{G_{i},\alpha_{i}}‖Vi−Gi‖2superscriptnormsubscript𝑉𝑖subscript𝐺𝑖2\displaystyle\|V_{i}-G_{i}\|^{2}(12)s.t.Gi∈{0,±αi,±2αi,⋯,±2Nαi}disubscript𝐺𝑖superscript0plus-or-minussubscript𝛼𝑖plus-or-minus2subscript𝛼𝑖⋯plus-or-minussuperscript2𝑁subscript𝛼𝑖subscript𝑑𝑖\displaystyle G_{i}\in\{0,\pm\alpha_{i},\pm 2\alpha_{i},\cdots,\pm 2^{N}\alpha_{i}\}^{d_{i}}
|
| 64 |
+
|
| 65 |
+
Taking the scaling factor away from the constraints, the objective can be equivalently formulated as:minQi,αisubscriptsubscript𝑄𝑖subscript𝛼𝑖\displaystyle\min\limits_{Q_{i},\alpha_{i}}‖Vi−αi⋅Qi‖2superscriptnormsubscript𝑉𝑖⋅subscript𝛼𝑖subscript𝑄𝑖2\displaystyle\|V_{i}-\alpha_{i}\cdot Q_{i}\|^{2}(13)s.t.Qi∈{0,±1,±2,⋯,±2N}disubscript𝑄𝑖superscript0plus-or-minus1plus-or-minus2⋯plus-or-minussuperscript2𝑁subscript𝑑𝑖\displaystyle Q_{i}\in\{0,\pm 1,\pm 2,\cdots,\pm 2^{N}\}^{d_{i}}
|
| 66 |
+
|
| 67 |
+
We propose an iterative quantization method to solve this problem. The algorithm alternates between optimizing αisubscript𝛼𝑖\alpha_{i} with Qisubscript𝑄𝑖Q_{i} fixed and optimizing Qisubscript𝑄𝑖Q_{i} with αisubscript𝛼𝑖\alpha_{i} fixed. In specific, with Qisubscript𝑄𝑖Q_{i} fixed, the problem becomes an univariate optimization. The optimal αisubscript𝛼𝑖\alpha_{i} can be easily obtained asαi=ViTQiQiTQisubscript𝛼𝑖superscriptsubscript𝑉𝑖𝑇subscript𝑄𝑖superscriptsubscript𝑄𝑖𝑇subscript𝑄𝑖\alpha_{i}=\frac{V_{i}^{T}Q_{i}}{Q_{i}^{T}Q_{i}}(14)
|
| 68 |
+
|
| 69 |
+
With αisubscript𝛼𝑖\alpha_{i} fixed, the optimal Qisubscript𝑄𝑖Q_{i} is actually the projection of Viαisubscript𝑉𝑖subscript𝛼𝑖\frac{V_{i}}{\alpha_{i}} onto {0,±1,±2,⋯,±2N}0plus-or-minus1plus-or-minus2⋯plus-or-minussuperscript2𝑁\{0,\pm 1,\pm 2,\cdots,\pm 2^{N}\}, namely,Qi=Π{0,±1,±2,⋯,±2N}(Viαi)subscript𝑄𝑖subscriptΠ0plus-or-minus1plus-or-minus2⋯plus-or-minussuperscript2𝑁subscript𝑉𝑖subscript𝛼𝑖Q_{i}=\Pi_{\{0,\pm 1,\pm 2,\cdots,\pm 2^{N}\}}\left(\frac{V_{i}}{\alpha_{i}}\right)(15)where ΠΠ\Pi denotes the projection operator. Moreover, the projection onto a discrete set is simply the closest point in it.
|
| 70 |
+
|
| 71 |
+
This iterative quantization algorithm is guaranteed to converge to a local minimum since we can get a decrease of loss in each step. In practice, we also find such a simple algorithm converges very fast. In most cases, we only need less than five iterations to get a stable solution.
|
| 72 |
+
|
| 73 |
+
In ADMM, dual update is actually gradient ascent in the dual space [15]. The iterate λk+1superscript𝜆𝑘1\lambda^{k+1} in Eq.(10) can be interpreted as a scaled dual variable, or as the running sum of the error values Wk+1−Gk+1superscript𝑊𝑘1superscript𝐺𝑘1W^{k+1}-G^{k+1}.
|
| 74 |
+
|
| 75 |
+
In order to verify the effectiveness of the proposed algorithm, in this section we evaluate it on two benchmarks: ImageNet for image classification and Pascal VOC for object detection.
|
| 76 |
+
|
| 77 |
+
To evaluate the performance of our proposed method on image recognition task, we perform extensive experiments on the large scale benchmark ImageNet (ILSVRC2012), which is one of the most challenging image classification benchmarks. ImageNet dataset has about 1.2 million training images and 50 thousand validation images, and these images cover 1000 object classes. We comprehensively evaluate our method on almost all well-known deep CNN architectures, including AlexNet [25], VGG-16 [26], ResNet-18 [27], ResNet-50 [27] and GoogleNet [28].
|
| 78 |
+
|
| 79 |
+
In the ImageNet experiments, all the images are resized to 256×256256256256\times 256. The images are then randomly clipped to 224×224224224224\times 224 patches with mean subtraction and randomly flipping. No other data augmentation tricks are used in the learning process. We report both the top-1 and top-5 classification accurate rates on the validation set, using single-view testing (single-crop on central patch only).
|
| 80 |
+
|
| 81 |
+
We study different kinds of bit width for weight quantization. Specifically, we tried binary quantization, ternary quantization, one-bit shift quantization and two-bits shift quantization. For one-bit shift quantization, the weights are restricted to be {-2a𝑎a, -a𝑎a, 0, +a𝑎a, +2a𝑎a}, which we denote as {-2, +2} in the comparison. Similarly, two-bits shift quantization are denoted as {-4, +4}. Binary quantization and ternary quantization need one bit and two bits to represent one weight respectively. Both {-2, +2} quantization and {-4, +4} quantization need three bits to represent one weight.
|
| 82 |
+
|
| 83 |
+
For binary and ternary quantization, we compare the proposed algorithm with the state-of-the-art approaches Binary Weight Network (BWN) [16] and Ternary Weight Network (TWN) [17]. Both BWN111https://github.com/allenai/XNOR-Net and TWN222https://github.com/fengfu-chris/caffe-twns release their source code so we can evaluate their performance on different network architectures. Our method is implemented with Caffe [29]. The referenced full precision CNN models VGG-16, ResNet-50 and GoogleNet are taken from the Caffe model zoo333https://github.com/BVLC/caffe/wiki/Model-Zoo.
|
| 84 |
+
|
| 85 |
+
AlexNet and VGG-16 are “old fashion” CNN architectures. AlexNet consists of 5 convolutional layers and 3 fully-connected layers. VGG-16 uses much wider and deeper structure than AlexNet, with 13 convolutional layers and 3 fully-connected layers. Table 1 demonstrates the comparison results on these two networks. For fair comparison with BWN, we report the performance of the batch normalization [30] version of AlexNet. The accuracy of the improved AlexNet is higher than the original one (Top-1 60.0% vs. 57.4%, Top-5 82.4% vs. 80.4%).
|
| 86 |
+
|
| 87 |
+
On these two architectures, the proposed algorithm achieves a lossless compression with only 3 bits compared with the full precision references. For {-2, +2} and {-4, +4} quantization, the performance of the our quantized networks is even better than the original full precision network on VGG-16. Similar results are observed in BinaryConnect on small datasets. This is because discrete weights could provide a form of regularization which can help to generalize better. These results also imply the heavy redundancy of the parameters in full precision AlexNet and VGG-16 models. This finding is consistent with that in other studies such as SqueezeNet [31]. In SqueezeNet, the authors suggest that one can achieve AlexNet-level accuracy on ImageNet with 50x fewer parameters.
|
| 88 |
+
|
| 89 |
+
Our binary quantization and ternary quantization slightly outperforms BWN and TWN on these two architectures. Comparing the accuracy of ternary quantization and binary quantization, we find that ternary network consistently works better than binary network. We also emphasize that the ternary network is more computing efficient than binary network because of the existence of many zero entries in the weights, as indicated in [32].
|
| 90 |
+
|
| 91 |
+
The results on ResNet-18 are shown in Table 2. ResNet-18 has 18 convolutional layers with shortcut connections. For the proposed method, both the binary and ternary quantization substantially outperform their competitors on this architecture. For example, our binary network outperforms BWN by 4 points in top-1 accuracy and 3.2 points in top-5 accuracy. The proposed ternary quantization outperforms TWN by 5.2 points and 3.3 points in top-1 and top-5 accuracy respectively. All these gaps are significant on ImageNet. We also observe over two percent improvement for our ternary quantization over binary quantization.
|
| 92 |
+
|
| 93 |
+
The effectiveness of our method is also verified on very deep convolutional network such as ResNet-50. Besides significantly increased network depth, ResNet-50 has a more complex network architecture than ResNet-18. Table 2 details the results on ResNet-50. It is easy to observe the similar trends as in ResNet-18. Our method is considerably better than the compared BWN and TWN. For example, our binary quantization obtains about 5 points improvement on top-1 accuracy over BWN.
|
| 94 |
+
|
| 95 |
+
For both ResNet-18 and ResNet-50, there is a more noticeable gap between the low bits quantized networks and full precision reference. Different from AlexNet and VGG-16, on ResNet we notice about 1 point gap in top-1 accuracy between {-4, +4} quantized network and full precision reference. These results suggest that training extremely low bits quantized network is easier for AlexNet and VGG than for ResNet, which also implies the parameters in AlexNet and VGG-16 are more redundant than those in ResNet-18 and ResNet-50.
|
| 96 |
+
|
| 97 |
+
The results on GoogleNet are illustrated in Table 3. GoogleNet is a 22 layers deep network, organized in the form of the “Inception module”. Similar to ResNet, GoogleNet is more compact than AlexNet and VGG-16, so it will be more difficult to compress it. There exists a gap of more than 2 points in top-1 accuracy between {-4, +4} quantized network and full precision version. The loss of binary quantization is more significant, which reaches 8 points in top-1 accuracy. Despite this, our method stills outperforms BWN444Note that the GoogleNet used in BWN paper is an improved variant of the original version used in this paper. and TWN on this network.
|
| 98 |
+
|
| 99 |
+
To our knowledge, Trained Ternary Quantization (TTN) [33] and Incremental Network Quantization (INQ) [34] are two of the most recent published works on low bits quantization of deep neural network. Instead of quantizing the ternary weights to be {−α,0,+α}𝛼0𝛼\{-\alpha,0,+\alpha\}, TTN makes it less restrictive as {−α,0,+β}𝛼0𝛽\{-\alpha,0,+\beta\}. Note that our method can be easily extended to deal with constraints of such form. Nevertheless, the computation of such form of ternary network is less efficient than the original one. As an example, for fast implementation the inner product between vector x and vector (−α,−α,0,+β)𝛼𝛼0𝛽(-\alpha,-\alpha,0,+\beta) will be decomposed as βx⋅(0,0,0,1)−αx⋅(1,1,0,0)⋅𝛽x0001⋅𝛼x1100\beta\textbf{x}\cdot(0,0,0,1)-\alpha\textbf{x}\cdot(1,1,0,0), having to do two floating-point multiplications with α𝛼\alpha and β𝛽\beta.
|
| 100 |
+
|
| 101 |
+
Since TTN only reports its results on AlexNet and ResNet-18, we compare the performance on these two architectures. Detailed results are summarized in Table 4 and Table 5. Our approach performs better than TTN on AlexNet (the results of ternary INQ on AlexNet is not available), and better than both TTN and INQ on ResNet-18. INQ shows more results on 5-bits networks in the paper. For example, the reported top-1 and top-5 accuracy of ResNet-50 with 5-bits are 73.2% and 91.2% [34]. In contrast, our method achieves such accuracy with only 3 bits.
|
| 102 |
+
|
| 103 |
+
We notice the extremely low bits quantization of GoogleNet suffers a large degradation. We guess this may be due to the 1×\times1 kernel in each inception. In order to verify this point, we perform another experiment on GoogleNet. In this version, the 1×\times1 kernels in the network are quantized with relatively more bits, i.e., INT8, and kernels of other size are quantized as usual. Table 6 shows the results.
|
| 104 |
+
|
| 105 |
+
By comparing the results in Table 6 and those in Table 3, we observe a considerable improvement, especially for binary and ternary quantization. As we have discussed, discrete weights can be interpret as a strong regularizer to the network. However, the parameters in 1×\times1 kernel is much less than those in other kernels. Imposing a very strong regularizer to such kernels may lead to underfitting of the network. These results suggest that we should quantize different parts of the networks with different bit width in practice. Letting the algorithm automatically determine the bit width will be our future work.
|
| 106 |
+
|
| 107 |
+
In order to evaluate the proposed method on object detection task, we apply it to the state of arts detection framework SSD [35]. The models are trained on Pascal VOC2007 and VOC2012 train dataset, and tested on Pascal VOC 2007 test dataset. For SSD, we adopt the open implementation released by the authors555https://github.com/weiliu89/caffe/tree/ssd. In all experiments, we follow the same setting as in [35] and the input images are resized to 300×300300300300\times 300.
|
| 108 |
+
|
| 109 |
+
The proposed method are evaluated on two base models, i.e., VGG-16 and Darknet reference model. Both base networks are pre-trained on ImageNet dataset. The VGG-16 network here is a variant of original one [26]. In detail, the fc6 and fc7 are converted to convolutional layers with 1×1111\times 1 kernel, and the fc8 layer is removed. The parameters of fc6 and fc7 are also subsampled. The darknet reference model is borrowed from YOLO [36], which is another fast detection framework. Darknet is designed to be small yet power, which attains comparable accuracy performance as AlexNet but only with about 10%percent\% of the parameters. We utilize the base darknet model downloaded from the website666https://pjreddie.com/darknet/imagenet/.
|
| 110 |
+
|
| 111 |
+
To the best of our knowledge, there is no other works on low bits quantization applied their algorithms to the object detection tasks. We compare our quantized network with full precision network in this experiment. We only implement ternary and {-4,+4} quantization for this experiment. Darknet has utilized many 1×\times1 kernels as in GoogleNet to accelerate the inference process. We implement two versions of Darknet. In the first version, the 1×\times1 kernels are also quantized as usual, while in the second version these kernels are quantized with INT8. Table 7 shows the mean average precision (mAP) on both models.
|
| 112 |
+
|
| 113 |
+
For {-4,+4} quantization, we find that the mAP of both modes are very close to the full precision version. On VGG16+SSD, we only suffer a loss of 0.002 in mAP. Comparing two versions of Darknet+SSD, the first version achieves a mAP of 0.624, and the second version obtains a improvement of 1.5 points. For ternary quantization, the accuracy degradation of Darknet+SSD is larger than VGG16+SSD, because the parameters of Darknet is less redundant than VGG-16. All these results indicate that our proposed method is also effective on the object detection tasks.
|
| 114 |
+
|
| 115 |
+
This work focused on compression and acceleration of deep neural networks with extremely low bits weight. Inspired by the efficient heuristics proposed to solve mixed integer programs, we proposed to learn low bits quantized neural network in the framework of ADMM. We decoupled the continuous parameters from the discrete constraints of network, and cast the original hard problem into several subproblems. We proposed to solve these subproblems using extragradient and iterative quantization algorithms that lead to considerably faster convergency compared to conventional optimization methods. Extensive experiments on convolutional neural network for image recognition and object detection have shown the effectiveness of the proposed method.
|
1708.00999v2.txt
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Although there has been a large amount of progress in human activity recognition research in the past years \cite{ryoo-review,simonyan14,google15,c3d}, most of the existing works assume that region-of-interest (ROI) in videos are large enough. The assumption is that each video region corresponding to an activity has a high enough resolution, allowing the recognition model to capture detailed motion and appearance changes. However, there are several cases where this assumption does not hold. For instance, in far-field recognition scenarios (i.e., detecting human activities at a distance), humans are usually very far away from the camera and each ROI often has just a few pixels within. This happens commonly in visual surveillance cameras \cite{efros2003recognizing,reddy2012human}, required to cover a large area while having a low native resolution due to their cost.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
\begin{figure}
|
| 6 |
+
\begin{center}
|
| 7 |
+
\includegraphics[width=1.0\linewidth]{images/intro_LR.pdf}
|
| 8 |
+
\includegraphics[width=1.0\linewidth]{images/intro_LR2.pdf}
|
| 9 |
+
\end{center}
|
| 10 |
+
\caption{Example LR images generated by applying different LR transforms (with slightly different translations) to a single HR image. Red boxes indicate pixels of the humans. Although these LR images (right) are all from the identical HR frame (left), their pixel values become very different.}
|
| 11 |
+
\label{fig:intro}
|
| 12 |
+
\end{figure}
|
| 13 |
+
|
| 14 |
+
Furthermore, there are situations where one wants to intentionally avoid taking high-resolution (HR) videos because of a privacy concern. High resolution cameras including robot cameras and wearable cameras are becoming increasingly available at both public and private places, and we are afraid of them recording privacy-sensitive videos of us without consent. For example, if such camera system at home (for home security or smart home services) is cracked by a hacker, there is a risk of one's 24/7 private life being monitored/recorded by someone else. The paradigm of using extreme low resolution (e.g., 16x12) anonymized videos for \emph{privacy-preserving} activity recognition is able to address such societal concern of unwanted video taking at the fundamental-level. Human faces in extreme LR videos are not identifiable (e.g., they are much smaller than 5x5), naturally prohibiting the recognition process from accessing privacy-sensitive face information. This allows designing the device (e.g., a robot) that does not record HR videos while still recognizing what is going on around it for its operation. Although extreme low resolution videos are not the only privacy-preserving data (e.g., super-pixeled frames could also be privacy-preserving), they probably are the most computation (and hardware) efficient data to obtain/process and a number of recent research \cite{dai15,ryoo17privacy} studied such direction.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
Motivated by such demands, there were several previous studies on extreme low resolution object/activity recognition \cite{dai15,lrface16,ryoo17privacy,chen17,cheng17emotion}. The learning in previous approaches was typically done by resizing each original high resolution training sample to a LR sample and using it as a training data. On the other hand, although the recognition methods are required to only use extreme low resolution data in the testing phase, it is a realistic assumption to use publicly available HR data (e.g., YouTube videos) for their learning in the training phase. Several previous works took such direction/assumption \cite{lrface16,ryoo17privacy,chen17,cheng17emotion} for the better LR recognition and obtained promising results.
|
| 38 |
+
|
| 39 |
+
However, most of the previous works were limited in the aspect that they seldom considered the intrinsic property of low resolution sensors: In LR images, due to the inherent limitation what a single pixel can capture from the scene, two images originated from the exact same scene often have totally different pixel (i.e., RGB) values. Camera transformations (particularly motion transformations \cite{huang10}) such as sub-pixel translations and rotations influence the image data significantly. Figure \ref{fig:intro} shows an example. Depending on the transformations, LR images from the exact same scene become different visual data.
|
| 40 |
+
|
| 41 |
+
In this paper, we propose a new low resolution classification approach that explicitly takes such property into account to enable better recognition of human activities from LR videos. The idea is that multiple LR videos (e.g., Figure \ref{fig:intro}) corresponds to a single HR video and thus should ideally be embedded to the same representation (to be used for the classification). That is, the intermediate representations corresponding to these LR videos should be very similar, mapping the videos to the same point in the embedding space. %
|
| 42 |
+
Once such embedding space is jointly learned with its classifier, when a new LR video is provided in the testing phase, the model can map the video to its corresponding embedding location regardless of its (unknown) LR transform. This means that the classifier becomes invariant to sub-pixel transforms (e.g., affine transforms including translation, scaling, and rotation) of the LR camera. A new multi-Siamese Convolutional Neural Network (CNN) architecture is designed to learn the optimal embeddings for LR videos.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
We experimentally confirm that our concept of posing an additional constraint in the representation (i.e., embedding) learning that ``LR videos corresponding to the same HR videos should be identical/similar'' obtains better performance than the conventional approach of learning a classifier with the exact same number of augmented LR training videos. Our approach jointly optimizes the video representation and the classifier for the best LR activity recognition, obtaining superior performances to prior works.
|
| 47 |
+
\section{Related works}
|
| 48 |
+
Human activity recognition is an important research area actively studied since 1990s \cite{ryoo-review}. In the past 3 years, approaches taking advantage of video-based convolutional neural networks showed particularly successful results in activity recognition. These not only include the approaches to capture relatively short-term (e.g., 15 frames) motion in videos such as two-stream CNN \cite{simonyan14} and C3D \cite{c3d}, but also include those to capture longer-term temporal structure like long-term temporal convolution \cite{varol16} and temporal attention filters \cite{piergiovanni2016learning}. Use of recurrent neural networks (RNNs) to model sequential changes in activity videos also have been popular \cite{google15,yeong16}. The approaches obtained successful results particularly in video classification. However, they did not consider activity recognition from low resolution videos (their target resolution was at least 200x200) and thus was not suitable for LR recognition as they are.
|
| 49 |
+
|
| 50 |
+
There have been more recent works on extreme low resolution activity recognition \cite{dai15,ryoo17privacy,chen17,cheng17emotion}. Some of these works focused on obtaining better low resolution features \cite{dai15}. Other works focused on taking advantage of high resolution training videos to learn better LR decision boundaries. The idea was that one high-resolution training image/video contains more information than just a single low-resolution data.
|
| 51 |
+
\cite{ryoo17privacy} considered that multiple different LR transforms can be used to increase the number of training data from a single HR video, although it did not attempt any LR representation learning. \cite{chen17} took advantage of the LR face recognition approach introduced in \cite{lrface16}; they designed the video version of \cite{lrface16}. Features to be shared in both HR and LR videos were learned in this approach. However, it did not take advantage of the fact that there can be multiple LR transforms, and its recognition accuracy was thus limited.
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
There were previous works on Siamese CNNs for various different computer vision problems (e.g., \cite{hadsell2006dimensionality,bell15siggraph,wang2015unsupervised}), but we believe this is the first paper to conduct the Siamese embedding learning for low resolution data. Previous Siamese CNNs were not focusing on exploiting the properties of LR data, and we are not aware of any such attempts for LR videos or activity recognition. Our approach is also different from the general data augmentation method increasing the number of training data; our method explicitly learns the intermediate LR embedding while considering sub-pixel transformations in LR videos, thereby becoming transform robust and performing superior.
|
| 55 |
+
\section{Our approach}
|
| 56 |
+
In this section, we describe our approach to recognize human activities from extreme low resolution videos. The key idea is that (1) multiple different LR transforms can be applied to a single HR training video to obtain a set of LR videos and that (2) we can learn the `embedding space' that explicitly forces intermediate CNN representations of such LR videos to be transform invariant while jointly optimizing them for the classification. We assume the availability of HR training videos from publicly available sources (e.g., YouTube), and present a method to best take advantage of such HR training videos to learn the optimal LR classifier.
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
Given a set of original HR training videos, the goal is to learn the \textbf{embedding space for low resolution videos}, and use the learned embedding for the classification of a new LR testing video. The learned embedding ideally maps LR videos (from the same original HR video) to the same location regardless of their transformations, thereby enabling learning of transform-invariant activity classifiers. Rather than using a hand designed mapping, we use a Siamese CNN architecture while explicitly designing it to handle multiple LR transforms. A two-stream network for extreme LR videos is presented, and a new Siamese architecture with multiple branches for the extreme LR classification (i.e., our multi-Siamese CNN architecture) is introduced.
|
| 60 |
+
\subsection{Low resolution video transforms}
|
| 61 |
+
\label{subsec:lr}
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
Motivated by the finding that the use of multiple different LR transforms benefits the classifier learning \cite{ryoo17privacy}, we designed our approach to explicitly take advantage of a set of LR transforms. The main idea is that a single high resolution video contains an equivalent amount of information to a set of low resolution videos, and the recognition approaches can exploit that by applying different LR transforms to a single HR video. We generate $n$ number of low resolution videos (i.e., $V_{ik}$) for each high resolution training video $X_i$ by applying the set of transforms $F_k$ and $D_k$:
|
| 68 |
+
\begin{equation}
|
| 69 |
+
V_{ik} = D_k F_k X_i, ~~k = 1 \ldots n.
|
| 70 |
+
\end{equation}
|
| 71 |
+
where $F_k$ is the camera motion transformation and $D_k$ is the down-sampling operator. Here, $F_k$ can be any affine transformation, but we consider combinations of translation, scaling, and rotation as our motion transform in this paper. We use the standard average downsampling for $D_k$.
|
| 72 |
+
|
| 73 |
+
Unlike \cite{ryoo17privacy} which attempted to learn a smaller subset of transforms computationally efficient for the training of the classifiers, in this paper, we take the strategy of providing a sufficient number of transforms to the classifier, $S = \{F_k\}^n_{k=1}$, and attempt to best take advantage of them to maximize the classification performance. Multiple $V_{ik}$ generated from each training sample $X_i$ will be used for the training of our approach, which we present in the ``Multi-Siamese CNN'' subsection in more detail.
|
| 74 |
+
|
| 75 |
+
\begin{figure}
|
| 76 |
+
\begin{center}
|
| 77 |
+
\includegraphics[width=0.8\linewidth]{images/two-stream.png}
|
| 78 |
+
\end{center}
|
| 79 |
+
\caption{The detailed architecture used in our two-stream CNN designed for 16x12 extreme low resolution videos. This two-stream CNN is applied to each frame of the video.}
|
| 80 |
+
\label{fig:two-stream}
|
| 81 |
+
\end{figure}
|
| 82 |
+
\subsection{Two-stream convolutional neural network}
|
| 83 |
+
We design a new two-stream convolutional neural network model for low resolution videos. Similar to other two-stream CNNs, one stream of our model takes the raw image as its input (spatial stream) and the other stream takes the concatenation optical flows (temporal stream) computed from LR images. We used 16x12 as the spatial resolution of our LR videos. More specifically, our spatial stream takes RGB pixel values of each frame as an input (i.e., the input dimensionality is 16x12x3) and the temporal stream takes 10-frame concatenation of X and Y optical flow images (i.e., 16x12x20). X and Y optical flow images are constructed by computing ``x (and y) optical flow magnitude'' per pixel. Figure \ref{fig:two-stream} illustrates parameters used in our two-stream architecture.
|
| 84 |
+
|
| 85 |
+
We used the TV-L1 optical flow extraction algorithm \cite{zach2007duality}. More specifically, our optical flows are computed by (1) bruteforcely resizing a 16x12 video to 256x256 using a standard bicubic interpolation, (2) applying the dual TV-L1 optical flow algorithm, and (3) resizing the result back to 16x12. No HR information was used in any part of our process, since we assume only one (unlabeled) LR video is provided in the testing phase.
|
| 86 |
+
|
| 87 |
+
\begin{figure}
|
| 88 |
+
\begin{center}
|
| 89 |
+
\includegraphics[width=1.0\linewidth]{images/two-stream-pyramid.png}
|
| 90 |
+
\end{center}
|
| 91 |
+
\caption{Our two-stream CNN model with temporal pyramid. This applies two-stream models from Figure \ref{fig:two-stream} for each frame, and then takes temporal max pooling with different intervals to perform the video classification.}
|
| 92 |
+
\label{fig:two-stream-pyramid}
|
| 93 |
+
\end{figure}
|
| 94 |
+
|
| 95 |
+
Our two-stream network is applied for each frame of the video, and they are summarized using a temporal pyramid similar to \cite{ryoo15} to generate a single video representation. Let $h(V^t)$ be the two-stream network being applied to each frame $V^t$ of video $V$ at time $t$. Then, our representation $f(V ; \theta)$ is computed by
|
| 96 |
+
\begin{equation}
|
| 97 |
+
\begin{split}
|
| 98 |
+
x = f(V ; \theta) = fc(&\max_{t \in [0,T]} h(V^t), \max_{[0,T/2]} h(V^t),\\
|
| 99 |
+
&\max_{[T/2,T]} h(V^t), \max_{[0,T/4]} h(V^t), \cdots)
|
| 100 |
+
\end{split}
|
| 101 |
+
\end{equation}
|
| 102 |
+
where $,$ denotes the vector concatenation operator, $T$ is the number of frames in the video $V$, and $fc$ denotes a set of fully connected layers to be applied on top of the concatenation. The size of $h(V^t)$ is 512-D: $256 \times 2$. $\theta$ is a set of parameters in our CNN, which we need to learn from the training data. Here, $\max$ is a temporal max pooling operator that computes the maximum of each element. In our experiments, the temporal pyramid of level 4 was used (i.e., a total of $15$ max pooling). Figure \ref{fig:two-stream-pyramid} shows the overall architecture.
|
| 103 |
+
|
| 104 |
+
Attaching more fully connected layers and a softmax layer to $f(V)$ would enable the learning of the activity video classifier. Let $g$ be such layers. Then, $y = g(f(V ; \theta))$ where $y$ is the activity class label. Training $g(f(V ; \theta))$ with the classification loss using low resolution videos generated using transforms will provide us the basic video classification model.
|
| 105 |
+
\subsection{Multi-Siamese CNN}
|
| 106 |
+
\label{subsec:multi-siamese}
|
| 107 |
+
|
| 108 |
+
Although the above two-stream network design is able to classify activity videos by learning model parameters optimized for the classification, it does not consider the property of extreme low resolution videos that different transforms applied to the same scene result different LR data. In order for the classifier to better take advantage of such nature, we require the learning of the embedding space that maps different LR videos with the same semantic content to the same embedding location whatever their transforms are. This embedding (i.e., representation) learning enables training of more generalized (i.e., less overfitted) classifier, jointly optimized for both the embedding and the classification using the learned embedding in an end-to-end fashion.
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
\begin{figure*}
|
| 112 |
+
\begin{center}
|
| 113 |
+
\includegraphics[width=0.8\linewidth]{images/multi-siamese4.pdf}
|
| 114 |
+
\end{center}
|
| 115 |
+
\caption{`Training' process of our multi-Siamese CNNs. It takes advantage of both contrastive and classification losses. It has $2 \cdot n$ branches sharing the parameters for the embedding and the classifier learning. In the actual testing phase, we only take advantage of one branch, applying it to each unknown low resolution test video for the classification.}
|
| 116 |
+
\label{fig:multi-siamese}
|
| 117 |
+
\end{figure*}
|
| 118 |
+
|
| 119 |
+
{\flushleft\textbf{Siamese CNN:} A Siamese neural network is the concept of having two networks sharing the same parameters, often used to learn the similarity measure between two inputs \cite{hadsell2006dimensionality,bell15siggraph}. The objective of a Siamese network (with a contrastive loss function) is to learn the embedding space that places similar items (i.e., LR videos in our case) nearby. More specifically, it is trained with positive and negative pairs of items as training examples, where a positive pair corresponds to samples that need to stay close in the embedding space and a negative pair corresponds to samples that need to stay far away.}
|
| 120 |
+
|
| 121 |
+
Let $x = f(V ; \theta)$ be our CNN. Then, during the training, we are obtaining $x_i = f(V_i ; \theta)$ and $x_j = f(V_j ; \theta)$ by applying the same copies of the network $f(V ; \theta)$ twice to any LR video $V_i$ and $V_j$, where $(x_i, x_j)$ can either be a positive pair or a negative pair. The contrastive loss to learn the network parameters $\theta$ is described as below:
|
| 122 |
+
\begin{equation}
|
| 123 |
+
\begin{split}
|
| 124 |
+
L_{siam}(\theta)=\sum_{(i,j)}^B &y'_{(i,j)} ||x_i - x_j||_2^2 + \\
|
| 125 |
+
&(1-y'_{(i,j)}) \max(0, m-||x_i - x_j||_2)^2
|
| 126 |
+
\end{split}
|
| 127 |
+
\end{equation}
|
| 128 |
+
where $m$ is a predetermined margin, $B$ is the batch of LR training examples being used, and $i$ and $j$ are the indexes of training pairs in the batch. $y'_{(i,j)}$ is a binary variable, which is 1 for positive pairs and 0 for negative pairs.
|
| 129 |
+
|
| 130 |
+
In our LR recognition embedding learning, a positive pair is composed of two LR videos originated from the same HR video, and a negative pair is composed of any two LR videos from different HR videos. Furthermore, since our objective is to finally classify LR videos by learning $y = g(f(V; \theta))$, we need to train the network with the combined loss function as below:
|
| 131 |
+
\begin{equation}
|
| 132 |
+
\label{eq:combined-loss}
|
| 133 |
+
L(\theta)= \lambda_1 L_{siam}(\theta) + \lambda_2 L_{class}(\theta)
|
| 134 |
+
\end{equation}
|
| 135 |
+
where $L_{class}(\theta)$ is the standard classification loss of the network $y = g(f(V ; \theta))$, and $\lambda_1$ and $\lambda_2$ are the weights.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
{\flushleft\textbf{Multi-Siamese CNN:} Different from the standard Siamese network that only has two copies (i.e., branches) of the network sharing parameters, we designed a new model with $2 \cdot n$ network copies sharing the same parameters $\theta$ for $f(V ; \theta)$. The idea is to make each copy correspond to each of the $n$ different LR transformations (i.e., $F_k$), so that we can enforce their embedding distance to be small using a contrastive loss. In addition, we have $n$ more copies of the network to form negative training pairs by using videos not corresponding to the scene of the first $n$ branches. Figure \ref{fig:multi-siamese} illustrates our network.}
|
| 139 |
+
|
| 140 |
+
Let $x_{ik} = f(V_{ik} ; \theta)$, where $V_{ik}$ is obtained by applying the transform $F_k$ to $X_i$. Based on the batch $B$ of `original HR training videos', we randomly prepare two types of batches: $B_1$ is a batch of LR videos generated from a single HR video $X_i$, and $B_2$ is a batch with randomly selected LR videos. We use $B_1$ to generate positive pairs, and $B_1$ and $B_2$ to generate negative pairs. The sizes of $B_1$ and $B_2$ have to be $n$. For each example $X_i$ in $B$, we apply $n$ different LR transforms to get $B_1$, and provide each of the resulting $V_{ik} = D_k F_k X_i$ to the first $n$ branches of our multi-Siamese network. The LR examples $V_j$ in $B_2$ are provided to the remaining $n$ branches of the Siamese network directly. Our new loss function is formulated as:
|
| 141 |
+
\begin{equation}
|
| 142 |
+
\begin{split}
|
| 143 |
+
L_{multi}(\theta) = \sum_{i \in B} &\Bigg[ \sum_{(k, l) \in B_1} ||x_{ik} - x_{il}||_2^2 + \max(0, \\
|
| 144 |
+
&~~n^2 \cdot m^2 - ( \sum_{k}\sum_{j \in B_2} ||x_{ik} - x_j||_2^2 ))\Bigg]
|
| 145 |
+
\end{split}
|
| 146 |
+
\end{equation}
|
| 147 |
+
That is, in our model, we consider multiple LR transforms simultaneously for the embedding learning. The new loss function essentially takes every pair of $n$ LR transforms as positive pairs, and also considers the same number of negative pairs using a separate batch.
|
| 148 |
+
|
| 149 |
+
The final loss function is computed by combining the above multi-Siamese contrastive loss and the standard classification loss as done in Equation \ref{eq:combined-loss}: $L(\theta)= \lambda_1 L_{multi}(\theta) + \lambda_2 \sum L_{class}(\theta)$. The overall process of our multi-Siamese embedding and classifier learning is summarized in Figure \ref{fig:multi-siamese}. This can be more specifically viewed as a Siamese CNN with multiple contrastive loss (from different LR pairs) combined. It is generalizing and extending the Siamese embedding learning beyond triplets by explicitly considering the multi-pairing of LR transforms.
|
| 150 |
+
|
| 151 |
+
We used three fully connected layers for the embedding learning and the classification. After the temporal pyramid, we obtain an intermediate representation of 7680-D per video (i.e., $15 \times 256 \times 2$). We then have the two fully connected layers with size 8192. Our embedding learning was done after this 2nd fully connected layer, making our $x$ to have the dimensionality of 8192-D. The classification was performed by having one more fully connected layer and one soft max layer on top of that.
|
| 152 |
+
|
| 153 |
+
Notice that our model relies on the multi-Siamese contrastive loss only during the `training' process. Once trained (i.e., once the embedding space is learned), in the testing phase, it is a standard feedforward convolutional neural network. It takes exactly the same amount of computation time compared to the baseline (i.e., two-stream temporal pyramid CNN) model to classify an unknown video segment.
|
| 154 |
+
\section{Experiments}
|
| 155 |
+
|
| 156 |
+
\subsection{Dataset and setting}
|
| 157 |
+
{\flushleft\textbf{16x12 HMDB dataset:} HMDB dataset \cite{hmdb} is one of the most widely used public video datasets containing more than 7000 videos with 51 different action classes. The dataset is composed of the videos mostly collected from YouTube, including movie scenes. It often serves as a standard benchmark for the evaluation of activity classification. HMDB dataset was also used in \cite{ryoo17privacy} and \cite{chen17} for the extreme low resolution recognition evaluation. We used the HMDB dataset to allow directly comparison between our approach and those previous works.}
|
| 158 |
+
|
| 159 |
+
We resized the HMDB videos to 16x12 using the average downsampling, while also including the lens blur term and the Gaussian noise term. For the videos with non-4:3 asepct ratio, a center cropping was used. The standard evaluation setting of the dataset using 3 provided training/testing splits was followed, performing the 51-class video classification.
|
| 160 |
+
|
| 161 |
+
{\flushleft\textbf{16x12 DogCentric dataset:} DogCentric dataset \cite{dogcentric} is a smaller scale dataset (compared to HMDB), consisting of more than 200 videos with 10 different activity classes. The videos in the dataset are taken from a wearable camera, mounted on top of dogs. Such videos, taken from the actor's own viewpoint, are often called first-person videos or egocentric videos. We use this dataset to test the ability of our approach to reliably recognize activities from LR videos taken with wearable cameras. This dataset was also used in \cite{ryoo17privacy} as their main dataset for the evaluation. Identical to the HMDB dataset case, we resized the videos to 16x12 for its testing. We followed the standard evaluation setting of the dataset, using 10 random half-training/half-testing splits.}
|
| 162 |
+
|
| 163 |
+
{\flushleft\textbf{Hardcore Henry movie:} We newly annotated events in a first-person movie called ``Hardcore Henry (2015)'', and obtained 16x12 videos from them. It is an action movie entirely taken with first-person wearable cameras. The idea was to evaluate whether we can recognize surveillance-type actions (e.g., violence) from a wearable camera where privacy-protection is most necessary. Action durations are around 3 seconds, and the task was to do binary classification of each unknown video segment (i.e., whether the segment corresponds to the action or not). A total of 67 `threat' event segments (e.g., the person getting hit, falling, ...) and 687 other segments (i.e., negative samples like `running') were annotated, and they were used for the evaluation. This is a relatively easier dataset compared to HMDB or DogCentric, in the aspect that clear camera motion caused by the event (i.e., the camera falling) is very visible even in LR.}
|
| 164 |
+
|
| 165 |
+
Figure \ref{fig:videos} shows examples of our extreme LR videos.
|
| 166 |
+
\subsection{Baselines}
|
| 167 |
+
In addition to the previous works we are comparing our proposed approach against \cite{ryoo17privacy,chen17}, we implemented several baselines. We implemented (1) the basic one-stream CNN only taking advantage of RGB pixels values of the frame and (2) our two-stream CNN. Using these two CNNs as base components, on top of them, we evaluated three different learning approaches: We tested (i) learning these models without using multiple LR transforms (i.e., only one LR transform per training video was used). We also tested (ii) learning the models with multiple LR transforms but without the embedding learning, to compare them against (iii) our approach of using Siamese embedding learning described in the previous section. As a result, a total of 2x3 methods were tested.
|
| 168 |
+
|
| 169 |
+
The approach (ii) can be viewed as a standard data augmentation (DA) method commonly used in previous works (e.g., \cite{karpathy14}), using the exact same set of LR training videos as our approach (iii) is using. The comparison between (ii) and (iii) will confirm the benefit of our approach.
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
\begin{figure}
|
| 174 |
+
\begin{center}
|
| 175 |
+
\includegraphics[width=1.0\linewidth]{images/hmdb_example1.png}
|
| 176 |
+
\includegraphics[width=1.0\linewidth]{images/hmdb_example2.png}
|
| 177 |
+
\includegraphics[width=1.0\linewidth]{images/dogcentric_example1.png}
|
| 178 |
+
\includegraphics[width=1.0\linewidth]{images/dogcentric_example2.png}
|
| 179 |
+
\end{center}
|
| 180 |
+
\caption{Example videos of the HMDB and DogCentric datasets. The upper rows show the original HR videos and the lower rows show the 16x12 extreme low resolution videos we use in our experiments. The first two videos are from HMDB and the other two videos are from DogCentric.}
|
| 181 |
+
\label{fig:videos}
|
| 182 |
+
\end{figure}
|
| 183 |
+
\subsection{Training}
|
| 184 |
+
The baselines and our approaches used the same amount of training videos provided in each dataset setting.
|
| 185 |
+
|
| 186 |
+
There were two stages in our learning process. In the first stage, we trained the two streams of our network separately using per-frame labels. The spatial stream of our two-stream network (taking a RGB frame as an input) was pre-trained using the ImageNet dataset on object classification task. The temporal stream was trained directly based on optical flows from HMDB video frames. Once such first-stage training is done, in the second stage, our entire model with the Siamese CNN architecture and the attached classifier is jointly trained. Both the activity classification loss and the contrastive loss were used to train the model in our approach.
|
| 187 |
+
|
| 188 |
+
The number of LR transforms we used in our experiments (i.e., $n$) was 75. We considered the translation of $\{-5, -2.5, 0, +2.5, +5\} \%$ in X direction and of $\{-5, 0, +5\} \%$ in Y direction, providing us a total of 15 motion transforms $F_k$. In addition, we have three different rotations with the angle $\{-10, -5, 0, 5, 10\}$ degrees, giving us a total of 75 transforms. These 75 transforms were used as our $S = \{F_k\}^{75}_{k=1}$.
|
| 189 |
+
|
| 190 |
+
For the training of the models, a standard early stopping strategy using validation errors was used to check the convergence, avoiding overfitting. Because of the fact that there is randomness in the CNN training, we repeated our experiments for 10 times and are reporting the mean and standard deviations.
|
| 191 |
+
\subsection{Evaluation}
|
| 192 |
+
We first conducted experiments with the HMDB dataset resized to 16x12, measuring 51-class classification accuracies. A total of six methods mentioned above (i.e., 5 baselines and our approach) were first compared. Table \ref{table:hmdb} illustrates the accuracies obtained by these six methods. We are able to observe that our proposed LR two-stream CNN performs a lot better than the single-stream version of the same approach. Furthermore, we can confirm that our concept of using multiple LR transforms and learning the embedding space using our `multi-Siamese architecture' is meaningfully benefiting the overall classification of the activities.
|
| 193 |
+
|
| 194 |
+
Although the `data augmentation' and our `multi-Siamese' method take advantage of the exact same amount of LR training videos, our method obtained superior results. Our multi-Siamese uses the contrastive loss to explicitly benefit from the knowledge that ``intermediate representations caused by different LR transformations should stay similar'', thereby learning transform-invariant embedding space. This allows the learning of the classifier more robust to transforms and less overfitted to the training data.
|
| 195 |
+
|
| 196 |
+
|
| 197 |
+
|
| 198 |
+
\begin{table}
|
| 199 |
+
\caption{Classification accuracies (\%) measured with the 16x12 HMDB dataset. We report the performances of these different approaches obtained from multiple training epochs with the standard early stopping strategy. We are reporting the mean and standard deviation of each method.}
|
| 200 |
+
\label{table:hmdb}
|
| 201 |
+
|
| 202 |
+
\center
|
| 203 |
+
\setlength\extrarowheight{0.5pt}
|
| 204 |
+
|
| 205 |
+
\begin{tabular}{c|c|c}
|
| 206 |
+
\hline Approach & One-Stream & Two-Stream \tabularnewline
|
| 207 |
+
\hline Baseline CNN & 25.08 $\pm$ 0.40 & 31.50 $\pm$ 0.30 \tabularnewline
|
| 208 |
+
Data augmentation & 25.17 $\pm$ 0.24 & 35.34 $\pm$ 0.41 \tabularnewline
|
| 209 |
+
Our multi-Siamese & 26.21 $\pm$ 0.27 & \textbf{37.70} $\pm$ 0.17 \tabularnewline
|
| 210 |
+
\hline
|
| 211 |
+
\end{tabular}
|
| 212 |
+
|
| 213 |
+
\end{table}
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
\begin{table}
|
| 217 |
+
\caption{A table comparing our approach with previous state-of-the-arts on the \textbf{16x12} HMDB dataset. Note that \cite{chen17} is the two-stream version of \cite{lrface16}, extending it for the video recognition.}
|
| 218 |
+
\label{table:hmdb-comp}
|
| 219 |
+
|
| 220 |
+
\center
|
| 221 |
+
\setlength\extrarowheight{0.5pt}
|
| 222 |
+
|
| 223 |
+
\begin{tabular}{c|c}
|
| 224 |
+
\hline Approach & Accuracy \tabularnewline
|
| 225 |
+
\hline
|
| 226 |
+
3-layer CNN \cite{ryoo17privacy} & 20.81 \% \tabularnewline
|
| 227 |
+
ResNet-32 \cite{resnet2016} & 22.37 \% \tabularnewline
|
| 228 |
+
PoT \cite{ryoo15} & 26.57 \% \tabularnewline
|
| 229 |
+
ISR \cite{ryoo17privacy} & 28.68 \% \tabularnewline
|
| 230 |
+
\cite{chen17} & 29.2 \% \tabularnewline
|
| 231 |
+
\hline
|
| 232 |
+
Our two-stream CNN with pyramid & 31.50 \% \tabularnewline
|
| 233 |
+
Ours & \textbf{37.70} \% \tabularnewline
|
| 234 |
+
\hline
|
| 235 |
+
\end{tabular}
|
| 236 |
+
|
| 237 |
+
\end{table}
|
| 238 |
+
|
| 239 |
+
In Table \ref{table:hmdb-comp}, we compare our approach with the reported results of the state-of-the-arts. In addition to the reported performances, we also tested the ResNet with 32 layers \cite{resnet2016}. The ResNet was pre-trained with 16x12 ImageNet and fine-tuned with 16x12 HMDB frames. We are able to clearly confirm that our proposed approach significantly outperforms the recent previous works, with more than +8\% gap. Our approach with the embedding learning using the two-stream multi-Siamese CNN obtained the best known result on the 16x12 activity recognition. Our approach was particularly effective for HMDB videos, since humans appearing in the videos are very small, causing LR videos to have very different pixel values per transform. Our approach captures such properties using the multi-Siamese embedding learning, thus obtaining a much superior performance.
|
| 240 |
+
|
| 241 |
+
In addition, we conducted the same set of experiments with the DogCentric activity dataset. Five baseline approaches were compared against our approach in Table \ref{table:dog} as it was done with HMDB, and Table \ref{table:dog-comp} shows classification accuracies of the state-of-the-art extreme low resolution activity recognition approaches compared with ours. We confirm once more that our approach obtains the best accuracy on this low resolution activity recognition task.
|
| 242 |
+
|
| 243 |
+
Finally, we checked our method's ability to perform binary event detection given segments from continuous videos using the Hardcore Henry dataset. We measured the precision and recall values of detecting the `threat' event. F1-scores based on the precision and recall are measured. The results were: baseline 0.838 vs. data augmentation 0.871 vs. our multi-Siamese 0.885.
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
Our approach runs in real-time ($\sim$50 fps) on a Nvidia Jetson TX2 mobile GPU card with the TensorFlow library, when the Farneback algorithm is used for optical flows.
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
\begin{table}
|
| 251 |
+
\caption{Classification accuracies (\%) measured with the 16x12 DogCentric dataset. We report the average performance of the approaches.}
|
| 252 |
+
\label{table:dog}
|
| 253 |
+
|
| 254 |
+
\center
|
| 255 |
+
\setlength\extrarowheight{0.5pt}
|
| 256 |
+
|
| 257 |
+
\begin{tabular}{c|c|c}
|
| 258 |
+
\hline Approach & One-Stream & Two-Stream \tabularnewline
|
| 259 |
+
\hline Baseline CNN & 53.05 & 61.25 \tabularnewline
|
| 260 |
+
Data augmentation & 57.61 & 68.09 \tabularnewline
|
| 261 |
+
Our multi-Siamese & 59.08 & \textbf{69.43} \tabularnewline
|
| 262 |
+
\hline
|
| 263 |
+
\end{tabular}
|
| 264 |
+
\end{table}
|
| 265 |
+
|
| 266 |
+
\begin{table}
|
| 267 |
+
\caption{Comparing our approach with previous state-of-the-art results reported on the \textbf{16x12} DogCentric activity dataset. \cite{wang13} performed poorly since no trajectories were extracted from 16x12.}
|
| 268 |
+
\label{table:dog-comp}
|
| 269 |
+
|
| 270 |
+
\center
|
| 271 |
+
\setlength\extrarowheight{0.5pt}
|
| 272 |
+
|
| 273 |
+
\begin{tabular}{c|c}
|
| 274 |
+
\hline Approach & Accuracy \tabularnewline
|
| 275 |
+
\hline
|
| 276 |
+
Iwashita et al. \cite{dogcentric} & 46.2 \% \tabularnewline
|
| 277 |
+
ITF \cite{wang13} & 10.0 \% \tabularnewline
|
| 278 |
+
PoT \cite{ryoo15} & 64.6 \% \tabularnewline
|
| 279 |
+
ISR \cite{ryoo17privacy} & 67.36 \% \tabularnewline
|
| 280 |
+
\hline
|
| 281 |
+
Our two-stream CNN with pyramid & 61.25 \% \tabularnewline
|
| 282 |
+
Ours & \textbf{69.43} \% \tabularnewline
|
| 283 |
+
\hline
|
| 284 |
+
\end{tabular}
|
| 285 |
+
|
| 286 |
+
\end{table}
|
| 287 |
+
\section{Conclusion}
|
| 288 |
+
We presented a new approach for human activity recognition from extreme low resolution videos. A new two-stream Siamese convolutional neural networks was designed for the low resolution videos. The idea was to explicitly capture the inherent property of LR videos that two images originated from the exact same scene often have totally different pixel (i.e., RGB) values depending on their LR transformations. Our approach learns the shared embedding space that maps LR videos with the same content to the same location regardless of their transformations, while jointly optimizing it for the classification. Our experimental results confirmed that the proposed method outperforms all previous works by a meaningful margin.
|
| 289 |
+
\section*{Acknowledgement}
|
| 290 |
+
This research was conducted as a part of EgoVid Inc.'s research activity on privacy-preserving computer vision. This research was supported by the Tech Incubator Program for Startup Korea (TIPS), ``deep learning-based low resolution video analysis,'' and the Miraeholdings grant funded by the Korean government (Ministry of Science and ICT). Yang is the corresponding author.
|
| 291 |
+
|
| 292 |
+
|
| 293 |
+
\bibliographystyle{aaai}
|
| 294 |
+
\bibliography{low-resolution}
|
1708.01425v4.txt
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Most house cats face enemies. Russia has the opposite objectives of the US. There is much innovation in 3-d printing and it is sustainable.
|
| 2 |
+
|
| 3 |
+
What do the three propositions have in common? They were never uttered but solely presupposed in arguments made by the participants of online discussions. Presuppositions are a fundamental pragmatic instrument of natural language argumentation in which parts of arguments are left unstated. This phenomenon is also referred to as common knowledge (Macagno and Walton, 2014, p. 218), enthymemes (Walton, 2007b, p. 12), tacit major premises (Amossy, 2009, p. 319), or implicit warrants (Newman and Marshall, 1991, p. 8). Wilson and Sperber (2004) suggest that, when we comprehend arguments, we reconstruct their warrants driven by the cognitive principle of relevance. In other words, we go straight for the interpretation that seems most relevant and logical within the given context Hobbs et al. (1993). Although any incomplete argument can be completed in different ways Plumer (2016), it is assumed that certain knowledge is shared between the arguing parties (Macagno and Walton, 2014, p. 180).
|
| 4 |
+
|
| 5 |
+
Filling the gap between the claim and premises (aka reasons) of a natural language argument empirically remains an open issue, due to the inherent difficulty of reconstructing the world knowledge and reasoning patterns in arguments. In a direct fashion, Boltužić andŠnajder (2016) let annotators write down implicit warrants, but they concluded only with a preliminary analysis due to large variance in the responses. In an indirect fashion, implicit warrants correspond to major premises in argumentation schemes; a concept heavily referenced in argumentation theory Walton (2012). However, mapping schemes to real-world arguments has turned out difficult even for the author himself.
|
| 6 |
+
|
| 7 |
+
Our main hypothesis is that, even if there is no limit to the tacit length of the reasoning chain between claims and premises, it is possible to systematically reconstruct a meaningful warrant, depending only on what we take as granted and what needs to be explicit. As warrants encode our current presupposed world knowledge and connect the reason with the claim in a given argument, we expect that other warrants can be found which connect the reason with a different claim. In the extreme case, there may exist an alternative warrant in which the same reason is connected to the opposite claim.
|
| 8 |
+
|
| 9 |
+
The intuition of alternative warrants is key to the systematic methodology that we develop in this paper for reconstructing a warrant for the original claim of an argument. In particular, we first ‘twist’ the stance of a given argument, trying to plausibly explain its reasoning towards the opposite claim. Then, we twist the stance back and use a similar reasoning chain to come up with a warrant for the original argument. As we discuss further below, this works for real-world arguments with a missing piece of information that is taken for granted and considered as common knowledge, yet, would lead to the opposite stance if twisted.
|
| 10 |
+
|
| 11 |
+
We demonstrate the applicability of our methodology in a large crowdsourcing study. The study results in 1,970 high-quality instances for a new task that we call argument reasoning comprehension: Given a reason and a claim, identify the correct warrant from two opposing options. An example is given in Figure 1. A solution to this task will represent a substantial step towards automatic warrant reconstruction. However, we present experiments with several neural attention and language models which reveal that current approaches based on the words and phrases in arguments and warrants do not suffice to solve the task.
|
| 12 |
+
|
| 13 |
+
The main contributions of this paper are (1) a methodology for obtaining implicit warrants realized by means of scalable crowdsourcing and (2) a new task along with a high-quality dataset. In addition, we provide (a) 2,884 user-generated arguments annotated for their stance, covering 50+ controversial topics, (b) 2,026 arguments with annotated reasons supporting the stance, (c) 4,235 rephrased reason gists, useful for argument summarization and sentence compression, and (d) a method for checking the reliability of crowdworkers in document and span labeling using traditional inter-annotator agreement measures.
|
| 14 |
+
|
| 15 |
+
It is widely accepted that an argument consists of a claim and one or more premises (reasons) Damer (2013). Toulmin (1958) elaborated on a model of argument in which the reason supports the claim on behalf of a warrant. The abstract structure of an argument then is Reason →→\rightarrow (since) Warrant →→\rightarrow (therefore) Claim. The warrant takes the role of an inference rule, similar to the major premise in Walton’s terminology Walton (2007a).
|
| 16 |
+
|
| 17 |
+
In principle, the chain Reason →→\rightarrow Warrant →→\rightarrow Claim is applicable to deductive arguments and syllogisms, which allows us to validate arguments properly formalized in propositional logic. However, most natural language arguments are in fact inductive (Govier, 2010, p. 255) or defeasible (Walton, 2007b, p. 29).222A recent empirical example is provided by Walker et al. (2014) who propose possible approaches to identify patterns of inference from premises to claims in vaccine court cases. The authors conclude that it is extremely rare that a reasoning is explicitly laid out in a deductively valid format. Accordingly, the unsuitability of formal logic for natural language arguments has been discussed by argumentation scholars since the 1950’s Toulmin (1958). To be clear, we do not claim that arguments cannot be represented logically (e.g., in predicate logic), however the drift to informal logic in the 20th century makes a strong case that natural language argumentation is more than modus ponens van Eemeren et al. (2014).
|
| 18 |
+
|
| 19 |
+
In argumentation theory, the notion of a warrant has also been contentious. Some argue that the distinction of warrants from premises is clear only in Toulmin’s examples but fails in practice, i.e., it is hard to tell whether the reason of a given argument is a premise or a warrant (van Eemeren et al., 1987, p. 205). However, Freeman (2011) provides alternative views on modeling an argument. Given a claim and two or more premises, the argument structure is linked if the reasoning step involves the logical conjunction of the premises.If we treat a warrant as a simple premise, then the linked structure fits the intuition behind Toulmin’s model, such that premise and warrant combined give support to the claim. For details, see (Freeman, 2011, Chap. 4).
|
| 20 |
+
|
| 21 |
+
What makes comprehending and analyzing arguments hard is that claims and warrants are usually implicit (Freeman, 2011, p. 82). As they are ‘taken for granted’ by the arguer, the reader has to infer the contextually most relevant content that she believes the arguer intended to use. To this end, the reader relies on common sense knowledge Oswald (2016); Wilson and Sperber (2004).
|
| 22 |
+
|
| 23 |
+
The reconstruction of implicit premises has already been faced in computational approaches.In light of the design of their argument diagramming tool, Reed and Rowe (2004) pointed out that the automatic reconstruction is a task that skilled analysts find both taxing and hard to explain. More recently, Feng and Hirst (2011) as well as Green (2014) outlined the reconstruction of missing enthymemes or warrants as future work, but they never approached it since.To date, the most advanced attempt in this regard is from Boltužić andŠnajder (2016). The authors let annotators ‘reconstruct’ several propositions between premises and claims and investigated whether the number of propositions correlates with the semantic distance between the claim and the premises. However, they conclude that the written warrants heavily vary both in depth and in content.By contrast, we explore cases with a missing single piece of information that is considered as common knowledge, yet leading to the opposite conclusion if twisted.Recently, Becker et al. (2017) also experimented with reconstructing implicit knowledge in short German argumentative essays. In contrast to our work, they used expert annotators who iteratively converged to a single proposition.
|
| 24 |
+
|
| 25 |
+
As the task we propose involves natural language comprehension, we also review relevant work outside argumentation here. In particular, the goal of the semantic inference task textual entailment is to classify whether a proposition entails or contradicts a hypothesis Dagan et al. (2009). A similar task, natural language inference, was boosted by releasing the large SNLI dataset Bowman et al. (2015) containing 0.5M entailment pairs crowdsourced by describing pictures. While the understanding of semantic inference is crucial in language comprehension, argumentation also requires coping with phenomena beyond semantics.Rajpurkar et al. (2016) presented a large dataset for reading comprehension by answering questions over Wikipedia articles (SQuAD). In an analysis of this dataset Sugawara and Aizawa (2016) found, though, that only 6.2% of the questions require causal reasoning, 1.2% logical reasoning, and 0% analogy. In contrast, these reasoning types often make up the core of argumentation Walton (2007a).Mostafazadeh et al. (2016) introduced the cloze story test, in which the appropriate ending of a narrative has to be selected automatically. The overall context of this task is completely different to ours. Moreover, the narratives were written from scratch by explicitly instructing crowd workers, whereas our data come from genuine argumentative comments.Common-sense reasoning was also approached by Angeli and Manning (2014) who targeted the inference of common-sense facts from a large knowledge base. Since their logical formalism builds upon an enhanced version of Aristotle’s syllogisms, its applicability to natural language argumentation remains limited (see our discussion above).In contrast to our data source, a few synthetic datasets for general natural language reasoning have been recently introduced, such as answers to questions over a described physical world Weston et al. (2016) or an evaluation set of 100 questions in the Winograd Schema Challenge Levesque et al. (2012).
|
| 26 |
+
|
| 27 |
+
Finally, we note that, although being related, research on argument mining, argumentation quality, and stance classification is not in the immediate scope of this paper. For details on these, we therefore refer to recent papers from Lippi and Torroni (2016); Habernal and Gurevych (2017) or Mohammad et al. (2016).
|
| 28 |
+
|
| 29 |
+
Let R𝑅R be a reason for a claim C𝐶C, both of which being propositions extracted from a natural language argument. Then there is a warrant W𝑊W that justifies the use of R𝑅R as support for C𝐶C, but W𝑊W is left implicit.
|
| 30 |
+
|
| 31 |
+
For example, in a discussion about whether declawing a cat should be illegal, an author takes the following position (which is her claim C𝐶C): ‘It should be illegal to declaw your cat’. She gives the following reason (R𝑅R): ‘They need to use their claws for defense and instinct’.333The example is taken from our dataset introduced below.The warrant W𝑊W could then be ‘If cat needs claws for instincts, declawing would be against nature’ or similar. W𝑊W remains implicit, because R𝑅R already implies C𝐶C quite obviously and so, according to common sense, any further explanation seems superfluous.
|
| 32 |
+
|
| 33 |
+
Now, the question is how to find the warrant W𝑊W for a given reason R𝑅R and claim C𝐶C. Our key hypothesis in the definition of the argument reasoning comprehension task is the existence of an alternative warrant AW𝐴𝑊AW that justifies the use of R𝑅R as support for the opposite ¬C𝐶\neg C of the claim C𝐶C (regardless of the question of how strong this justification is).
|
| 34 |
+
|
| 35 |
+
For the example above, assume that we ‘twist’ C𝐶C to ‘It should be legal to declaw your cat’ (¬C𝐶\neg C) but use the same reason R𝑅R. Is it possible to come up with an alternative warrant AW𝐴𝑊AW that justifies R𝑅R? In the given case, ‘most house cats don’t face enemies’ would bridge R𝑅R to ¬C𝐶\neg C quite plausibly. If we now use a reasoning based on AW𝐴𝑊AW but twist AW𝐴𝑊AW again such that it leads to the claim C𝐶C, we get ‘most house cats face enemies’, which is a plausible warrant W𝑊W for the original argument containing R𝑅R and C𝐶C.444This way, we also reveal the weakness of the original argument that was hidden in the implicit premise. It can be challenged by asking the arguer whether house cats really face enemies.
|
| 36 |
+
|
| 37 |
+
Constructing an alternative warrant is not possible for all reason/claim pairs; in some reasons the arguer’s position is deeply embedded. As a result, trying to give a plausible reasoning for the opposite claim ¬C𝐶\neg C either leads to nonsense or to a proposition that resembles a rebuttal rather than a warrant Toulmin (1958). However, if both W𝑊W and AW𝐴𝑊AW are available, they usually capture the core of a reason’s relevance and reveal the implicit presuppositions (examples follow further below).
|
| 38 |
+
|
| 39 |
+
Based on our key hypothesis, we define the argument reasoning comprehension task as:
|
| 40 |
+
|
| 41 |
+
Given a reason R𝑅R and a claim C𝐶C along with the title and a short description of the debate they occur in, identify the correct warrant W𝑊W from two candidates: the correct warrant W𝑊W and an incorrect alternative warrant AW𝐴𝑊AW.
|
| 42 |
+
|
| 43 |
+
An instance of the task is thus basically given by a tuple (R,C,W,AW)𝑅𝐶𝑊𝐴𝑊(R,C,W,AW). The debate title and description serve as the context of R𝑅R and C𝐶C. As it is binary, we propose to evaluate the task using accuracy.
|
| 44 |
+
|
| 45 |
+
We now describe our methodology to systematically reconstruct implicit warrants, along with the scalable crowdsourcing process that operationalizes the methodology. The result of the process is a dataset with authentic instances (R,C,W,AW)𝑅𝐶𝑊𝐴𝑊(R,C,W,AW) of the argument reasoning comprehension task.
|
| 46 |
+
|
| 47 |
+
Instead of extending an existing dataset, we decided to create a new one from scratch, because we aimed to study a variety of controversial issues in user-generated web comments and because we sought for a dataset with a permissive license.
|
| 48 |
+
|
| 49 |
+
As a source, we opted for the Room for Debate section of the New York Times.555https://www.nytimes.com/roomfordebateIt provides authentic argumentation on contemporary issues with good editorial work and moderation — as opposed to debate portals such as createdebate.com, where classroom assignments, silly topics, and bad writing prevail.We manually selected 188 debates with polar questions in the title. These questions are controversial and provoking, giving a stimulus for stance-taking and argumentation.666Detailed theoretical research on polar and alternative questions can be found in van Rooy andŠafářová (2003); Asher and Reese (2005) analyze bias and presupposition in polar questions.For each debate we created two explicit opposing claims, e.g., ‘It should be illegal to declaw your cat’ and ‘It should be legal to declaw your cat’. We crawled all comments from each debate and sampled about 11k high-ranked, root-level comments.777To remove ‘noisy’ candidates, we applied several criteria, such as the absence of quotations or URLs and certain lengths. For details, see the source code we provide. We did not check any quality criteria of arguments, as this was not our focus; see, e.g., Wachsmuth et al. (2017) for argumentation quality.
|
| 50 |
+
|
| 51 |
+
The methodology we propose consists of eight consecutive steps that are illustrated in Figure 2 and detailed below. Each step can be operationalized with crowdsourcing. For our dataset, we performed crowdsourcing on 5,000 randomly sampled comments using Amazon Mechanical Turk (AMT) from December 2016 to April 2017. Before, each comment was split into elementary discourse units (EDUs) using SistaNLP Surdeanu et al. (2015).
|
| 52 |
+
|
| 53 |
+
For each comment, we first classify what stance it is taking (recall that we always have two explicit claims with opposing stance). Alternatively, it may be neutral (considering both sides) or may not take any stance.888We also experimented with approaching the annotations top-down starting by annotating explicit claims, but the results were unsatisfying. This is in line with empirical observations made by Habernal and Gurevych (2017) who showed that the majority of claims in user-generated arguments are implicit.
|
| 54 |
+
|
| 55 |
+
All 2,884 comments in our dataset classified as stance-taking by the crowdworkers were then also annotated as to whether being sarcastic or ironic; both pose challenges in analyzing argumentation not solved so far Habernal and Gurevych (2017).
|
| 56 |
+
|
| 57 |
+
For all comments taking a stance, the next step is to select those spans that give a reason for the claim (with a single EDU as the minimal unit).
|
| 58 |
+
|
| 59 |
+
In our dataset, the workers found 5,119 reason spans, of which 2,026 lay within arguments. About 40 comments lacked any explicit reason.
|
| 60 |
+
|
| 61 |
+
This new task is, in our view, crucial for downstream annotations. Each reason from the previous step is rewritten, such that the reason’s gist in the argument remains the same but the clutter is removed (examples are given in the supplementary material which is available both in the ACL Anthology and the project GitHub site). Besides, wrongly annotated reasons are removed in this step. The result is pairs of reason R𝑅R and claim C𝐶C.
|
| 62 |
+
|
| 63 |
+
All 4,294 gists in our dataset were summarized under Creative Commons Zero license (CC-0).
|
| 64 |
+
|
| 65 |
+
Within our methodology, we need to be able to identify to what extent a reason itself implies a stance: While ‘C𝐶C because R𝑅R’ allows for many plausible interpretations (as discussed above), whether R→C→𝑅𝐶R\rightarrow C or R→¬C→𝑅𝐶R\rightarrow\neg C depends on how much presupposition is encoded in R𝑅R. In this step, we decide which claim (C𝐶C or ¬C𝐶\neg C) is most plausible for R𝑅R, or whether both are similarly plausible (in the given data, respective reasons turned out to be rather irrelevant though).
|
| 66 |
+
|
| 67 |
+
We used only those 1,955 instances where R𝑅R indeed implied C𝐶C according to the workers, as this suggests at least some implicit presupposition in R𝑅R.
|
| 68 |
+
|
| 69 |
+
This step is the trickiest, since it requires both creativity and ‘brain twisting’. As exemplified in Section 3, a plausible explanation needs to be given why R𝑅R supports ¬C𝐶\neg C (i.e., the alternative warrant AW𝐴𝑊AW). Alternatively, this may be classified as being impossible.
|
| 70 |
+
|
| 71 |
+
Exact instructions for our workers can be found in the provided sources. All 5,342 alternative warrants in our dataset are written under CC-0 license.
|
| 72 |
+
|
| 73 |
+
As the previous step produces largely uncontrolled writings, we validate each fabricated alternative warrant AW𝐴𝑊AW as to whether it actually relates to the reason R𝑅R. To this end, we show AW𝐴𝑊AW and ¬C𝐶\neg C together with two alternatives: R𝑅R itself and a distracting reason. Only instances with correctly validated R𝑅R are kept.
|
| 74 |
+
|
| 75 |
+
For our dataset, we sampled the distracting reason from the same debate topic, using the most dissimilar to R𝑅R in terms of skip-thought vectors Kiros et al. (2015) and cosine similarity. We kept 3,791 instances, for which the workers also rated how ‘logical’ the explanation of AW𝐴𝑊AW was (0–2 scale).
|
| 76 |
+
|
| 77 |
+
This step refers to the second task in the example from Section 3: Given R𝑅R and C𝐶C, make minimal modifications to the alternative warrant AW𝐴𝑊AW, such that it becomes an actual warrant W𝑊W (i.e., such that R→W→C→𝑅𝑊→𝐶R\rightarrow W\rightarrow C).
|
| 78 |
+
|
| 79 |
+
For our dataset, we restricted this step to those 2,613 instances that had a ‘logic score’ of at least 0.68 (obtained from the annotations mentioned above), in order to filter out nonsense alternative warrants. All resulting 2,447 warrants were written by the workers again under CC0 license.
|
| 80 |
+
|
| 81 |
+
To ensure that each tuple (R,C,W,AW)𝑅𝐶𝑊𝐴𝑊(R,C,W,AW) allows only one logical explanation (i.e., either R→W→C→𝑅𝑊→𝐶R\rightarrow W\rightarrow C or R→AW→C→𝑅𝐴𝑊→𝐶R\rightarrow AW\rightarrow C is correct, not both), all instances are validated again.
|
| 82 |
+
|
| 83 |
+
Disputed cases in the dataset (according to our workers) were fixed by an expert to ensure quality. We ended up with 1,970 instances to be used for the argument reasoning comprehension task.
|
| 84 |
+
|
| 85 |
+
To strictly assess quality in the entire crowdsourcing process, we propose an evaluation method that enables ‘classic’ inter-annotator agreement measures for crowdsourcing, such as Fleiss’ κ𝜅\kappa or Krippendorff’s α𝛼\alpha. Applying κ𝜅\kappa and α𝛼\alpha directly to crowdsourced data has been disputed Passonneau and Carpenter (2014). For estimating gold labels from the crowd, several models have been proposed; we rely on MACE Hovy et al. (2013). Given a number of noisy workers, MACE outputs best estimates, outperforming simple majority votes. At least five workers are recommended for a crowdsourcing task, but how reliable is the output really?
|
| 86 |
+
|
| 87 |
+
We hence collected 18 assignments per item and split them into two groups (9+9) based on their submission time. We then considered each group as an independent crowdsourcing experiment and estimated gold labels using MACE for each group, thus yielding two ‘experts from the crowd.’ Having two independent ‘experts’ from the crowd allowed us to compute standard agreement scores. We also varied the size of the sub-sample from each group from 1 to 9 by repeated random sampling of assignments. This revealed how the score varies with respect to the crowd size per ‘expert’.
|
| 88 |
+
|
| 89 |
+
Figure 3 shows the Cohen’s κ𝜅\kappa agreement for stance annotation with respect to the crowd size computed by our method. As MACE also includes a threshold for keeping only the most confident predictions in order to benefit precision, we tuned this parameter, too. Deciding on the number of workers per task is a trade-off between the desired quality and the budget. For example, reason span annotation is a harder task; however, the results for six workers are comparable to those for the expert annotations of Habernal and Gurevych (2017).999The supplementary material contains a detailed figure; not to be confused with Figure 3 which refers to stance annotation.
|
| 90 |
+
|
| 91 |
+
Table 1 lists statistics of the entire crowdsourcing process carried out for our dataset, including tasks for which we created data as a by-product.
|
| 92 |
+
|
| 93 |
+
Below, we show three examples in which implicit common-sense presuppositions were revealed during the construction of the alternative warrant AW𝐴𝑊AW and the original warrant W𝑊W. For brevity, we omit the debate title and description here. A full walk-through example is found in the supplementary material.
|
| 94 |
+
|
| 95 |
+
R𝑅R:Cooperating with Russia on terrorism ignores Russia’s overall objectives.C𝐶C:Russia cannot be a partner.AW𝐴𝑊AW:Russia has the same objectives of the US.W𝑊W:Russia has the opposite objectives of the US. R𝑅R:Economic growth needs innovation.C𝐶C:3-D printing will change the world.AW𝐴𝑊AW:There is no innovation in 3-d printing since it’s unsustainable.W𝑊W:There is much innovation in 3-d printing and it is sustainable. R𝑅R:College students have the best chance of knowing history.C𝐶C:College students’ votes do matter in an election.AW𝐴𝑊AW:Knowing history doesn’t mean that we will repeat it.W𝑊W:Knowing history means that we won’t repeat it.
|
| 96 |
+
|
| 97 |
+
Given the dataset, we performed first experiments to assess the complexity of argument reasoning comprehension. To this end, we split the 1,970 instances into three sets based on the year of the debate they were taken from: 2011–2015 became the training set (1,210 instances), 2016 the development set (316 instances), and 2017 the test set (444 instances). This follows the paradigm of learning on past data and predicting on new ones. In addition, it removes much lexical and topical overlap.
|
| 98 |
+
|
| 99 |
+
To evaluate human upper bounds for the task, we sampled 100 random questions (such as those presented in Section 4.4) from the test set and distributed them among 173 participants of an AMT survey. Every participant had to answer 10 questions. We also asked the participants about their highest completed education (six categories) and the amount of formal training they have in reasoning, logic, or argumentation (no training, some, or extensive). In addition, they specified for each question how familiar they were with the topic (3-point scale).
|
| 100 |
+
|
| 101 |
+
It depends, as shown in Figure 4. Whereas education had almost negligible influence on the performance, the more extensive formal training in reasoning the participants had, the higher their score was. Overall, 30 of the 173 participants scored 100%. The mean score for those with extensive formal training was 90.9%. For all participants, the mean was 79.8%. However, we have to note that some of the questions are more difficult than others, for which we could not control explicitly.
|
| 102 |
+
|
| 103 |
+
Not really, i.e., we found no significant (Spearman) correlation between the mean score and familiarity of a participant in almost all education/training configurations. This suggests that argument reasoning comprehension skills are likely to be independent of topic-specific knowledge.
|
| 104 |
+
|
| 105 |
+
To assess the complexity of computationally approaching argument reasoning comprehension, we carried out first experiments with systems based on the following models.
|
| 106 |
+
|
| 107 |
+
The simplest considered model was the random baseline, which chooses either of the candidate warrants of an instance by chance.As another baseline, we used a 4-gram Modified Kneser-Ney language model trained on 500M tokens (100k vocabulary) from the C4Corpus Habernal et al. (2016). The effectiveness of language models was demonstrated by Rudinger et al. (2015) for the narrative cloze test where they achieved state-of-the-art results. We computed log-likelihood of the candidate warrants and picked the one with lower score.101010This might seem counterintuitive, but since W𝑊W is created by rewriting AW𝐴𝑊AW, it may suffer from some dis-coherency, which is then caught by the language model.
|
| 108 |
+
|
| 109 |
+
To specifically appoach the given task, we implemented two neural models based on a bidirectional LSTM. In the standard attention version, we encoded the reason and claim using a BiLSTM and provided it as an attention vector after max-pooling to LSTM layers from the two available warrants W0subscript𝑊0W_{0} and W1subscript𝑊1W_{1} (corresponding to W𝑊W and AW𝐴𝑊AW, see below). Our more elaborated version used intra-warrant attention, as shown in Figure 5. Both versions were also extended with the debate title and description added as context to the attention layer (w/ context). We trained the resulting four models using the ADAM optimizer, with heavy dropout (0.9) and early stopping (5 epochs), tuned on the development set. Input embeddings were pre-trained word2vec’s Mikolov et al. (2013). We ran each model three times with random initializations.
|
| 110 |
+
|
| 111 |
+
To evaluate all systems, each instance in our dataset is represented as a tuple (R,C,W0,W1)𝑅𝐶subscript𝑊0subscript𝑊1(R,C,W_{0},W_{1}) with a label (0 or 1). If the label is 0, W0subscript𝑊0W_{0} is the correct warrant, otherwise W1subscript𝑊1W_{1}. Recall that we have two warrants W𝑊W and AW whose correctness depends on the claim: W𝑊W is correct for R𝑅R and the original claim C𝐶C, whereas AW𝐴𝑊AW would be correct for R𝑅R and the opposite claim ¬C𝐶\neg C. We thus doubled the training data by adding a permuted instance (R,C,W1,W0)𝑅𝐶subscript𝑊1subscript𝑊0(R,C,W_{1},W_{0}) with the respective correct label; this led to increased performance.The overall results of all approaches (humans and systems) are shown in Table 2. Intra-warrant attention with rich context outperforms standard neural models with a simple attention, but it only slightly beats the language model on the dev set. The language model is basically random on the test set.
|
| 112 |
+
|
| 113 |
+
A manual error analysis of 50 random wrong predictions (a single run of the best-performing system on the dev set) revealed no explicit pattern of encountered errors. Drawing any conclusions is hard given the diversity of included topics and the variety of reasoning patterns. A possible approach would be to categorize warrants using, e.g., argumentation schemes Walton et al. (2008) and break down errors accordingly. However, this is beyond the scope here and thus left for future work.
|
| 114 |
+
|
| 115 |
+
Since the reasoning chain R→AW→¬C→𝑅𝐴𝑊→𝐶R\rightarrow AW\rightarrow\neg C is correct, too, we also tried adding respective instances to the training set (thus doubling the size). In this configuration, however, the neural models failed to learn anything better than a random guess. The reason behind is probably that the opposing claims are lexically very close, usually negated, and the models cannot pick this up. This underlines that argument reasoning comprehension cannot be solved by simply looking at the occurring words or phrases.
|
| 116 |
+
|
| 117 |
+
We presented a new task called argument reasoning comprehension that tackles the core of reasoning in natural language argumentation — implicit warrants. Moreover, we proposed a methodology to systematically reconstruct implicit warrants in eight consecutive steps. So far, we implemented the methodology in a manual crowdsourcing process, along with a strategy that enables standard inter-annotator agreement measures in crowdsourcing.
|
| 118 |
+
|
| 119 |
+
Following the process, we constructed a new dataset with 1,970 instances for the task. This number might not seem large (e.g., compared to 0.5M from SNLI), but tasks with hand-crafted data are of a similar size (e.g., 3,744 Story Cloze Test instances). Also, the crowdsourcing process is scalable and is limited only by the budget.111111In our case, the total costs were about $6,000 including bonuses and experiments with the workflow set-up.Moreover, we created several data ‘by-products’ that are valuable for argumentation research: 5,000 comments annotated with stance, which outnumbers the 4,163 tweets for stance detection of Mohammad et al. (2016); 2,026 arguments with 4,235 annotated reasons, which is six times larger than the 340 documents of Habernal and Gurevych (2017); and 4,235 summarized reason gists — we are not aware of any other hand-crafted dataset for abstractive argument summarization built upon authentic arguments.
|
| 120 |
+
|
| 121 |
+
Based on the dataset, we evaluated human performance in argument reasoning comprehension. Our findings suggest that the task is harder for people without formal argumentation training, while being solvable without knowing the topic. We also found that neural attention models outperform language models on the task.
|
| 122 |
+
|
| 123 |
+
In the short run, we plan to draw more attention to this topic by running a SemEval 2018 shared task.121212https://competitions.codalab.org/competitions/17327A deep qualitative analysis of the warrants from the theoretical perspective of reasoning patterns or argumentation schemes is also necessary.In the long run, an automatic generation and validation warrants can be understood as the ultimate goal in argument evaluation.It has been claimed that for reconstructing and evaluating natural language arguments, one has to fully ‘roll out’ their implicit premises (van Eemeren et al., 2014, Chap. 3.2) and leverage knowledge bases (Wyner et al., 2016). We believe that a system that can distinguish between the wrong and the right warrant given its context will be helpful in filtering out good candidates in argument reconstruction.
|
| 124 |
+
|
| 125 |
+
For the moment, we just made a first empirical step towards exploring how much common-sense reasoning is necessary in argumentation and how much common sense there might be at all.
|
1708.01785v3.txt
ADDED
|
@@ -0,0 +1,819 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Convolutional neural networks (CNNs)~\cite{CNN,CNNImageNet,ResNet,ConvFace} have achieved superior performance in object classification and detection. However, the end-to-end learning strategy makes the entire CNN a black box. When a CNN is trained for object classification, we believe that its conv-layers have encoded rich implicit patterns (\emph{e.g.} patterns of object parts and patterns of textures). Therefore, in this research, we aim to provide a global view of how visual knowledge is organized in a pre-trained CNN, which presents considerable challenges. For example,
|
| 3 |
+
\begin{itemize}
|
| 4 |
+
\item[1] How many types of patterns are memorized by each convolutional filter of the CNN (here, a pattern may describe a specific object part or a certain texture)?
|
| 5 |
+
\item[2] Which patterns are co-activated to describe an object part?
|
| 6 |
+
\item[3] What is the spatial relationship between two patterns?
|
| 7 |
+
\end{itemize}
|
| 8 |
+
|
| 9 |
+
In this study, given a pre-trained CNN, we propose to mine mid-level object part patterns from conv-layers, and we organize these patterns in an explanatory graph in an unsupervised manner. As shown in Fig.~\ref{fig:top}, the explanatory graph explains the knowledge hierarchy hidden inside the CNN. The explanatory graph disentangles the mixture of part patterns in each filter's feature map\textcolor{red}{\footnotemark[1]} of a conv-layer, and uses each graph node to represent a part.
|
| 10 |
+
|
| 11 |
+
\noindent\textbf{\textbullet\quad Representing knowledge hierarchy:} The explanatory graph has multiple layers, which correspond to different conv-layers of the CNN. Each graph layer has many nodes. We use these graph nodes to summarize the knowledge hidden in chaotic feature maps of the corresponding conv-layer. Because each filter in the conv-layer may potentially represent multiple parts of the object, we use graph nodes to represent patterns of all candidate parts. A graph edge connects two nodes in adjacent layers to encode co-activation logics and spatial relationships between them.
|
| 12 |
+
|
| 13 |
+
Note that we do \textbf{not} fix the location of each pattern (node) to a certain neural unit of a conv-layer's output. Instead, given different input images, a part pattern may appear on various positions of a filter's feature maps\textcolor{red}{\footnotemark[1]}. For example, the horse face pattern and the horse ear pattern in Fig.~\ref{fig:top} can appear on different positions of different images, as long as they are co-activated and keep certain spatial relationships.
|
| 14 |
+
|
| 15 |
+
\begin{figure}[t]
|
| 16 |
+
\centering
|
| 17 |
+
\includegraphics[width=0.99\linewidth]{top.pdf}
|
| 18 |
+
\caption{An explanatory graph represents knowledge hierarchy hidden in conv-layers of a CNN. Each filter in a pre-trained CNN may be activated by different object parts. Our method disentangles part patterns from each filter in an unsupervised manner, thereby clarifying the knowledge representation.}
|
| 19 |
+
\label{fig:top}
|
| 20 |
+
\end{figure}
|
| 21 |
+
|
| 22 |
+
\noindent\textbf{\textbullet\quad Disentangling object parts from a single filter:} As shown in Fig.~\ref{fig:top}, each filter in a conv-layer may be activated by different object parts (\emph{e.g.} the filter's feature map\textcolor{red}{\footnotemark[1]} may be activated by both the head and the neck of a horse). To clarify the knowledge representation, we hope to disentangle patterns of different object parts from the same filter in an unsupervised manner, which presents a big challenge for state-of-the-art algorithms.
|
| 23 |
+
|
| 24 |
+
In this study, we propose a simple yet effective method to automatically discover object parts from a filter's feature maps \textbf{without} ground-truth part annotations. In this way, we can filter out noisy activations from feature maps, and we ensure that each graph node consistently represents the same object part among different images.
|
| 25 |
+
|
| 26 |
+
Given a testing image to the CNN, the explanatory graph can tell 1) whether a node (part) is triggered and 2) the location of the part on the feature map.
|
| 27 |
+
|
| 28 |
+
\noindent\textbf{\textbullet\quad Graph nodes with high transferability:} Just like a dictionary, the explanatory graph provides off-the-shelf patterns for object parts, which enables a probability of transferring knowledge from conv-layers to other tasks. Considering that all filters in the CNN are learned using numerous images, we can regard each graph node as a detector that has been sophisticatedly learned to detect a part among thousands of images. Compared to chaotic feature maps of conv-layers, our explanatory graph is a more concise and meaningful representation of the CNN knowledge.
|
| 29 |
+
|
| 30 |
+
To prove the above assertions, we learn explanatory graphs for different CNNs (including the VGG-16, residual networks, and the encoder of a VAE-GAN) and analyze the graphs from different perspectives as follows.
|
| 31 |
+
|
| 32 |
+
\noindent\textit{\bf Visualization \& reconstruction:} Patterns in graph nodes can be directly visualized in two ways. First, for each graph node, we list object parts that trigger strong node activations. Second, we use activation states of graph nodes to reconstruct image regions related to the nodes.
|
| 33 |
+
|
| 34 |
+
\noindent\textit{\bf Examining part interpretability of graph nodes:} \cite{Interpretability} defined different types of interpretability for a CNN. In this study, we evaluate the part-level interpretability of the graph nodes. \emph{I.e.} given an explanatory graph, we check whether a node consistently represents the same part semantics among different objects. We follow ideas of \cite{Interpretability,CNNSemanticDeep} to measure the part interpretability of each node.
|
| 35 |
+
|
| 36 |
+
\noindent\textit{\bf Examining location instability of graph nodes:} Besides the part interpretability, we also define a new metric, namely location instability, to evaluate the clarity of the semantic meaning of each node in the explanatory graph. We assume that if a graph node consistently represents the same object part, then the distance between the inferred part and some ground-truth semantic parts of the object should not change a lot among different images.
|
| 37 |
+
|
| 38 |
+
\noindent\textit{\bf Testing transferability:} We associate graph nodes with explicit part names for multi-shot part localization. The superior performance of our method shows the good transferability of our graph nodes.
|
| 39 |
+
|
| 40 |
+
In experiments, we demonstrate both the representation clarity and the high transferability of the explanatory graph.
|
| 41 |
+
|
| 42 |
+
\noindent\textbf{Contributions} of this paper are summarized as follows.
|
| 43 |
+
|
| 44 |
+
\noindent
|
| 45 |
+
1) In this paper, we, for the first time, propose a simple yet effective method to clarify the chaotic knowledge hidden inside a pre-trained CNN and to summarize such a deep knowledge hierarchy using an explanatory graph. The graph disentangles part patterns from each filter of the CNN. Experiments show that each graph node consistently represents the same object part among different images.
|
| 46 |
+
|
| 47 |
+
\noindent
|
| 48 |
+
2) Our method can be applied to different CNNs, \emph{e.g.} VGGs, residual networks, and the encoder of a VAE-GAN.
|
| 49 |
+
|
| 50 |
+
\noindent
|
| 51 |
+
3) The mined patterns have good transferability, especially in multi-shot part localization. Although our patterns were pre-trained without part annotations, our transfer-learning-based part localization outperformed approaches that learned part representations with part annotations.
|
| 52 |
+
\section{Related work}
|
| 53 |
+
|
| 54 |
+
\subsection{Semantics in CNNs}
|
| 55 |
+
The interpretability and the discrimination power are two crucial aspects of a CNN~\cite{Interpretability}. In recent years, different methods are developed to explore the semantics hidden inside a CNN. Many statistical methods~\cite{CNNAnalysis_1,CNNAnalysis_2,CNNVisualization_5} have been proposed to analyze the characteristics of CNN features. In particular, \cite{CNNBias} has demonstrated that in spite of the good classification performance, a CNN may encode biased knowledge representations due to dataset bias. Instead, the CNN usually uses unreliable contexts for classification. For example, a CNN may extract features from hairs as a context to identify the \textit{smiling} attribute. Therefore, we need methods to visualize the knowledge hierarchy hidden inside a CNN.
|
| 56 |
+
|
| 57 |
+
\textbf{Visualization \& interpretability of CNN filters:}{\verb| |} Visualization of filters in a CNN is the most direct way of exploring the pattern hidden inside a neural unit. Up-convolutional nets~\cite{FeaVisual} were developed to invert feature maps to images. Comparatively, gradient-based visualization~\cite{CNNVisualization_1,CNNVisualization_2,CNNVisualization_3} showed the appearance that maximized the score of a given unit, which is more close to the spirit of understanding CNN knowledge. Furthermore, Bau \emph{et al.}~\cite{Interpretability} defined and analyzed the interpretability of each filter.
|
| 58 |
+
|
| 59 |
+
Although these studies achieved clear visualization results, theoretically, gradient-based visualization methods visualize one of the local minimums contained in a high-layer filter. \emph{I.e.} when a filter represents multiple patterns, these methods selectively illustrated one of the patterns; otherwise, the visualization result will be chaotic. Similarly, \cite{Interpretability} selectively analyzed the semantics among the highest 0.5\% activations of each filter. In contrast, our method provides a solution to explaining both strong and weak activations of each filter and discovering all possible patterns from each filter.
|
| 60 |
+
|
| 61 |
+
\textbf{Pattern retrieval:}{\verb| |} Some studies go beyond passive visualization and actively retrieve units from CNNs for different applications. Like middle-level feature extraction~\cite{MiddleLevel}, pattern retrieval mainly learns mid-level representations of CNN knowledge. Zhou~\emph{et al.}~\cite{CNNSemanticDeep,CNNSemanticDeep2} selected units from feature maps to describe ``scenes''. Simon~\emph{et al.} discovered objects from feature maps of unlabeled images~\cite{ObjectDiscoveryCNN_2}, and selected a filter to describe each part in a supervised fashion~\cite{CNNSemanticPart}. However, most methods simply assumed that each filter mainly encoded a single visual concept, and ignored the case that a filter in high conv-layers encoded a mixture of patterns. \cite{CNNAoG,DeepQA,interactiveAOG_arXiv} extracted certain neurons from a filter's feature map to describe an object part in a weakly-supervised manner (\emph{e.g.} learning from active question answering and human interactions).
|
| 62 |
+
|
| 63 |
+
In this study, the explanatory graph disentangles patterns different parts in the CNN without a need of part annotations. Compared to raw feature maps, patterns in graph nodes are more interpretable.
|
| 64 |
+
\subsection{Weakly-supervised knowledge transferring}
|
| 65 |
+
Knowledge transferring ideas have been widely used in deep learning. Typical research includes end-to-end fine-tuning and transferring CNN knowledge between different categories~\cite{CNNAnalysis_2} or different datasets~\cite{UnsuperTransferCNN}. In contrast, we believe that a transparent representation of part knowledge will create a new possibility of transferring part knowledge to other applications. Therefore, we build an explanatory graph to represent part patterns hidden inside a CNN, which enables transfer part patterns to other tasks. Experiments have demonstrated the efficiency of our method in multi-shot part localization.
|
| 66 |
+
\section{Algorithm}
|
| 67 |
+
|
| 68 |
+
\subsection{Intuitive understanding of the pattern hierarchy}
|
| 69 |
+
\label{sec:pre}
|
| 70 |
+
|
| 71 |
+
\begin{figure}[t]
|
| 72 |
+
\centering
|
| 73 |
+
\includegraphics[width=0.99\linewidth]{peak.pdf}
|
| 74 |
+
\caption{Spatial and co-activation relationships between part patterns in the explanatory graph. High-layer patterns filter out noises and disentangle low-layer patterns. From another perspective, we can regard low-layer patterns as components of high-layer patterns.}
|
| 75 |
+
\label{fig:peak}
|
| 76 |
+
\end{figure}
|
| 77 |
+
|
| 78 |
+
As shown in Fig.~\ref{fig:peak}, the feature map of a filter can usually be activated by different object parts in various locations. Let us assume that a feature map is activated with $N$ peaks. Some peaks represent common parts of the object, and we call such activation peaks \textit{part patterns}. Whereas, other peaks may correspond to background noises.
|
| 79 |
+
|
| 80 |
+
Our task is to discover activation peaks of part patterns out of noisy peaks from a filter's feature map. We assume that if a peak corresponds to an object part, then some patterns of other filters must be activated in similar map positions; vice versa. These patterns represent sub-regions of the same part and keep certain spatial relationships. Thus, in the explanatory graph, we connect each pattern in a low conv-layer to some patterns in the neighboring upper conv-layer. We mine part patterns layer by layer. Given patterns mined from the upper conv-layer, we select activation peaks, which keep stable spatial relationships with specific upper-layer patterns among different images, as part patterns in the current conv-layer.
|
| 81 |
+
|
| 82 |
+
As shown in Fig.~\ref{fig:peak}, patterns in high conv-layers usually represent large-scale object parts. Whereas, patterns in low conv-layers mainly describes relatively simple shapes, which are less distinguishable in semantics. We use high-layer patterns to filter out noises and disentangle low-layer patterns. From another perspective, we can regard low-layer patterns as components of high-layer patterns.
|
| 83 |
+
\subsection{Learning}
|
| 84 |
+
\textbf{Notations:} We are given a CNN pre-trained using its own set of training samples {\small${\bf I}$}. Let $G$ denote the target explanatory graph. $G$ contains several layers, which corresponds to conv-layers in the CNN. We disentangles the $d$-th filter of the $L$-th conv-layer into {\small$N_{L,d}$} different part patterns, which are modeled as a set of {\small$N_{L,d}$} nodes in the $L$-th layer of $G$, denoted by {\small$\Omega_{L}$}. {\small$\Omega_{L,d}\subset\Omega_{L}$} denotes the node set for the $d$-th filter. Parameters of these nodes in the $L$-th layer are given as {\small${\boldsymbol\theta}_{L}$}, which mainly encode spatial relationships between these nodes and the nodes in the $(L+1)$-th layer.
|
| 85 |
+
|
| 86 |
+
Given a training image {\small$I\in{\bf I}$}, the CNN generates a feature map\textcolor{red}{\footnotemark[1]} of the $L$-th conv-layer, denoted by {\small${\bf X}_{L}^{I}$}. Then, for each node {\small$V\in\Omega_{L,d}$}, we can use the explanatory graph to infer whether $V$'s part pattern appears on the $d$-th channel\footnotemark[1] of {\small${\bf X}_{L}^{I}$}, as well as the position of the part pattern (if the pattern appears). We use {\small${\bf R}_{L}^{I}$} to represent position inference results for all nodes in the $L$-th layer.
|
| 87 |
+
|
| 88 |
+
\textbf{Objective function:} We build the explanatory graph in a top-down manner. Given all training samples {\small${\bf I}$}, we first disentangle patterns from the top conv-layer of the CNN, and built the top graph layer. Then, we use inference results of the patterns/nodes on the top layer to help disentangle patterns from the neighboring lower conv-layer. In this way, the construction of $G$ is implemented layer by layer. Given inference results for the $(L+1)$-th layer {\small$\{{\bf R}_{L+1}^{I}\}_{I\in{\bf I}}$}, we expect that all patterns to simultaneously 1) be well fit to {\small${\bf X}_{L}^{I}$} and 2) keep consistent spatial relationships with upper-layer patterns {\small${\bf R}_{L+1}^{I}$} among different images. The objective of learning for the $L$-th layer is given as
|
| 89 |
+
\begin{equation}{\arg\!\max}_{{\boldsymbol\theta}_{L}}{\prod}_{I\in{\bf I}}P({\bf X}_{L}^{I}|{\bf R}_{L+1}^{I},{\boldsymbol\theta}_{L})
|
| 90 |
+
\label{eqn:prob}
|
| 91 |
+
\end{equation}
|
| 92 |
+
\emph{I.e.} we learn node parameters {\small${\boldsymbol\theta}_{L}$} that best fit feature maps of training images.
|
| 93 |
+
|
| 94 |
+
Let us focus on a conv-layer's feature map {\small${\bf X}_{L}^{I}$} of image $I$. Without ambiguity, we ignore the superscript $I$ to simplify notations in following paragraphs. We can regard {\small${\bf X}_{L}$} as a distribution of ``neural activation entities.'' We consider the neural response of each unit {\small$x\in{\bf X}_{L}$} as the number of ``activation entities.'' In other words, each unit $x$ localizes at the position of {\small${\bf p}_{x}$}\footnote[2]{To make unit positions in different conv-layers comparable with each other (\emph{e.g.}{\small$\mu_{V'\rightarrow V}$} in Eq.~\ref{eqn:gauss}), we project the position of unit $x$ to the image plane. We define the coordinate {\small${\bf p}_{x}$} on the image plane, instead of on the feature-map plane.} in the $d_{x}$-th channel of {\small${\bf X}_{L}$}. We use {\small$F(x)\!=\!\beta\cdot\max\{f_{x},0\}$} to denote the number of activation entities at the position {\small${\bf p}_{x}$}, where $f_{x}$ is the normalized response value of $x$; $\beta$ is a constant.
|
| 95 |
+
|
| 96 |
+
\begin{figure}[t]
|
| 97 |
+
\centering
|
| 98 |
+
\includegraphics[width=0.9\linewidth]{pair.pdf}
|
| 99 |
+
\caption{Related patterns $V$ and $V'$ keep similar spatial relationships among different images. Circle centers represent the prior pattern positions, \emph{e.g.} $\mu_{V}$ and $\mu_{V'}$. Red arrows denote relative displacements between the inferred positions and prior positions, \emph{e.g.} ${\bf p}_{V}-\mu_{V}$.}
|
| 100 |
+
\label{fig:pair}
|
| 101 |
+
\end{figure}
|
| 102 |
+
|
| 103 |
+
Therefore, just like a Gaussian mixture model, we use all patterns in {\small$\Omega_{L,d}$} as a mixture model to jointly explain the distribution of activation entities on the $d$-th channel of {\small${\bf X}_{L}$}:
|
| 104 |
+
\begin{small}
|
| 105 |
+
\begin{eqnarray}
|
| 106 |
+
\!\!\!\!&P({\bf X}_{L}|{\bf R}_{L+1},{\boldsymbol\theta}_{L})\!=\!{\prod}_{x\in{\bf X}_{L}}P({\bf p}_{x}|{\bf R}_{L+1},{\boldsymbol\theta}_{L})^{F(x)}\\
|
| 107 |
+
\!\!\!\!&={\prod}_{x\in{\bf X}_{L}}\Big\{\sum\limits_{V\in\Omega_{L,d}\cup\{V_{\textrm{none}}\}}\!\!\!\!\!\!\!\!\!P(V)P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})\!\Big\}_{d=d_{x}}^{F(x)}\!\nonumber
|
| 108 |
+
\end{eqnarray}
|
| 109 |
+
\end{small}
|
| 110 |
+
where we consider each node {\small$V\in\Omega_{L,d}$} as a hidden variable or an alternative component in the mixture model to describe activation entities. {\small$P(V)=\frac{1}{N_{L,d}+1}$} is a constant prior probability. {\small$P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})$} measures the compatibility of using node $V$ to describe an activation entity at ${\bf p}_{x}$. In addition, because noisy activations cannot be explained by any patterns, we add a dummy component {\small$V_{\textrm{none}}$} to the mixture model for noisy activations. Thus, the compatibility between $V$ and ${\bf p}_{x}$ is computed based on spatial relationship between $V$ and other nodes in $G$, which is roughly formulated as
|
| 111 |
+
\begin{small}
|
| 112 |
+
\begin{eqnarray}
|
| 113 |
+
\!\!\!\!P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})\!=\!\left\{\!\begin{array}{ll}\gamma\!\!\!\!\!\prod\limits_{V'\in{E}_{V}}\!\!\!P({\bf p}_{x}|{\bf p}_{V'},{\boldsymbol\theta}_{L})^{\lambda}\!\!,\!\!\!&\!\!\!V\!\in\!\Omega_{L\!,d_{x}}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\\
|
| 114 |
+
\gamma\tau,&\!\!\!\!\!\!\!\!\!\!\!\!V\!=\!V_{\textrm{none}}\!\!\!\!\!\!\!\!\!\!\!\!\\
|
| 115 |
+
\end{array}\right.\label{eqn:prob-full}\\
|
| 116 |
+
\!\!\!P({\bf p}_{x}|{\bf p}_{V'},{\boldsymbol\theta}_{L})\!=\!{\bf\mathcal N}({\bf p}_{x}|\mu_{V'\!\rightarrow\!V},\sigma_{V'}^2)\!\!\label{eqn:gauss}
|
| 117 |
+
\end{eqnarray}
|
| 118 |
+
\end{small}
|
| 119 |
+
In above equations, node $V$ has a set of $M$ neighboring patterns in the upper layer, denoted by {\small${E}_{V}\in{\boldsymbol\theta}_{L}$}, which would be determined during the learning process. The overall compatibility {\small$P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})$} is divided into the spatial compatibility between node $V$ and each neighboring node $V'$, {\small$P({\bf p}_{x}|{\bf p}_{V'},{\boldsymbol\theta}_{L})$}. {\small$\forall V'\in{E}_{V}$}, {\small${\bf p}_{V'}\!\in\!{\bf R}_{L+1}$} denotes the position inference result of $V'$, which have been provided. {\small$\lambda=\frac{1}{M}$} is a constant for normalization. {\small$\gamma$} is a constant to roughly ensure {\small$\int P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L}){\bf d}{{\bf p}_{x}}=1$}, which can be eliminated during the learning process.
|
| 120 |
+
|
| 121 |
+
\begin{algorithm}[t]
|
| 122 |
+
{\bf Inputs:} feature map ${\bf X}_{L}$ of the $L$-th conv-layer, inference results ${\bf R}_{L+1}$ in the upper conv-layer.\\
|
| 123 |
+
{\bf Outputs:} $\mu_{V},{E}_{V}$ for $\forall V\in\Omega_{L}$.\\
|
| 124 |
+
{\bf Initialization:} $\forall V$, ${E}_{V}\!=\!\{V_{\textrm{dummy}}\}$, a random value for $\mu_{V}^{(0)}$\\
|
| 125 |
+
\For{$iter=1$ to $T$}{
|
| 126 |
+
$\forall V\in\Omega_{L}$, compute $P({\bf p}_{x},V|{\bf R}_{L+1},{\boldsymbol\theta}_{L})$.\\
|
| 127 |
+
\For{$V\in\Omega_{L}$}{
|
| 128 |
+
1) Update $\mu_{V}$ via an EM algorithm,\\
|
| 129 |
+
{\small$\mu_{V}^{(iter)}\!=\!\mu_{V}^{(iter-1)}\!\!+\!\eta\!\!\!\!\!\!\!\sum\limits_{I\in{\bf I},x\in{\bf X}_{L}}\!\!\!\!\!\!\!{\bf\large E}_{P(V|{\bf p}_{x},{\bf R}_{L+1},{\boldsymbol\theta}_{L})}\big[$ $F(x)\cdot\frac{\partial{\log}P({\bf p}_{x},V|{\bf R}_{L+1},{\boldsymbol\theta}_{L})}{\partial\mu_{V}}\big]$}.\\
|
| 130 |
+
2) Select $M$ patterns from $V'\in\Omega_{L+1}$ to construct ${E}_{V}$ based on a greedy strategy, which maximize {\small${\prod}_{I\in{\bf I}}P({\bf X}_{L}|{\bf R}_{L+1},{\boldsymbol\theta}_{L})$}.}}
|
| 131 |
+
\caption{Learning sub-graph in the $L$-th layer}
|
| 132 |
+
\label{alg:main}
|
| 133 |
+
\end{algorithm}
|
| 134 |
+
|
| 135 |
+
As shown in Fig.~\ref{fig:pair}, an intuitive idea is that the relative displacement between $V$ and $V'$ should not change a lot among different images. Let {\small$\mu_{V}\in{\boldsymbol\theta}_{L}$} and {\small$\mu_{V'}\in{\boldsymbol\theta}_{L+1}$} denote the prior positions of $V$ and $V'$, respectively. Then, {\small${\bf p}_{x}-{\bf p}_{V'}$} will approximate to {\small$\mu_{V}-\mu_{V'}$}, if node $V$ can well fit activation entities at ${\bf p}_{x}$. Therefore, given {\small${E}_{V}$} and {\small${\bf R}_{L+1}$}, we assume the spatial relationship between $V$ and $V'$ follows a Gaussian distribution in Eqn.~\ref{eqn:gauss}, where {\small$\mu_{V'\rightarrow V}\!=\!\mu_{V}-\mu_{V'}+{\bf p}_{V'}$} denotes the prior position of $V$ given $V'$. {\small$\sigma_{V'}^2$} denotes the variation, which can be estimated from data\footnote[3]{We can prove that for each $V\in\Omega_{L,d}$, $P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})$ $\propto{\bf\mathcal N}({\bf p}_{x}|\mu_{V}$ $+\Delta_{I,V},\tilde{\sigma}_{V}^2)$, where $\Delta_{I,V}=\sum_{V'\in{E}_{V}}$ $\frac{{\bf p}_{V'}-\mu_{V'}}{\sigma_{V'}^2}$ $/\sum_{V'\in{E}_{V}}\frac{1}{\sigma_{V'}^2}$; $\tilde{\sigma}_{V}^2$ $=1/{\bf E}_{V'\in{E}_{V}}\frac{1}{\sigma_{V'}^2}$. Therefore, we can either directly use $\tilde{\sigma}_{V}^2$ as $\sigma_{V}^2$, or compute the variation of ${\bf p}_{x}-\mu_{V}-\Delta_{I,V}$ \emph{w.r.t.} different images to obtain $\sigma_{V}^2$.}.
|
| 136 |
+
|
| 137 |
+
In this way, the core of learning is to determine an optimal set of neighboring patterns {\small${E}_{V}\in{\boldsymbol\theta}_{L}$} and estimate the prior position {\small$\mu_{V}\in{\boldsymbol\theta}_{L}$}. Note that our method only models the relative displacement {\small$\mu_{V}-\mu_{V'}$}.
|
| 138 |
+
|
| 139 |
+
\begin{figure}[t]
|
| 140 |
+
\centering
|
| 141 |
+
\includegraphics[width=0.8\linewidth]{global.pdf}
|
| 142 |
+
\caption{A four-layer explanatory graph. For clarity, we put all nodes of different filters in the same conv-layer on the same plan and only show 1\% of the nodes with 10\% of their edges from two perspectives.}
|
| 143 |
+
\label{fig:global}
|
| 144 |
+
\end{figure}
|
| 145 |
+
|
| 146 |
+
\begin{figure*}[t]
|
| 147 |
+
\centering
|
| 148 |
+
\includegraphics[width=0.86\linewidth]{patch_large.pdf}
|
| 149 |
+
\caption{Image patches corresponding to different nodes in the explanatory graph.}
|
| 150 |
+
\label{fig:patch}
|
| 151 |
+
\end{figure*}
|
| 152 |
+
|
| 153 |
+
\textbf{Inference of pattern positions:} Given the $d$-th filter's feature map, we simply assign node {\small$V\in\Omega_{L,d}$} with a certain unit {\small$\hat{x}={\arg\!\max}_{x\in{\bf X}_{L}:d_{x}=d}S_{V\rightarrow x}^{I}$} on the feature map as the true inference of $V$, where {\small$S_{V\rightarrow x}^{I}\!=\!F(x)P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})$} denotes the score of assigning $V$ to $x$. Accordingly, {\small${\bf p}_{V'}={\bf p}_{\hat{x}}$} represents the inferred position of $V$. In particular, in Eqn.~(\ref{eqn:prob}), we define {\small${\bf R}_{L+1}\!=\!\{{\bf p}_{V'}\}_{V'\!\in\!\Omega_{L+1}}$}.
|
| 154 |
+
|
| 155 |
+
\textbf{Top-down EM-based Learning:}{\verb| |} For each node $V$, we need to learn the parameter {\small$\mu_{V}\in{\boldsymbol\theta}_{L}$} and a set of patterns in the upper layer that are related to $V$, {\small${E}_{V}\!\in\!{\boldsymbol\theta}_{L}$}. We learn the model in a top-down manner. We first learn nodes in the top-layer of $G$, and then learn for the neighboring lower layer. For the sub-graph in the $L$-th layer, we iteratively estimate parameters of {\small$\mu_{V}$} and {\small${E}_{V}$} for nodes in the sub-graph. We can use the Expectation-Maximization (EM) algorithm for learning. Please see Algorithm~\ref{alg:main} for details.
|
| 156 |
+
|
| 157 |
+
Note that for each pattern $V$ in the top conv-layer, we simply define {\small${E}_{V}\!=\!\{V_{\textrm{dummy}}\}$}, In {\small${\bf R}_{L+1}$}, {\small$\mu_{V_{\textrm{dummy}}}\!=\!{\bf p}_{V_{\textrm{dummy}}}\!=\!{\bf 0}$}. {\small$V_{\textrm{dummy}}$} is a dummy node. Based on Eqns.~(\ref{eqn:prob-full}) and (\ref{eqn:gauss}), we obtain {\small$P({\bf p}_{x}|V,{\bf R}_{L+1},{\boldsymbol\theta}_{L})\!=\!{\bf\mathcal N}({\bf p}_{x}|\mu_{V},\sigma_{V}^2)$}.
|
| 158 |
+
\section{Experiments}
|
| 159 |
+
|
| 160 |
+
\subsection{Overview of experiments}
|
| 161 |
+
\textbf{Four types of CNNs:} To demonstrate the broad applicability of our method, we applied our method to four types of CNNs, \emph{i.e.} the VGG-16~\cite{VGG}, the 50-layer and 152-layer Residual Networks~\cite{ResNet}, and the encoder of the VAE-GAN~\cite{VAEGAN}.
|
| 162 |
+
|
| 163 |
+
\textbf{Three experiments and thirteen baselines:} We designed three experiments to evaluate the explanatory graph. The first experiment is to visualize patterns in the graph. The second experiment is to evaluate the semantic interpretability of the part patterns, \emph{i.e.} checking whether a pattern consistently represents the same object region among different images. We compared our patterns with three types of middle-level features and neural patterns. The third experiment is multi-shot learning for part localization, in order to test the transferability of patterns in the graph. In this experiment, we associated part patterns with explicit part names for part localization. We compared our method with ten baselines.
|
| 164 |
+
|
| 165 |
+
\textbf{Three benchmark datasets:} We built explanatory graphs to describe CNNs learned using a total of 37 animal categories in three datasets: the ILSVRC 2013 DET Animal-Part dataset~\cite{CNNAoG}, the CUB200-2011 dataset~\cite{CUB200}, and the Pascal VOC Part dataset~\cite{SemanticPart}. As discussed in \cite{SemanticPart,CNNAoG}, animals usually contain non-rigid parts, which presents a key challenge for part localization. Thus, we selected animal categories in the three datasets for testing.
|
| 166 |
+
\subsection{Implementation details}
|
| 167 |
+
\begin{figure*}[t]
|
| 168 |
+
\centering
|
| 169 |
+
\includegraphics[width=1.0\linewidth]{heatmap_large_submit.pdf}
|
| 170 |
+
\caption{Heat maps of patterns. We use a heat map to visualize the spatial distribution of the top-50\% patterns in the $L$-th layer of the explanatory graph with the highest inference scores.}
|
| 171 |
+
\label{fig:heatmap}
|
| 172 |
+
\end{figure*}
|
| 173 |
+
|
| 174 |
+
We first trained/fine-tuned a CNN using object images of a category, which were cropped using object bounding boxes. Then, we learned an explanatory graph to represent patterns of the category hidden inside the CNN. We set parameters {\small$\tau\!=\!0.1$}, {\small$M\!=\!15$}, {\small$T\!=\!20$}, and {\small$\beta\!=\!1$}.
|
| 175 |
+
|
| 176 |
+
\textbf{VGG-16:} Given a VGG-16 that was pre-trained using the 1.3M images in the ImageNet dataset~\cite{ImageNet}, we fine-tuned all conv-layers of the VGG-16 using object images in a category. The loss for finetuning was that for classification between the target category and background images. In each VGG-16, there are thirteen conv-layers and three fully connected layers. We selected the ninth, tenth, twelfth, and thirteenth conv-layers of the VGG-16 as four valid conv-layers, and accordingly built a four-layer graph. We extracted {\small$N_{L,d}$} patterns from the $d$-th filter of the $L$-th layer. We set {\small$N_{L=1\,\textrm{or}\,2,d}\!=\!40$} and {\small$N_{L=3\,\textrm{or}\,4,d}\!=\!20$}.
|
| 177 |
+
|
| 178 |
+
\textbf{Residual Networks:} We chose two residual networks, \emph{i.e.} the 50-layer and 152-layer ones. The finetuning process for each network was exactly the same as that for VGG-16. We built a three-layer graph based on each residual network by selecting the last conv-layer with a {\small$28\times28\times128$} feature ouput, the last conv-layer with a {\small$14\times14\times256$} feature map, and the last conv-layer with a {\small$7\times7\times512$} feature map as valid conv-layers. We set {\small$N_{L=1,d}\!=\!40$}, {\small$N_{L=2,d}\!=\!20$}, and {\small$N_{L=3,d}\!=\!10$}.
|
| 179 |
+
|
| 180 |
+
\textbf{VAE-GAN:} For each category, we used the cropped object images in the category to train a VAE-GAN. We learned a three-layer graph based on the three conv-layers of the encoder of the VAE-GAN. We set {\small$N_{L=1,d}\!=\!52$}, {\small$N_{L=2,d}\!=\!26$}, and {\small$N_{L=3,d}\!=\!13$}.
|
| 181 |
+
\subsection{Experiment 1: pattern visualization}
|
| 182 |
+
Given an explanatory graph for a VGG-16 network, we visualize its structure in Fig.~\ref{fig:global}. Part patterns in the graph are visualized in the following three ways.
|
| 183 |
+
|
| 184 |
+
\textbf{Top-ranked patches:} We performed pattern inference on all object images. For each image $I$, we extracted an images patch in the position of {\small${\bf p}_{\hat{x}_{V}}$}\footnote[4]{We projected the unit to the image to compute its position.} with a fixed scale of {\small$70\,pixels\!\times\!70\,pixels$} to represent pattern $V$. Fig.~\ref{fig:patch} shows a pattern's image patches that had highest inference scores.
|
| 185 |
+
|
| 186 |
+
\textbf{Heat maps of patterns:} Given a cropped object image $I$, we used the explanatory graph to infer its patterns on image $I$, and drew heat maps to show the spatial distribution of the inferred patterns. We drew a heat map for each layer $L$ of the graph. Given inference results of patterns in the $L$-th layer, we drew each pattern {\small$V\in\Omega_{L}$} as a weighted Gaussian distribution {\small$\alpha\cdot{\bf\mathcal N}(\mu\!=\!{\bf p}_{V},\sigma_{V}^2)$}\footnotemark[4] on the heat map, where {\small$\alpha\!=\!S_{V\rightarrow\hat{x}}^{I}$}. Please see Fig.~\ref{fig:heatmap} for heat maps of the top-50\% patterns with the highest scores of {\small$S_{V\rightarrow\hat{x}}^{I}$}.
|
| 187 |
+
|
| 188 |
+
\begin{figure}[t]
|
| 189 |
+
\centering
|
| 190 |
+
\includegraphics[width=\linewidth]{reconstruct.pdf}
|
| 191 |
+
\caption{Image synthesis result (right) based on patterns activated on an image (left). The explanatory graph only encodes major part patterns hidden in conv-layers, rather than compress a CNN without information loss. Synthesis results demonstrate that the patterns are automatically learned to represent foreground appearance, and ignore background noises and trivial details of objects.}
|
| 192 |
+
\label{fig:reconstruct}
|
| 193 |
+
\end{figure}
|
| 194 |
+
|
| 195 |
+
\textbf{Pattern-based image synthesis:} We used the up-convolutional network~\cite{FeaVisual} to visualize the learned patterns. Up-convolutional networks were originally trained for image reconstruction. In this study, given an image's feature maps corresponding to the second graph layer, we estimated the appearance of the original image. Given an object image $I$, we used the explanatory graph for pattern inference, \emph{i.e.} assigning each pattern $V$ with a certain neural unit {\small$\hat{x}_{V}$} as its position inference\textcolor{red}{\footnotemark[4]}. We considered the top-10\% patterns with highest scores of {\small$S_{V\rightarrow\hat{x}}^{I}$} as valid ones. We filtered out all neural responses of units, which were not assigned to valid patterns, from feature maps (setting these responses to zero). We then used \cite{FeaVisual} to synthesize the appearance corresponding to the modified feature maps. We regard image synthesis in Fig.~\ref{fig:reconstruct} as the visualization of the inferred patterns.
|
| 196 |
+
|
| 197 |
+
\begin{figure*}[t]
|
| 198 |
+
\centering
|
| 199 |
+
\includegraphics[width=0.95\linewidth]{interpretability_details.pdf}
|
| 200 |
+
\caption{Purity of part semantics. We draw image regions corresponding to each node in an explanatory graph and image regions corresponding to each pattern learned by other methods (we show some examples on the right). We use human users to annotate the semantic purity of each node/pattern. Cyan boxes show inference results that do not describe the common part.}
|
| 201 |
+
\label{fig:interpretability}
|
| 202 |
+
\end{figure*}
|
| 203 |
+
\subsection{Experiment 2: semantic interpretability of patterns}
|
| 204 |
+
In this experiment, we tested whether each pattern in an explanatory graph consistently represented the same object region among different images. We learned four explanatory graphs for a VGG-16 network, two residual networks, and a VAE-GAN that were trained/fine-tuned using the CUB200-2011 dataset~\cite{CUB200}. We used two methods to evaluate the semantic interpretability of patterns, as follows.
|
| 205 |
+
|
| 206 |
+
\textbf{Part interpretability of patterns:} We mainly extracted patterns from high conv-layers, and as discussed in \cite{Interpretability}, high conv-layers contain large-scale part patterns. We were inspired by Zhou \emph{et al.}~\cite{CNNSemanticDeep} and measured the interpretability of part patterns. For the pattern of a given node $V$, we used people to manually evaluate the pattern's interpretability. When we used $V$ to make inferences among all images, we regarded inference results with the top-$K$ inference scores $S_{V}^{I_{i}}$ among all images as valid representations of $V$. We require the $K$ highest inference scores $S_{V}^{I_{i}}$ on images $\{I_1,\ldots,I_{k}\}$ to take about 30\% of the inference energy, \emph{i.e.}{\small$\sum_{i=1}^{K}S_{V}^{I_{i}}=0.3\sum_{i\in{\bf I}}S_{V}^{I}$} (we use this equation to compute $K$). As shown in Fig.\ref{fig:interpretability}, we asked human raters how many inference results among the top $K$ described the same object part, in order to compute the purity of part semantics of pattern $V$.
|
| 207 |
+
|
| 208 |
+
The table in Fig.~\ref{fig:interpretability}(top-left) shows the semantic purity of the patterns in the second layer of the graph. Let the second graph layer correspond to the $L$-th conv-layer with $D$ filters. Like in \cite{CNNSemanticDeep}, the \textit{raw filter maps} baseline used activated neurons in the feature map of a filter to describe a part. The \textit{raw filter peaks} baseline considered the highest peak on a filer's feature map as a part detection. Like our method, the two baselines only visualized top-$K'$ part inferences (the $K'$ feature maps' neural activations took 30\% of activation energies among all images). We back-propagated the center of the receptive field of each neural activation to the image plane and simply used a fixed radius to draw the image region corresponding to each neural activation. Fig.~\ref{fig:interpretability} compares the image region corresponding to each node in the explanatory graph and image regions corresponding to feature maps of each filter. Our graph nodes encoded much more meaningful part representations than raw filters.
|
| 209 |
+
|
| 210 |
+
\begin{figure}[t]
|
| 211 |
+
\centering
|
| 212 |
+
\includegraphics[width=1.0\linewidth]{location_instability.pdf}
|
| 213 |
+
\caption{Notation for the computation of location instability.}
|
| 214 |
+
\label{fig:instability}
|
| 215 |
+
\end{figure}
|
| 216 |
+
|
| 217 |
+
Because the baselines simply averaged the semantic purity among the $D$ filters, for a fair comparison, we also computed average semantic purities using the top-$D$ nodes, each node $V$ having the highest scores of $\sum_{i\in{\bf I}}S_{V}^{I}$.
|
| 218 |
+
|
| 219 |
+
\begin{table}[t]
|
| 220 |
+
\centering
|
| 221 |
+
\resizebox{1.0\linewidth}{!}{\begin{tabular}{l|cccc}
|
| 222 |
+
\hline
|
| 223 |
+
\!\!\!&\!\!\! ResNet-50 \!\!\!&\!\!\! ResNet-152 \!\!\!&\!\!\! VGG-16 \!\!\!& VAE-GAN\!\!\!\\
|
| 224 |
+
Raw filter~\cite{CNNSemanticDeep} & 0.1328 & 0.1346 & 0.1398 & 0.1944\\
|
| 225 |
+
Ours & {\bf0.0848} & {\bf0.0858} & {\bf0.0638} & {\bf0.1066}\\
|
| 226 |
+
\hline{\footnotesize\cite{MiddleLevel}} & \multicolumn{4}{|c}{0.1341}\\
|
| 227 |
+
{\footnotesize\cite{CNNSemanticPart}} & \multicolumn{4}{|c}{0.2291}\\
|
| 228 |
+
\hline
|
| 229 |
+
\end{tabular}}
|
| 230 |
+
\caption{Location instability of patterns.}
|
| 231 |
+
\label{tab:stability}
|
| 232 |
+
\end{table}
|
| 233 |
+
|
| 234 |
+
\begin{figure}[t]
|
| 235 |
+
\centering
|
| 236 |
+
\includegraphics[width=0.9\linewidth]{hybird.pdf}
|
| 237 |
+
\caption{And-Or graph for semantic object parts. The AOG encodes a four-layer hierarchy for each semantic part, \emph{i.e.} the semantic part (OR node), part templates (AND node), latent part patterns (OR nodes, those from the explanatory graph), and neural units (terminal nodes). In the AOG, the OR node of semantic part contains a number of alternative appearance candidates as children. Each OR node of a latent part pattern encodes a list of neural units as alternative deformation candidates. Each AND node (\emph{e.g.} a part template) uses a number of latent part patterns to describe its compositional regions.}
|
| 238 |
+
\label{fig:hybrid}
|
| 239 |
+
\end{figure}
|
| 240 |
+
|
| 241 |
+
\textbf{Location instability of inference positions:} We also defined the location instability of inference positions for each pattern as an alternative evaluation of pattern interpretability. We assumed that if a pattern was always triggered by the same object part through different images, then the distance between the pattern's inference position and a ground-truth landmark of the object part should not change a lot among various images.
|
| 242 |
+
|
| 243 |
+
As shown in Fig.~\ref{fig:instability}, for each testing image $I$, we computed the distances between the inferred position of $V$ and ground-truth landmark positions of \textit{head}, \textit{back}, and \textit{tail} parts, denoted by {\small$d_{I}^{\textrm{head}}$}, {\small$d_{I}^{\textrm{back}}$}, and {\small$d_{I}^{\textrm{tail}}$}. We normalized these distances by the diagonal length of input images. Then, we computed {\small$(\sqrt{var(d_{I}^{\textrm{head}})}+\sqrt{var(d_{I}^{\textrm{back}})}+\sqrt{var(d_{I}^{\textrm{tail}})})/3$} as the location instability of the node for evaluation, where {\small$var(d_{I}^{\textrm{head}})$} denotes the variation of {\small$d_{I}^{\textrm{head}}$} among different images.
|
| 244 |
+
|
| 245 |
+
Given an explanatory graph, we compared its location instability with three baselines. In the first baseline, we treated each filter in a CNN as a detector of a certain pattern. Thus, given the feature map of a filter (after the ReLu operation), we used the method of \cite{CNNSemanticDeep} to localize the unit with the highest response value as the pattern position. The other two baselines were typical methods to extract middle-level features from images~\cite{MiddleLevel} and extract patterns from CNNs~\cite{CNNSemanticPart}, respectively. For each baseline, we chose the top-500 patterns (\emph{i.e.} 500 nodes with top scores in our explanatory graph, 500 filters with strongest activations in the CNN, and the top-500 middle-level features). For each pattern, we selected position inferences on the top-20 images with highest scores to compute the instability of its inferred positions. Table~\ref{tab:stability} compares the location instability of the patterns learned by different baselines, and our method exhibited significantly lower location instability.
|
| 246 |
+
\subsection{Experiment 3: multi-shot part localization}
|
| 247 |
+
\begin{table}[t]
|
| 248 |
+
\centering
|
| 249 |
+
\resizebox{0.9\linewidth}{!}{\begin{tabular}{c|lcc}
|
| 250 |
+
\hline
|
| 251 |
+
&\multicolumn{2}{r}{Method$\qquad$obj.-box fine-tune}&\\
|
| 252 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{no-RL}}
|
| 253 |
+
&{\small SS-DPM-Part~\cite{SSDPM}} & {N}
|
| 254 |
+
&{\small0.3469}
|
| 255 |
+
\\
|
| 256 |
+
&{\small PL-DPM-Part~\cite{PLDPM}} & {N}
|
| 257 |
+
&{\small0.3412}
|
| 258 |
+
\\
|
| 259 |
+
&{\small Part-Graph~\cite{SemanticPart}} & {N}
|
| 260 |
+
&{\small0.4889}
|
| 261 |
+
\\
|
| 262 |
+
\hline
|
| 263 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{\scriptsize unsup\textcolor{red}{\footnotemark[5]}-RL}}
|
| 264 |
+
&{\small CNN-PDD~\cite{CNNSemanticPart}} & {N}
|
| 265 |
+
&{\small0.2333}
|
| 266 |
+
\\
|
| 267 |
+
&{\small CNN-PDD-ft~\cite{CNNSemanticPart}} & {Y}
|
| 268 |
+
&{\small0.3269}
|
| 269 |
+
\\
|
| 270 |
+
&{\small\bf Ours} & {Y}
|
| 271 |
+
&{\small\bf 0.0862}
|
| 272 |
+
\\
|
| 273 |
+
\hline
|
| 274 |
+
\multirow{4}{*}{\rotatebox[origin=c]{90}{sup-RL}}
|
| 275 |
+
&{\small fc7+linearSVM} & {Y}
|
| 276 |
+
&{\small0.3120}
|
| 277 |
+
\\
|
| 278 |
+
&{\small fc7+sp+linearSVM} & {Y}
|
| 279 |
+
&{\small0.3120}
|
| 280 |
+
\\
|
| 281 |
+
&{\small Fast-RCNN (1 ft)~\cite{FastRCNN}} & {N}
|
| 282 |
+
&{\small0.4517}
|
| 283 |
+
\\
|
| 284 |
+
&{\small Fast-RCNN (2 fts)~\cite{FastRCNN}} & {Y}
|
| 285 |
+
&{\small0.4131}
|
| 286 |
+
\\
|
| 287 |
+
\hline
|
| 288 |
+
\end{tabular}}
|
| 289 |
+
\caption{Normalized distance of part localization on the CUB200-2011 dataset~\cite{CUB200}. The second column indicates whether the baseline used all object-box annotations in the category to fine-tune a CNN.}
|
| 290 |
+
\label{tab:CUB}
|
| 291 |
+
\end{table}
|
| 292 |
+
|
| 293 |
+
|
| 294 |
+
\begin{table*}[t]
|
| 295 |
+
\centering
|
| 296 |
+
\resizebox{0.75\linewidth}{!}{\begin{tabular}{c|l|c|ccccccc}
|
| 297 |
+
\hline
|
| 298 |
+
&\multicolumn{2}{r|}{$\qquad\qquad$obj.-box fine-tune}& bird & cat & cow & dog & horse & sheep & \textcolor{blue}{\bf\large Avg.}\\
|
| 299 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{no-RL}}
|
| 300 |
+
&{\small SS-DPM-Part~\cite{SSDPM}} \!&\! {N}
|
| 301 |
+
&{\small0.356}
|
| 302 |
+
&{\small0.270}
|
| 303 |
+
&{\small0.264}
|
| 304 |
+
&{\small0.242}
|
| 305 |
+
&{\small0.262}
|
| 306 |
+
&{\small0.286}
|
| 307 |
+
&\textcolor{blue}{\small0.280}
|
| 308 |
+
\\
|
| 309 |
+
&{\small PL-DPM-Part~\cite{PLDPM}} \!&\! {N}
|
| 310 |
+
&{\small0.294}
|
| 311 |
+
&{\small0.328}
|
| 312 |
+
&{\small0.282}
|
| 313 |
+
&{\small0.312}
|
| 314 |
+
&{\small0.321}
|
| 315 |
+
&{\small0.840}
|
| 316 |
+
&\textcolor{blue}{\small0.396}
|
| 317 |
+
\\
|
| 318 |
+
&{\small Part-Graph~\cite{SemanticPart}} \!&\! {N}
|
| 319 |
+
&{\small0.360}
|
| 320 |
+
&{\small0.208}
|
| 321 |
+
&{\small0.263}
|
| 322 |
+
&{\small0.205}
|
| 323 |
+
&{\small0.386}
|
| 324 |
+
&{\small0.500}
|
| 325 |
+
&\textcolor{blue}{\small0.320}
|
| 326 |
+
\\
|
| 327 |
+
\cline{1-3}
|
| 328 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{\scriptsize unsup\textcolor{red}{\footnotemark[5]}-RL}}
|
| 329 |
+
&{\small CNN-PDD~\cite{CNNSemanticPart}} \!&\! {N}
|
| 330 |
+
&{\small0.301}
|
| 331 |
+
&{\small0.246}
|
| 332 |
+
&{\small0.220}
|
| 333 |
+
&{\small0.248}
|
| 334 |
+
&{\small0.292}
|
| 335 |
+
&{\small0.254}
|
| 336 |
+
&\textcolor{blue}{\small0.260}
|
| 337 |
+
\\
|
| 338 |
+
&{\small CNN-PDD-ft~\cite{CNNSemanticPart}} \!&\! {Y}
|
| 339 |
+
&{\small0.358}
|
| 340 |
+
&{\small0.268}
|
| 341 |
+
&{\small0.220}
|
| 342 |
+
&{\small0.200}
|
| 343 |
+
&{\small0.302}
|
| 344 |
+
&{\small0.269}
|
| 345 |
+
&\textcolor{blue}{\small0.269}
|
| 346 |
+
\\
|
| 347 |
+
&{\small\bf Ours} \!&\! {Y}
|
| 348 |
+
&{\small\bf 0.162}
|
| 349 |
+
&{\small\bf 0.130}
|
| 350 |
+
&{\small0.258}
|
| 351 |
+
&{\small\bf 0.137}
|
| 352 |
+
&{\small\bf 0.181}
|
| 353 |
+
&{\small\bf 0.192}
|
| 354 |
+
&\textcolor{blue}{\small\bf 0.177}
|
| 355 |
+
\\
|
| 356 |
+
\cline{1-3}
|
| 357 |
+
\multirow{4}{*}{\rotatebox[origin=c]{90}{sup-RL}}
|
| 358 |
+
&{\small fc7+linearSVM} \!&\! {Y}
|
| 359 |
+
&{\small0.247}
|
| 360 |
+
&{\small0.174}
|
| 361 |
+
&{\small0.251}
|
| 362 |
+
&{\small0.217}
|
| 363 |
+
&{\small0.261}
|
| 364 |
+
&{\small0.317}
|
| 365 |
+
&\textcolor{blue}{\small0.244}
|
| 366 |
+
\\
|
| 367 |
+
&{\small fc7+sp+linearSVM} \!&\! {Y}
|
| 368 |
+
&{\small0.247}
|
| 369 |
+
&{\small0.174}
|
| 370 |
+
&{\small\bf 0.249}
|
| 371 |
+
&{\small0.217}
|
| 372 |
+
&{\small0.261}
|
| 373 |
+
&{\small0.317}
|
| 374 |
+
&\textcolor{blue}{\small0.244}
|
| 375 |
+
\\
|
| 376 |
+
&{\small Fast-RCNN (1 ft)~\cite{FastRCNN}} \!&\! {N}
|
| 377 |
+
&{\small0.324}
|
| 378 |
+
&{\small0.324}
|
| 379 |
+
&{\small0.325}
|
| 380 |
+
&{\small0.272}
|
| 381 |
+
&{\small0.347}
|
| 382 |
+
&{\small0.314}
|
| 383 |
+
&\textcolor{blue}{\small0.318}
|
| 384 |
+
\\
|
| 385 |
+
&{\small Fast-RCNN (2 fts)~\cite{FastRCNN}} \!&\! {Y}
|
| 386 |
+
&{\small0.350}
|
| 387 |
+
&{\small0.295}
|
| 388 |
+
&{\small0.255}
|
| 389 |
+
&{\small0.293}
|
| 390 |
+
&{\small0.367}
|
| 391 |
+
&{\small0.260}
|
| 392 |
+
&\textcolor{blue}{\small0.303}
|
| 393 |
+
\\
|
| 394 |
+
\hline
|
| 395 |
+
\end{tabular}}
|
| 396 |
+
\caption{Normalized distance of part localization on the Pascal VOC Part dataset~\cite{SemanticPart}. The second column indicates whether the baseline used all object-box annotations in the category to fine-tune a CNN.}
|
| 397 |
+
\label{tab:VOC}
|
| 398 |
+
\centering
|
| 399 |
+
\resizebox{0.95\linewidth}{!}{\begin{tabular}{c|l|c|cccccccccccccccc}
|
| 400 |
+
\hline
|
| 401 |
+
&\multicolumn{2}{r|}{$\qquad\qquad$obj.-box fine-tune} \!\!&\!\! gold. \!\!&\!\! bird \!\!&\!\! frog \!\!&\!\! turt. \!\!&\!\! liza. \!\!&\!\! koala \!\!&\!\! lobs. \!\!&\!\! dog \!\!&\!\! fox \!\!&\!\! cat \!\!&\!\! lion \!\!&\!\! tiger \!\!&\!\! bear \!\!&\!\! rabb. \!\!&\!\! hams. \!\!&\!\! squi.\\
|
| 402 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{no-RL}}&
|
| 403 |
+
\!\!\! {\small SS-DPM-Part} \!\!\!&\!\!\! {N}
|
| 404 |
+
\!\!\!&\!\!\!{\small0.297}
|
| 405 |
+
\!\!\!&\!\!\!{\small0.280}
|
| 406 |
+
\!\!\!&\!\!\!{\small0.257}
|
| 407 |
+
\!\!\!&\!\!\!{\small0.255}
|
| 408 |
+
\!\!\!&\!\!\!{\small0.317}
|
| 409 |
+
\!\!\!&\!\!\!{\small0.222}
|
| 410 |
+
\!\!\!&\!\!\!{\small0.207}
|
| 411 |
+
\!\!\!&\!\!\!{\small0.239}
|
| 412 |
+
\!\!\!&\!\!\!{\small0.305}
|
| 413 |
+
\!\!\!&\!\!\!{\small0.308}
|
| 414 |
+
\!\!\!&\!\!\!{\small0.238}
|
| 415 |
+
\!\!\!&\!\!\!{\small0.144}
|
| 416 |
+
\!\!\!&\!\!\!{\small0.260}
|
| 417 |
+
\!\!\!&\!\!\!{\small0.272}
|
| 418 |
+
\!\!\!&\!\!\!{\small0.178}
|
| 419 |
+
\!\!\!&\!\!\!{\small0.261}
|
| 420 |
+
\\
|
| 421 |
+
&\!\!\! {\small PL-DPM-Part} \!\!\!&\!\!\! {N}
|
| 422 |
+
\!\!\!&\!\!\!{\small0.273}
|
| 423 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 424 |
+
\!\!\!&\!\!\!{\small0.271}
|
| 425 |
+
\!\!\!&\!\!\!{\small0.321}
|
| 426 |
+
\!\!\!&\!\!\!{\small0.327}
|
| 427 |
+
\!\!\!&\!\!\!{\small0.242}
|
| 428 |
+
\!\!\!&\!\!\!{\small0.194}
|
| 429 |
+
\!\!\!&\!\!\!{\small0.238}
|
| 430 |
+
\!\!\!&\!\!\!{\small0.619}
|
| 431 |
+
\!\!\!&\!\!\!{\small0.215}
|
| 432 |
+
\!\!\!&\!\!\!{\small0.239}
|
| 433 |
+
\!\!\!&\!\!\!{\small0.136}
|
| 434 |
+
\!\!\!&\!\!\!{\small0.323}
|
| 435 |
+
\!\!\!&\!\!\!{\small0.228}
|
| 436 |
+
\!\!\!&\!\!\!{\small0.186}
|
| 437 |
+
\!\!\!&\!\!\!{\small0.281}
|
| 438 |
+
\\
|
| 439 |
+
&\!\!\! {\small Part-Graph} \!\!\!&\!\!\! {N}
|
| 440 |
+
\!\!\!&\!\!\!{\small0.363}
|
| 441 |
+
\!\!\!&\!\!\!{\small0.316}
|
| 442 |
+
\!\!\!&\!\!\!{\small0.241}
|
| 443 |
+
\!\!\!&\!\!\!{\small0.322}
|
| 444 |
+
\!\!\!&\!\!\!{\small0.419}
|
| 445 |
+
\!\!\!&\!\!\!{\small0.205}
|
| 446 |
+
\!\!\!&\!\!\!{\small0.218}
|
| 447 |
+
\!\!\!&\!\!\!{\small0.218}
|
| 448 |
+
\!\!\!&\!\!\!{\small0.343}
|
| 449 |
+
\!\!\!&\!\!\!{\small0.242}
|
| 450 |
+
\!\!\!&\!\!\!{\small0.162}
|
| 451 |
+
\!\!\!&\!\!\!{\small0.127}
|
| 452 |
+
\!\!\!&\!\!\!{\small0.224}
|
| 453 |
+
\!\!\!&\!\!\!{\small0.188}
|
| 454 |
+
\!\!\!&\!\!\!{\small0.131}
|
| 455 |
+
\!\!\!&\!\!\!{\small0.208}
|
| 456 |
+
\\
|
| 457 |
+
\cline{1-3}
|
| 458 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{\scriptsize unsup\textcolor{red}{\footnotemark[5]}-RL}}
|
| 459 |
+
&\!\!\! {\small CNN-PDD} \!\!\!&\!\!\! {N}
|
| 460 |
+
\!\!\!&\!\!\!{\small0.316}
|
| 461 |
+
\!\!\!&\!\!\!{\small0.289}
|
| 462 |
+
\!\!\!&\!\!\!{\small0.229}
|
| 463 |
+
\!\!\!&\!\!\!{\small0.260}
|
| 464 |
+
\!\!\!&\!\!\!{\small0.335}
|
| 465 |
+
\!\!\!&\!\!\!{\small0.163}
|
| 466 |
+
\!\!\!&\!\!\!{\small0.190}
|
| 467 |
+
\!\!\!&\!\!\!{\small0.220}
|
| 468 |
+
\!\!\!&\!\!\!{\small0.212}
|
| 469 |
+
\!\!\!&\!\!\!{\small0.196}
|
| 470 |
+
\!\!\!&\!\!\!{\small0.174}
|
| 471 |
+
\!\!\!&\!\!\!{\small0.160}
|
| 472 |
+
\!\!\!&\!\!\!{\small0.223}
|
| 473 |
+
\!\!\!&\!\!\!{\small0.266}
|
| 474 |
+
\!\!\!&\!\!\!{\small0.156}
|
| 475 |
+
\!\!\!&\!\!\!{\small0.291}
|
| 476 |
+
\\
|
| 477 |
+
&\!\!\! {\small CNN-PDD-ft} \!\!\!&\!\!\! {Y}
|
| 478 |
+
\!\!\!&\!\!\!{\small0.302}
|
| 479 |
+
\!\!\!&\!\!\!{\small0.236}
|
| 480 |
+
\!\!\!&\!\!\!{\small0.261}
|
| 481 |
+
\!\!\!&\!\!\!{\small0.231}
|
| 482 |
+
\!\!\!&\!\!\!{\small0.350}
|
| 483 |
+
\!\!\!&\!\!\!{\small0.168}
|
| 484 |
+
\!\!\!&\!\!\!{\small0.170}
|
| 485 |
+
\!\!\!&\!\!\!{\small0.177}
|
| 486 |
+
\!\!\!&\!\!\!{\small0.264}
|
| 487 |
+
\!\!\!&\!\!\!{\small0.270}
|
| 488 |
+
\!\!\!&\!\!\!{\small0.206}
|
| 489 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 490 |
+
\!\!\!&\!\!\!{\small0.178}
|
| 491 |
+
\!\!\!&\!\!\!{\small0.167}
|
| 492 |
+
\!\!\!&\!\!\!{\small0.286}
|
| 493 |
+
\!\!\!&\!\!\!{\small0.237}
|
| 494 |
+
\\
|
| 495 |
+
&\!\!\! {\small\bf Ours} \!\!\!&\!\!\! {Y}
|
| 496 |
+
\!\!\!&\!\!\!{\small\bf 0.090}
|
| 497 |
+
\!\!\!&\!\!\!{\small\bf 0.091}
|
| 498 |
+
\!\!\!&\!\!\!{\small\bf 0.095}
|
| 499 |
+
\!\!\!&\!\!\!{\small 0.167}
|
| 500 |
+
\!\!\!&\!\!\!{\small\bf 0.124}
|
| 501 |
+
\!\!\!&\!\!\!{\small\bf 0.084}
|
| 502 |
+
\!\!\!&\!\!\!{\small\bf 0.155}
|
| 503 |
+
\!\!\!&\!\!\!{\small 0.147}
|
| 504 |
+
\!\!\!&\!\!\!{\small\bf 0.081}
|
| 505 |
+
\!\!\!&\!\!\!{\small\bf 0.129}
|
| 506 |
+
\!\!\!&\!\!\!{\small\bf 0.074}
|
| 507 |
+
\!\!\!&\!\!\!{\small\bf 0.102}
|
| 508 |
+
\!\!\!&\!\!\!{\small\bf 0.121}
|
| 509 |
+
\!\!\!&\!\!\!{\small\bf 0.087}
|
| 510 |
+
\!\!\!&\!\!\!{\small\bf 0.097}
|
| 511 |
+
\!\!\!&\!\!\!{\small\bf 0.095}
|
| 512 |
+
\\
|
| 513 |
+
\cline{1-3}
|
| 514 |
+
\multirow{4}{*}{\rotatebox[origin=c]{90}{sup-RL}}
|
| 515 |
+
&\!\!\! {\small fc7+linearSVM} \!\!\!&\!\!\! {Y}
|
| 516 |
+
\!\!\!&\!\!\!{\small0.150}
|
| 517 |
+
\!\!\!&\!\!\!{\small0.318}
|
| 518 |
+
\!\!\!&\!\!\!{\small0.186}
|
| 519 |
+
\!\!\!&\!\!\!{\small0.150}
|
| 520 |
+
\!\!\!&\!\!\!{\small0.257}
|
| 521 |
+
\!\!\!&\!\!\!{\small0.156}
|
| 522 |
+
\!\!\!&\!\!\!{\small0.196}
|
| 523 |
+
\!\!\!&\!\!\!{\small0.136}
|
| 524 |
+
\!\!\!&\!\!\!{\small0.101}
|
| 525 |
+
\!\!\!&\!\!\!{\small0.138}
|
| 526 |
+
\!\!\!&\!\!\!{\small0.132}
|
| 527 |
+
\!\!\!&\!\!\!{\small0.163}
|
| 528 |
+
\!\!\!&\!\!\!{\small0.122}
|
| 529 |
+
\!\!\!&\!\!\!{\small0.139}
|
| 530 |
+
\!\!\!&\!\!\!{\small0.110}
|
| 531 |
+
\!\!\!&\!\!\!{\small0.262}
|
| 532 |
+
\\
|
| 533 |
+
&\!\!\! {\small fc7+sp+linearSVM} \!\!\!&\!\!\! {Y}
|
| 534 |
+
\!\!\!&\!\!\!{\small0.150}
|
| 535 |
+
\!\!\!&\!\!\!{\small0.318}
|
| 536 |
+
\!\!\!&\!\!\!{\small0.186}
|
| 537 |
+
\!\!\!&\!\!\!{\small\bf 0.150}
|
| 538 |
+
\!\!\!&\!\!\!{\small0.254}
|
| 539 |
+
\!\!\!&\!\!\!{\small0.156}
|
| 540 |
+
\!\!\!&\!\!\!{\small0.196}
|
| 541 |
+
\!\!\!&\!\!\!{\small\bf 0.136}
|
| 542 |
+
\!\!\!&\!\!\!{\small0.101}
|
| 543 |
+
\!\!\!&\!\!\!{\small0.138}
|
| 544 |
+
\!\!\!&\!\!\!{\small0.132}
|
| 545 |
+
\!\!\!&\!\!\!{\small0.163}
|
| 546 |
+
\!\!\!&\!\!\!{\small0.122}
|
| 547 |
+
\!\!\!&\!\!\!{\small0.139}
|
| 548 |
+
\!\!\!&\!\!\!{\small0.110}
|
| 549 |
+
\!\!\!&\!\!\!{\small0.262}
|
| 550 |
+
\\
|
| 551 |
+
&\!\!\! {\small Fast-RCNN (1 ft)} \!\!\!&\!\!\! {N}
|
| 552 |
+
\!\!\!&\!\!\!{\small0.261}
|
| 553 |
+
\!\!\!&\!\!\!{\small0.365}
|
| 554 |
+
\!\!\!&\!\!\!{\small0.265}
|
| 555 |
+
\!\!\!&\!\!\!{\small0.310}
|
| 556 |
+
\!\!\!&\!\!\!{\small0.353}
|
| 557 |
+
\!\!\!&\!\!\!{\small0.365}
|
| 558 |
+
\!\!\!&\!\!\!{\small0.289}
|
| 559 |
+
\!\!\!&\!\!\!{\small0.363}
|
| 560 |
+
\!\!\!&\!\!\!{\small0.255}
|
| 561 |
+
\!\!\!&\!\!\!{\small0.319}
|
| 562 |
+
\!\!\!&\!\!\!{\small0.251}
|
| 563 |
+
\!\!\!&\!\!\!{\small0.260}
|
| 564 |
+
\!\!\!&\!\!\!{\small0.317}
|
| 565 |
+
\!\!\!&\!\!\!{\small0.255}
|
| 566 |
+
\!\!\!&\!\!\!{\small0.255}
|
| 567 |
+
\!\!\!&\!\!\!{\small0.169}
|
| 568 |
+
\\
|
| 569 |
+
&\!\!\! {\small Fast-RCNN (2 fts)} \!\!\!&\!\!\! {Y}
|
| 570 |
+
\!\!\!&\!\!\!{\small0.340}
|
| 571 |
+
\!\!\!&\!\!\!{\small0.351}
|
| 572 |
+
\!\!\!&\!\!\!{\small0.388}
|
| 573 |
+
\!\!\!&\!\!\!{\small0.327}
|
| 574 |
+
\!\!\!&\!\!\!{\small0.411}
|
| 575 |
+
\!\!\!&\!\!\!{\small0.119}
|
| 576 |
+
\!\!\!&\!\!\!{\small0.330}
|
| 577 |
+
\!\!\!&\!\!\!{\small0.368}
|
| 578 |
+
\!\!\!&\!\!\!{\small0.206}
|
| 579 |
+
\!\!\!&\!\!\!{\small0.170}
|
| 580 |
+
\!\!\!&\!\!\!{\small0.144}
|
| 581 |
+
\!\!\!&\!\!\!{\small0.160}
|
| 582 |
+
\!\!\!&\!\!\!{\small0.230}
|
| 583 |
+
\!\!\!&\!\!\!{\small0.230}
|
| 584 |
+
\!\!\!&\!\!\!{\small0.178}
|
| 585 |
+
\!\!\!&\!\!\!{\small0.205}
|
| 586 |
+
\\
|
| 587 |
+
\hline
|
| 588 |
+
&\!\!\!&\!\!\!&\!\!\! horse \!\!\!&\!\!\! zebra \!\!\!&\!\!\! swine \!\!\!&\!\!\! hippo \!\!\!&\!\!\! catt. \!\!\!&\!\!\! sheep \!\!\!&\!\!\! ante. \!\!\!&\!\!\! camel \!\!\!&\!\!\! otter \!\!\!&\!\!\! arma. \!\!\!&\!\!\! monk. \!\!\!&\!\!\! elep. \!\!\!&\!\!\! red pa. \!\!\!&\!\!\! gia.pa. \!\!\!&\!\!\! \!\!\!&\!\!\! \textcolor{blue}{\bf\large Avg.}\\
|
| 589 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{no-RL}}
|
| 590 |
+
&\!\!\! {\small SS-DPM-Part} \!\!\!&\!\!\! {N}
|
| 591 |
+
\!\!\!&\!\!\!{\small0.246}
|
| 592 |
+
\!\!\!&\!\!\!{\small\bf 0.206}
|
| 593 |
+
\!\!\!&\!\!\!{\small0.240}
|
| 594 |
+
\!\!\!&\!\!\!{\small0.234}
|
| 595 |
+
\!\!\!&\!\!\!{\small0.246}
|
| 596 |
+
\!\!\!&\!\!\!{\small0.205}
|
| 597 |
+
\!\!\!&\!\!\!{\small0.224}
|
| 598 |
+
\!\!\!&\!\!\!{\small0.277}
|
| 599 |
+
\!\!\!&\!\!\!{\small0.253}
|
| 600 |
+
\!\!\!&\!\!\!{\small0.283}
|
| 601 |
+
\!\!\!&\!\!\!{\small0.206}
|
| 602 |
+
\!\!\!&\!\!\!{\small0.219}
|
| 603 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 604 |
+
\!\!\!&\!\!\!{\small0.129}
|
| 605 |
+
\!\!\!&\!\!\!
|
| 606 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.242}}
|
| 607 |
+
\\
|
| 608 |
+
&\!\!\! {\small PL-DPM-Part} \!\!\!&\!\!\! {N}
|
| 609 |
+
\!\!\!&\!\!\!{\small0.322}
|
| 610 |
+
\!\!\!&\!\!\!{\small0.267}
|
| 611 |
+
\!\!\!&\!\!\!{\small0.297}
|
| 612 |
+
\!\!\!&\!\!\!{\small0.273}
|
| 613 |
+
\!\!\!&\!\!\!{\small0.271}
|
| 614 |
+
\!\!\!&\!\!\!{\small0.413}
|
| 615 |
+
\!\!\!&\!\!\!{\small0.337}
|
| 616 |
+
\!\!\!&\!\!\!{\small0.261}
|
| 617 |
+
\!\!\!&\!\!\!{\small0.286}
|
| 618 |
+
\!\!\!&\!\!\!{\small0.295}
|
| 619 |
+
\!\!\!&\!\!\!{\small0.187}
|
| 620 |
+
\!\!\!&\!\!\!{\small0.264}
|
| 621 |
+
\!\!\!&\!\!\!{\small0.204}
|
| 622 |
+
\!\!\!&\!\!\!{\small0.505}
|
| 623 |
+
\!\!\!&\!\!\!
|
| 624 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.284}}
|
| 625 |
+
\\
|
| 626 |
+
&\!\!\! {\small Part-Graph} \!\!\!&\!\!\! {N}
|
| 627 |
+
\!\!\!&\!\!\!{\small0.296}
|
| 628 |
+
\!\!\!&\!\!\!{\small0.315}
|
| 629 |
+
\!\!\!&\!\!\!{\small0.306}
|
| 630 |
+
\!\!\!&\!\!\!{\small0.378}
|
| 631 |
+
\!\!\!&\!\!\!{\small0.333}
|
| 632 |
+
\!\!\!&\!\!\!{\small0.230}
|
| 633 |
+
\!\!\!&\!\!\!{\small0.216}
|
| 634 |
+
\!\!\!&\!\!\!{\small0.317}
|
| 635 |
+
\!\!\!&\!\!\!{\small0.227}
|
| 636 |
+
\!\!\!&\!\!\!{\small0.341}
|
| 637 |
+
\!\!\!&\!\!\!{\small0.159}
|
| 638 |
+
\!\!\!&\!\!\!{\small0.294}
|
| 639 |
+
\!\!\!&\!\!\!{\small0.276}
|
| 640 |
+
\!\!\!&\!\!\!{\small0.094}
|
| 641 |
+
\!\!\!&\!\!\!
|
| 642 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.257}}
|
| 643 |
+
\\
|
| 644 |
+
\cline{1-3}
|
| 645 |
+
\multirow{3}{*}{\rotatebox[origin=c]{90}{\scriptsize unsup\textcolor{red}{\footnotemark[5]}-RL}}
|
| 646 |
+
&\!\!\! {\small CNN-PDD} \!\!\!&\!\!\! {N}
|
| 647 |
+
\!\!\!&\!\!\!{\small0.261}
|
| 648 |
+
\!\!\!&\!\!\!{\small0.266}
|
| 649 |
+
\!\!\!&\!\!\!{\small\bf 0.189}
|
| 650 |
+
\!\!\!&\!\!\!{\small0.192}
|
| 651 |
+
\!\!\!&\!\!\!{\small0.201}
|
| 652 |
+
\!\!\!&\!\!\!{\small0.244}
|
| 653 |
+
\!\!\!&\!\!\!{\small0.208}
|
| 654 |
+
\!\!\!&\!\!\!{\small0.193}
|
| 655 |
+
\!\!\!&\!\!\!{\small0.174}
|
| 656 |
+
\!\!\!&\!\!\!{\small0.299}
|
| 657 |
+
\!\!\!&\!\!\!{\small0.236}
|
| 658 |
+
\!\!\!&\!\!\!{\small0.214}
|
| 659 |
+
\!\!\!&\!\!\!{\small0.222}
|
| 660 |
+
\!\!\!&\!\!\!{\small0.179}
|
| 661 |
+
\!\!\!&\!\!\!
|
| 662 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.225}}
|
| 663 |
+
\\
|
| 664 |
+
&\!\!\! {\small CNN-PDD-ft} \!\!\!&\!\!\! {Y}
|
| 665 |
+
\!\!\!&\!\!\!{\small0.310}
|
| 666 |
+
\!\!\!&\!\!\!{\small0.321}
|
| 667 |
+
\!\!\!&\!\!\!{\small0.216}
|
| 668 |
+
\!\!\!&\!\!\!{\small0.257}
|
| 669 |
+
\!\!\!&\!\!\!{\small0.220}
|
| 670 |
+
\!\!\!&\!\!\!{\small0.179}
|
| 671 |
+
\!\!\!&\!\!\!{\small0.229}
|
| 672 |
+
\!\!\!&\!\!\!{\small0.253}
|
| 673 |
+
\!\!\!&\!\!\!{\small0.198}
|
| 674 |
+
\!\!\!&\!\!\!{\small0.308}
|
| 675 |
+
\!\!\!&\!\!\!{\small0.273}
|
| 676 |
+
\!\!\!&\!\!\!{\small0.189}
|
| 677 |
+
\!\!\!&\!\!\!{\small0.208}
|
| 678 |
+
\!\!\!&\!\!\!{\small0.275}
|
| 679 |
+
\!\!\!&\!\!\!
|
| 680 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.240}}
|
| 681 |
+
\\
|
| 682 |
+
&\!\!\! {\small\bf Ours} \!\!\!&\!\!\! {Y}
|
| 683 |
+
\!\!\!&\!\!\!{\small\bf 0.189}
|
| 684 |
+
\!\!\!&\!\!\!{\small 0.212}
|
| 685 |
+
\!\!\!&\!\!\!{\small 0.212}
|
| 686 |
+
\!\!\!&\!\!\!{\small 0.151}
|
| 687 |
+
\!\!\!&\!\!\!{\small\bf 0.185}
|
| 688 |
+
\!\!\!&\!\!\!{\small\bf 0.124}
|
| 689 |
+
\!\!\!&\!\!\!{\small\bf 0.093}
|
| 690 |
+
\!\!\!&\!\!\!{\small\bf 0.120}
|
| 691 |
+
\!\!\!&\!\!\!{\small\bf 0.102}
|
| 692 |
+
\!\!\!&\!\!\!{\small\bf 0.188}
|
| 693 |
+
\!\!\!&\!\!\!{\small\bf 0.086}
|
| 694 |
+
\!\!\!&\!\!\!{\small 0.174}
|
| 695 |
+
\!\!\!&\!\!\!{\small\bf 0.104}
|
| 696 |
+
\!\!\!&\!\!\!{\small\bf 0.073}
|
| 697 |
+
\!\!\!&\!\!\!
|
| 698 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{\bf 0.125}}
|
| 699 |
+
\\
|
| 700 |
+
\cline{1-3}
|
| 701 |
+
\multirow{4}{*}{\rotatebox[origin=c]{90}{sup-RL}}
|
| 702 |
+
&\!\!\! {\small fc7+linearSVM} \!\!\!&\!\!\! {Y}
|
| 703 |
+
\!\!\!&\!\!\!{\small0.205}
|
| 704 |
+
\!\!\!&\!\!\!{\small0.258}
|
| 705 |
+
\!\!\!&\!\!\!{\small0.201}
|
| 706 |
+
\!\!\!&\!\!\!{\small0.140}
|
| 707 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 708 |
+
\!\!\!&\!\!\!{\small0.236}
|
| 709 |
+
\!\!\!&\!\!\!{\small0.164}
|
| 710 |
+
\!\!\!&\!\!\!{\small0.190}
|
| 711 |
+
\!\!\!&\!\!\!{\small0.140}
|
| 712 |
+
\!\!\!&\!\!\!{\small0.252}
|
| 713 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 714 |
+
\!\!\!&\!\!\!{\small0.176}
|
| 715 |
+
\!\!\!&\!\!\!{\small0.215}
|
| 716 |
+
\!\!\!&\!\!\!{\small0.116}
|
| 717 |
+
\!\!\!&\!\!\!
|
| 718 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.184}}
|
| 719 |
+
\\
|
| 720 |
+
&\!\!\! {\small fc7+sp+linearSVM} \!\!\!&\!\!\! {Y}
|
| 721 |
+
\!\!\!&\!\!\!{\small0.205}
|
| 722 |
+
\!\!\!&\!\!\!{\small0.258}
|
| 723 |
+
\!\!\!&\!\!\!{\small0.201}
|
| 724 |
+
\!\!\!&\!\!\!{\small\bf 0.140}
|
| 725 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 726 |
+
\!\!\!&\!\!\!{\small0.236}
|
| 727 |
+
\!\!\!&\!\!\!{\small0.164}
|
| 728 |
+
\!\!\!&\!\!\!{\small0.190}
|
| 729 |
+
\!\!\!&\!\!\!{\small0.140}
|
| 730 |
+
\!\!\!&\!\!\!{\small0.250}
|
| 731 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 732 |
+
\!\!\!&\!\!\!{\small0.176}
|
| 733 |
+
\!\!\!&\!\!\!{\small0.215}
|
| 734 |
+
\!\!\!&\!\!\!{\small0.116}
|
| 735 |
+
\!\!\!&\!\!\!
|
| 736 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.184}}
|
| 737 |
+
\\
|
| 738 |
+
&\!\!\! {\small Fast-RCNN (1 ft)} \!\!\!&\!\!\! {N}
|
| 739 |
+
\!\!\!&\!\!\!{\small0.374}
|
| 740 |
+
\!\!\!&\!\!\!{\small0.322}
|
| 741 |
+
\!\!\!&\!\!\!{\small0.285}
|
| 742 |
+
\!\!\!&\!\!\!{\small0.265}
|
| 743 |
+
\!\!\!&\!\!\!{\small0.320}
|
| 744 |
+
\!\!\!&\!\!\!{\small0.277}
|
| 745 |
+
\!\!\!&\!\!\!{\small0.255}
|
| 746 |
+
\!\!\!&\!\!\!{\small0.351}
|
| 747 |
+
\!\!\!&\!\!\!{\small0.340}
|
| 748 |
+
\!\!\!&\!\!\!{\small0.324}
|
| 749 |
+
\!\!\!&\!\!\!{\small0.334}
|
| 750 |
+
\!\!\!&\!\!\!{\small0.256}
|
| 751 |
+
\!\!\!&\!\!\!{\small0.336}
|
| 752 |
+
\!\!\!&\!\!\!{\small0.274}
|
| 753 |
+
\!\!\!&\!\!\!
|
| 754 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.299}}
|
| 755 |
+
\\
|
| 756 |
+
&\!\!\! {\small Fast-RCNN (2 fts)} \!\!\!&\!\!\! {Y}
|
| 757 |
+
\!\!\!&\!\!\!{\small0.346}
|
| 758 |
+
\!\!\!&\!\!\!{\small0.303}
|
| 759 |
+
\!\!\!&\!\!\!{\small0.212}
|
| 760 |
+
\!\!\!&\!\!\!{\small0.223}
|
| 761 |
+
\!\!\!&\!\!\!{\small0.228}
|
| 762 |
+
\!\!\!&\!\!\!{\small0.195}
|
| 763 |
+
\!\!\!&\!\!\!{\small0.175}
|
| 764 |
+
\!\!\!&\!\!\!{\small0.247}
|
| 765 |
+
\!\!\!&\!\!\!{\small0.280}
|
| 766 |
+
\!\!\!&\!\!\!{\small0.319}
|
| 767 |
+
\!\!\!&\!\!\!{\small0.193}
|
| 768 |
+
\!\!\!&\!\!\!{\small\bf 0.125}
|
| 769 |
+
\!\!\!&\!\!\!{\small0.213}
|
| 770 |
+
\!\!\!&\!\!\!{\small0.160}
|
| 771 |
+
\!\!\!&\!\!\!
|
| 772 |
+
\!\!\!&\!\!\!{\small\textcolor{blue}{0.246}}
|
| 773 |
+
\\
|
| 774 |
+
\hline
|
| 775 |
+
\end{tabular}}
|
| 776 |
+
\caption{Normalized distance of part localization on the ILSVRC 2013 DET Animal-Part dataset~\cite{CNNAoG}. The second column indicates whether the baseline used all object-box annotations in the category to fine-tune a CNN.}
|
| 777 |
+
\label{tab:imgnet}
|
| 778 |
+
\end{table*}
|
| 779 |
+
\subsubsection{And-Or graph for semantic parts}
|
| 780 |
+
The explanatory graph makes it plausible to transfer middle-layer patterns from CNNs to semantic object parts. In order to test the transferability of patterns, we build an additional And-Or graph (AOG) to associate certain implicit patterns with an explicit part name, in the scenario of multi-shot learning. We used the AOG to localize semantic parts of objects for evaluation. The structure of the AOG is inspired by \cite{NineAOG}, and the learning of the AOG was originally proposed in \cite{CNNAoG}. We briefly introduce the AOG in \cite{CNNAoG} as follows.
|
| 781 |
+
|
| 782 |
+
As shown in Fig.~\ref{fig:hybrid}, like the hierarchical model in \cite{HierarchicalFace}, the AOG encodes a four-layer hierarchy for each semantic part, \emph{i.e.} the semantic part (OR node), part templates (AND node), latent patterns (OR nodes, those from the explanatory graph), and neural units (terminal nodes). In the AOG, each OR node (\emph{e.g.} a semantic part or a latent pattern) contains a list of alternative appearance (or deformation) candidates. Each AND node (\emph{e.g.} a part template) uses a number of latent patterns to describe its compositional regions.
|
| 783 |
+
|
| 784 |
+
1) The OR node of a semantic part contains a total of $m$ part templates to represent alternative appearance or pose candidates of the part. 2) Each part template (AND node) retrieve $K$ patterns from the explanatory graph as children. These patterns describe compositional regions of the part. 3) Each latent pattern (OR node) has all units in its corresponding filter's feature map as children, which represent its deformation candidates on image $I$.
|
| 785 |
+
\subsubsection{Experimental settings of three-shot learning}
|
| 786 |
+
We learned the explanatory graph based on a fine-tuned VGG-16 network and built the AOG following the scenario of multi-shot learning introduced in \cite{CNNAoG}. For each category, we used three annotations of the head part to learn three head templates in the AOG. Such part annotations were offered by \cite{CNNAoG}. To enable a fair comparison, all the object-box annotations and the three part annotations were equally provided to all baselines for learning.
|
| 787 |
+
|
| 788 |
+
We learned the explanatory graph based on a fine-tuned VGG-16 network~\cite{VGG} and built the AOG following the scenario of multi-shot learning introduced in \cite{CNNAoG}. For each category, we set three templates for the head part ($m=3$), and used a single part-box annotation for each template. We set {\small$K\!=\!0.1\sum_{L,d}N_{L,d}$} to learn AOGs for categories in the ILSVRC Animal-Part and CUB200 datasets and set {\small$K\!=\!0.4\sum_{L,d}N_{L,d}$} for Pascal VOC Part categories. Then, we used the AOGs to localize semantic parts on objects. Note that we used object images without part annotations to learn the explanatory graph and we used three part annotations provided by \cite{CNNAoG} to build the AOG. All these training samples were equally provided to all baselines for learning (besides part annotations, all baselines also used object annotations contained in the datasets for learning).
|
| 789 |
+
|
| 790 |
+
\textbf{Baselines:}{\verb| |} We compared AOGs with a total of ten baselines in part localization. The baselines included 1) state-of-the-art algorithms for object detection (\emph{i.e.} directly detecting target parts from objects), 2) graphical/part models for part localization, and 3) the methods selecting CNN patterns to describe object parts.
|
| 791 |
+
|
| 792 |
+
The first baseline was the standard fast-RCNN~\cite{FastRCNN}, namely \textit{Fast-RCNN (1 ft)}, which directly fine-tuned a VGG-16 network based on part annotations. Then, the second baseline, namely \textit{Fast-RCNN (2 fts)}, first used massive object-box annotations in the target category to fine-tune the VGG-16 network with the loss of object detection. Then, given part annotations, Fast-RCNN (2 fts) further fine-tuned the VGG-16 to detect object parts. We used \cite{CNNSemanticPart} as the third baseline, namely \textit{CNN-PDD}. CNN-PDD selected certain filters of a CNN to localize the target part. In CNN-PDD, the CNN was pre-trained using the ImageNet dataset~\cite{ImageNet}. Just like Fast-RCNN (2 ft), we extended \cite{CNNSemanticPart} as the fourth baseline \textit{CNN-PDD-ft}, which fine-tuned a VGG-16 network using object-box annotations before applying the technique of \cite{CNNSemanticPart}. The fifth and sixth baselines were DPM-related methods, \emph{i.e.} the strongly supervised DPM (\textit{SS-DPM-Part})~\cite{SSDPM} and the technique in \cite{PLDPM} (\textit{PL-DPM-Part}), respectively. Then, the seventh baseline, namely \textit{Part-Graph}, used a graphical model for part localization~\cite{SemanticPart}. For weakly supervised learning, ``simple'' methods are usually insensitive to model over-fitting. Thus, we designed two baselines as follows. First, we used object-box annotations in a category to fine-tune the VGG-16 network. Then, given a few well-cropped object images, we used the selective search~\cite{SelectiveSearch} to collect image patches, and used the VGG-16 network to extract \textit{fc7} features from these patches. The baseline \textit{fc7+linearSVM} used a linear SVM to detect the target part. The other baseline \textit{fc7+sp+linearSVM} combined both the \textit{fc7} feature and the spatial position {\small$(x,y)$ ($-1\leq x,y\leq1$)} of each image patch as features for part detection. The last competing method is weakly supervised mining of part patterns from CNNs~\cite{CNNAoG}, namely \textit{supervised-AOG}. Unlike our method (unsupervised), \textit{supervised-AOG} used part annotations to extract part patterns.
|
| 793 |
+
|
| 794 |
+
\begin{table}[t]
|
| 795 |
+
\centering
|
| 796 |
+
\resizebox{1.0\linewidth}{!}{\begin{tabular}{l|ccc}
|
| 797 |
+
\hline{\small Dataset} & {\scriptsize ILSVRC DET Animal} & {\scriptsize Pascal VOC Part} & {\scriptsize CUB200-2011}\\
|
| 798 |
+
\hline{\small Supervised-AOG} & 0.1344 & 0.1767 & 0.0915\\
|
| 799 |
+
{\small Ours (unsupervised)} & {\bf0.1250} & {\bf0.1765} & {\bf0.0862}\\
|
| 800 |
+
\hline
|
| 801 |
+
\end{tabular}}
|
| 802 |
+
\caption{Normalized distance of part localization. We compared supervised and unsupervised mining of part patterns.}
|
| 803 |
+
\label{tab:cnnaog}
|
| 804 |
+
\end{table}
|
| 805 |
+
|
| 806 |
+
\textbf{Comparisons:}{\verb| |} To enable a fair comparison, we classify all baselines into three groups, \emph{i.e.} no representation learning (no-RL), unsupervised representation learning (unsup-RL)\footnote[5]{Representation learning in these methods only used object-box annotations, which is independent to part annotations. A few part annotations were used to select off-the-shelf pre-trained features.}, and supervised representation learning (sup-RL). The No-RL group includes conventional methods without using deep features, such as SS-DPM-Part, PL-DPM-Part, and Part-Graph. Sup-RL methods are Fast-RCNN (1 ft), Fast-RCNN (2 ft), CNN-PDD, CNN-PDD-ft, supervised-AOG, fc7+linearSVM, and fc7+sp+linearSVM. Fast-RCNN methods used part annotations to learn features. Supervised-AOG used part annotations to select filters from CNNs to localize parts. Unsup-RL methods include CNN-PDD, CNN-PDD-ft, and our method. These methods did not use part annotations, and only used object boxes for learning/selection.
|
| 807 |
+
|
| 808 |
+
We use the normalized distance to evaluate localization accuracy, which has been used in \cite{CNNAoG,CNNSemanticPart} as a standard metric. Tables~\ref{tab:CUB}, \ref{tab:VOC}, and \ref{tab:imgnet} show part-localization results on the CUB200-2011 dataset~\cite{CUB200}, the Pascal VOC Part dataset~\cite{SemanticPart}, and the ILSVRC 2013 DET Animal-Part dataset~\cite{CNNAoG}, respectively. Table~\ref{tab:cnnaog} compares the unsupervised and supervised learning of neural patterns. In the experiment, the AOG outperformed all baselines, even methods that learned part features in a supervised manner.
|
| 809 |
+
\section{Conclusion and discussions}
|
| 810 |
+
In this paper, we proposed a simple yet effective method to learn an explanatory graph that reveals knowledge hierarchy inside conv-layers of a pre-trained CNN (\emph{e.g.} a VGG-16, a residual network, or a VAE-GAN). We regard the graph as a concise and meaningful representation, which 1) filters out noisy activations, 2) disentangles reliable part patterns from each filter of the CNN, and 3) encodes co-activation logics and spatial relationships between patterns. Experiments showed that our patterns had significantly higher stability than baselines.
|
| 811 |
+
|
| 812 |
+
The explanatory graph's transparent representation makes it plausible to transfer CNN patterns to object parts. Part-localization experiments well demonstrated the good transferability. Our method even outperformed supervised learning of part representations. Nevertheless, the explanatory graph is still a rough representation of the CNN, rather than an accurate reconstruction of the CNN knowledge.
|
| 813 |
+
\section*{Acknowledgement}
|
| 814 |
+
This work is supported by ONR MURI project N00014-16-1-2007 and DARPA XAI Award N66001-17-2-4029, and NSF IIS 1423305.
|
| 815 |
+
|
| 816 |
+
{\small
|
| 817 |
+
\bibliographystyle{aaai}
|
| 818 |
+
\bibliography{TheBib}
|
| 819 |
+
}
|
1708.02072v4.txt
ADDED
|
@@ -0,0 +1,632 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\noindent While the basic architecture and training algorithms behind deep neural networks (DNNs) are over 30 years old, interest in them has never been greater in both industry and the artificial intelligence research community. Owing to far larger datasets, increases in computational power, and innovations in activation functions, DNNs have achieved near-human or super-human abilities on a number of problems, including image classification \cite{he2016deep}, speech-to-text~\cite{khilari2015review}, and face identification~\cite{schroff2015facenet}. These algorithms power most of the recent advances in semantic segmentation ~\cite{long2015fully}, visual question answering~\cite{kafle2017visual}, and reinforcement learning~\cite{mnih-atari-2013}. While these systems have become more capable, the standard multi-layer perceptron (MLP) architecture and typical training algorithms cannot handle incrementally learning new tasks or categories without catastrophically forgetting previously learned training data. Fixing this problem is critical to making agents that incrementally improve after deployment. For non-embedded or personalized systems, catastrophic forgetting is often overcome simply by storing new training examples and then re-training either the entire network from scratch or possibly only the last few layers. In both cases, retraining uses \emph{both} the previously learned examples and the new examples, randomly shuffling them so that they are independent and identically distributed (iid). Retraining can be slow, especially if a dataset has millions or billions of instances.
|
| 3 |
+
|
| 4 |
+
\begin{figure}[t]
|
| 5 |
+
\centering
|
| 6 |
+
\includegraphics[width=0.99\linewidth]{figures/headline.eps}
|
| 7 |
+
|
| 8 |
+
\caption{Catastrophic forgetting impairs incremental learning in neural networks. As a network is incrementally trained (solid lines), ideally its performance would match that of a model trained offline with all of the data upfront (dashed line). In this paper, we develop methods and benchmarks for measuring catastrophic forgetting. Our experiments show that even methods designed to prevent catastrophic forgetting perform significantly worse than an offline model. Incremental learning is key to many real-world applications because it allows the model to adapt after being deployed.}
|
| 9 |
+
\label{fig:up_front}
|
| 10 |
+
\end{figure}
|
| 11 |
+
|
| 12 |
+
Catastrophic forgetting was first recognized in MLPs almost 30 years ago \cite{mccloskey1989catastrophic}. Since then, there have been multiple attempts to mitigate this phenomenon \cite{hinton1987using,robins1995catastrophic,goodrich2014unsupervised,draelos2016neurogenesis,ren2017life,fernando2017pathnet,kirkpatrick2017overcoming}. However, these methods vary considerably in how they train and evaluate their models and they focus on small datasets, e.g., MNIST. It is not clear if these methods will scale to larger datasets containing hundreds of categories. In this paper, we remedy this problem by providing a comprehensive empirical review of methods to mitigate catastrophic forgetting across a variety of new metrics. While catastrophic forgetting occurs in unsupervised frameworks \cite{draelos2016neurogenesis,goodrich2014unsupervised,triki2017encoder}, we focus on supervised classification. \textbf{Our major contributions are:}
|
| 13 |
+
\begin{itemize}[noitemsep,nolistsep]
|
| 14 |
+
\item We demonstrate that despite popular claims~\cite{kirkpatrick2017overcoming}, catastrophic forgetting is not solved.
|
| 15 |
+
\item We establish new benchmarks with novel metrics for measuring catastrophic forgetting. Previous work has focused on MNIST, which contains low-resolution images and only 10 classes. Instead, we use real-world image/audio classification datasets containing 100-200 classes. We show that, although existing models perform well on MNIST for a variety of different incremental learning problems, performance drops significantly with more challenging datasets.
|
| 16 |
+
\item We identified five common mechanisms for mitigating catastrophic forgetting: 1) regularization, 2) ensembling, 3) rehearsal, 4) dual-memory models, and 5) sparse-coding. Unlike previous work, we directly compare these distinct approaches.
|
| 17 |
+
\end{itemize}
|
| 18 |
+
\subsection{Problem Formulation}
|
| 19 |
+
In this paper, we study catastrophic forgetting in MLP-based neural networks that are incrementally trained for classification tasks. In our setup, the labeled training dataset $D$ is organized into $T$ study sessions (batches), i.e., $D = \left\{{B_t } \right\}_{t = 1}^T$. Each study session $B_t$ consists of $N_t$ labeled training data points, i.e., $
|
| 20 |
+
B_t = \left\{{\left({{\mathbf{x}}_j ,y_j } \right)} \right\}_{j = 1}^{N_t } $, where $\mathbf{x}_j \in \mathbb{R}^d$ and $y_j$ is a discrete label. $N_t$ is variable across sessions. The model is only permitted to learn sessions sequentially, in order. At time $t$ the network can only learn from study session $B_t$; however, models may use auxiliary memory to store previously observed sessions, but this memory use must be reported. We do not assume sessions are iid, e.g., some sessions may contain data from only a single category. In between sessions, the model may be evaluated on test data. Because this paper's focus is catastrophic forgetting, we focus less on representation learning and obtain feature vectors using embeddings from pre-trained networks. Note that in some other papers, new sessions are called new `tasks.' We refer to the first study session as the model's `base set knowledge.'
|
| 21 |
+
\section{Why Does Catastrophic Forgetting Occur?}
|
| 22 |
+
Catastrophic forgetting in neural networks occurs because of the stability-plasticity dilemma~\cite{abraham2005memory}. The model requires sufficient plasticity to acquire new tasks, but large weight changes will cause forgetting by disrupting previously learned representations. Keeping the network's weights stable prevents previously learned tasks from being forgotten, but too much stability prevents the model from learning new tasks. Prior research has tried to solve this problem using two broad approaches. The first is to try to keep new and old representations separate, which can be done using distributed models, regularization, and ensembling. The second is to prevent the forgetting of prior knowledge simply by training on the old tasks (or some facsimile of them) as well as new tasks, thereby preventing the old tasks from being forgotten. Besides requiring costly re-learning of previous examples and additional storage, this scheme is still not as effective as simply combining the new data with the old data and completely re-training the model from scratch. This solution is inefficient as it prevents the development of deployable systems that are capable of learning new tasks over the course of their lifetime.
|
| 23 |
+
\section{Previous Surveys}
|
| 24 |
+
\inline{french1999catastrophic} exhaustively reviewed mechanisms for preventing catastrophic forgetting that were explored in the 1980s and 1990s. \inline{goodfellow2013empirical} compared different activation functions and learning algorithms to see how they affected
|
| 25 |
+
catastrophic forgetting, but these methods were not explicitly designed to mitigate catastrophic forgetting. The authors concluded that the learning algorithms have a larger impact, which is what we focus on in our paper. They sequentially trained a network on two separate tasks using three different scenarios: 1) identical tasks with different forms of input, 2) similar tasks, and 3) dissimilar tasks. We adopt a similar paradigm, but our experiments involve a much larger number of tasks. We also focus on methods explicitly designed to mitigate catastrophic forgetting.
|
| 26 |
+
|
| 27 |
+
\inline{soltoggio2017born} reviewed neural networks that can adapt their plasticity over time, which they called Evolved Plastic Artificial Neural Networks. Their review covered a wide-range of brain-inspired algorithms and also identified that the field lacks appropriate benchmarks. However, they did not conduct any experiments or establish benchmarks for measuring catastrophic forgetting. We remedy this gap in the literature by establishing large-scale benchmarks for evaluating catastrophic forgetting in neural networks, and we compare methods that use five distinct mechanisms for mitigating it.
|
| 28 |
+
\section{Mitigating Catastrophic Forgetting}
|
| 29 |
+
While not exhaustive, we have identified five main approaches that have been pursued for mitigating catastrophic forgetting in MLP-like architectures, which we describe in the next subsections. We describe the models we have selected in greater detail in the Experimental Setup section.
|
| 30 |
+
\subsection{Regularization Methods}
|
| 31 |
+
Regularization methods add constraints to the network's weight updates, so that a new session is learned without interfering with prior memories. \inline{hinton1987using} implemented a network that had both `fast' and `slow' training weights. The fast weights had high plasticity and were easily affected by changes to the network, and the `slow' weights had high stability and were harder to adapt. This kind of dual-weight architecture is similar in idea to dual-network models, but has not been proven to be sufficiently powerful to learn a large number of new tasks. Elastic weight consolidation (EWC) \cite{kirkpatrick2017overcoming} adds a constraint to the loss function that directs plasticity away from weights that contribute the most to previous tasks. We use EWC to evaluate the regularization mechanism.
|
| 32 |
+
\subsection{Ensemble Methods}
|
| 33 |
+
Ensemble methods attempt to mitigate catastrophic forgetting either by explicitly or implicitly training multiple classifiers together and then combining them to generate the final prediction. For the explicit methods, such as Learn++ and TradaBoost, this prevents forgetting because an entirely new sub-network is trained for a new session~\cite{polikar2001learn++,dai2007boosting}. However, memory usage will scale with the number of sessions, which is highly non-desirable. Moreover, this prevents portions of the network from being re-used for the new session. Two methods that try to alleviate the memory usage problem are Accuracy Weighted Ensembles and Life-long Machine Learning~\cite{wang2003mining,ren2017life}. These methods automatically decide whether a sub-network should be removed or added to the ensemble.
|
| 34 |
+
|
| 35 |
+
PathNet can be considered as an implicit ensemble method~\cite{fernando2017pathnet}. It uses a genetic algorithm to find an optimal path through a fixed-size neural network for each study session. The weights in this path are then frozen; so that when new sessions are learned, the knowledge is not lost. In contrast to the explicit ensembles, the base network's size is fixed and it is possible for learned representations to be re-used which allows for smaller, more deployable models. The authors showed that PathNet learned subsequent tasks more quickly, but not how well earlier tasks were retained. We have selected PathNet to evaluate the ensembling mechanism, and we show how well it retains pre-trained information.
|
| 36 |
+
\subsection{Rehearsal Methods}
|
| 37 |
+
Rehearsal methods try to mitigate catastrophic forgetting by mixing data from earlier sessions with the current session being learned~\cite{robins1995catastrophic}. The cost is that this requires storing past data, which is not resource efficient. Pseudorehearsal methods use the network to generate pseudopatterns \cite{robins1995catastrophic} that are combined with the session currently being learned. Pseudopatterns allow the network to stabilize older memories without the requirement for storing all previously observed training data points. \inline{draelos2016neurogenesis} used this approach to incrementally train an autoencoder, where each session contained images from a specific category. After the autoencoder learned a particular session, they passed the session's data through the encoder and stored the output statistics. During replay, they used these statistics and the decoder network to generate the appropriate pseudopatterns for each class.
|
| 38 |
+
|
| 39 |
+
The GeppNet model proposed by \inline{Gepperth2016} reserves its training data to replay after each new class was trained. This model used a self-organizing map (SOM) as a hidden-layer to topologically reorganize the data from the input layer (i.e., clustering the input onto a 2-D lattice). We use this model to explore the value of rehearsal.
|
| 40 |
+
\subsection{Dual-Memory Models}
|
| 41 |
+
Dual-memory models are inspired by memory consolidation in the mammalian brain, which is thought to store memories in two distinct neural networks. Newly formed memories are stored in a brain region known as the hippocampus. These memories are then slowly transferred/consolidated to the pre-frontal cortex during sleep. Several algorithms based on these ideas have been created.
|
| 42 |
+
Early work used fast (hippocampal) and slow (cortical) training networks to separate pattern-processing areas, and they passed pseudopatterns back and forth to consolidate recent and remote memories \cite{french1997pseudo}. In general, dual-memory models incorporate rehearsal, but not all rehearsal-based models are dual-memory models.
|
| 43 |
+
|
| 44 |
+
Another model proposed by \inline{Gepperth2016}, which we denote GeppNet+STM, stores new inputs that yield a highly uncertain prediction into a short-term memory (STM) buffer. This model then seeks to consolidate the new memories into the entire network during a separate sleep phase. They showed that GeppNet+STM could incrementally learn MNIST classes without forgetting previously trained ones. We use GeppNet and GeppNet+STM to evaluate the dual-memory approach.
|
| 45 |
+
\subsection{Sparse-Coding Methods}
|
| 46 |
+
Catastrophic forgetting occurs when new internal representations interfere with previously learned ones~\cite{french1999catastrophic}. Sparse representations can reduce the chance of this interference; however, sparsity can impair generalization and ability to learn new tasks~\cite{sharkey1995analysis}.
|
| 47 |
+
|
| 48 |
+
Two models that implicitly use sparsity are CALM and ALCOVE. To learn new data, CALM searches among competing nodes to see which nodes have not been committed to another representation \cite{murre2014learning}. ALCOVE is a shallow neural network that uses a sparse distance-based representation, which allows the weights assigned to older tasks to be largely unchanged when the network is presented with new data \cite{kruschke1992alcove}. The Sparse Distributed Memory (SDM) is a convolution-correlation model that uses sparsity to reduce the overlap between internal representations~\cite{kanerva1988sparse}. CHARM and TODAM are also convolution-correlation models that use internal codings to ensure that new input representations remain orthogonal to one another~\cite{murdock1983distributed,eich1982composite}.
|
| 49 |
+
|
| 50 |
+
The Fixed Expansion Layer (FEL) model creates sparse representations by fixing the network's weights and specifying neuron triggering conditions~\cite{FEL}. FEL uses excitatory and inhibitory fixed weights to sparsify the input, which gates the weight updates throughout the network. This enables the network to retain prior learned mappings and reduce representational overlap. We use FEL to evaluate the sparsity mechanism.
|
| 51 |
+
\section{Experimental Setup}
|
| 52 |
+
We explore how well methods to mitigate catastrophic forgetting scale on hard datasets involving fine-grained image and audio classification. These datasets were chosen because they contain 1) different data modalities (image and audio), 2) a large number of classes, and 3) a small number of samples per class. These datasets are more meaningful (real-world problems) and more practical than MNIST. We also use MNIST to showcase the value of these real-world datasets. See Table \ref{table:data} for dataset statistics.
|
| 53 |
+
\subsection{Dataset Description}
|
| 54 |
+
|
| 55 |
+
\subsubsection{MNIST}
|
| 56 |
+
MNIST is a classic dataset in machine learning containing 10 digit classes. Its grayscale images are $28 \times 28$.
|
| 57 |
+
\subsubsection{CUB-200}
|
| 58 |
+
Caltech-UCSD Birds-200 (CUB-200) is an image classification dataset containing 200 different bird species~\cite{WahCUB_200_2011}. We use the 2011 version. Each high-resolution image is turned into a 2048-dimensional vector with ResNet-50 \cite{he2016deep}, which is a deep convolutional neural network (DCNN) pre-trained on ImageNet \cite{ILSVRC15}. Extracting image features from the last hidden (fully-connected) layer of pre-trained {DCNNs} is a common practice in computer vision. We report mean-per-class accuracy, which is the CUB-200 standard.
|
| 59 |
+
|
| 60 |
+
\begin{table}[t!]
|
| 61 |
+
\centering \footnotesize
|
| 62 |
+
\begin{tabular}{@{}rccc@{}}\toprule
|
| 63 |
+
& \textbf{MNIST}&\textbf{CUB-200} & \textbf{AudioSet}\\ \midrule
|
| 64 |
+
\textbf{Classification Task }& Gray Image & RGB Image & Audio \\
|
| 65 |
+
\textbf{Classes} & 10 & 200 & 100 \\
|
| 66 |
+
\textbf{Feature Shape} & 784 & 2,048 & 1,280 \\
|
| 67 |
+
\textbf{Train Samples}& 50,000 & 5,994 & 28,779\\
|
| 68 |
+
\textbf{Test Samples} & 10,000 & 5,794 & 5,523\\
|
| 69 |
+
\textbf{Train Samples/Class} & 5,421-6,742 & 29-30 & 250-300 \\
|
| 70 |
+
\textbf{Test Samples/Class} & 892-1,135 & 11-30 & 43-62 \\
|
| 71 |
+
\bottomrule
|
| 72 |
+
\end{tabular}
|
| 73 |
+
\caption{Dataset Specifications}
|
| 74 |
+
\label{table:data}
|
| 75 |
+
\end{table}
|
| 76 |
+
\subsubsection{AudioSet}
|
| 77 |
+
AudioSet~\cite{gemmeke2017audio} is a hierarchically organized audio classification dataset built from YouTube videos. It has over 2 million human-labeled, 10 second sound bytes drawn from one or more of 632 classes. We used the pre-extracted frame-wise features from AudioSet concatenated in order. These features were extracted using a variant ResNet-50 for audio data \cite{hershey2017CNN}, which was pre-trained on an early version of the YouTube-8m dataset \cite{DBLP:journals/corr/Abu-El-HaijaKLN16}. We used 100 classes from AudioSet, none of which were super or sub-classes of each other. The classes did not have any restrictions based on the AudioSet ontology, and all of them had a quality estimation of over 70\%. Each audio sample can have multiple labels, so we chose training and testing samples that were labeled with only 1 of the 100 classes.
|
| 78 |
+
\subsection{Models Evaluated}
|
| 79 |
+
We evaluated five models that correspond to each of the five mechanisms described in the previous section: 1) EWC, 2) PathNet, 3) GeppNet, 4) GeppNet+STM, and 5) FEL. To choose the number of parameters to use across models, we established a baseline MLP architecture that performed well for CUB-200 and AudioSet when trained offline. The goal is to determine which mechanism(s) work best for various incremental learning paradigms. To provide a fair comparison, the number of parameters in each model were chosen to be as close as possible to the number of parameters in the baseline MLP. We optimized each model's hyperparameters to work well for our benchmarks, which are given in supplemental materials~\footnote{Supplemental materials provided at the end of our arXiv submission: \url{https://arxiv.org/abs/1708.02072}}. The supplemental materials provides the stopping criteria for each model as defined by their creators, which involved 1) training for a fixed period of time or 2) using test accuracy to stop training early.
|
| 80 |
+
\subsubsection{Standard Multi-Layer Perceptron}
|
| 81 |
+
\label{sss:mlp}
|
| 82 |
+
For our baseline, we use a standard MLP. Its architecture was chosen by optimizing performance using the entire training set for both CUB-200 and AudioSet, i.e., it was trained offline. The offline MLP achieves 62.1\% accuracy on the CUB-200 test set and 46.1\% on the AudioSet test set. We did a hyperparameter search for the number of units per hidden layer (32-4,096), number of hidden layers (2-3), and weight decay parameter (0, $10^{-4}$, $5\cdot 10^{-4}$). The MLP model was also trained incrementally to measure the severity of catastrophic forgetting.
|
| 83 |
+
\subsubsection{Elastic Weight Consolidation}
|
| 84 |
+
\label{sss:ewc}
|
| 85 |
+
EWC adds an additional constraint to the loss function $L\left(\theta\right)$, i.e.,
|
| 86 |
+
\begin{equation}
|
| 87 |
+
\label{eq:ewc}
|
| 88 |
+
\footnotesize
|
| 89 |
+
L\left(\theta\right) = L_t\left(\theta\right) + \sum\limits_{i} \frac{\lambda}{2} F_i\left(\theta_i - \theta_{A,i}^*\right)^2,
|
| 90 |
+
\end{equation}
|
| 91 |
+
where $L\left(\theta\right)$ is the combined loss function, $\theta$ is the network's parameters, $L_t\left(\theta\right)$ is the loss for session $B_t$, $\lambda$ is a hyperparameter that indicates how important the old task(s) are compared to the new task, $F$ is the Fisher information matrix, and $\theta_A^*$ are the trainable parameters (weights and biases) important to previously trained tasks. The Fisher matrix is used to constrain the weights important to previously learned tasks to their original value; that is, plasticity is directed to the trainable parameters that contribute the least to performing previously trained tasks. The size of the hidden-layer was chosen to match the baseline MLP's capacity.
|
| 92 |
+
\subsubsection{PathNet}
|
| 93 |
+
\label{sss:pathnet}
|
| 94 |
+
PathNet is a fixed size neural network that uses a genetic algorithm to find the optimal path through the network. Only this path is trainable when learning a particular session, which is why the authors described their model as an evolutionary dropout network. PathNet creates an independent output layer for each task in order to preserve previously trained tasks, and it cannot be used without modifications for incremental class learning. Since entire portions of the network are sequentially frozen as new tasks are learned, there is a risk of PathNet losing its ability to learn once the maximum capacity is reached. PathNet's capacity was chosen to match the capacity of the MLP baseline.
|
| 95 |
+
\subsubsection{GeppNet}
|
| 96 |
+
\label{sss:som}
|
| 97 |
+
GeppNet and GeppNet+STM are biologically-inspired approaches that use rehearsal to mitigate forgetting. In these models, training the initial task starts by initializing the SOM-layer, which is used to project the probability density of the input to a higher two-dimensional lattice. The SOM-layer features are passed to a linear regression classification layer to make a prediction. During training, the SOM-layer is initialized with the first session for a fixed-period of time, and then the SOM- and classification-layers are trained jointly. The SOM-layer is only updated when a training example is determined by the model to be novel (i.e., using the prediction probabilities to generate a confidence measure). After GeppNet has been trained on the initial session for a fixed period of time, it incrementally learns subsequent sessions.
|
| 98 |
+
GeppNet performs updates to the SOM-layer and classification-layer when a training example is considered novel. When GeppNet+STM detects novelty, it instead uses a fixed-size short-term memory buffer to store that training example, which then replays it during a sleep phase. The sleep phase repeats after a fixed number of training iterations. Since the replay queue has a fixed-size (i.e., older examples are replaced), the GeppNet+STM model will train more efficiently than GeppNet. GeppNet stores all previous training data and replays it along with the previous data during a portion of its incremental learning step. GeppNet+STM also stores all previous and new training data; however, each training example is only replayed if the model is uncertain on the prediction. In addition, GeppNet+STM is capable of making real-time predictions by determining if the desired memory is in short-term memory (the memory buffer) or in long-term storage (the SOM- and classification-layers).
|
| 99 |
+
\subsubsection{Fixed Expansion Layer}
|
| 100 |
+
FEL uses sparsity to mitigate catastrophic forgetting~\cite{FEL}. FEL is a two hidden-layer MLP where the second hidden-layer (FEL-layer) has a higher capacity than the first fully-connected layer, but the weights are sparse and remain fixed through training. Each FEL-layer unit is only connected to a subset of the units in the first hidden layer, and these connections are split between excitatory and inhibitory weights. Only a subset of the FEL-layer units are allowed to have non-zero output to the final classification layer, which causes only some of the units in the first hidden layer to be updated.
|
| 101 |
+
\section{Experiments and Results}
|
| 102 |
+
We have established three benchmark experiments for measuring catastrophic forgetting:
|
| 103 |
+
\begin{enumerate}
|
| 104 |
+
\item \textbf{Data Permutation Experiment} - The elements of every feature vector are randomly permuted, with the permutation held constant within a session, but varying across sessions. The model is evaluated on its ability to recall data learned in prior study sessions. Each session contains the same number of examples.
|
| 105 |
+
\item \textbf{Incremental Class Learning} - After learning the base set, each new session learned contains only a single class.
|
| 106 |
+
\item \textbf{Multi-Modal Learning} - The model incrementally learns different datasets, e.g., learn image classification and then audio classification.
|
| 107 |
+
\end{enumerate}
|
| 108 |
+
|
| 109 |
+
For the data permutation and incremental class learning experiments, each model was also evaluated on MNIST. The goal is to examine whether results on MNIST generalize to the real-world datasets. More results, including detailed plots, can be found in the supplementary materials.
|
| 110 |
+
\subsection{Evaluation Metrics}
|
| 111 |
+
We propose three new metrics to evaluate a model's ability to retain prior sessions while still learning new knowledge,
|
| 112 |
+
|
| 113 |
+
\begin{equation}
|
| 114 |
+
\label{eq:base}
|
| 115 |
+
\footnotesize
|
| 116 |
+
\Omega_{base} = \frac{1}{T-1} \sum_{i=2}^T \frac{\alpha_{base,i}}{\alpha_{ideal}}
|
| 117 |
+
\end{equation}
|
| 118 |
+
\begin{equation}
|
| 119 |
+
\small
|
| 120 |
+
\label{eq:new}
|
| 121 |
+
\Omega_{new} = \frac{1}{T-1} \sum_{i=2}^T \alpha_{new,i}
|
| 122 |
+
\end{equation}
|
| 123 |
+
|
| 124 |
+
\begin{equation}
|
| 125 |
+
\label{eq:combined}
|
| 126 |
+
\small
|
| 127 |
+
\Omega_{all} = \frac{1}{T-1} \sum_{i=2}^T \frac{\alpha_{all,i}}{\alpha_{ideal}} %
|
| 128 |
+
\end{equation}
|
| 129 |
+
where $T$ is the total number of sessions, $\alpha_{new,i}$ is the test accuracy for session $i$ immediately after it is learned, $\alpha_{base,i}$ is the test accuracy on the first session (base set) after $i$ new sessions have been learned, $\alpha_{all,i}$ is the test accuracy of all of the test data for the classes seen to this point, and $\alpha_{ideal}$ is the offline MLP accuracy on the base set, which we assume is the ideal performance. $\Omega_{base}$ and $\Omega_{new}$ are normalized area under the curve metrics. $\Omega_{base}$ measures a model's retention of the first session, after learning in later study sessions. $\Omega_{new}$ measures the model's ability to immediately recall new tasks. By normalizing $\Omega_{base}$ and $\Omega_{all}$ by $\alpha_{ideal}$, the results will be easier to compare between datasets. Unless a model exceeds $\alpha_{ideal}$, results will be between $\left[0,1\right]$, which enables comparison between datasets. $\Omega_{all}$ computes how well a model both retains prior knowledge and acquires new information.
|
| 130 |
+
\subsection{Experimental Results}
|
| 131 |
+
|
| 132 |
+
\subsubsection{Data Permutation Experiment}
|
| 133 |
+
This experiment evaluates a model's ability to retain multiple representations of the dataset, with each representation learned sequentially. These representations are created by randomly permuting the elements of the input feature vectors, with the random permutation changing between sessions. An identically permuted test set is used along with each session. This paradigm provides overlapping tasks in which each session contains the same information and categories, so each session is of equal complexity. This paradigm is identical to that used by \inline{goodfellow2013empirical} and \inline{kirkpatrick2017overcoming}.
|
| 134 |
+
|
| 135 |
+
\begin{table*}[t!]
|
| 136 |
+
\centering \footnotesize
|
| 137 |
+
\begin{tabular}{@{}cc|ccc|ccc|ccc|c|c@{}}\toprule
|
| 138 |
+
\multirow{2}{*}{\textbf{Model}} & \multirow{2}{*}{\textbf{Dataset}} & \multicolumn{3}{c|}{\textbf{Data Permutation}} & \multicolumn{3}{c|}{\textbf{Incremental Class}}& \multicolumn{3}{c|}{\textbf{Multi-Modal}} & \textbf{Memory} & \textbf{Model} \\
|
| 139 |
+
& & $\Omega_{base}$ & $\Omega_{new}$ & $\Omega_{all}$& $\Omega_{base}$ & $\Omega_{new}$ & $\Omega_{all}$ & $\Omega_{base}$ & $\Omega_{new}$ & $\Omega_{all}$ & \textbf{Constraints} & \textbf{Size (MB)} \\
|
| 140 |
+
\midrule
|
| 141 |
+
\multirow{3}{*}{\textbf{MLP}} &\textbf{MNIST} & 0.434 & 0.996 & 0.702 & 0.060 & 1.000 & 0.181 & N/A & N/A & N/A & \multirow{3}{*}{Fixed-size} & 1.91\\
|
| 142 |
+
&\textbf{CUB} & 0.488 & 0.917 & 0.635 & 0.020 & 1.000 & 0.031 & 0.327 & 0.412 & 0.610 & & 4.24 \\
|
| 143 |
+
&\textbf{AS} & 0.186 & 0.957 & 0.446 & 0.016 & 1.000 & 0.044 & 0.197 & 0.609 & 0.589 & & 2.85\\[1ex]
|
| 144 |
+
\multirow{3}{*}{\textbf{EWC}} &\textbf{MNIST} & 0.437 & 0.992 & 0.746 & 0.001 & 1.000 & 0.133 & N/A & N/A & N/A & \multirow{3}{*}{Fixed-size}& 3.83\\
|
| 145 |
+
&\textbf{CUB} & 0.765 & 0.869 & 0.762 & 0.105 & 0.000 & 0.094 & 0.944 & 0.369 & 0.872 & & 8.48\\
|
| 146 |
+
&\textbf{AS} & 0.129 & 0.687 & 0.251 & 0.021 & 0.580 & 0.034 & 1.000 & 0.588 & 0.984 & & 5.70\\[1ex]
|
| 147 |
+
\multirow{3}{*}{\textbf{PathNet}} &\textbf{MNIST} & 0.687 & 0.887 & 0.848 & N/A & N/A & N/A & N/A & N/A & N/A & New output & 2.80\\
|
| 148 |
+
&\textbf{CUB} & 0.538 & 0.701 & 0.655 & N/A & N/A & N/A & 0.908 & 0.376 & 0.862 & layer for & 7.46\\
|
| 149 |
+
&\textbf{AS} & 0.414 & 0.750 & 0.615 & N/A & N/A & N/A & 0.069 & 0.540 & 0.469 & each task & 4.68\\[1ex]
|
| 150 |
+
\multirow{3}{*}{\textbf{GeppNet}} &\textbf{MNIST} & 0.912 & 0.242 & 0.364 & 0.960 & 0.824 & 0.922 & N/A & N/A & N/A & Stores all & 190.08\\
|
| 151 |
+
&\textbf{CUB} & 0.606 & 0.029 & 0.145 & 0.628 & 0.640 & 0.585 & 0.156 & 0.010 & 0.089 & training & 53.48 \\
|
| 152 |
+
&\textbf{AS} & 0.897 & 0.170 & 0.343 & 0.984 & 0.458 & 0.947 & 0.913 & 0.005 & 0.461 & data & 150.38\\[1ex]
|
| 153 |
+
\multirow{3}{*}{\textbf{GeppNet+STM}}&\textbf{MNIST}& 0.892 & 0.212 & 0.326 & 0.919 & 0.599 & 0.824 & N/A & N/A & N/A & Stores all & 191.02\\
|
| 154 |
+
&\textbf{CUB} & 0.615 & 0.020 & 0.142 & 0.727 & 0.232 & 0.626 & 0.031 & 0.329 & 0.026 & training & 55.94 \\
|
| 155 |
+
&\textbf{AS} & 0.820 & 0.041 & 0.219 & 1.007 & 0.355 & 0.920 & 0.829 & 0.005 & 0.418 & data & 151.92\\[1ex]
|
| 156 |
+
\multirow{3}{*}{\textbf{FEL}} &\textbf{MNIST} & 0.117 & 0.990 & 0.279 & 0.451 & 1.000 & 0.439 & N/A & N/A & N/A & \multirow{3}{*}{Fixed-size}& 4.54\\
|
| 157 |
+
&\textbf{CUB} & 0.043 & 0.764 & 0.184 & 0.316 & 1.000 & 0.361 & 0.110 & 0.329 & 0.412 & & 6.16 \\
|
| 158 |
+
&\textbf{AS} & 0.081 & 0.848 & 0.239 & 0.283 & 1.000 & 0.240 & 0.473 & 0.320 & 0.494 & & 6.06 \\[1ex]
|
| 159 |
+
\bottomrule
|
| 160 |
+
\end{tabular}
|
| 161 |
+
\caption{Results on MNIST, CUB-200 (CUB), and AudioSet (AS) for our evaluation metrics as well as model size (in MB) for each model/dataset combination.}
|
| 162 |
+
\label{table:results}
|
| 163 |
+
\end{table*}
|
| 164 |
+
|
| 165 |
+
Results are given in Table \ref{table:results}. In nearly every case, $\Omega_{all}$ is greater for MNIST than on CUB-200 or AudioSet, demonstrating the need for alternative incremental learning benchmarks. To some extent, EWC, PathNet, GeppNet, and GeppNet+STM retain prior knowledge without forgetting; however, GeppNet and GeppNet+STM fail to learn new sessions. PathNet and EWC seem to retain base knowledge while still learning new information; however, PathNet performs better on AudioSet and MNIST, while EWC performs better on CUB-200 (see discussion).
|
| 166 |
+
\subsubsection{Incremental Class Learning}
|
| 167 |
+
In the incremental class learning experiment, a model's ability to sequentially learn new classes is tested. The first session learned contains training data from half of the classes in each dataset: 5 for MNIST, 100 for CUB-200, and 50 for AudioSet. Once this base set was learned, each subsequent session contained training data from a single new class. We measure mean-per-class accuracy on the base set after each new class is learned to assess a model's long-term memory. We also calculate the accuracy of each class after it is trained to ensure the model is still learning, and we calculate the performance of all previously learned classes.
|
| 168 |
+
|
| 169 |
+
PathNet is incapable of learning new classes incrementally because it creates a separate output layer for each additional session. Accessing that output layer during prediction time requires a priori information on which session the model needs to access. This means PathNet requires the testing label to make the appropriate prediction, which would result in a misleading high test accuracy. For this reason, we omitted PathNet from this experiment.
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
Results are summarized in Table \ref{table:results} and Fig. \ref{fig:results} contains plots for the mean-per-class test accuracy for all classes seen so far. The only models that were able to both retain the base knowledge and learn new classes were GeppNet, GeppNet+STM, and FEL, with the clear winner being GeppNet. Much like the data permutation experiment, the CUB-200 and AudioSet results were noticeably lower than the MNIST results. GeppNet+STM did well at retaining the base set, but it struggled to learn new classes on CUB-200 and AudioSet. This could be because the model only trains during sleep for efficiency reasons. Additionally, the short-term memory buffer is emptied after training each study session, which is when the model is evaluated. This type of model could work better in a real-time environment. FEL learned new classes well, but suffered from forgetting of the base set. FEL may benefit from larger model capacity, but this would require more memory/processing power.
|
| 173 |
+
|
| 174 |
+
\begin{figure*}[t!]
|
| 175 |
+
\centering
|
| 176 |
+
\subfigure[MNIST]{%
|
| 177 |
+
\includegraphics[width=0.32\linewidth]{figures/inc_all_mnist.eps}
|
| 178 |
+
\label{fig:result_a}}
|
| 179 |
+
\subfigure[CUB-200]{%
|
| 180 |
+
\includegraphics[width=0.32\linewidth]{figures/inc_all_cub.eps}
|
| 181 |
+
\label{fig:result_b}}
|
| 182 |
+
\subfigure[AudioSet]{%
|
| 183 |
+
\includegraphics[width=0.32\linewidth]{figures/inc_all_as.eps}
|
| 184 |
+
\label{fig:result_c}}
|
| 185 |
+
\caption{{Results for incremental class learning experiment.} This shows the mean-class test accuracy for all classes seen so far.}
|
| 186 |
+
\label{fig:results}
|
| 187 |
+
\end{figure*}
|
| 188 |
+
\subsubsection{Multi-Modal Experiment}
|
| 189 |
+
The goal of the multi-modal experiment is to determine if a network can learn and retain multiple dissimilar tasks that have 1) inputs with different dimensionality and feature distributions and 2) a different number of classes. A system like this could be useful for learning tasks that have multi-modal data using a single network and could be more efficient than building a separate neural network for each modality (e.g., video has visual and audio information). In this experiment, we evaluated each model's ability to perform image and audio classification with CUB-200 and AudioSet respectively. In this experiment, there are only two incrementally learned sessions, where each session contains AudioSet or CUB-200. We compare learning AudioSet first then CUB-200 (AS/CUB) and learning CUB then AudioSet (CUB/AS).
|
| 190 |
+
|
| 191 |
+
The ResNet features obtained from CUB-200 have a higher dimensionality than the AudioSet features, so we zero-padded the AudioSet input to match the dimensionality of CUB-200. This experiment is done by training one dataset to completion followed by training the other dataset to completion (and vice-versa). Once both modalities have been trained, we evaluate the first modality that was trained in order to measure how well the model was able to retain what it learned about the first task.
|
| 192 |
+
|
| 193 |
+
Table \ref{table:results} shows summary results for the multi-modal experiment, where the corresponding row is the modality that was trained first, i.e. the row for CUB-200 is where CUB-200 is learned first followed by AudioSet. Additional results are in supplementary materials. Although several models perform well at one of the two experiments, EWC is the only model capable of preserving the first modality while also learning the second modality for both cases, which we explore further in the discussion.
|
| 194 |
+
\section{Discussion}
|
| 195 |
+
In our paper we introduced new metrics and benchmarks for measuring catastrophic forgetting. Our results reveal that none of the methods we tested solve catastrophic forgetting, while also enabling the learning of new information. Table \ref{table:summary} summarizes these results for each of our experiments by averaging $\Omega_{all}$ over all datasets. While no method excels at incremental learning, some perform better than others.
|
| 196 |
+
|
| 197 |
+
PathNet performed best overall on the data permutation experiments, with the exception of CUB-200. However, PathNet requires being told which session each test instance is from, whereas the other models do not use this information. This may give it an unfair advantage. PathNet works by locking the optimal path for a given session. Because permuting the data does not reduce feature overlap, the model requires more trainable weights (less feature sharing) to build a discriminative model, causing PathNet to saturate (freeze all weights) more quickly. When PathNet reaches the saturation point, the only trainable parameters are in the output layer. While EWC was the second best performing method in the permutation experiments, it only redirects plasticity instead of freezing trainable weights.
|
| 198 |
+
|
| 199 |
+
\begin{table}[t!]
|
| 200 |
+
\centering \footnotesize
|
| 201 |
+
\begin{tabular}{@{}cccc@{}}\toprule
|
| 202 |
+
\multirow{2}{*}{\textbf{Model}}& \textbf{Data} & \textbf{Incremental} & \multirow{2}{*}{\textbf{Multi-Modal}} \\
|
| 203 |
+
& \textbf{Permutation} & \textbf{Class} & \\
|
| 204 |
+
\midrule
|
| 205 |
+
\textbf{MLP} &0.594 &0.085 & 0.600 \\
|
| 206 |
+
\textbf{EWC} &0.586 &0.087 &\textbf{0.913} \\
|
| 207 |
+
\textbf{PathNet} &\textbf{0.706} &N/A &0.666 \\
|
| 208 |
+
\textbf{GeppNet} &0.284 &\textbf{0.818} &0.275 \\
|
| 209 |
+
\textbf{GeppNet+STM} &0.229 &0.790 &0.222 \\
|
| 210 |
+
\textbf{FEL} &0.234 &0.347 &0.453 \\
|
| 211 |
+
\bottomrule
|
| 212 |
+
\end{tabular}
|
| 213 |
+
\caption{{Summary of Experimental Results. Average of $\Omega_{all}$ over MNIST, CUB-200, and AudioSet results.}}
|
| 214 |
+
\label{table:summary}
|
| 215 |
+
\end{table}
|
| 216 |
+
|
| 217 |
+
Both GeppNet variants performed best at incremental class learning. These models make slow, gradual changes to the network that are inspired by memory consolidation during sleep. For these models, the SOM-layer was fixed to $23\times23$ to have the same number of trainable parameters as the other models. With 100-200 classes, this corresponds to 2-5 hidden layer neurons per class respectively. The experiments on MNIST in \inline{Gepperth2016} used 90 hidden-layer neurons per class, so their performance may improve if their model capacity was significantly increased, but this would demand more memory and computation.
|
| 218 |
+
|
| 219 |
+
EWC performed best on the multi-modal experiment. This may be because features between the two modalities are non-redundant. We hypothesize that EWC is a better choice for separating non-redundant data and PathNet may work well when working with data that has different, but not entirely dissimilar, representations. To explore this, we used the Fast Correlation Based Filter proposed by \inline{yu2003feature} to show the features in MNIST and AudioSet are more redundant than those in CUB-200 (see supplemental material). The performance of EWC and PathNet for both the data permutation and multi-modal experiments are consistent with this hypothesis.
|
| 220 |
+
|
| 221 |
+
Table \ref{table:results} shows the memory constraints and usage of each model. While we kept the number of trainable parameters roughly the same across all models in their hidden layers, some require additional memory resources. PathNet generates a new output layer for each session. Both GeppNet variants store all training data and rehearse over it during their incremental learning stage. The creators of EWC stored validation data from all previous sessions and used it to minimize forgetting when learning a new session. This was not done in our experiments to fairly compare it to the other models, which only had access to validation data for the current session.
|
| 222 |
+
|
| 223 |
+
Table \ref{table:time} shows the total time to train each model for the data permutation and incremental class learning experiments using CUB-200. Both variants of GeppNet are orders of magnitude slower because they train the model one sample at a time. PathNet is also very slow at the data permutation task because the optimal path through a large DCNN needs to be found for each permutation. The fixed-size models are noticeably faster; however, only EWC was effective at mitigating catastrophic forgetting (in the data permutation and multi-modal experiments).
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
\begin{table}[t!]
|
| 227 |
+
\centering \footnotesize
|
| 228 |
+
\begin{tabular}{@{}ccc@{}}\toprule
|
| 229 |
+
\multirow{2}{*}{\textbf{Model}}& \textbf{Data} & \textbf{Incremental} \\
|
| 230 |
+
& \textbf{Permutation} & \textbf{Class} \\
|
| 231 |
+
\midrule
|
| 232 |
+
\textbf{MLP} & 16& 15 \\
|
| 233 |
+
\textbf{EWC} & 16& 13 \\
|
| 234 |
+
\textbf{PathNet} &1,385 & N/A \\
|
| 235 |
+
\textbf{GeppNet} &507 &1,123 \\
|
| 236 |
+
\textbf{GeppNet+STM} & 179& 410 \\
|
| 237 |
+
\textbf{FEL} & 53 & 8 \\
|
| 238 |
+
\bottomrule
|
| 239 |
+
\end{tabular}
|
| 240 |
+
\caption{Training time (minutes) for each model on CUB-200.}
|
| 241 |
+
\label{table:time}
|
| 242 |
+
\end{table}
|
| 243 |
+
|
| 244 |
+
In general, models that expand as a function of the number of sessions and those that are allowed to store data from prior sessions may have limited real-world application. In our opinion, methods for mitigating catastrophic forgetting should have the amount of total memory they use constrained. While our summary statistics did not take this into account, it is an important factor in deploying a method that learns incrementally. This is the reason we chose to keep the number of trainable parameters fixed across all models.
|
| 245 |
+
|
| 246 |
+
An alternative would have been to tune the number of trainable parameters in each model for each experiment, which is what we did for the data permutation and incremental class learning experiments as well (see Supplemental Materials for details). Although in most cases the base performance increased, there were no changes to any of our conclusions on which model/mechanism yielded superior performance. The one interesting thing we did observe is that the sparsity model (i.e. FEL) can sometimes improve significantly; however, the cost is a 40x increase in the model’s memory footprint. This reinforces our claim that a model that only uses the sparsity mechanism to mitigate catastrophic forgetting may not be ideal in a deployed environment. We urge future incremental learning algorithm creators to take memory footprint into account, especially when comparing to other models.
|
| 247 |
+
|
| 248 |
+
Our metrics could be expanded to other training paradigms such as reinforcement learning, unsupervised learning, etc. In reinforcement learning, the agent learns an initial study-session (e.g. an ATARI game), which represents the base knowledge. We would track the performance of the base-knowledge as the model learns additional games and ensure that the model is learning new games as well. The main difference is that the performance metrics would be normalized by the maximum performance for each study-session when the model only has to learn that single study session. In unsupervised learning, we could follow the experiments performed by \cite{draelos2016neurogenesis} where the metrics would be the same, but we would train the models using a different loss function (e.g. reconstruction error).
|
| 249 |
+
|
| 250 |
+
\begin{table}[t!]
|
| 251 |
+
\centering \footnotesize
|
| 252 |
+
\begin{tabular}{@{}ccccccc@{}}\toprule
|
| 253 |
+
\textbf{Model}& \rot{\textbf{Incremental Class}} & \rot{\textbf{Similar Data}} & \rot{\textbf{Dissimilar Data}} & \rot{\textbf{Memory Efficient} } & \rot{\textbf{Trains Quickly}} & \hspace{10 mm} \\
|
| 254 |
+
\midrule
|
| 255 |
+
\textbf{MLP} &\xmark &\xmark &\xmark & \cmark & \cmark \\
|
| 256 |
+
\textbf{EWC} &\xmark &\xmark &\cmark& \cmark&\cmark \\
|
| 257 |
+
\textbf{PathNet} &\xmark & \cmark &\xmark &\xmark &\xmark \\
|
| 258 |
+
\textbf{GeppNet} & \cmark &\xmark &\xmark&\xmark&\xmark \\
|
| 259 |
+
\textbf{GeppNet+STM} & \cmark &\xmark &\xmark&\xmark&\xmark \\
|
| 260 |
+
\textbf{FEL} & \xmark & \xmark& \xmark& \xmark& \cmark \\
|
| 261 |
+
\bottomrule
|
| 262 |
+
\end{tabular}
|
| 263 |
+
\caption{Summary of the optimal performer on the incremental class learning, data permutation (Similar Data), and multi-modal (Dissimilar Data) experiments, as well as the memory/computational efficiency of each model.}
|
| 264 |
+
\label{table:end}
|
| 265 |
+
\end{table}
|
| 266 |
+
\section{Conclusion}
|
| 267 |
+
In this paper, we developed new metrics for evaluating catastrophic forgetting. We identified five families of mechanisms for mitigating catastrophic forgetting in DNNs. We found that performance on MNIST was significantly better than on the larger datasets we used. Using our new metrics, experimental results (summarized in Table \ref{table:end}) show that 1) a combination of rehearsal/pseudo-rehearsal and dual-memory systems are optimal for learning new classes incrementally, and 2) regularization and ensembling are best at separating multiple dissimilar sessions in a common DNN framework. Although the rehearsal system performed reasonably well, it required retaining all training data for replay. This type of system may not be scalable for a real-world lifelong learning system; however, it does indicate that models that use pseudorehearsal could be a viable option for real-time incremental learning systems. Future work on lifelong learning frameworks should involve combinations of these mechanisms. While some models perform better than others in different scenarios, our work shows that catastrophic forgetting is not solved by any single method. This is because there is no model that is capable of assimilating new information while simultaneously and efficiently preserving the old. We urge the community to use larger datasets in future work.
|
| 268 |
+
\section{Acknowledgements}
|
| 269 |
+
A. Abitino was supported by NSF Research Experiences for Undergraduates (REU) award \#1359361 to R. Dube. We thank NVIDIA for the generous donation of a Titan X GPU.
|
| 270 |
+
|
| 271 |
+
|
| 272 |
+
\newpage
|
| 273 |
+
\bibliography{bibtex}
|
| 274 |
+
\bibliographystyle{aaai}
|
| 275 |
+
|
| 276 |
+
\newpage
|
| 277 |
+
\appendix
|
| 278 |
+
\counterwithin{figure}{section}
|
| 279 |
+
\counterwithin{table}{section}
|
| 280 |
+
\renewcommand{\thefigure}{S\arabic{figure}}
|
| 281 |
+
\renewcommand{\thetable}{S\arabic{table}}
|
| 282 |
+
\setcounter{figure}{0}
|
| 283 |
+
\setcounter{table}{0}
|
| 284 |
+
\section{Supplemental Material}
|
| 285 |
+
|
| 286 |
+
\subsection{Training Parameters}
|
| 287 |
+
\begin{table}[h!]
|
| 288 |
+
\centering \footnotesize
|
| 289 |
+
\begin{tabular}{@{}ll@{}}\toprule
|
| 290 |
+
\textbf{Training Parameter} & \textbf{Value} \\
|
| 291 |
+
\midrule
|
| 292 |
+
Units per Layer & 400 \\
|
| 293 |
+
Hidden Layers & 2 \\
|
| 294 |
+
Mini-Batch Size & 256 \\
|
| 295 |
+
Hidden-Layer Activation & ReLU \\
|
| 296 |
+
Optimizer & Nadam \\
|
| 297 |
+
Initial Learning Rate & 8e-4 \\
|
| 298 |
+
Convergence Criteria & Early-Stopping \\
|
| 299 |
+
\bottomrule \\
|
| 300 |
+
\end{tabular}
|
| 301 |
+
\caption{Training parameters for the MLP baseline model}
|
| 302 |
+
\label{table:mlp_specs}
|
| 303 |
+
\end{table}
|
| 304 |
+
|
| 305 |
+
\begin{table}[h!]
|
| 306 |
+
\centering \footnotesize
|
| 307 |
+
\begin{tabular}{@{}ll@{}}\toprule
|
| 308 |
+
\textbf{Training Parameter} & \textbf{Value} \\
|
| 309 |
+
\midrule
|
| 310 |
+
Units per Layer & 400 \\
|
| 311 |
+
Hidden Layers & 2 \\
|
| 312 |
+
Mini-Batch Size & 250 \\
|
| 313 |
+
Hidden-Layer Activation & ReLU \\
|
| 314 |
+
Optimizer & Adam \\
|
| 315 |
+
Initial Learning Rate & 2e-4 \\
|
| 316 |
+
Convergence Criteria & Early Stopping \\
|
| 317 |
+
\bottomrule \\
|
| 318 |
+
|
| 319 |
+
\end{tabular}
|
| 320 |
+
\caption{Training parameters for the EWC model}
|
| 321 |
+
\label{table:ewc_specs}
|
| 322 |
+
\end{table}
|
| 323 |
+
|
| 324 |
+
\begin{table}[h!]
|
| 325 |
+
\centering \footnotesize
|
| 326 |
+
\begin{tabular}{@{}ll@{}}\toprule
|
| 327 |
+
\textbf{Training Parameter} & \textbf{Value} \\
|
| 328 |
+
\midrule
|
| 329 |
+
Layers (L) & 2 \\
|
| 330 |
+
Modules (M) & 10 \\
|
| 331 |
+
Modules per Layer (N) & 5 \\
|
| 332 |
+
Units per Module & 80 \\
|
| 333 |
+
Mini-Batch Size & 16 \\
|
| 334 |
+
Hidden Layer Activation & ReLU \\
|
| 335 |
+
Optimizer & Adam \\
|
| 336 |
+
Initial Learning Rate & 2e-3 \\
|
| 337 |
+
Convergence Criteria & Early Stopping \\
|
| 338 |
+
\bottomrule \\
|
| 339 |
+
\end{tabular}
|
| 340 |
+
\caption{Training parameters for the PathNet model.}
|
| 341 |
+
\label{table:pathnet_specs}
|
| 342 |
+
\end{table}
|
| 343 |
+
|
| 344 |
+
\begin{table}[h!]
|
| 345 |
+
\centering \footnotesize
|
| 346 |
+
\begin{tabular}{@{}ll@{}}\toprule
|
| 347 |
+
\textbf{Training Parameter} & \textbf{Value} \\
|
| 348 |
+
\midrule
|
| 349 |
+
SOM Shape & 23x23 \\
|
| 350 |
+
Mini-Batch Size & 1 \\
|
| 351 |
+
Hidden-Layer Activation & Custom \\
|
| 352 |
+
Initial SOM Learning Rate & 0.1 \\
|
| 353 |
+
MLP Learning Rate & 1e-3\\
|
| 354 |
+
Modulation Threshold ($\theta_{m}^{inc}$) & 0.5 \\
|
| 355 |
+
\multirow{2}{*}{Convergence Criteria} & 80,000 iterations (Base) \\
|
| 356 |
+
& 20,000 iterations (Incremental) \\
|
| 357 |
+
\bottomrule \\
|
| 358 |
+
\end{tabular}
|
| 359 |
+
\caption{Training parameters for the GeppNet and GeppNet+STM models.}
|
| 360 |
+
\label{table:som_specs}
|
| 361 |
+
\end{table}
|
| 362 |
+
|
| 363 |
+
\begin{table}[h!]
|
| 364 |
+
\centering \footnotesize
|
| 365 |
+
\begin{tabular}{@{}ll@{}}\toprule
|
| 366 |
+
\textbf{Training Parameter} & \textbf{Value} \\
|
| 367 |
+
\midrule
|
| 368 |
+
Hidden Layer Units & 400 \\
|
| 369 |
+
\multirow{3}{*}{FEL Layer Neurons} & 1200 (CUB-200) \\
|
| 370 |
+
& 2000 (AudioSet) \\
|
| 371 |
+
& 1200 (Multi-modal experiment)\\
|
| 372 |
+
Mini-Batch Size & 256 \\
|
| 373 |
+
Optimizer & Adam \\
|
| 374 |
+
Initial Learning Rate & 2e-2 \\
|
| 375 |
+
Convergence Criteria & Early Stopping \\
|
| 376 |
+
\bottomrule \\
|
| 377 |
+
\end{tabular}
|
| 378 |
+
\caption{Training parameters for the FEL model.}
|
| 379 |
+
\label{table:fel_specs}
|
| 380 |
+
\end{table}
|
| 381 |
+
\subsection{Reproduction Validation Experiments}
|
| 382 |
+
In the following section we have documented our results from our reproduction of some of the experiments previously done with each of these models. PathNet is not included in this section because we were able to get the model directly from \inline{fernando2017pathnet}.
|
| 383 |
+
|
| 384 |
+
Fig. \ref{fig:verify-ewc} demonstrates the results for our implementation of EWC from the MNIST experiment proposed by \inline{kirkpatrick2017overcoming}. Unlike the training methodology employed in our main paper, for the reproduction, we used the validation data from previous permutations to help retain previously trained tasks which is consistent with the original implementation of EWC. The results show the mean test accuracy across all permuted datasets seen so far. We performed a grid search across the hyperparameters (hidden layer size and learning rate) listed in the paper. Our model performs similarly to the one in \inline{kirkpatrick2017overcoming}.
|
| 385 |
+
|
| 386 |
+
\begin{figure}[th!]
|
| 387 |
+
\centering
|
| 388 |
+
\includegraphics[width=0.9\linewidth]{figures/ewc_varification.eps}
|
| 389 |
+
\caption{Our results for EWC on the MNIST experiment created by \inline{kirkpatrick2017overcoming}.}
|
| 390 |
+
\label{fig:verify-ewc}
|
| 391 |
+
\end{figure}
|
| 392 |
+
|
| 393 |
+
Table \ref{table:som_verify} contains results from our GeppNet and GeppNet+STM model verification experiment. Each test ``Inc-X'' involves training the base with every class except for ``X'' and then adding Class ``X'' incrementally. \inline{Gepperth2016} do not list specific percentages for each test, but the results in Table \ref{table:som_verify} are similar to the author's. The three reported metrics, in order, include the accuracy of the base prior to the incremental training step, the accuracy of the new class after the incremental training step, and the overall accuracy of all test data after the incremental training step.
|
| 394 |
+
|
| 395 |
+
\begin{table}[ht!]
|
| 396 |
+
\centering \footnotesize
|
| 397 |
+
\begin{tabular}{@{}rcccc@{}}\toprule
|
| 398 |
+
\multirow{2}{*}{\textbf{Test}} & \multirow{2}{*}{\textbf{Model}} & \multicolumn{3}{c}{\textbf{Accuracy}} \\
|
| 399 |
+
& &\textbf{Base} & \textbf{New Class} & \textbf{Overall}\\
|
| 400 |
+
\midrule
|
| 401 |
+
\multirow{2}{*}{\textbf{Inc-0}} & \textbf{GeppNet} & 92.9 & 93.2 & 92.6 \\
|
| 402 |
+
& \textbf{GeppNet+STM} & 92.4 & 83.2 & 90.4 \\[1ex]
|
| 403 |
+
\multirow{2}{*}{\textbf{Inc-1}} & \textbf{GeppNet} & 92.9 & 97.8 & 93.3 \\
|
| 404 |
+
& \textbf{GeppNet+STM} & 93.1 & 97.0 & 93.1 \\[1ex]
|
| 405 |
+
\multirow{2}{*}{\textbf{Inc-2}} & \textbf{GeppNet} & 93.3 & 81.8 & 92.0 \\
|
| 406 |
+
& \textbf{GeppNet+STM} & 92.9 & 84.0 & 90.4 \\[1ex]
|
| 407 |
+
\multirow{2}{*}{\textbf{Inc-3}} & \textbf{GeppNet} & 93.9 & 80.6 & 91.9 \\
|
| 408 |
+
& \textbf{GeppNet+STM} & 94.1 & 55.6 & 88.8 \\[1ex]
|
| 409 |
+
\multirow{2}{*}{\textbf{Inc-4}} & \textbf{GeppNet} & 94.1 & 72.0 & 90.6 \\
|
| 410 |
+
& \textbf{GeppNet+STM} & 93.6 & 94.5 & 85.3 \\[1ex]
|
| 411 |
+
\multirow{2}{*}{\textbf{Inc-5}} & \textbf{GeppNet} & 94.1 & 74.0 & 91.5 \\
|
| 412 |
+
& \textbf{GeppNet+STM} & 93.9 & 62.0 & 89.8 \\[1ex]
|
| 413 |
+
\multirow{2}{*}{\textbf{Inc-6}} & \textbf{GeppNet} & 93.1 & 93.0 & 92.9 \\
|
| 414 |
+
& \textbf{GeppNet+STM} & 92.7 & 89.9 & 91.4 \\[1ex]
|
| 415 |
+
\multirow{2}{*}{\textbf{Inc-7}} & \textbf{GeppNet} & 93.7 & 83.9 & 92.2 \\
|
| 416 |
+
& \textbf{GeppNet+STM} & 92.7 & 77.4 & 85.4 \\[1ex]
|
| 417 |
+
\multirow{2}{*}{\textbf{Inc-8}} & \textbf{GeppNet} & 94.5 & 73.6 & 92.1 \\
|
| 418 |
+
& \textbf{GeppNet+STM} & 94.0 & 74.7 & 90.4 \\[1ex]
|
| 419 |
+
\multirow{2}{*}{\textbf{Inc-9}} & \textbf{GeppNet} & 94.8 & 74.0 & 91.0 \\
|
| 420 |
+
& \textbf{GeppNet+STM} & 94.6 & 55.0 & 89.6 \\
|
| 421 |
+
\bottomrule \\
|
| 422 |
+
|
| 423 |
+
\end{tabular}
|
| 424 |
+
\caption{Tests to verify that GeppNet and GeppNet+STM were correctly implemented.
|
| 425 |
+
These tests use the parameters and training strategy from \inline{Gepperth2016}.}
|
| 426 |
+
\label{table:som_verify}
|
| 427 |
+
\end{table}
|
| 428 |
+
|
| 429 |
+
Table \ref{table:fel_verify} shows the results from the FEL verification experiment. We reproduced the non-stationary MNIST classification task with all ten digits proposed by \inline{FEL}. Complete reproducibility was difficult because the authors do not state the learning rate or number of epochs for training, but the results are still comparable.
|
| 430 |
+
|
| 431 |
+
\begin{table}[ht!]
|
| 432 |
+
\centering \footnotesize
|
| 433 |
+
\begin{tabular}{@{}cc@{}}\toprule
|
| 434 |
+
\textbf{Non-Stationary} & \textbf{FEL Network} \\
|
| 435 |
+
\textbf{Percentage} & \textbf{Performance} \\
|
| 436 |
+
\midrule
|
| 437 |
+
0.00 & 86.2 \\
|
| 438 |
+
0.25 & 67.9 \\
|
| 439 |
+
0.50 & 55.2 \\
|
| 440 |
+
0.75 & 46.7 \\
|
| 441 |
+
1.00 & 46.2 \\
|
| 442 |
+
\bottomrule \\
|
| 443 |
+
|
| 444 |
+
\end{tabular}
|
| 445 |
+
\caption{Tests to verify that FEL was correctly implemented. Tests match parameters and training strategy from \inline{FEL}.}
|
| 446 |
+
\label{table:fel_verify}
|
| 447 |
+
\end{table}
|
| 448 |
+
\subsection{Plots and Tables for Experimental Results}
|
| 449 |
+
In this section we provide plots and tables demonstrating the performance of the various models on the data permutation, incremental class learning, and multi-modal experiments. Additionally, we provide a comparison of results on the MNIST dataset to results on the harder CUB-200 and AudioSet datasets.
|
| 450 |
+
\subsubsection{Data Permutation Experiment}
|
| 451 |
+
Fig. \ref{fig:multitask} shows the results of the data permutation experiment on the MNIST, CUB-200, and AudioSet datasets. The first column of Fig. \ref{fig:multitask} shows the performance of the first session (original data) as the network learns new permutations and the second column of Fig. \ref{fig:multitask} shows the performance of the current permutation to demonstrate that the network is still learning new information. Although GeppNet and GeppNet+STM appear to be retaining the original task, they do not appear to be acquiring new information.
|
| 452 |
+
|
| 453 |
+
While performance is worse for all models on the CUB-200 and AudioSet datasets than on MNIST (See Fig. \ref{fig:multitask} and Table \ref{table:results}), some models exhibit similar trends in behavior independent of the dataset. In particular, GeppNet and GeppNet+STM retain the original data, but are unable to learn new information for both the CUB-200 and AudioSet datasets, which is similar to the behavior they exhibited on MNIST. In addition, FEL is prone to catastrophically forgetting the original data while maintaining the ability to learn new information, with worse performance than the MLP for learning new information on all three datasets.
|
| 454 |
+
|
| 455 |
+
While EWC and PathNet have the best overall performance, both models perform worse on the CUB-200 and AudioSet datasets than on MNIST. Although PathNet is able to retain some knowledge of the original data while still maintaining the ability to learn new information on the CUB-200 and AudioSet datasets, its retention accuracy and newly trained task accuracy are much lower than in the MNIST experiments. Additionally, the EWC and MLP models exhibit similar behavior to one another on AudioSet with both models catastrophically forgetting the original data, while still maintaining some ability to learn new information.
|
| 456 |
+
|
| 457 |
+
For the permutation task on the CUB-200 dataset, EWC performs the best, with similar trends to its performance on MNIST. With many of the models yielding significantly different trends and worse overall performance for the permutation task on the CUB-200 and AudioSet, it is important to consider scalability to large datasets before choosing a model for an incremental learning based task.
|
| 458 |
+
\subsubsection{Incremental Class Learning Experiment}
|
| 459 |
+
Fig. \ref{fig:incremental} shows the results of the incremental class learning experiment. Similar to the permutation task, results for the incremental class learning experiment (See Fig. \ref{fig:incremental} and Table \ref{table:results}) on the CUB-200 and AudioSet are much worse than on MNIST. Overall, MLP and EWC do not perform well for the incremental task and GeppNet, GeppNet+STM, and FEL perform the best on all three datasets, with significantly better results on the MNIST dataset. Both GeppNet and GeppNet+STM are capable of retaining prior knowledge while also learning new classes; however, GeppNet performs better since it trains for every iteration (instead of only during the sleep phase).
|
| 460 |
+
|
| 461 |
+
\begin{figure*}[ht!]
|
| 462 |
+
\centering
|
| 463 |
+
\subfigure[First Permutation - MNIST]{
|
| 464 |
+
\centering
|
| 465 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_mnist_first.eps}
|
| 466 |
+
\label{fig:multitask-mnista}
|
| 467 |
+
}
|
| 468 |
+
\subfigure[Most Recent Permutation - MNIST]{
|
| 469 |
+
\centering
|
| 470 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_mnist_recent.eps}
|
| 471 |
+
\label{fig:multitask-mnistb}}
|
| 472 |
+
\subfigure[First Permutation - CUB-200]{
|
| 473 |
+
\centering
|
| 474 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_cub_first.eps}
|
| 475 |
+
\label{fig:multitask-cuba}
|
| 476 |
+
}
|
| 477 |
+
\subfigure[Most Recent Permutation - CUB-200]{
|
| 478 |
+
\centering
|
| 479 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_cub_recent.eps}
|
| 480 |
+
\label{fig:multitask-cubb}
|
| 481 |
+
}
|
| 482 |
+
\subfigure[First Permutation - AudioSet]{
|
| 483 |
+
\centering
|
| 484 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_as_first.eps}
|
| 485 |
+
\label{fig:multitask-asa}}
|
| 486 |
+
\label{fig:multitask-as}
|
| 487 |
+
\subfigure[Most Recent Permutation - AudioSet]{
|
| 488 |
+
\centering
|
| 489 |
+
\includegraphics[width=0.45\linewidth]{figures/perm_as_recent.eps}
|
| 490 |
+
\label{fig:multitask-asb}
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
\caption{Data Permutation experiment for MNIST, CUB-200, and AudioSet. The first column shows the performance of the original task as new tasks are learned and the second column shows the performance of the most recent permutation.}
|
| 494 |
+
\label{fig:multitask}
|
| 495 |
+
\end{figure*}
|
| 496 |
+
|
| 497 |
+
\begin{figure*}[th!]
|
| 498 |
+
\centering
|
| 499 |
+
\subfigure[Base Set Accuracy for MNIST]{
|
| 500 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_base_mnist.eps}
|
| 501 |
+
\label{fig:incremental-mnista}}
|
| 502 |
+
\subfigure[Overall Accuracy for MNIST]{
|
| 503 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_all_mnist.eps}
|
| 504 |
+
\label{fig:incremental-mnistb}}
|
| 505 |
+
\subfigure[Base Set Accuracy for CUB-200]{
|
| 506 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_base_cub.eps}
|
| 507 |
+
\label{fig:base_cub}}
|
| 508 |
+
\subfigure[Overall Accuracy for CUB-200]{
|
| 509 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_all_cub.eps}
|
| 510 |
+
\label{fig:overall_cub}}
|
| 511 |
+
\subfigure[Base Set Accuracy for AudioSet]{
|
| 512 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_base_as.eps}
|
| 513 |
+
\label{fig:base_as}}
|
| 514 |
+
\subfigure[Overall Accuracy for AudioSet]{
|
| 515 |
+
\includegraphics[width=0.45\linewidth]{figures/inc_all_as.eps}
|
| 516 |
+
\label{fig:overall_as}}
|
| 517 |
+
|
| 518 |
+
\caption{The results from the incremental learning experiment for MNIST, CUB-200, and AudioSet. The results are the mean-per-class accuracy of each model for the entire testing set over time. The first column shows the base set accuracy and the second column shows the overall accuracy. The dashed line shows the performance of the offline MLP. }
|
| 519 |
+
\label{fig:incremental}
|
| 520 |
+
\end{figure*}
|
| 521 |
+
\subsubsection{Multi-Modal Experiment}
|
| 522 |
+
Table \ref{table:multimodal2} shows the results for the multi-modal experiment. The results indicate that EWC performs the best for this task, which is consistent with the results presented in Table \ref{table:results}.
|
| 523 |
+
|
| 524 |
+
\begin{table}[t!]
|
| 525 |
+
\centering \footnotesize
|
| 526 |
+
\begin{tabular}{@{}cccc@{}}\toprule
|
| 527 |
+
& & \multicolumn{2}{c}{\textbf{Accuracy}} \\
|
| 528 |
+
& & \textbf{Initial} & \textbf{Final} \\
|
| 529 |
+
\midrule
|
| 530 |
+
\multirow{2}{*}{\textbf{MLP}} &\textbf{CUB/AS} & 61.8 / 41.2 & 20.3 / 41.2 \\
|
| 531 |
+
&\textbf{AS/CUB} & 47.7 / 60.9 & 9.1 / 60.9 \\[1ex]
|
| 532 |
+
\multirow{2}{*}{\textbf{EWC}} &\textbf{CUB/AS} & 64.3 / 36.9 & 58.6 / 36.9 \\
|
| 533 |
+
&\textbf{AS/CUB} & 47.4 / 58.8 & 47.1 / 58.8 \\[1ex]
|
| 534 |
+
\multirow{2}{*}{\textbf{PathNet}} &\textbf{CUB/AS} & 59.2 / 37.6 & 56.4 / 37.6 \\
|
| 535 |
+
&\textbf{AS/CUB} & 44.7 / 54.0 & 3.2 / 54.0 \\[1ex]
|
| 536 |
+
\multirow{2}{*}{\textbf{GeppNet}} &\textbf{CUB/AS} & 38.3 / 1.0 & 9.7 / 1.0 \\
|
| 537 |
+
&\textbf{AS/CUB} & 41.8 / 0.5 & 42.1/ 0.5 \\[1ex]
|
| 538 |
+
\multirow{2}{*}{\textbf{GeppNet+STM}} &\textbf{CUB/AS} & 36.9 / 1.0 & 1.9 / 1.0 \\
|
| 539 |
+
&\textbf{AS/CUB} & 40.1 / 0.5 & 38.2 / 0.5 \\[1ex]
|
| 540 |
+
\multirow{2}{*}{\textbf{FEL}} &\textbf{CUB/AS} & 40.5 / 32.9 & 6.8 / 32.9 \\
|
| 541 |
+
&\textbf{AS/CUB} & 33.8 / 32.0 & 21.8 / 32.0 \\
|
| 542 |
+
\bottomrule
|
| 543 |
+
\end{tabular}
|
| 544 |
+
\caption{\textit{Results from Multi-Modal Experiment.} AS denotes AudioSet. For each experiment, ``A/B'' indicates where task A is trained first followed by the training of task B. Initial Accuracy is the performance for tasks A/B immediately after each are trained. Final Accuracy is the performance for each task after both tasks are trained.}
|
| 545 |
+
\label{table:multimodal2}
|
| 546 |
+
\end{table}
|
| 547 |
+
\subsection{Fast Correlation Based Filter}
|
| 548 |
+
In this paper, we used the Fast Correlation Based Filter (FCBF) to measure feature redundancy in each dataset~\cite{yu2003feature}. FCBF uses symmetric uncertainty to measure the independence (inverse redundancy) between two random variables $X,Y$. Symmetric uncertainty is defined in Eq. \ref{eq:symmetric_uncertainty} where $H\left(X\right)$ is the entropy of $X$ (Eq. \ref{eq:entropy}), $H\left(X\vert Y \right)$ is the entropy of $X$ after observing $Y$ (Eq. \ref{eq:conditional}), and $IG\left(X\vert Y\right)$ is the information gain between $X$ and $Y$ (Eq. \ref{eq:information_gain}).
|
| 549 |
+
|
| 550 |
+
\begin{equation}
|
| 551 |
+
\label{eq:symmetric_uncertainty}
|
| 552 |
+
SU\left(X,Y\right) = 2\cdot\frac{IG\left(X\vert Y\right)}{H\left(X\right) + H\left(Y\right)}
|
| 553 |
+
\end{equation}
|
| 554 |
+
|
| 555 |
+
\begin{equation}
|
| 556 |
+
\label{eq:entropy}
|
| 557 |
+
H\left(X\right) = - \sum_i P\left(x_i\right) log_2\left(P\left(x_i\right)\right)
|
| 558 |
+
\end{equation}
|
| 559 |
+
|
| 560 |
+
\begin{equation}
|
| 561 |
+
\label{eq:conditional}
|
| 562 |
+
H\left(X \vert Y\right) = - \sum_j P\left(y_j\right) \sum_i P\left(x_i \vert y_j\right) log_2\left(P\left(x_i \vert y_j\right)\right)
|
| 563 |
+
\end{equation}
|
| 564 |
+
|
| 565 |
+
\begin{equation}
|
| 566 |
+
\label{eq:information_gain}
|
| 567 |
+
IG\left(X\vert Y\right) = H\left(X\right) - H\left(X \vert Y\right)
|
| 568 |
+
\end{equation}
|
| 569 |
+
|
| 570 |
+
Table \ref{table:fcbf} shows the total number of non-redundant features for each dataset along with the percentage of features that are not redundant in each dataset. The results show that the features in MNIST and AudioSet are noticeably more redundant than the features found in CUB-200.
|
| 571 |
+
|
| 572 |
+
\begin{table}[t!]
|
| 573 |
+
\centering \footnotesize
|
| 574 |
+
\begin{tabular}{@{}ccc@{}}\toprule
|
| 575 |
+
\multirow{2}{*}{\textbf{Dataset}} & \textbf{Non-Redundant} & \textbf{Percentage of} \\
|
| 576 |
+
& \textbf{Features} & \textbf{Total Features} \\
|
| 577 |
+
\midrule
|
| 578 |
+
MNIST & 39 & 5.0\% \\
|
| 579 |
+
AudioSet & 129 & 10.1\% \\
|
| 580 |
+
CUB-200 & 450 & 22.0\% \\
|
| 581 |
+
\bottomrule
|
| 582 |
+
\end{tabular}
|
| 583 |
+
\caption{\textit{Non-redundant features in MNIST, AudioSet, and CUB-200 datasets.} This was determined using the Fast Correlation Based Filter algorithm.}
|
| 584 |
+
\label{table:fcbf}
|
| 585 |
+
\end{table}
|
| 586 |
+
|
| 587 |
+
Figure \ref{fig:fcbf} is a visualization of these results, where we show the symmetric uncertainty matrix for each dataset. The results are a $F\times F$ matrix where $F$ is the dimensionality of the feature vector (e.g. CUB-200 is 2048). The bright areas represent features that are strongly correlated with one another (they are more redundant). The results show significant feature overlap in MNIST which is expected since it is a gray-scale image with zero values in the background. AudioSet also has sub-diagonals across the matrix which correspond to highly correlated features that repeat over some interval. Each AudioSet sample consists of ten 128-dimensional sub-vectors that are concatenated together to form a single vector. Each sub-vector is the feature representation of the audio signal for a single second. Since the sounds repeat across the entire ten seconds, the corresponding features are strongly correlated in those locations. The CUB-200 features appear to not be strongly correlated. This is probably because each sample is the ResNet-50 feature representation which is highly discriminative.
|
| 588 |
+
|
| 589 |
+
\begin{figure}[th!]
|
| 590 |
+
\centering
|
| 591 |
+
|
| 592 |
+
\subfigure[MNIST]{%
|
| 593 |
+
\includegraphics[width=0.9\linewidth]{figures/su_mnist.eps}
|
| 594 |
+
\label{fig:su_mnist}}
|
| 595 |
+
|
| 596 |
+
\subfigure[CUB-200]{%
|
| 597 |
+
\includegraphics[width=0.9\linewidth]{figures/su_cub.eps}
|
| 598 |
+
\label{fig:su_cub}}
|
| 599 |
+
|
| 600 |
+
\subfigure[AudioSet]{%
|
| 601 |
+
\includegraphics[width=0.9\linewidth]{figures/su_as.eps}
|
| 602 |
+
\label{fig:su_as}}
|
| 603 |
+
|
| 604 |
+
\caption{\textit{Symmetric uncertainty coefficients for all three datasets.}}
|
| 605 |
+
\label{fig:fcbf}
|
| 606 |
+
\end{figure}
|
| 607 |
+
\subsection{Ideal Model}
|
| 608 |
+
Table \ref{table:results_ideal} show the experimental results when the model capacity is not constrained; that is, we performed a hyperparameter search to find the best model for each model/dataset combination. The base results are a bit higher than the results where we constrained the model capacity (Table \ref{table:results}), but the main conclusions remain the same.
|
| 609 |
+
|
| 610 |
+
\begin{table*}[t!]
|
| 611 |
+
\centering \footnotesize
|
| 612 |
+
\begin{tabular}{@{}cc|ccc|ccc|c|c@{}}\toprule
|
| 613 |
+
\multirow{2}{*}{\textbf{Model}} & \multirow{2}{*}{\textbf{Dataset}} & \multicolumn{3}{c|}{\textbf{Data Permutation}} & \multicolumn{3}{c|}{\textbf{Incremental Class}} & \textbf{Memory} & \textbf{Model} \\
|
| 614 |
+
& & $\Omega_{base}$ & $\Omega_{new}$ & $\Omega_{all}$& $\Omega_{base}$ & $\Omega_{new}$ & $\Omega_{all}$ & \textbf{Constraints} & \textbf{Size (MB)} \\
|
| 615 |
+
\midrule
|
| 616 |
+
\multirow{2}{*}{\textbf{MLP}} &\textbf{CUB} & 0.449 & 0.936 & 0.619 & 0.000 & 0.640 & 0.011 & \multirow{2}{*}{Fixed-size} & 36.54 \\
|
| 617 |
+
&\textbf{AS} & 0.336 & 0.950 & 0.578 & 0.025 & 1.000 & 0.050 & & 4.44 \\[1ex]
|
| 618 |
+
\multirow{2}{*}{\textbf{EWC}} &\textbf{CUB} & 0.426 & 0.830 & 0.525 & 0.362 & 0.010 & 0.302 & \multirow{2}{*}{Fixed-size} & 13.19\\
|
| 619 |
+
&\textbf{AS} & 0.118 & 0.459 & 0.182 & 0.249 & 0.000 & 0.213 & & 4.41 \\[1ex]
|
| 620 |
+
\multirow{2}{*}{\textbf{PathNet}}&\textbf{CUB} & 0.538 & 0.701 & 0.655 & N/A & N/A & N/A & New output layer & 7.46\\
|
| 621 |
+
&\textbf{AS} & 0.414 & 0.750 & 0.615 & N/A & N/A & N/A & for each task & 4.68\\[1ex]
|
| 622 |
+
\multirow{2}{*}{\textbf{GeppNet}} &\textbf{CUB} & 0.571 & 0.112 & 0.167 & 0.758 & 0.558 & 0.675 & Stores all & 58.33 \\
|
| 623 |
+
&\textbf{AS} & 0.877 & 0.238 & 0.346 & 1.024 & 0.495 & 0.972 & training data & 153.12 \\[1ex]
|
| 624 |
+
\multirow{2}{*}{\textbf{GeppNet+STM}}&\textbf{CUB}& 0.610 & 0.014 & 0.137 & 0.803 & 0.217 & 0.686 & Stores all & 59.77 \\
|
| 625 |
+
&\textbf{AS} & 0.857 & 0.125 & 0.272 & 1.025 & 0.372 & 0.942 & training data & 153.94 \\[1ex]
|
| 626 |
+
\multirow{2}{*}{\textbf{FEL}} &\textbf{CUB} & 0.575 & 0.880 & 0.732 & 0.735 & 0.976 & 0.672 & \multirow{2}{*}{Fixed-size} & 209.06 \\
|
| 627 |
+
&\textbf{AS} & 0.191 & 0.853 & 0.444 & 0.595 & 0.999 & 0.541 & & 247.07 \\[1ex]
|
| 628 |
+
\bottomrule
|
| 629 |
+
\end{tabular}
|
| 630 |
+
\caption{Results on CUB-200 (CUB) and AudioSet (AS) for our evaluation metrics as well as model size (in MB) for each model/dataset combination. In these experiments, we optimized the model capacity and other hyperparameters for each model/dataset combination.}
|
| 631 |
+
\label{table:results_ideal}
|
| 632 |
+
\end{table*}
|
1708.02153v2.txt
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Recent years have seen the widespread implementation of data-driven decision making algorithms in increasingly high-stakes domains, such as finance, healthcare, transportation and public safety. Using novel ML techniques, these algorithms are able to process massive amounts of data and make highly accurate predictions; however, their inherent complexity makes it increasingly difficult for humans to understand why certain decisions were made.Indeed, these algorithms are black-box decision makers: their inner workings are either hidden from human scrutiny by proprietary law, or (as is often the case) are so complicated that even their own designers are hard-pressed to explain their behavior. By obfuscating their reasoning, data-driven classifiers expose human stakeholders to risks. These may include incorrect decisions (e.g. a loan application that was wrongly rejected due to system error), information leaks (e.g. an algorithm inadvertently uses information it should not have used), or discrimination (e.g. biased decisions against certain ethnic or gender groups). Government bodies and regulatory authorities have recently begun calling for algorithmic transparency: providing human-interpretable explanations of the underlying reasoning behind large-scale decision making algorithms. Several recent works propose making algorithms more transparent by using numerical influence measures: methods for measuring the importance of every feature in a dataset. However, these works, by and large, do not justify why their particular methodology is sound.Our work takes an axiomatic approach to influence measurement in data-driven domains. Starting from a set of desiderata (or axioms), we uniquely derive a class of measures satisfying these axioms. Thus, our work provides a…formal axiomatic analysis of automatically generated numerical explanations for black-box classifiers.
|
| 2 |
+
|
| 3 |
+
Numerical influence measures are functions that assign a value ϕisubscriptitalic-ϕ𝑖\phi_{i} to every feature i𝑖i; ϕisubscriptitalic-ϕ𝑖\phi_{i} corresponds to the predicted effect of this feature on the outcome. We identify specific properties (axioms) that any reasonable influence measure should satisfy (Section 3), and derive a class of influence measures, dubbed monotone influence measures (MIM), uniquely satisfying these axioms (Section 4).Next, we show that MIM can be interpreted as the solution to a natural optimization problem, further grounding our methodology (Section 5).Unlike most existing influence measures in the literature, we assume neither knowledge of the underlying decision making algorithm, nor of its behavior on points outside the dataset. Indeed, some methodologies (see Section 7 in the supplementary material) are heavily reliant on having access to counterfactual information: what would the classifier have done if some features were changed? This may be a strong assumption: it requires not only access to the classifier, but also the potential ability to use it on nonsensical data points111For example, if the dataset consists of medical records of men and women, the classifier might need to answer how it would handle pregnant men.. By making no such assumptions, we provide a general methodology for measuring influence; indeed, many of the methods described in Section 1.2 are unusable in the absence of classifier access, or when the underlying classification algorithm is not known.We show that despite our rather limiting conceptual framework, MIM does surprisingly well on a sparse image dataset, and provides an interesting analysis of a recidivism dataset. We compare the outputs of MIM to other measures, and provide interpretable results. Additional results relate MIM, new influence measures in a statistical cost sharing domain (?), and classic game-theoretic measures (?).
|
| 4 |
+
|
| 5 |
+
Algorithmic transparency has been debated and called for by government bodies (?, ?, ?), the legal community (?, ?), and the media (?, ?, ?, ?). The AI/ML research community is paying attention: algorithmic fairness, accountability and transparency is quickly gaining traction in the CS community, with new conferences (e.g. FAT* and AIES), numerous workshops and dozens of publications in mainstream AI/ML conferences. Several ongoing research efforts are informing the design of explainable AI systems (e.g. ? ((?)), ? ((?))), as well as tools that explain the behavior of existing black-box systems (see ? ((?)) for an overview); we focus on the latter.
|
| 6 |
+
|
| 7 |
+
The work most closely related to ours is that of ? ((?)). ? ((?)) axiomatically characterize an influence measure for datasets; however, they interpret influence as a global measure (e.g., what is the overall importance of gender for decision making), whereas we measure feature importance for individual datapoints. Moreover, as ? ((?)) show, the measure proposed by ? ((?)) outputs undesirable values (e.g. zero influence) on real data; this is due to the fact that the measure requires the existence of counterfactual data: datapoints that differ by only a single feature. As we show in Section 8, MIM does not require such a dense dataset in order to register influence. ? ((?)) propose a data-driven influence measure that relies on a potential-like approach; as we demonstrate, their methodology fails to satisfy reasonable properties even on simple datasets.
|
| 8 |
+
|
| 9 |
+
Other approaches in the literature rely on black-box access to the classifier. ? ((?)) use an axiomatically justified influence measure based on an economic fairness paradigm, called QII; briefly, QII perturbs feature values and observes the effect this has on the classification outcome. Another line of work using black-box access (?, ?) uses queries to the classifier in a local region near the point of interest in order to measure influence. ? ((?)) equate the influence of a given feature i𝑖i with the ability to infer i𝑖i’s value from the rest of features, after it has been obscured; this idea is the basis for a framework for auditing black-box models. However, this approach assumes that one can make predictions on a dataset with some features removed. ? ((?)) have a different take on influence, identifying key datapoints — rather than features — that explain classifier behavior.
|
| 10 |
+
|
| 11 |
+
Some works study explanations for specific domains, such as neural networks (?, ?, ?), or computer programs (?); others apply explanations for generating more accurate predictions (?).
|
| 12 |
+
|
| 13 |
+
A dataset 𝒳=⟨x→1,…,x→m⟩𝒳subscript→𝑥1…subscript→𝑥𝑚\mathcal{X}=\langle\vec{x}_{1},\dots,\vec{x}_{m}\rangle is given as a list of vectors in ℝnsuperscriptℝ𝑛\mathbb{R}^{n} (each dimension i∈[n]𝑖delimited-[]𝑛i\in[n] is a feature), where every x→j∈𝒳subscript→𝑥𝑗𝒳\vec{x}_{j}\in\mathcal{X} has a unique label cj∈{−1,1}subscript𝑐𝑗11c_{j}\in\{-1,1\}; given a vector x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X}, we refer to the label of x→→𝑥\vec{x} as c(x→)𝑐→𝑥c(\vec{x}).An influence measure is a function ϕitalic-ϕ\phi whose input is a dataset 𝒳𝒳\mathcal{X}, vector labels denoted by c𝑐c, and a specific point of interest x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X}; its output is a value ϕi(x→,𝒳,c)∈ℝsubscriptitalic-ϕ𝑖→𝑥𝒳𝑐ℝ\phi_{i}(\vec{x},\mathcal{X},c)\in\mathbb{R}; we often omit the inputs 𝒳𝒳\mathcal{X} and c𝑐c when they are clear from context. The value ϕi(x→)subscriptitalic-ϕ𝑖→𝑥\phi_{i}(\vec{x}) should correspond to how altering the i𝑖i-th feature is predicted to affect the outcome c(x→)𝑐→𝑥c(\vec{x}) for x→→𝑥\vec{x} in the following way: if ϕi(x→)subscriptitalic-ϕ𝑖→𝑥\phi_{i}(\vec{x}) is positive (negative), then for points similar to x→→𝑥\vec{x}, increasing the value of the i-th feature increases (decreases) the likelihood of assigning the label c(x→)𝑐→𝑥c(\vec{x}), and the value |ϕi(x→)|subscriptitalic-ϕ𝑖→𝑥|\phi_{i}(\vec{x})| expresses the strength of that effect.
|
| 14 |
+
|
| 15 |
+
We are now ready to define our axioms; these are simple properties that we believe any reasonable influence measure should satisfy.1.Shift Invariance: let 𝒳+b→𝒳→𝑏\mathcal{X}+\vec{b} be the dataset resulting from adding the vector b→∈ℝn→𝑏superscriptℝ𝑛\vec{b}\in\mathbb{R}^{n} to every vector in 𝒳𝒳\mathcal{X} (not changing the labels). An influence measure ϕitalic-ϕ\phi is said to be shift invariant if for any vector b→∈ℝn→𝑏superscriptℝ𝑛\vec{b}\in\mathbb{R}^{n}, any i∈[n]𝑖delimited-[]𝑛i\in[n] and any x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X},ϕi(x→,𝒳)=ϕi(x→+b→,𝒳+b→).subscriptitalic-ϕ𝑖→𝑥𝒳subscriptitalic-ϕ𝑖→𝑥→𝑏𝒳→𝑏\phi_{i}(\vec{x},\mathcal{X})=\phi_{i}(\vec{x}+\vec{b},\mathcal{X}+\vec{b}).In other words, shifting the entire dataset by some vector b→→𝑏\vec{b} should not affect feature importance.2.Rotation and Reflection Faithfulness: let A𝐴A be a rotation (or reflection) matrix, i.e. an n×n𝑛𝑛n\times n matrix with det(A)∈±1𝐴plus-or-minus1\det(A)\in\pm 1; let A𝒳𝐴𝒳A\mathcal{X} be the dataset resulting from taking every point x→→𝑥\vec{x} in 𝒳𝒳\mathcal{X} and replacing it with Ax→𝐴→𝑥A\vec{x}. An influence measure ϕitalic-ϕ\phi is said to be rotation and reflection faithful if for any rotation matrix A𝐴A, and any point x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X}, we haveAϕ(x→,𝒳)=ϕ(Ax→,A𝒳).𝐴italic-ϕ→𝑥𝒳italic-ϕ𝐴→𝑥𝐴𝒳A\phi(\vec{x},\mathcal{X})=\phi(A\vec{x},A\mathcal{X}).In other words, the influence measure ϕitalic-ϕ\phi is invariant under rotation and reflection.3.Continuity: an influence measure ϕitalic-ϕ\phi is said to be continuous if it is a continuous function of 𝒳𝒳\mathcal{X}.4.Flip Invariance: let −c𝑐-c be the labeling resulting from replacing every label c(x→)𝑐→𝑥c(\vec{x}) with −c(x→)𝑐→𝑥-c(\vec{x}). An influence measure is flip invariant if for every point x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X} and every i∈[n]𝑖delimited-[]𝑛i\in[n] we haveϕi(x→,𝒳,c)=ϕi(x→,𝒳,−c).subscriptitalic-ϕ𝑖→𝑥𝒳𝑐subscriptitalic-ϕ𝑖→𝑥𝒳𝑐\phi_{i}(\vec{x},\mathcal{X},c)=\phi_{i}(\vec{x},\mathcal{X},-c).5.Monotonicity: a point y→∈ℝn→𝑦superscriptℝ𝑛\vec{y}\in\mathbb{R}^{n} is said to strengthen the influence of feature i𝑖i with respect to x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X} if c(x→)=c(y→)𝑐→𝑥𝑐→𝑦c(\vec{x})=c(\vec{y}) and yi>xisubscript𝑦𝑖subscript𝑥𝑖y_{i}>x_{i}; similarly, a point y→∈ℝn→𝑦superscriptℝ𝑛\vec{y}\in\mathbb{R}^{n} is said to weaken the influence of i𝑖i with respect to x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X} if yi>xisubscript𝑦𝑖subscript𝑥𝑖y_{i}>x_{i} and c(x→)≠c(y→)𝑐→𝑥𝑐→𝑦c(\vec{x})\neq c(\vec{y}). An influence measure ϕitalic-ϕ\phi is said to be monotonic, if for any data set 𝒳𝒳\mathcal{X}, any feature i𝑖i and any data point x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X} we have ϕi(x→,𝒳)≤ϕi(x→,𝒳∪{y→})subscriptitalic-ϕ𝑖→𝑥𝒳subscriptitalic-ϕ𝑖→𝑥𝒳→𝑦\phi_{i}(\vec{x},\mathcal{X})\leq\phi_{i}(\vec{x},\mathcal{X}\cup\{\vec{y}\}) if y→→𝑦\vec{y} strengthens i𝑖i w.r.t. x→→𝑥\vec{x}, and ϕi(x→,𝒳)≥ϕi(x→,𝒳∪{y→})subscriptitalic-ϕ𝑖→𝑥𝒳subscriptitalic-ϕ𝑖→𝑥𝒳→𝑦\phi_{i}(\vec{x},\mathcal{X})\geq\phi_{i}(\vec{x},\mathcal{X}\cup\{\vec{y}\}) if y→→𝑦\vec{y} weakens i𝑖i w.r.t. x→→𝑥\vec{x}.6.Non-Bias:suppose that all labels for points in 𝒳𝒳\mathcal{X} are assigned i.i.d. uniformly at random (i.e. for all y→∈𝒳→𝑦𝒳\vec{y}\in\mathcal{X}, Pr[c(y→)=1]=Pr[c(y→)=−1]Pr𝑐→𝑦1Pr𝑐→𝑦1\Pr[c(\vec{y})=1]=\Pr[c(\vec{y})=-1]). We call this label distribution 𝒰𝒰\mathcal{U}; an influence measure ϕitalic-ϕ\phi satisfies the non-bias axiom if for all x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X} and all i∈[n]𝑖delimited-[]𝑛i\in[n] we have𝔼c∼𝒰[ϕi(x→,𝒳,c)∣c(x→)]=0subscript𝔼similar-to𝑐𝒰delimited-[]conditionalsubscriptitalic-ϕ𝑖→𝑥𝒳𝑐𝑐→𝑥0\displaystyle\mathbb{E}_{c\sim\mathcal{U}}[\phi_{i}(\vec{x},\mathcal{X},c)\mid c(\vec{x})]=0In other words, when we fix the label of x→→𝑥\vec{x} and randomize all other labels, the expected influence of all features is 0.The first four axioms are rather fundamental: indeed, most influence measures in the literature trivially satisfy some variants of these properties. The last two axioms are more interesting. While we strongly believe that there is no one “universally correct” set of axioms that all influence measures should satisfy, we believe that our proposed properties make intuitive sense in many application domains.
|
| 16 |
+
|
| 17 |
+
Monotonicity is a key defining property for characterizing our family of influence measures. Intuitively, it is a consistency requirement: if one is to argue that a person’s old age caused their bank loan to be rejected, then finding older persons whose loans were similarly rejected should strengthen this argument; however, finding older persons whose loans were not rejected should weaken the argument. We mention that monotonicity coupled with flip invariance implies the converse argument as well: adding younger persons whose loans were accepted should increase the influence of age, and adding younger persons whose loans were rejected would decrease it. Of course, in order for the monotonicity property to make any sense, feature states must satisfy some natural order: they should be numerical quantities (e.g. income, age, scores in a test, or shades of a color), states with a natural progression (e.g. education level, or disease severity), or binary states (e.g. gender). Monotonicity does not easily apply to features whose states cannot be naturally ordered (e.g. profession, ethnicity, species). That said, our characterization result holds whenever the dataset has at least one feature whose states can be naturally ordered.
|
| 18 |
+
|
| 19 |
+
The Non-Bias axiom states that when labels are randomly generated, no feature should have any influence in expectation. We argue that this requirement is absolutely necessary: any influence measure that fails this test exhibits an inherent bias towards some features, even when labels are completely unrelated to the data. As we show in Section 7 in the supplementary material, some measures in the literature fail the non-bias test.
|
| 20 |
+
|
| 21 |
+
In what follows, we show that influence measures satisfying the axioms in Section 3 must follow a specific formula, described in Theorem 4.2. Below, 𝟙(p)1𝑝\mathbbm{1}(p) is a {1,−1}11\{1,-1\}-valued indicator (i.e. 111 if p𝑝p is true and −11-1 otherwise), and ∥x→∥delimited-∥∥→𝑥\lVert\vec{x}\rVert is the Euclidean length of x→→𝑥\vec{x}; our analysis admits other distances over ℝnsuperscriptℝ𝑛\mathbb{R}^{n}, but we stick with ∥⋅∥delimited-∥∥⋅\lVert\cdot\rVert for concreteness.We begin by showing a simple technical lemma.
|
| 22 |
+
|
| 23 |
+
We are now ready to prove our main result.
|
| 24 |
+
|
| 25 |
+
We refer to measures satisfying Equation (2) as monotone influence measures (MIM). We note that MIM is a family of influence measures, parameterized by the choice of the function α𝛼\alpha. It may be natural to assume that α𝛼\alpha is a monotone decreasing function; that is, the further away the point y→→𝑦\vec{y} is from x→→𝑥\vec{x}, the lower its effect on ϕitalic-ϕ\phi should be. However, this assumption does not follow from our analysis.In what follows, we propose a method of selecting the α𝛼\alpha parameter, by viewing MIM as a solution to an optimization problem, in a similar manner to ? ((?)).
|
| 26 |
+
|
| 27 |
+
Is MIM a ‘good’ way of measuring influence? If the reader is convinced that the axioms proposed in Section 3 make sense, then our work here is done. In this section we make an additional case for MIM, showing that it is an optimal solution to a natural optimization problem. The results in this section serve an additional important purpose. Our characterization result (Theorem 4.2) identifies a family of measures (MIM), not a unique function, parameterized by the α𝛼\alpha function in Equation (2). Theorem 4.2 only requires that α𝛼\alpha is a function of ∥x→−y→∥delimited-∥∥→𝑥→𝑦\lVert\vec{x}-\vec{y}\rVert, but does not indicate what choice of α𝛼\alpha is appropriate. As we now show, MIM can be seen as a solution to an underlying optimization problem, the parameters of which may indicate the appropriate choice of α𝛼\alpha.
|
| 28 |
+
|
| 29 |
+
We are given a dataset 𝒳𝒳\mathcal{X} and a point of interest x→→𝑥\vec{x}. Consider any potential influence vector ϕitalic-ϕ\phi; intuitively, ϕitalic-ϕ\phi should be a direction, such that moving x→→𝑥\vec{x} along ϕitalic-ϕ\phi will ‘increase the chance’ or ‘positively contribute’ to the label of x→→𝑥\vec{x} being c(x→)𝑐→𝑥c(\vec{x}). For any point y→∈𝒳→𝑦𝒳\vec{y}\in\mathcal{X} s.t. c(y→)=c(x→)𝑐→𝑦𝑐→𝑥c(\vec{y})=c(\vec{x}), it is desirable that ϕitalic-ϕ\phi points towards y→→𝑦\vec{y}; if c(y→)≠c(x→)𝑐→𝑦𝑐→𝑥c(\vec{y})\neq c(\vec{x}), ϕitalic-ϕ\phi should point away from y→→𝑦\vec{y}.
|
| 30 |
+
|
| 31 |
+
Local points should be assigned more influence than further ones. Assume a function α0:ℝ→ℝ:subscript𝛼0→ℝℝ\alpha_{0}:\mathbb{R}\to\mathbb{R} whose input is ∥(y→−x→)∥delimited-∥∥→𝑦→𝑥\lVert(\vec{y}-\vec{x})\rVert; its output is a weightage representing the importance of y→→𝑦\vec{y}; intuitively, α0subscript𝛼0\alpha_{0} should be monotone decreasing in its input, assigning higher values to points in a local neighborhood of x→→𝑥\vec{x} and lower importance to points further away. Hence, ϕ(x→,𝒳)italic-ϕ→𝑥𝒳\phi(\vec{x},\mathcal{X}) should maximize∑y→∈𝒳α0(∥y→−x→∥)cos(y→−x→,ϕ)𝟙(c(x→)=c(y→))subscript→𝑦𝒳subscript𝛼0delimited-∥∥→𝑦→𝑥→𝑦→𝑥italic-ϕ1𝑐→𝑥𝑐→𝑦\displaystyle\sum_{\vec{y}\in\mathcal{X}}\alpha_{0}(\lVert\vec{y}-\vec{x}\rVert)\cos(\vec{y}-\vec{x},\phi)\mathbbm{1}(c(\vec{x})=c(\vec{y}))(3)Equation (3) can be thought of as a weighted variant of the total cosine similarity optimization target.
|
| 32 |
+
|
| 33 |
+
Intuitively, given a point of interest x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X}, a monotone influence vector will point in the direction that has the ‘most’ points in 𝒳𝒳\mathcal{X} that share a label with x→→𝑥\vec{x}. The value ∥ϕ∥delimited-∥∥italic-ϕ\lVert\phi\rVert can be thought of as one’s confidence in the direction: if ∥ϕ∥delimited-∥∥italic-ϕ\lVert\phi\rVert is high, this means that one is fairly certain where other vectors sharing a label with x→→𝑥\vec{x} are (and, correspondingly, this means that there are at least some highly influential features identified by ϕitalic-ϕ\phi); in the case that ∥ϕ∥delimited-∥∥italic-ϕ\lVert\phi\rVert is small, the direction of ϕitalic-ϕ\phi is not a particularly strong indication of where other vectors of the same type can be found. In terms of choosing the right α𝛼\alpha parameter, Lemma 5.2 provides a few useful insights: if we select α(∥y→−x→∥)=1𝛼delimited-∥∥→𝑦→𝑥1\alpha(\lVert\vec{y}-\vec{x}\rVert)=1, then the resulting MIM measure maximizes the function∑y→∈𝒳cos(y→−x→,ϕ)∥y→−x→∥subscript→𝑦𝒳→𝑦→𝑥italic-ϕdelimited-∥∥→𝑦→𝑥\sum_{\vec{y}\in\mathcal{X}}\cos(\vec{y}-\vec{x},\phi)\lVert\vec{y}-\vec{x}\rVert;in other words, we put more weight on vectors in 𝒳𝒳\mathcal{X} that are more distant from x→→𝑥\vec{x}. Similarly, if we choose α(∥y→−x→∥)=1∥y→−x→∥𝛼delimited-∥∥→𝑦→𝑥1delimited-∥∥→𝑦→𝑥\alpha(\lVert\vec{y}-\vec{x}\rVert)=\frac{1}{\lVert\vec{y}-\vec{x}\rVert} then we place equal importance on all points in the dataset, whereas if we set α(���y→−x→∥)=1∥y→−x→∥2𝛼delimited-∥∥→𝑦→𝑥1superscriptdelimited-∥∥→𝑦→𝑥2\alpha(\lVert\vec{y}-\vec{x}\rVert)=\frac{1}{\lVert\vec{y}-\vec{x}\rVert^{2}}, vectors that are farther away from the point of interest are weighted by 1∥y→−x→∥1delimited-∥∥→𝑦→𝑥\frac{1}{\lVert\vec{y}-\vec{x}\rVert}. This choice of α𝛼\alpha informs our implementation in Section 8.
|
| 34 |
+
|
| 35 |
+
Influence measurement is studied in various domains; while influence measures in data classification are a relatively recent research topic, influence has been studied extensively in cooperative game theory. In what follows, we apply our analysis to cooperative games. Beyond its mathematical interest, the purpose of this section is to show that our work is taking a step towards a unified theory of influence measurement, connecting game theory to a more general domain of influence measurement; indeed, ideas from cooperative games have been successfully applied in the machine learning domain in previous studies (?, ?, ?).
|
| 36 |
+
|
| 37 |
+
A cooperative game is given by a set of players N={1,…,n}𝑁1…𝑛N=\{1,\dots,n\} and a characteristic function v:2N→ℝ:𝑣→superscript2𝑁ℝv:2^{N}\to\mathbb{R}, assigning a value v(S)𝑣𝑆v(S) to every subset of players (also referred to as a coalition).Translating to our setting, we can think of the players as features, and of sets as indicator vectors in {0,1}nsuperscript01𝑛\{0,1\}^{n};thus, our dataset 𝒳𝒳\mathcal{X} consists of all vectors in {0,1}nsuperscript01𝑛\{0,1\}^{n}, where the label of the indicator vector corresponding to S𝑆S (which we denote e→Ssubscript→𝑒𝑆\vec{e}_{S}) is the value v(S)𝑣𝑆v(S).Note that for a fully faithful translation we’ll need all sets to have binary values (i.e. v(S)∈{0,1}𝑣𝑆01v(S)\in\{0,1\});cooperative games where all sets have values in {0,1}01\{0,1\} are known as simple games222There are several excellent textbooks on cooperative game theory; we refer our reader to (?, ?);however, our definition easily extends to all types of cooperative games. What does MIM look like translated to this domain? Fixing a set S⊆N𝑆𝑁S\subseteq N, taking the standard Hamming set distance with α(d)=1d𝛼𝑑1𝑑\alpha(d)=\frac{1}{d}, we obtain the following equation
|
| 38 |
+
|
| 39 |
+
ϕ(S)=italic-ϕ𝑆absent\displaystyle\phi(S)=∑T⊆Nv(S)−v(T)|S△T|(e→S−e→T)subscript𝑇𝑁𝑣𝑆𝑣𝑇𝑆△𝑇subscript→𝑒𝑆subscript→𝑒𝑇\displaystyle\sum_{T\subseteq N}\frac{v(S)-v(T)}{|S\triangle T|}(\vec{e}_{S}-\vec{e}_{T})(6)In Equation (6), S△T𝑆△𝑇S\triangle T is the symmetric difference between S𝑆S and T𝑇T; furthermore(e→S−e→T)i=subscriptsubscript→𝑒𝑆subscript→𝑒𝑇𝑖absent\displaystyle(\vec{e}_{S}-\vec{e}_{T})_{i}={1if i∈S∖T−1if i∈T∖S0.otherwise.cases1if 𝑖𝑆𝑇1if 𝑖𝑇𝑆0otherwise.\displaystyle\begin{cases}1&\mbox{if }i\in S\setminus T\\-1&\mbox{if }i\in T\setminus S\\0.&\mbox{otherwise.}\end{cases}If i∉S𝑖𝑆i\notin S, ϕi(S)subscriptitalic-ϕ𝑖𝑆\phi_{i}(S) is of the formϕi(S)=subscriptitalic-ϕ𝑖𝑆absent\displaystyle\phi_{i}(S)=∑T:i∈Tv(T)−v(S)|S△T|subscript:𝑇𝑖𝑇𝑣𝑇𝑣𝑆𝑆△𝑇\displaystyle\sum_{T:i\in T}\frac{v(T)-v(S)}{|S\triangle T|}(7)One can think about Equation (7) as a generalization of the key concept of marginal contribution in cooperative games. The marginal contribution of a player i∈N𝑖𝑁i\in N to a set S𝑆S is the value v(S∪{i})−v(S)𝑣𝑆𝑖𝑣𝑆v(S\cup\{i\})-v(S); this value is just one of the summands in Equation (7), when one takes T=S∪{i}𝑇𝑆𝑖T=S\cup\{i\}. Intuitively, one can think of v(T)−v(S)𝑣𝑇𝑣𝑆v(T)-v(S) as the benefit (or loss) resulting from forming the coalition T𝑇T (that contains i𝑖i) over forming S𝑆S; normalizing by |S△T|𝑆△𝑇|S\triangle T| ensures that player i𝑖i receives an equal share of the responsibility for this change: the players in S△T𝑆△𝑇S\triangle T need to take action in order for T𝑇T to form rather than S𝑆S (those in T∖S𝑇𝑆T\setminus S need to join and those in S∖T𝑆𝑇S\setminus T need to leave). Thus, Equation (7) measures the overall capability of i𝑖i to affect a change in the value of S𝑆S by adding or removing players from S𝑆S; the total added benefit of doing so is normalized by the extent of the change required.
|
| 40 |
+
|
| 41 |
+
Let us take S=∅𝑆S=\emptyset; we obtainϕi(∅)=∑T:i∈Tv(T)|T|subscriptitalic-ϕ𝑖subscript:𝑇𝑖𝑇𝑣𝑇𝑇\displaystyle\phi_{i}(\emptyset)=\sum_{T:i\in T}\frac{v(T)}{|T|}(8)Equation (8) is of particular interest: the same equation appears in an axiomatic characterization of influence in a data-dependent cooperative setting given by ? ((?)). In their work, ? explore player influence where the dataset 𝒳𝒳\mathcal{X} consists of m𝑚m coalitions and their values (a similar setting has also been explored in (?, ?)); ? show that (8) is a unique way of measuring player influence in the data-driven cooperative games. The only difference between (8) and ?’s measure is that rather summing over all sets T𝑇T such that i∈T𝑖𝑇i\in T, one takes only the sets in 𝒳𝒳\mathcal{X} that contain i𝑖i. In other words, applying MIM to the cooperative game theoretic setting yields an influence measure that generalizes ?’s measure.In classic cooperative games, one often refers to the overall influence of player i𝑖i in the game v𝑣v, rather than i𝑖i’s influence with respect to a specific set. This leads us to consider the sum-total of the setwise influence of i𝑖i.ψi=subscript𝜓𝑖absent\displaystyle\psi_{i}=∑S:i∉Sϕi(S)=∑S:i∉S∑T:i∈Tv(T)−v(S)|S△T|subscript:𝑆𝑖𝑆subscriptitalic-ϕ𝑖𝑆subscript:𝑆𝑖𝑆subscript:𝑇𝑖𝑇𝑣𝑇𝑣𝑆𝑆△𝑇\displaystyle\sum_{S:i\notin S}\phi_{i}(S)=\sum_{S:i\notin S}\sum_{T:i\in T}\frac{v(T)-v(S)}{|S\triangle T|}=\displaystyle=∑S:i∉Sϕi(S)=∑S:i∉S∑T:i∉Tv(T∪{i})−v(S)|S△T|+1subscript:𝑆𝑖𝑆subscriptitalic-ϕ𝑖𝑆subscript:𝑆𝑖𝑆subscript:𝑇𝑖𝑇𝑣𝑇𝑖𝑣𝑆𝑆△𝑇1\displaystyle\sum_{S:i\notin S}\phi_{i}(S)=\sum_{S:i\notin S}\sum_{T:i\notin T}\frac{v(T\cup\{i\})-v(S)}{|S\triangle T|+1}(9)One popular influence measure in cooperative games is the Banzhaf value (?); this value equates player i𝑖i’s influence with its average marginal contribution over all coalitions. That is, the Banzhaf value is of the form:βi=12n∑S⊆N∖{i}v(S∪{i})−v(S)subscript𝛽𝑖1superscript2𝑛subscript𝑆𝑁𝑖𝑣𝑆𝑖𝑣𝑆\displaystyle\beta_{i}=\frac{1}{2^{n}}\sum_{S\subseteq N\setminus\{i\}}v(S\cup\{i\})-v(S)(10)We now show that (9) equals (10) (up to a constant depending only on n𝑛n).
|
| 42 |
+
|
| 43 |
+
We mention that the measure proposed by (?) also collapses to the Banzhaf value (times a constant dependent on n𝑛n) in the cooperative game setting.QII, on the other hand, can be seen as an implementation of the Shapley value to influence in a data domain.
|
| 44 |
+
|
| 45 |
+
In this section we provide an overview of some existing influence measures in data domains, and compare them to MIM. Measuring influence in data domains for algorithmic transparency is a relatively new approach, and has seen a veritable explosion of literature in recent years; we believe it is important to keep abreast of known methodologies and understand the domains where they are most appropriate.
|
| 46 |
+
|
| 47 |
+
The main idea behind the approach followed by ? ((?)) is to approximate the labeled dataset with a potential function and then use the derivative of this function to locally assign influence to features. Given a locality measure σ∈ℝ+𝜎subscriptℝ\sigma\in\mathbb{R}_{+} and a kernel functionkσ(x→)=1πσ2exp(−∑i=1nxi22σ2)subscript𝑘𝜎→𝑥1𝜋superscript𝜎2superscriptsubscript𝑖1𝑛superscriptsubscript𝑥𝑖22superscript𝜎2\displaystyle k_{\sigma}(\vec{x})=\frac{1}{\sqrt{\pi\sigma^{2}}}\exp\left(\frac{-\sum_{i=1}^{n}x_{i}^{2}}{2\sigma^{2}}\right)(13)The Parzen measure ϕParzenσ(x→,𝒳)subscriptitalic-ϕsubscriptParzen𝜎→𝑥𝒳\phi_{\text{Parzen}_{\sigma}}(\vec{x},\mathcal{X}), is given by the derivative of the potential function below at x→→𝑥\vec{x}.ℙ(c(x→)=1|x→)=∑y→∈𝒳c(y→)=1kσ(x→−y→)∑y→∈𝒳kσ(x→−y→).ℙ𝑐→𝑥conditional1→𝑥subscript→𝑦𝒳𝑐→𝑦1subscript𝑘𝜎→𝑥→𝑦subscript→𝑦𝒳subscript𝑘𝜎→𝑥→𝑦\displaystyle\mathbb{P}(c(\vec{x})=1|\vec{x})=\frac{\sum_{\vec{y}\in\mathcal{X}c(\vec{y})=1}k_{\sigma}(\vec{x}-\vec{y})}{\sum_{\vec{y}\in\mathcal{X}}k_{\sigma}(\vec{x}-\vec{y})}.It is easy to check that ϕParzenσsubscriptitalic-ϕsubscriptParzen𝜎\phi_{\text{Parzen}_{\sigma}} satisfies Axioms 1 to 4. However, Parzen is neither monotonic, nor does it satisfy non-bias. To understand why Parzen fails monotonicity it helps to look at (13). In Figure 1, we have a single feature ranging from 00 to 222; we are measuring influence for the point x→0subscript→𝑥0\vec{x}_{0} (marked with a green circle). When we add two more positive labels slightly to its right, monotonicity requires that the value of ϕParzenσ(x→0,𝒳)subscriptitalic-ϕsubscriptParzen𝜎subscript→𝑥0𝒳\phi_{\text{Parzen}_{\sigma}}(\vec{x}_{0},\mathcal{X}) should not decrease; however, this addition ‘flattens’ the potential function, decreasing the influence of the feature.Non-bias is violated on any dataset with at least two distinct points. The underlying problem is the same: ϕParzenσsubscriptitalic-ϕsubscriptParzen𝜎\phi_{\text{Parzen}_{\sigma}} measures only change in labels, so data points with the same label lead to zero influence. This leads to ϕParzenσsubscriptitalic-ϕsubscriptParzen𝜎\phi_{\text{Parzen}_{\sigma}} assigning influence to random noise.
|
| 48 |
+
|
| 49 |
+
The approach followed by ? ((?)) is based on the idea of using an interpretable classifier approximating the original in a region around x→→𝑥\vec{x}; this simpler classifier then can be thought of as an explanation. This approach is termed Local Interpretable Model-agnostic Explanation (LIME).
|
| 50 |
+
|
| 51 |
+
? provide a concrete applicable framework, providing explanations in specific application domains. Some parts of this framework, however, lead to obvious violations of the axioms in Section 3. As an example, LIME maps datapoints to a binary explanation space, rather than considering them directly. This mapping aims to ensure that the result is human-interpretable; however, it clearly violates Axioms 1 to 4.On the other hand, one can draw a close connection between the theoretical framework underlying LIME, and the MIM formulation. In order to do so, it is useful to think of an influence measure as a linear classifier that approximates the data in a region close to the point of interest x→→𝑥\vec{x}. We define the classifier based on an influence measure ϕitalic-ϕ\phi simply as cϕ(y→)=𝟙(ϕy→≥ϕx→)subscript𝑐italic-ϕ→𝑦1italic-ϕ→𝑦italic-ϕ→𝑥c_{\phi}(\vec{y})=\mathbbm{1}(\phi\vec{y}\geq\phi\vec{x})
|
| 52 |
+
|
| 53 |
+
We rewrite the core optimization problem in ? ((?)), when a linear classifier is used as an explanation:ϕLIME(x→)=argminϕ∈ℝn∑y→∈𝒳α(‖y→−x→‖)(c(y→)−cϕ(y→))2subscriptitalic-ϕLIME→𝑥subscriptargminitalic-ϕsuperscriptℝ𝑛subscript→𝑦𝒳𝛼norm→𝑦→𝑥superscript𝑐→𝑦subscript𝑐italic-ϕ→𝑦2\displaystyle\phi_{\text{LIME}}(\vec{x})=\operatorname*{arg\,min}_{\phi\in\mathbb{R}^{n}}\sum_{\vec{y}\in\mathcal{X}}\alpha(||\vec{y}-\vec{x}||)(c(\vec{y})-c_{\phi}(\vec{y}))^{2}(14)where α𝛼\alpha is some non-negative function and we assume for simplicity c(x→)=1𝑐→𝑥1c(\vec{x})=1.
|
| 54 |
+
|
| 55 |
+
Comparing this to Section 5 one can see that at its core, LIME minimizes the mean-squared error, whereas MIM maximizes cosine similarity (see Section 5). We note that other implementations of LIME (appearing in its source code), use cosine similarity rather than mean-squared error as the target; our results (namely Theorem 4.2) indicate that using cosine similarity offers certain theoretical guarantees over other approaches.
|
| 56 |
+
|
| 57 |
+
? ((?)) initiate the axiomatic analysis of influence in data domains. Unlike other measures in this section, their approach does not measure feature influence for a given point of interest; rather, it measures the overall influence of a feature for a given dataset. Following our notation, one can formulate the measure they propose as follows:ηi(𝒳)=1|𝒳|∑x→∈𝒳∑yi:(x→−i,yi)∈𝒳|c(x→)−c(x→−i,yi)|subscript𝜂𝑖𝒳1𝒳subscript→𝑥𝒳subscript:subscript𝑦𝑖subscript→𝑥𝑖subscript𝑦𝑖𝒳𝑐→𝑥𝑐subscript→𝑥𝑖subscript𝑦𝑖\displaystyle\eta_{i}(\mathcal{X})=\frac{1}{|\mathcal{X}|}\sum_{\vec{x}\in\mathcal{X}}\sum_{y_{i}:(\vec{x}_{-i},y_{i})\in\mathcal{X}}|c(\vec{x})-c(\vec{x}_{-i},y_{i})|(15)In other words, the measure proposed by ? ((?)) does the following: when measuring the influence of the i𝑖i-th feature; for every point x→∈𝒳→𝑥𝒳\vec{x}\in\mathcal{X}, it counts the number of points in 𝒳𝒳\mathcal{X} which differ from x→→𝑥\vec{x} by only the i𝑖i-th feature, and in their classification outcome. This follows the idea of counterfactual influence: the importance of feature i𝑖i is equivalent to its aggregate ability to change the outcome for points in 𝒳𝒳\mathcal{X}, assuming that one is only allowed to change the i𝑖i-th coordinate of x→→𝑥\vec{x}. The axioms satisfied by (15) turn out to be too stringent: first, the counterfactual measure requires a dataset that contains datapoints differing by only one feature. Second, in many types of data, it is extremely unlikely that changing the state of a single feature will result in a change to the classification outcome (as noted by ? ((?))); indeed, on the dataset we study (Section 8), Equation (15) outputs zero influence for all features: no two points differ by only one feature.
|
| 58 |
+
|
| 59 |
+
? ((?)) propose an influence measure generalizing counterfactual influence. Instead of measuring the effect of changing a single feature, they examine the expected influence of changing a set of features. More formally, given a set of features S𝑆S, letv(S;x→)=𝔼y→[c(x→−S,y→S)]𝑣𝑆→𝑥subscript𝔼→𝑦delimited-[]𝑐subscript→𝑥𝑆subscript→𝑦𝑆v(S;\vec{x})=\mathbb{E}_{\vec{y}}[c(\vec{x}_{-S},\vec{y}_{S})]where (x→−S,y→S)subscript→𝑥𝑆subscript→𝑦𝑆(\vec{x}_{-S},\vec{y}_{S}) is the vector resulting from replacing the values of features in S𝑆S with those of features in y→→𝑦\vec{y} (y→→𝑦\vec{y} is sampled from the empirical distribution of 𝒳𝒳\mathcal{X}). In other words, v(S;x→)𝑣𝑆→𝑥v(S;\vec{x}) measures the expected effect of randomizing the values of features in S𝑆S on the classification outcome of x→→𝑥\vec{x}, with samples drawn according to the empirical distribution of S𝑆S values in the dataset. Given this notion of ‘value’ for a set of features, ? ((?)) use the Shapley value (?), a well-known economic measure of influence from coalitional game theory. More formally, given a subset of features S𝑆S, and a feature i∉S𝑖𝑆i\notin S, letmi(S;x→)=v(S∪{i};x→)−v(S;x→)subscript𝑚𝑖𝑆→𝑥𝑣𝑆𝑖→𝑥𝑣𝑆→𝑥m_{i}(S;\vec{x})=v(S\cup\{i\};\vec{x})-v(S;\vec{x});that is, mi(S;x→)subscript𝑚𝑖𝑆→𝑥m_{i}(S;\vec{x}) is the marginal effect of randomizing i𝑖i, given that we have randomized S𝑆S. Let 𝒩ki={S⊆N∖{i}:|S|=k}superscriptsubscript𝒩𝑘𝑖conditional-set𝑆𝑁𝑖𝑆𝑘\mathcal{N}_{k}^{i}=\{S\subseteq N\setminus\{i\}:|S|=k\};the influence measure defined by ? ((?)) is then𝑄𝐼𝐼i(x→)=1n!∑k=0n−1k!(n−k−1)!(∑S∈𝒩kimi(S;x→))subscript𝑄𝐼𝐼𝑖→𝑥1𝑛superscriptsubscript𝑘0𝑛1𝑘𝑛𝑘1subscript𝑆superscriptsubscript𝒩𝑘𝑖subscript𝑚𝑖𝑆→𝑥\displaystyle\mathit{QII}_{i}(\vec{x})=\frac{1}{n!}\sum_{k=0}^{n-1}k!(n-k-1)!\left(\sum_{S\in\mathcal{N}_{k}^{i}}m_{i}(S;\vec{x})\right)(16)𝑄𝐼𝐼i(x→)subscript𝑄𝐼𝐼𝑖→𝑥\mathit{QII}_{i}(\vec{x}) is simply the Shapley value of feature i𝑖i under the coalitional game defined by v(S;x→)𝑣𝑆→𝑥v(S;\vec{x}). By using the Shapley value, QII immediately guarantees several desirable properties ‘for free’ (as the Shapley value satisfies them); moreover, the Shapley value (and thus, QII) is the only way of measuring influence that can satisfy these properties. However, QII suffers from two major drawbacks. The first is that when computing v(S;x→)𝑣𝑆→𝑥v(S;\vec{x}), one assumes the ability to query the classifier on points that are not in the dataset (in particular, when computing c(x→−S,y→S)𝑐subscript→𝑥𝑆subscript→𝑦𝑆c(\vec{x}_{-S},\vec{y}_{S})). Secondly, computing QII is computationally intensive, both when deriving the value of a set of features in v(S;x→)𝑣𝑆→𝑥v(S;\vec{x}) and when aggregating marginal effect in (16) (? ((?)) propose workarounds to these issues).
|
| 60 |
+
|
| 61 |
+
Influence measures in data domains seem to follow either one of two paradigms. One class of methods relies on black-box access to the underlying classifier; for example, QII (?) requires classifier queries in order to compute v(S;x→)𝑣𝑆→𝑥v(S;\vec{x}); LIME makes such queries to sample a local region of x→→𝑥\vec{x}. Data-driven methods (e.g. Parzen, MIM) do not require black-box access.
|
| 62 |
+
|
| 63 |
+
Is it valid to assume black-box access to a classifier? This depends on the implementation domain one has in mind. On the one hand, having more access, measures such as QII and LIME offer better explanations in a sparse data domain; however, they are essentially unusable when one does not have access to the underlying classifier. Data-driven approaches such as MIM, the counterfactual measure and Parzen are more generic and will work on any given dataset; however, they will naturally not be particularly informative in sparse regions of the dataset. That said, data-driven models subsume ones assuming black-box access: any data-driven method can be used after an initial black-box query phase: in this way, we add more points to the dataset 𝒳𝒳\mathcal{X} as a preprocessing step (for example, in order to obtain a dense region around the point of interest), and then run the data-driven method.
|
| 64 |
+
|
| 65 |
+
In what follows, we apply MIM, Parzen and a version of LIME on a facial expression dataset. We ran our experiments using a workstation with a quad core Intel i7 CPU, and 16GB of RAM. We were able to compute each influence vector in 4−5454-5 seconds.The dataset used for this experiment is a part of the Facial Expression Recognition 2013 dataset (?). The data consists of 12 1561215612\,156 48×48484848\times 48 pixel grayscale images of faces, evenly divided between happy and sad facial expressions. Each pixel is a feature; its brightness level is its parametric value. A parametric Parzen influence measure with σ=4.7𝜎4.7\sigma=4.7 and a monotone influence measure with α(d)=1d2𝛼𝑑1superscript𝑑2\alpha(d)=\frac{1}{d^{2}} were run on some of the images. Further, we used a black-box data version of LIME. For the α𝛼\alpha parameter in Equation 14, we choose αρ(d)=exp(−d2/ρ2)subscript𝛼𝜌𝑑superscript𝑑2superscript𝜌2\alpha_{\rho}(d)=\sqrt{\exp(-d^{2}/\rho^{2})} with ρ=3𝜌3\rho=3 as a Kernel function.
|
| 66 |
+
|
| 67 |
+
The first row of Table 1 shows an example picture of a happy face from the dataset, along with a visualization of the influence vectors as produced by MIM, Parzen and LIME. In the images of influence vectors, the color blue (red) indicates positive (negative) influence; that is, for every pixel, the measures indicate that the brighter (darker) the pixel in the original image, the more ‘happy’ (‘sad’) the face. The third, fifth and seventh column show the point of interest shifted according to the respective influence vector, i.e. the pixels with positive influence were brightened, and darkened if their influence was negative.According to the MIM influence vector, the factors that contribute to this face looking happy, are a bright mouth with darkened corners, bright eyebrows, bright tone of the face, and a darkened background. Shifting the picture along the influence vector seems to make the person in the picture smile wider, and open their mouth slightly. The Parzen vector differs from the MIM vector mainly in that it suggests dark eyes as indicative of the label and does not indicate the eyebrows as strongly. LIME, while generally agreeing with the other two, results in a more ’shattered’ image. Seemingly it’s better for a classifier to focus it’s weights on a smaller set of features, while for MIM and Parzen you can see that neighbouring pixels actually have similar influence.
|
| 68 |
+
|
| 69 |
+
The second row shows another example picture and its corresponding influence vectors; however here, all measures fail to offer a meaningful explanation. This is likely to be since the face in the image is tilted, unlike the majority of images in the dataset. This is due to the fact that the dataset does not describe the locality of the image well enough; one can expect this to be the case for many images if the dataset is so small (12000) for such a complex feature space (48×48=23044848230448\times 48=2304 features, with each potentially taking 256256256 different shades of gray). This exemplifies the dependency of MIM on the dataset provided, and indicates it needs a relatively dense locality in order to perform reasonably well, if black-box access to the classifier or any domain knowledge cannot be assumed.
|
| 70 |
+
|
| 71 |
+
Tables 2 and 3 present additional experimental results on the dataset from (?), with influence vectors computed similarly as in Section 8 of the main paper. In Table 2 depicted are five happy and five sad labeled images, their influence vector and the images shifted along the vector to ‘enhance’ their label as suggested by the influence vector; we use MIM, Parzen and LIME to compute influence. MIM and Parzen produce similar vectors, while the outputs of LIME are visibly more jagged, introducing much more noise to the shifted image. As one might expect, influence vectors for opposing labels tend to have similar but inverted direction.
|
| 72 |
+
|
| 73 |
+
In Section 8, we test LIME and Parzen with certain parameter choices. LIME is parameterized by a variable ρ𝜌\rho governing the behavior of a distance function αρsubscript𝛼𝜌\alpha_{\rho} (see the definition of LIME in Equation (14) of the main paper); increasing ρ𝜌\rho makes LIME assign influence to points further away from the point of interest. We also consider LIME with (inverse) cosine similarity as our choice of α𝛼\alpha in Equation (14) of the main paper; this is again parameterized by a μ𝜇\mu parameter controlling the amount of weight placed on points further away from the point of interest.Parzen is parameterized by the choice of σ𝜎\sigma in Equation (13) in the main paper.
|
| 74 |
+
|
| 75 |
+
Table 3 highlights the effects of parameter choice for both LIME and Parzen. For Parzen, we vary the σ𝜎\sigma parameter, whereas for LIME we vary ρ𝜌\rho (for the Euclidean distance method compared to in the main paper) and μ𝜇\mu (for the cosine similarity version). Intuitively, both parameters control the locality of their respective measures. Small values imply that points closer to the point of interest are considered with more weight or, to frame it in terms of window functions, the weight of points further away is suppressed. Larger parameter values diminish this effect.
|
| 76 |
+
|
| 77 |
+
As can be seen in Table 3, small parameters make the measures place a lot of weight on the point of interest itself, and the resulting influence measure is a near-replica of it. As we increase the parameters, more neighbors are considered, resulting in a more informative influence measure.Large values of ρ𝜌\rho and μ𝜇\mu make LIME much noisier. This can be explained by the fact that when the parameters are sufficiently large, LIME effectively tries to fit a linear classifier to the entire dataset. This linear classifier is highly inaccurate, resulting at a rather uninformative local influence measure. Parzen doesn’t suffer from this problem, it seemingly converges to a generic version of a happy face.
|
| 78 |
+
|
| 79 |
+
Our final parameter choices aimed at striking a balance between ignoring the effect of other points in the dataset, and maintaining a locality at the point of influence; there is a rather broad range of parameters which strike this balance, so the precise parameter choice is less critical in this experiment333We tested several additional values on various images, with similar effects..
|
| 80 |
+
|
| 81 |
+
The dataset used for this experiment is the anonymized listing of arrest data used by the Chicago Police Department’s Strategic Subject Algorithm to create a risk assessment score, known as the Strategic Subject List or SSL (?). The dataset contains 398,684398684398,684 records; for each record the experiment focuses on 14 attributes and a score. The scores reflect an individual’s probability of being involved in a shooting incident either as a victim or an offender. Scores, ranging from 0 (low risk) to 500 (high risk), are calculated for individuals with criminal records using eight attributes (not including race or sex). These attributes are:age during the latest arrest (1), number of times being the victim of a shooting incident (2), number of times being the victim of aggravated battery or assault (3), number of prior arrests for violent offenses (4), presence of gang affiliation (5), number of prior narcotic arrests (6), trend in recent criminal activity (7) and number of prior unlawful use of weapon arrests (8). Additionally, in this experiment, we measure the influence of features not available to the algorithm (but which are part of the dataset): sex (9), race (10), occurrence of at least one weapon arrest in past 10 years (11), occurrence of at least one drug arrest in past 10 years (12), the subject being currently on parole (13), and the latest year of contact with the police (14).
|
| 82 |
+
|
| 83 |
+
The dataset requires some adjustments to the original definitions of MIM and Parzen. First, we adjust MIM to a regression setting by replacing the indicator 𝟙(c(y→)=c(x→))1𝑐→𝑦𝑐→𝑥\mathbbm{1}(c(\vec{y})=c(\vec{x})) with c(y→)−c(x→)𝑐→𝑦𝑐→𝑥c(\vec{y})-c(\vec{x}); thus, a point’s contribution to the measure is weighted based on how much bigger, or smaller, its SSL score is; Parzen was similarly adjusted.Moreover, the race feature is categorical with no natural order to its states; thus, the value of race is set to 1 whenever it is the same as the point of interest, and 0 otherwise.
|
| 84 |
+
|
| 85 |
+
While MIM and Parzen have similar outputs on the data: the average cosine similarity between the two measures is ≥0.94absent0.94\geq 0.94 (taken over ≥8000absent8000\geq 8000 randomly sampled points). Two example MIM influence measurements are depicted in Table 4.
|
| 86 |
+
|
| 87 |
+
? ((?)) analyze the eight features used by the SSL Algorithm. Their results suggest that age has significant negative influence on the SSL score, while other features contribute positively in varying degrees.The MIM outputs confirm this statement, but suggest that the degree to which the features contribute to the SSL score vary greatly between cases. As exemplified in Table 4, the influence of a single crime-related event tends to grow with the number of events of the same type. In the vast majority of cases, age has significant negative influence on the SSL score. Interestingly, the latest date of contact with the police often has significant positive influence on the score, despite not being used by the algorithm directly. In other cases, race has significant influence as well. This last point highlights some of the issues of using a data-driven method: features that are not used by the classifier can be assigned a significant amount of influence; this is simply because race is correlated with other variables used by the SSL algorithm. Indeed, in order to ascertain that race is not an input to the algorithm, black-box access is required.
|
| 88 |
+
|
| 89 |
+
We present a novel characterization of data-driven influence measurement. Our measure is uniquely derived from a set of reasonable properties; what’s more, it optimizes a natural objective function.
|
| 90 |
+
|
| 91 |
+
Taking a broader perspective, axiomatic influence analysis in data domains is an important research direction: it allows us to rigorously discuss the underlying norms that govern our explanations. Different axioms result in alternative measures, and mathematically justifying one’s choice of influence measures makes them more accountable: when explaining the behavior of classifiers in high-stakes domains, having provably sound measures offers mathematical backing to those using them. More importantly, an axiomatic approach allows one to justify the approach to non-academic stakeholders: while the proofs in this paper might be rather obscure to those without the requisite background, the axioms we use can be easily explained.
|
| 92 |
+
|
| 93 |
+
While MIM offers an interesting perspective on influence measurement, it is but a first step. First, our analysis is currently limited to binary classification domains. It is possible to naturally extend our results to regression domains, e.g. by replacing the value 𝟙(c(x→)=c(y→))1𝑐→𝑥𝑐→𝑦\mathbbm{1}(c(\vec{x})=c(\vec{y})) with c(x→)−c(y→)𝑐→𝑥𝑐→𝑦c(\vec{x})-c(\vec{y}); however, it is not entirely clear how one might define influence measures for multiclass domains.
|
| 94 |
+
|
| 95 |
+
Current numerical influence measures limit their explanations to individual features; they do not capture joint effect, let alone more complex feature interactions (the only exception to this is LIME, which, at least in theory, allows fitting non-linear classifiers in the local region of the point of interest). Designing provably sound methods for measuring the effect of pairwise (or k𝑘k-wise) interactions amongst features is a major challenge.Non-linear explanations naturally trade-off accuracy and interpretability. A linear explanation is easy to understand, but lacks the explanatory power of a measure that captures k𝑘k-wise interactions.
|
| 96 |
+
|
| 97 |
+
Finally, it is important to translate our numerical measure to an actual human-readable report. ? ((?)) propose using linear explanations as transparency reports; more advanced methods use subroutines from the classifier’s source code to explain its behavior (?, ?). Mapping numerical measures to actual human-interpretable explanations is an important open problem; we believe that analyses such as ours form the fundamental basis for making black-box systems transparent, and ultimately more accountable.
|
| 98 |
+
|
| 99 |
+
The authors thank the AAAI 2019 reviewers and the FAT/ML 2018 participants for their useful suggestions. The authors are supported by an NRF fellowship #R-252-000-750-733.
|
| 100 |
+
|
1708.03797v1.txt
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
In the Web 2.0, social tagging systems are introduced by many websites, where users can freely annotate online items using arbitrary tags (commonly known as folksonomy [9]). Since social tags are good summaries of the relevant items and the users’ preferences, and since they also contain little sensitive information about their creators, they are valuable information for privacy-enhanced personalized recommendation.Consequently, many efforts have been put on tag-aware personalized recommendation using content-based filtering [4, 14, 16] or collaborative filtering [3, 12, 13, 15].
|
| 2 |
+
|
| 3 |
+
However, as users can freely choose their own vocabulary, social tags may contain many uncontrolled vocabularies. This usually results in sparse, redundant, and ambiguous tag information, and significantly weakens the performance of content-based recommendation systems. The common solution is to apply machine learning techniques, e.g., clustering [14] or autoencoders [17], to learn more abstract and representative features from raw tags. Recently, Xu et al. [16] propose a deep-semantic model called DSPR which utilizes deep neural networks to model abstract and recommendation-oriented representations for social tags. DSPR is reported to achieve better performance than the clustering and autoencoder solutions.
|
| 4 |
+
|
| 5 |
+
Matrix factorization is a collaborative-filtering-based solution, which has become a dominant solution for personalized recommendation on the Social Web [3, 12, 13] and has been reported to be superior to memory-based techniques [11].However, there exists a cold start problem in matrix factorization:many users only give very few ratings, resulting in a very sparse user-item rating matrix, and making it difficult to summarize users’ preferences.A widely adopted solution is to incorporate additional sources of information about users, e.g., implicit feedback [11], social friendship [12], geographical neighborhood [10], or textual comments [13]. We call these upgraded models additional-information-based matrix factorization (AMF) models.
|
| 6 |
+
|
| 7 |
+
Although the existing deep-semantic model, DSPR, and the upgraded matrix factorization models, AMF, have progressively improved the tag-aware personalized recommendation, there are still a few drawbacks:(i) DSPR does not utilize the idea of collaborative filtering; hence, the valuable correlation information between users and items is not being used to help recommendation.(ii) As a deep neural model, DSPR stacks many layers, which makes it difficult to optimize the model by gradient back-propagation.(iii) The existing AMF models generally incorporate the additional information as a regularization term of matrix factorization; this term’s coefficient, as proved in [12], has to be very small; therefore, the additional information has very limited contribution on the optimizing gradient, resulting in only “marginal” improvements on the recommendation performance.(iv) The recommendation results of the existing AMF models are difficult to interpret, because latent factor matrices are used to represent users and items.
|
| 8 |
+
|
| 9 |
+
Consequently, to solve the above problems and to further improve the performance of tag-aware personalized recommendation, we propose a hybrid deep-semantic matrix factorization (HDMF) model, which integrates the techniques of deep-semantic modeling, hybrid learning, and matrix factorization. Generally, HDMF uses a tag-based user matrix and a tag-based item matrix as respective inputs of two deep autoencoders to generate deep-semantic user and item matrices at the code layers, and also reconstructed user and item matrices at the output layers. The deep model is then trained by using a hybrid learning signal to minimize both reconstruction errors and deep-semantic matrix factorization errors, i.e., the squared differences between the user-item rating matrix (seeing tags as positive ratings) and the dot product of deep-semantic user and item matrices (seeing deep-semantic matrices as the decomposed matrices in matrix factorization). The intuitions of using the hybrid learning signal are: (i) minimizing reconstruction errors can learn better representations for both users and items; (ii) deep-semantic matrix factorization offers a learning signal that connects users and items to discover the underlying users’ preferences; (iii) two signals can complement each other to provide sufficient gradients for better model optimization and escaping the local minima.
|
| 10 |
+
|
| 11 |
+
HDMF thus has the following advantages.(i) It overcomes the drawback of DSPR by adding collaborative-based capabilities to the deep-semantic model.(ii) The hybrid learning signal helps HDMF to better optimize the model and escape local minima.(iii) Differently from AMF models, the additional tag information in HDMF is directly used to model the decomposed user and item matrices in matrix factorization; this thus maximizes the effect of the additional tag information on the model optimization.(iv) HDMF remedies the non-interpretability problem in matrix factorization:considering deep-semantic matrices as the decomposed matrices and finding the most influential input tags for each dimension, the decomposed user and item matrices in HDMF become interpretable.
|
| 12 |
+
|
| 13 |
+
The main contributions of this paper are briefly as follows:•We briefly analyze the state-of-the-art personalized recommendation models that use content-based filtering or matrix factorization and identify their existing problems.•We innovatively propose a hybrid deep-semantic matrix factorization (HDMF) model to tackle these problems and to further improve the performance of tag-aware personalized recommendation, by integrating the techniques of deep-semantic modeling, hybrid learning, and matrix factorization.•Experimental results show that HDMF significantly outperforms the state-of-the-art baselines in tag-aware personalized recommendation, in terms of all evaluation metrics, e.g., its mean reciprocal rank (resp., mean average precision) is 1.521.521.52 (resp., 1.661.661.66) times as high as that of the best baseline.
|
| 14 |
+
|
| 15 |
+
A folksonomy is a tuple ℱ=(U,T,D,A)ℱ𝑈𝑇𝐷𝐴\mathcal{F}=(U,T,D,A), where U𝑈U, T𝑇T, and D𝐷D are sets of users, tags, and items, respectively, and A⊆U×T×D𝐴𝑈𝑇𝐷A\subseteq U\times T\times D is a set of assignments (u,t,d)𝑢𝑡𝑑(u,t,d) of tag t𝑡t to item d𝑑d by user u𝑢u [9].
|
| 16 |
+
|
| 17 |
+
A tag-based user profile is a feature vector x=[giu]i=1|T|𝑥subscriptsuperscriptdelimited-[]subscriptsuperscript𝑔𝑢𝑖𝑇𝑖1x=[g^{u}_{i}]^{|T|}_{i=1}, where |T|𝑇|T| is the tag vocabulary’s size, and giu=|{(u,ti,d)∈A∣d∈D}|subscriptsuperscript𝑔𝑢𝑖conditional-set𝑢subscript𝑡𝑖𝑑𝐴𝑑𝐷g^{u}_{i}=|\{(u,t_{i},d)\in A\mid d\,{\in}\,D\}| is the number of times that user u𝑢u annotates items with tag tisubscript𝑡𝑖t_{i}; the tag-based user matrix is thus defined as X=[xi]i=1|U|𝑋subscriptsuperscriptdelimited-[]subscript𝑥𝑖𝑈𝑖1X=[x_{i}]^{|U|}_{i=1}, where xisubscript𝑥𝑖x_{i} is the profile vector of the i𝑖ith user, and |U|𝑈|U| is the total number of users. Similarly, a tag-based item profile is a vector y=[gjd]j=1|T|𝑦subscriptsuperscriptdelimited-[]subscriptsuperscript𝑔𝑑𝑗𝑇𝑗1y=[g^{d}_{j}]^{|T|}_{j=1}, where gjd=|{(u,tj,d)∈A∣u∈U}|subscriptsuperscript𝑔𝑑𝑗conditional-set𝑢subscript𝑡𝑗𝑑𝐴𝑢𝑈g^{d}_{j}=|\{(u,t_{j},d)\,{\in}\,A\mid u\,{\in}\,U\}| is the number of times that item d𝑑d is annotated with tag tjsubscript𝑡𝑗t_{j}; while the tag-based item matrix is defined as Y=[yj]j=1|D|𝑌subscriptsuperscriptdelimited-[]subscript𝑦𝑗𝐷𝑗1Y=[y_{j}]^{|D|}_{j=1}, where yjsubscript𝑦𝑗y_{j} is the profile vector of the j𝑗jth item, and |D|𝐷|D| is the total number of items.
|
| 18 |
+
|
| 19 |
+
The user-item rating matrix is R=[ri,j]i=1,j=1|U|,|D|𝑅subscriptsuperscriptdelimited-[]subscript𝑟𝑖𝑗𝑈𝐷formulae-sequence𝑖1𝑗1R=[r_{i,j}]^{|U|,|D|}_{i=1,j=1}, where ri,jsubscript𝑟𝑖𝑗r_{i,j} is the number of tags annotated by user i𝑖i to item j𝑗j. Given R𝑅R, traditional matrix-factorization-based recommender systems aim to approximate R𝑅R using the decomposed latent matrices of users and items, i.e., Xlsuperscript𝑋𝑙X^{l} and Ylsuperscript𝑌𝑙Y^{l}, respectively, which are optimized by minimizing the squared differences between R𝑅R and XlT⋅Yl⋅superscriptsuperscript𝑋𝑙𝑇superscript𝑌𝑙{X^{l}}^{T}\cdot Y^{l} on a set of observed ratings; formally,
|
| 20 |
+
|
| 21 |
+
minXl,Yl∑i=1|U|∑j=1|D|Ii,j(ri,j−xilT⋅yjl)2,subscriptsuperscript𝑋𝑙superscript𝑌𝑙superscriptsubscript𝑖1𝑈superscriptsubscript𝑗1𝐷subscript𝐼𝑖𝑗superscriptsubscript𝑟𝑖𝑗⋅superscriptsuperscriptsubscript𝑥𝑖𝑙𝑇superscriptsubscript𝑦𝑗𝑙2\displaystyle\min_{X^{l},Y^{l}}\sum_{i=1}^{|U|}\sum_{j=1}^{|D|}I_{i,j}(r_{i,j}-{x_{i}^{l}}^{T}\cdot y_{j}^{l})^{2},(1)
|
| 22 |
+
|
| 23 |
+
where Ii,jsubscript𝐼𝑖𝑗I_{i,j} is 111, if user i𝑖i annotated item j𝑗j, and 00, otherwise [13]. After optimization learning, the predicted user-item rating matrix R^=XlT⋅Yl^𝑅⋅superscriptsuperscript𝑋𝑙𝑇superscript𝑌𝑙\hat{R}={X^{l}}^{T}\cdot Y^{l} is used for personalized recommendation.
|
| 24 |
+
|
| 25 |
+
To alleviate the cold start problem in traditional matrix factorization, a widely adopted solution is to incorporate additional sources of information about users to achieve additional-information-based matrix factorization (AMF) [10, 11, 12, 13]. However, as analyzed in Section 1 and demonstrated by both our experimental results and the results reported in [13], the existing AMF models achieve only “marginal” (around 5%percent55\% in [13]) improvements on the performance of personalized recommendation.Therefore, inspired by the recent development of deep-semantic modeling [16], we propose a hybrid deep-semantic matrix factorization (HDMF) model to tackle these problems and to further enhance the performance of tag-aware personalized recommendation, by integrating the techniques of deep-semantic modeling, hybrid learning, and matrix factorization.
|
| 26 |
+
|
| 27 |
+
Figure 1 shows an overview of the HDMF model. Generally, HDMF takes the tag-based user and item matrices X𝑋X and Y𝑌Y (defined in Section 2) as inputs of two deep autoencoders, consisting of encoders and decoders. These inputs are then passed through multiple hidden layers and projected to the deep-semantic user and item matrices X~~𝑋\widetilde{X} and Y~~𝑌\widetilde{Y} at the code layers, and to the reconstructed user and item matrices X′superscript𝑋′X^{\prime} and Y′superscript𝑌′Y^{\prime} at the output layers. The HDMF model is then trained by using a hybrid learning signal to minimize both deep-semantic matrix factorization errors and reconstruction errors. Finally, a predicted user-item rating matrix R^=X~T⋅Y~^𝑅⋅superscript~𝑋𝑇~𝑌\hat{R}={\widetilde{X}}^{T}\cdot\widetilde{Y} is used for personalized recommendation.
|
| 28 |
+
|
| 29 |
+
Deep-semantic matrix factorization is solely based on the encoder parts of the deep autoencoders, which can be seen as multi-layer perception networks.Formally, given the tag-based user and item matrices X𝑋X and Y𝑌Y, a weight matrix W1subscript𝑊1W_{1}, and a bias vector b1subscript𝑏1b_{1}, the intermediate outputs h1(⋅)subscriptℎ1⋅h_{1}(\cdot) of the first hidden layers in the encoders are defined as follows:
|
| 30 |
+
|
| 31 |
+
h1(X)=tanh(W1X+b1),h1(Y)=tanh(W1Y+b1),formulae-sequencesubscriptℎ1𝑋subscript𝑊1𝑋subscript𝑏1subscriptℎ1𝑌subscript𝑊1𝑌subscript𝑏1\displaystyle h_{1}(X)=\tanh(W_{1}X+b_{1}),\qquad h_{1}(Y)=\tanh(W_{1}Y+b_{1}),(2)
|
| 32 |
+
|
| 33 |
+
where tanh\tanh is used as the activation function. Similarly, the intermediate outputs of the j𝑗jth hidden layers hj(⋅)subscriptℎ𝑗⋅h_{j}(\cdot), j∈{2,…,K}𝑗2…𝐾j\in\{2,\ldots,K\}, in the encoders are defined as follows:
|
| 34 |
+
|
| 35 |
+
hj(X)subscriptℎ𝑗𝑋\displaystyle h_{j}(X)=tanh(Wjhj−1(X)+bj),absentsubscript𝑊𝑗subscriptℎ𝑗1𝑋subscript𝑏𝑗\displaystyle=\tanh(W_{j}h_{j-1}(X)+b_{j}),(3)hj(Y)subscriptℎ𝑗𝑌\displaystyle h_{j}(Y)=tanh(Wjhj−1(Y)+bj),absentsubscript𝑊𝑗subscriptℎ𝑗1𝑌subscript𝑏𝑗\displaystyle=\tanh(W_{j}h_{j-1}(Y)+b_{j}),(4)
|
| 36 |
+
|
| 37 |
+
where Wjsubscript𝑊𝑗W_{j} and bjsubscript𝑏𝑗b_{j} are the weight matrix and the bias vector for the j𝑗jth hidden layers in the encoders, respectively, and K𝐾K is the total number of hidden layers in each encoder.
|
| 38 |
+
|
| 39 |
+
Then, the outputs of the K𝐾Kth hidden layers, i.e., the code layers, are the deep-semantic user and item matrices, denoted X~~𝑋\widetilde{X} and Y~~𝑌\widetilde{Y}, respectively. Formally,
|
| 40 |
+
|
| 41 |
+
X~=hK(X),Y~=hK(Y).formulae-sequence~𝑋subscriptℎ𝐾𝑋~𝑌subscriptℎ𝐾𝑌\displaystyle\widetilde{X}=h_{K}(X),\qquad\widetilde{Y}=h_{K}(Y).(5)
|
| 42 |
+
|
| 43 |
+
Consequently, by seeing the deep-semantic matrices X~~𝑋\widetilde{X} and Y~~𝑌\widetilde{Y} as the decomposed user and item matrices in matrix factorization, the parameters Wjsubscript𝑊𝑗W_{j} and bjsubscript𝑏𝑗b_{j} can be optimized by minimizing the following deep-semantic matrix factorization errors:
|
| 44 |
+
|
| 45 |
+
LDMF(Θ)=subscript𝐿𝐷𝑀𝐹Θabsent\displaystyle L_{DMF}(\Theta)=(1−λθ)∑i=1|U|∑j=1|D|Ii,j(ri,j−x~iT⋅y~j)21subscript𝜆𝜃superscriptsubscript𝑖1𝑈superscriptsubscript𝑗1𝐷subscript𝐼𝑖𝑗superscriptsubscript𝑟𝑖𝑗⋅superscriptsubscript~𝑥𝑖𝑇subscript~𝑦𝑗2\displaystyle\,(1-\lambda_{\theta})\sum_{i=1}^{|U|}\sum_{j=1}^{|D|}I_{i,j}(r_{i,j}-{\widetilde{x}_{i}}^{T}\cdot\widetilde{y}_{j})^{2}+λθ(∑j=1K‖Wj‖2+∑j=1K‖bj‖2),subscript𝜆𝜃superscriptsubscript𝑗1𝐾superscriptnormsubscript𝑊𝑗2superscriptsubscript𝑗1𝐾superscriptnormsubscript𝑏𝑗2\displaystyle+\,\lambda_{\theta}(\sum\limits_{j=1}^{K}\|W_{j}\|^{2}+\sum\limits_{j=1}^{K}\|b_{j}\|^{2}),(6)
|
| 46 |
+
|
| 47 |
+
where ri,jsubscript𝑟𝑖𝑗r_{i,j} is an element in the user-item rating matrix R𝑅R, indicating the number of tags assigned by user i𝑖i to item j𝑗j; x~isubscript~𝑥𝑖\widetilde{x}_{i} (resp., y~jsubscript~𝑦𝑗\widetilde{y}_{j}) is the vector at the i𝑖ith (resp., j𝑗jth) column of X~~𝑋\widetilde{X} (resp., Y~~𝑌\widetilde{Y}), which is the deep-semantic representation of the i𝑖ith user (resp., j𝑗jth item); the second term is a regularization term used to prevent overfitting, and λθsubscript𝜆𝜃\lambda_{\theta} is the regularization parameter.
|
| 48 |
+
|
| 49 |
+
However, it is difficult to train the model using solely the learning signal from deep-semantic matrix factorization.This is because the model stacks many layers of non-linearities, and when learning signals are back-propagated to the first few layers, they become minuscule and insignificant to learn good representations for the users and items, which in turn results in poor local minima.A common solution is to first pre-train each layer using restricted Boltzmann machines (RBMs) [7, 8] or autoencoders [1] and then use back-propagation to fine-tune the entire deep neural network [6].
|
| 50 |
+
|
| 51 |
+
Therefore, in this work, we directly incorporate autoencoders into the deep-semantic matrix factorization model, and train the deep model using a hybrid learning signal that integrates reconstruction errors of autoencoders with the deep-semantic matrix factorization errors. We thus call this model hybrid deep-semantic matrix factorization (HDMF). The intuition behind it is as follows: (i) the reconstruction-error-based signal can learn better representations for both users and items; (ii) the collaborative learning signal from deep-semantic matrix factorization can connect users and items to discover the underlying users’ preferences; (iii) furthermore, the reconstruction-error-based signal can complement deep-semantic matrix factorization to provide sufficient gradients for better optimizing the model and escaping the local minima.
|
| 52 |
+
|
| 53 |
+
Specifically, as shown in Figure 1, we adopt autoencoders with tied weights in HDMF, i.e., the weight matrices in the decoder are the transposes of weight matrices in the encoder. The decoders take the deep-semantic user and item matrices X~~𝑋\widetilde{X} and Y~~𝑌\widetilde{Y} at the code layer as the inputs and generate reconstructed user and item matrices X′superscript𝑋′X^{\prime} and Y′superscript𝑌′Y^{\prime} at their output layers. Then, reconstruction errors are computed based on the squared differences between the original tag-based matrices (X𝑋X and Y𝑌Y) and the reconstructed matrices (X′superscript𝑋′X^{\prime} and Y′superscript𝑌′Y^{\prime}). Finally, the reconstruction-error-based learning signal will be used to first update W1Tsubscriptsuperscript𝑊𝑇1W^{T}_{1}, then back-propagated to update W2Tsubscriptsuperscript𝑊𝑇2W^{T}_{2}, W3Tsubscriptsuperscript𝑊𝑇3W^{T}_{3}, and so on. As updating WjTsubscriptsuperscript𝑊𝑇𝑗W^{T}_{j} is equivalent to updating Wjsubscript𝑊𝑗W_{j}, this signal complements deep-semantic matrix factorization and offers sufficient gradients to the first few layers of the deep model.
|
| 54 |
+
|
| 55 |
+
Formally, the intermediate outputs of the K+j𝐾𝑗K{+}jth hidden layers hK+j(⋅)subscriptℎ𝐾𝑗⋅h_{K+j}(\cdot), j∈{1,…,K−1}𝑗1…𝐾1j\in\{1,\ldots,K-1\}, in the decoders are defined as:
|
| 56 |
+
|
| 57 |
+
hK+j(X)subscriptℎ𝐾𝑗𝑋\displaystyle h_{K+j}(X)=tanh(WK−(j−1)ThK+(j−1)(X)+bK+j),absentsubscriptsuperscript𝑊𝑇𝐾𝑗1subscriptℎ𝐾𝑗1𝑋subscript𝑏𝐾𝑗\displaystyle=\tanh(W^{T}_{K-(j-1)}h_{K+(j-1)}(X)+b_{K+j}),(7)hK+j(Y)subscriptℎ𝐾𝑗𝑌\displaystyle h_{K+j}(Y)=tanh(WK−(j−1)ThK+(j−1)(Y)+bK+j),absentsubscriptsuperscript𝑊𝑇𝐾𝑗1subscriptℎ𝐾𝑗1𝑌subscript𝑏𝐾𝑗\displaystyle=\tanh(W^{T}_{K-(j-1)}h_{K+(j-1)}(Y)+b_{K+j}),(8)
|
| 58 |
+
|
| 59 |
+
where WK−(j−1)Tsubscriptsuperscript𝑊𝑇𝐾𝑗1W^{T}_{K-(j-1)} is the transpose of WK−(j−1)subscript𝑊𝐾𝑗1W_{K-(j-1)}, and bK+jsubscript𝑏𝐾𝑗b_{K+j} is the bias vector for the K+j𝐾𝑗K{+}jth hidden layer. The outputs of the 2K−12𝐾12K{-}1th hidden layers are used to generate reconstructed user and item profiles, denoted X′superscript𝑋′X^{\prime} and Y′superscript𝑌′Y^{\prime}, at the output layers:
|
| 60 |
+
|
| 61 |
+
X′superscript𝑋′\displaystyle X^{\prime}=tanh(W1Th2K−1(X)+b2K),absentsubscriptsuperscript𝑊𝑇1subscriptℎ2𝐾1𝑋subscript𝑏2𝐾\displaystyle=\tanh(W^{T}_{1}h_{2K\!-\!1}(X)+b_{2K}),(9)Y′superscript𝑌′\displaystyle Y^{\prime}=tanh(W1Th2K−1(Y)+b2K).absentsubscriptsuperscript𝑊𝑇1subscriptℎ2𝐾1𝑌subscript𝑏2𝐾\displaystyle=\tanh(W^{T}_{1}h_{2K\!-\!1}(Y)+b_{2K}).(10)
|
| 62 |
+
|
| 63 |
+
Then, the reconstruction errors of the user (resp., item) matrix are computed as the sum of the Euclidean (i.e., L222) norms of the differences between the tag-based user (resp., item) profile xisubscript𝑥𝑖x_{i} (resp., yjsubscript𝑦𝑗y_{j}) in X𝑋X (resp., Y𝑌Y) and the reconstructed user (resp., item) profile xi′subscriptsuperscript𝑥′𝑖x^{\prime}_{i} (resp., yj′subscriptsuperscript𝑦′𝑗y^{\prime}_{j}) in X′superscript𝑋′X^{\prime} (resp., Y′superscript𝑌′Y^{\prime}). By integrating the reconstruction errors with the deep-semantic matrix factorizations errors (as defined in Equation 3.1), the HDMF model is thus trained by minimizing the following hybrid learning signal:
|
| 64 |
+
|
| 65 |
+
LHDMF(Θ)=subscript𝐿𝐻𝐷𝑀𝐹Θabsent\displaystyle L_{HDMF}(\Theta)=(1−λθ−λe)∑i=1|U|∑j=1|D|Ii,j(ri,j−x~iT⋅y~j)21subscript𝜆𝜃subscript𝜆𝑒superscriptsubscript𝑖1𝑈superscriptsubscript𝑗1𝐷subscript𝐼𝑖𝑗superscriptsubscript𝑟𝑖𝑗⋅superscriptsubscript~𝑥𝑖𝑇subscript~𝑦𝑗2\displaystyle\,(1-\lambda_{\theta}-\lambda_{e})\sum_{i=1}^{|U|}\sum_{j=1}^{|D|}I_{i,j}(r_{i,j}-{\widetilde{x}_{i}}^{T}\cdot\widetilde{y}_{j})^{2}+λe(∑i=1|U|‖xi′−xi‖+∑j=1|D|‖yj′−yj‖)subscript𝜆𝑒superscriptsubscript𝑖1𝑈normsubscriptsuperscript𝑥′𝑖subscript𝑥𝑖superscriptsubscript𝑗1𝐷normsubscriptsuperscript𝑦′𝑗subscript𝑦𝑗\displaystyle+\,\lambda_{e}(\sum_{i=1}^{|U|}\|x^{\prime}_{i}-x_{i}\|+\sum_{j=1}^{|D|}\|y^{\prime}_{j}-y_{j}\|)+λθ(∑j=1K‖Wj‖2+∑j=12K‖bj‖2).subscript𝜆𝜃superscriptsubscript𝑗1𝐾superscriptnormsubscript𝑊𝑗2superscriptsubscript𝑗12𝐾superscriptnormsubscript𝑏𝑗2\displaystyle+\,\lambda_{\theta}(\sum\limits_{j=1}^{K}\|W_{j}\|^{2}+\sum\limits_{j=1}^{2K}\|b_{j}\|^{2}).(11)
|
| 66 |
+
|
| 67 |
+
We have conducted extensive experimental studies and compared our proposed hybrid deep-semantic matrix factorization (HDMF) model with a number of state-of-the-art baselines, which are grouped into two categories and summarized as follows:
|
| 68 |
+
|
| 69 |
+
Content-based tag-aware models. Four state-of-the-art models that utilize social tags as the content information to conduct tag-aware personalized recommendation are selected as the baselines. Similarly to HDMF, they all apply machine learning techniques to model abstract and effective representations for users or/and items; i.e., the clustering-based models, CCS and CCF [14], the autoencoder-based model, ACF [17], and the deep-semantic similarity-based model, DSPR [16].
|
| 70 |
+
|
| 71 |
+
Matrix-factorization-based models. Three matrix-factorization-based recommendation models are also selected as the baselines; i.e., the traditional matrix factorization model, MF, and the additional-information-based matrix factorization (AMF) models, MFsf [12] and MFtc [13], which incorporate, respectively, the social friendships and the textual comments of users as the additional sources of information for matrix factorization.
|
| 72 |
+
|
| 73 |
+
To ensure a fair comparison, the experiments are performed on the same real-world social-tagging dataset as used in [16, 17], which is gathered from the Delicious bookmarking systemand released in HetRec 2011 [5]. After using the same pre-processing to remove the infrequent tags that are used less than 151515 times, the resulting dataset is as shown in Table 1. We randomly select 80%percent8080\% of assignments as training set, 5%percent55\% as validation set, and 15%percent1515\% as test set.
|
| 74 |
+
|
| 75 |
+
All models are implemented using Python and Theano and run on a GPU server with an NVIDIA Tesla K404040 GPU and 121212GB GPU memory. The parameters of HDMF are selected by grid search and the values are set as follows: (i) ##\# of hidden layers is 555; (ii) ##\# of neurons from 111st to 555th hidden layer are 2 00020002\,000, 300300300, 128128128, 300300300, and 2 00020002\,000, respectively; (iii) the parameters λθsubscript𝜆𝜃\lambda_{\theta} and λesubscript𝜆𝑒\lambda_{e} are set to 0.010.010.01 and 0.20.20.2; (iv) the learning rate for model training is 0.0020.0020.002.
|
| 76 |
+
|
| 77 |
+
In training, we first initialize the weight matrices Wjsubscript𝑊𝑗W_{j}, using the random normal distribution, and initialize the biases bjsubscript𝑏𝑗b_{j} to be zero vectors; the model is then trained by back-propagation using stochastic gradient descent; finally, the training stops when the model converges or reaches the maximum training runs. We also use the validation set to avoid over-fitting by early stopping.
|
| 78 |
+
|
| 79 |
+
As for the evaluation of recommendation systems, the most popular metrics are precision, recall, and F111-score [2]. Since users usually only browse the topmost recommended items, we apply these metrics at a given cut-off rank k𝑘k, i.e., considering only the top-k𝑘k results on the recommendation list, called precision at k𝑘k (P@k𝑃@𝑘P@k), recall at k𝑘k (R@k𝑅@𝑘R@k), and F111-score at k𝑘k (F@k𝐹@𝑘F@k). In addition, since users always prefer to have their target items ranked in the front of the recommendation list, we also employ as evaluation metrics the mean average precision (MAP) and the mean reciprocal rank (MRR), which take into account the order of items and give greater importance to the ones ranked higher.
|
| 80 |
+
|
| 81 |
+
Table 2 depicts in detail the tag-aware personalized recommendation performances of our proposed HDMF and seven baselines on the Delicious dataset, in terms of P@k𝑃@𝑘P@k, R@k𝑅@𝑘R@k, F@k𝐹@𝑘F@k, MAP, and MRR, where four cut-off ranks k=5𝑘5k=5, 151515, 303030, and 505050 are selected.
|
| 82 |
+
|
| 83 |
+
In general, the relative performances of the baselines reported in Table 2 are highly consistent with the results reported in [17], [16], and [13]; namely, (i) ACF outperforms CCF, (ii) DSPR outperforms CCF, ACF, and CCS, and (iii) MFsf and MFct “slightly” outperform MF, respectively. More importantly, we note that our proposed model, HDMF, significantly outperforms all seven baselines in all metrics; e.g., the MRR (resp., MAP) of HDMF are 1.521.521.52 (resp., 1.661.661.66) times as high as that of the best baseline, DSPR (resp., MFsf), while the relative performances in P@k𝑃@𝑘P@k, R@k𝑅@𝑘R@k, and F@k𝐹@𝑘F@k are also similar. This finding strongly proves that by integrating the techniques of deep-semantic modeling, hybrid learning, and matrix factorization, HDMF overcomes the existing problems (as presented in Section 1) of the state-of-the-art recommendation models and achieves very superior performance in tag-aware personalized recommendation.
|
| 84 |
+
|
| 85 |
+
Specifically, as shown in Table 2, the MRR and MAP of HDMF are 1.521.521.52 and 2.12.12.1 times, respectively, as high as those of the-state-of-art deep-semantic model, DSPR. In addition, the relative improvements of HDMF to DSPR, in terms of P@k𝑃@𝑘P@k, R@k𝑅@𝑘R@k, and F@k𝐹@𝑘F@k, all gradually enhance with the rise of the cut-off rank k𝑘k, i.e., increasing from around 1.31.31.3 times at k=5𝑘5k=5 to more than double at k=50𝑘50k=50. This observation demonstrates that incorporating collaborative-based capabilities (i.e., using correlation information between users and items to help the recommendation) can greatly enhance the deep-semantic model’s performance in tag-aware recommendation, especially for the one with relative long recommendation lists.
|
| 86 |
+
|
| 87 |
+
Furthermore, by comparing the results of the matrix-factorization-based models, MF, MFsf, and MFtc, in Table 2, we find that the AMF models, MFsf and MFtc, have close performances; and, more importantly, their relative improvements to MF are “marginal”, e.g., their MAP and MRR are only 2.4%percent2.42.4\% and 6.8%percent6.86.8\%, respectively, better than those of MF. This finding is actually consistent with the results in [13], where the improvement rates of MFsf and MFtc to MF are only 3.2%percent3.23.2\% and 5.5%percent5.55.5\%, respectively. The reason for these “marginal” enhancements is as follows: the AMF models incorporate the additional source of information as a regularization term with a small coefficient in matrix factorization, which greatly limits the additional information’s contribution on the optimizing gradient and thus limits their capabilities in improving the recommendation performance. By contrast, as shown in Table 2, HDMF dramatically outperforms MF: the MAP and MRR of HDMF are about 70%percent7070\% and 130%percent130130\%, respectively, better than those of MF. This is mainly because that the additional social tag information in HDMF is utilized to model the deep-semantic user and item matrices, which are then used directly as the decomposed user and item matrices in matrix factorization; since the decomposed matrices have dominant contribution on the optimizing gradient, HDMF maximizes the effect of the additional social tag information on the model optimization, making it possible to achieve significant improvements.
|
| 88 |
+
|
| 89 |
+
In this paper, we have briefly analyzed the state-of-the-art tag-aware personalized recommendation models that use content-based filtering or matrix factorization, and identified their existing problems. We thus have proposed a hybrid deep-semantic matrix factorization (HDMF) model to tackle these problems and to further enhance the performance of tag-aware personalized recommendation. We have also conducted extensive experimental studies and compared HDMF with seven state-of-the-art baselines; the results show that, by integrating the techniques of deep-semantic modeling, hybrid learning, and matrix factorization, HDMF greatly outperforms the state-of-the-art baselines in tag-aware personalized recommendation, in terms of all evaluation metrics.
|
| 90 |
+
|
| 91 |
+
In the future, further experiments will be conducted to compare the performances of HDMF on different kinds of Social Web datasets, e.g., Last.fm and MovieLens. Moreover, we will also investigate methodologies to add spatial and temporal information into the HDMF model to capture the users’ real-time preferences.
|
1708.04106v3.txt
ADDED
|
@@ -0,0 +1,459 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Deep networks have achieved state-of-the-art results in many areas, such as computer vision~\cite{huang2016densely} and nature language processing~\cite{bahdanau2014neural}.
|
| 3 |
+
From AlexNet~\cite{krizhevsky2012imagenet} to recently proposed DenseNet~\cite{huang2016densely},
|
| 4 |
+
better performances are accompanied with deeper and wider networks and more complex and adaptable structures.
|
| 5 |
+
A more complex structure of neural networks means longer inference time,
|
| 6 |
+
which is not tolerated in industrial environment.
|
| 7 |
+
Networks mentioned above only consider the evaluation criterion of accuracy,
|
| 8 |
+
while neglect the necessity of real-time response in industrial applications.
|
| 9 |
+
|
| 10 |
+
At the same time, some nets like DIN~\cite{zhou2017deep} and wide~\&~deep model~\cite{cheng2016wide} get more and more attention. These nets share some characteristics: nets are shallow,
|
| 11 |
+
layers are very simple and with less computation cost.
|
| 12 |
+
In industrial applications, e.g.~online advertising systems, models have to make prediction of hundreds of advertisements for one user in several milliseconds, which restricts the complexity of model.
|
| 13 |
+
Only simple and shallow structure meets the stringent response time requirements in industry.
|
| 14 |
+
|
| 15 |
+
Accuracy and latency are the two points that we pay attention to.
|
| 16 |
+
In general, there are two solutions to reduce runtime complexities while keeping a decent performance.
|
| 17 |
+
Some works make use of factorizing or compressing to directly simplify the computation,
|
| 18 |
+
such as matrix SVD~\cite{denton2014exploiting},
|
| 19 |
+
MobileNet~\cite{howard2017mobilenets}, and ShuffleNet~\cite{zhang2017shufflenet}.
|
| 20 |
+
Other approaches adopt the teacher-student strategy. They use light networks with fewer layers and parameters to decrease the inference time, while the light nets are trained helped by a complicated teacher network that trained in advance,
|
| 21 |
+
like knowledge distillation~\cite{hinton2015distill} and FitNet~\cite{Romero2014fitnet}.
|
| 22 |
+
These teacher-student methods decrease the runtime complexities,
|
| 23 |
+
and can be further combined with approaches of the first category.
|
| 24 |
+
In this work, we propose a novel universal framework to train decent small networks,
|
| 25 |
+
motivated by the potential of teacher-student methods.
|
| 26 |
+
|
| 27 |
+
In this work, we develop a novel network training process dubbed rocket launching.
|
| 28 |
+
The light net is the target network for inference, the booster relates to the deeper and more complex network from the architecture.
|
| 29 |
+
Both the light and the booster net compose the architecture of rocket network.
|
| 30 |
+
At the training stage, the light and booster networks are trained simultaneously on the same task.
|
| 31 |
+
Besides, the light net also keeps getting knowledge learned by the booster through the optimization of the hint loss,
|
| 32 |
+
which is included in the objective function to make both nets have similar behaviour during training.
|
| 33 |
+
The booster guides the optimization of the target light network along all the training process.
|
| 34 |
+
At the inference stage, only the trained light network is used.
|
| 35 |
+
Different from previous teacher-student methods~\cite{hinton2015distill,Romero2014fitnet},
|
| 36 |
+
we make the light model share some lower layers with the cumbersome one
|
| 37 |
+
and train them simultaneously.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
In this paper, we propose a universal method aiming to obtain a well-behaved light net considering limitations on inference time.
|
| 41 |
+
Our method is suitable to many different network structures.
|
| 42 |
+
In brief, our contributions can be summarized as follows:
|
| 43 |
+
\begin{itemize}
|
| 44 |
+
\item We propose a novel universal training process called rocket launching, which makes use of the booster net to supervise the learning of the light network through whole training process.
|
| 45 |
+
We show that a light model can be trained to perform close to deeper and more complex models in experiments.
|
| 46 |
+
\item We analyze different hint loss functions to transfer the information from booster to the light net.
|
| 47 |
+
\item In order to push light net to be close to booster net, we use gradient block technique to cancel the effect of hint loss's back-propagation on layers of the booster, which gives booster net more freedom to update its parameters based on ground truth and improve the performance further.
|
| 48 |
+
\end{itemize}
|
| 49 |
+
|
| 50 |
+
Our method achieves the state-of-the-art results on publicly available benchmarks
|
| 51 |
+
as well as industrial dataset.
|
| 52 |
+
It is notable that our method performs better than other teacher-student approaches.
|
| 53 |
+
Experimental results present that the performance can be further improved when combining other teacher-student approaches with our framework.
|
| 54 |
+
|
| 55 |
+
The remainder of this paper starts from a summary of related work.
|
| 56 |
+
Then we introduce our approach, followed by experiments and conclusions.
|
| 57 |
+
\section{Related work}
|
| 58 |
+
Deep neural networks have drawn increasing attention in recent years due to their overwhelming performance
|
| 59 |
+
on many research areas.
|
| 60 |
+
One main trend of network structure design is to develop neural networks with
|
| 61 |
+
larger depth, more parameters and higher complexity to achieve better performance~\cite{Simonyan2015verydeep,szegedy2015going,he2016deep,Zagoruyko2016wide}.
|
| 62 |
+
However, these top-performing networks with high complexity will result in time consuming systems
|
| 63 |
+
at the inference phase.
|
| 64 |
+
Therefore, they are not well suitable for applications with inference time limitations.
|
| 65 |
+
|
| 66 |
+
There have been some explorations of model compression by directly simplifying the computation or pruning of the original neural operations. Denton et al.~\cite{denton2014exploiting} use SVD to approximate the convolutional operations in deep CNNs. MobileNets~\cite{howard2017mobilenets} are based on a streamlined architecture that uses depthwise separable convolutions to build lightweight deep neural networks. ShuffleNet~\cite{zhang2017shufflenet} uses pointwise group convolution and channel shuffle to reduce computation cost. ThiNet~\cite{luo2017thinet} uses statistic information from next layer to prune filters which accelerates CNN models while maintaining accuracy.
|
| 67 |
+
|
| 68 |
+
Besides designing delicate net structure, light net can get more information from extra pre-trained model during training phrase. This idea has been emphasized in Learnware~\cite{zhou2016learnware}. There have been some attempts adopting a teacher-student strategy, where a more complex teacher network is employed to teach a lightweight student network on a given task.
|
| 69 |
+
The teacher network helps the student net to get a decent performance at the inference phase.
|
| 70 |
+
Bucilu\v{a} et al.~\cite{Bucilua06compression}
|
| 71 |
+
improve compression model, which pioneers this type of learning process. They expound that the knowledge of a large ensemble of models could transfer to a single small model, they use a large ensemble of models to label large amounts of unlabel data, then use the data labeled by the ensemble models to train small model. Furthermore,
|
| 72 |
+
Ba et al.~\cite{ba2014deep}
|
| 73 |
+
train a wider and shallower net called student net to mimic the big model called teacher net via regressing logits before the softmax layer with $\ell_2$ loss. They think that matching logits could get more information than the hard label that provided by the cumbersome model.
|
| 74 |
+
Hinton et al.~\cite{hinton2015distill}
|
| 75 |
+
point out that identifying knowledge in a trained model with the learned parameter value is hard. Instead, they make use of one abstract view of the knowledge that is the learned mapping from input vectors to output vectors, they propose the strategy of knowledge distillation which uses the class probabilities produced by the cumbersome model as "soft targets" for training the small model. They prove that they are the general version of matching logits which uesd by~\citeauthor{ba2014deep}\shortcite{ba2014deep}.
|
| 76 |
+
|
| 77 |
+
Besides using the output of the teacher network, people try to get more supervised information from the teacher. FitNets~\cite{Romero2014fitnet} use not only the outputs but also the intermediate representations learned by the cumbersome model as the hint to supervise the training process. Zagoruyko et al.~\cite{Zagoruyko2016attenion} use attention as a mechanism of transferring knowledge from one network to another. By properly defining attention for convolutional neural networks, they improve the performance of a student CNN by forcing it to mimic the attention maps of a powerful teacher network.
|
| 78 |
+
|
| 79 |
+
In previous teacher-student approaches, the cumbersome teacher networks are trained in advance.
|
| 80 |
+
Instead of only transferring the final stationary outputs of the pretrained model,
|
| 81 |
+
we let the booster model guide the whole training process of light net in rocket launching.
|
| 82 |
+
We think that the knowledge learned by the cumbersome model exists not only in the final outputs,
|
| 83 |
+
but also in the full learning process.
|
| 84 |
+
The light model gets not only the difference between the target and the temporary outputs, but also the possible path towards the final target provided by a complex model of more learning capability.
|
| 85 |
+
Another difference of our approach is that the part parameters of the light model and the booster are shared in our framework. We adopt the parameter sharing scheme since the lower-level representation of the same task should be universal. In the proposed architecture, the booster has a much deeper specific layers to ensure the capability to guide the light model to learn the task better.
|
| 86 |
+
|
| 87 |
+
Training several nets together is often applied on multi input scenes~\cite{Andrew13dcca,Bromley1993siamese} or semi-supervised task~\cite{laine2016temporal}. Parameters sharing has also been used in multi-task~\cite{He2017maskrcnn}. However, to the best of our knowledge, there is no attempt on using these techniques to train small net to get better performance. We are the first to utilize these schemes in model compression attempts, and results in experiments present the effectiveness of our method.
|
| 88 |
+
\section{Our approach}
|
| 89 |
+
\label{sec:opa}
|
| 90 |
+
|
| 91 |
+
In this section, we will describe our proposed rocket net training process in detail.
|
| 92 |
+
We will further analyze the highlights of our method and compare different hint loss functions.
|
| 93 |
+
\subsection{The sketch of our method}
|
| 94 |
+
Fig.~\ref{fig:gm} represents the general structure of our architecture,
|
| 95 |
+
it is composed of two parts: the light net and the booster net. These two networks share some lower-level layers (annotated in yellow), and they both have their specific layers for the learning and prediction on the same task.
|
| 96 |
+
|
| 97 |
+
\begin{figure}[!t]
|
| 98 |
+
\centering
|
| 99 |
+
\includegraphics[height=80mm ]{figures/NetStructure.pdf}
|
| 100 |
+
\caption{{Whole Net Structure, blue dashed circle represents light net, pink dashed circle represents booster net. Yellow layers are shared by light net and booster net.}}
|
| 101 |
+
\label{fig:gm}
|
| 102 |
+
\end{figure}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
We let $\bs{x}$ and $\bs{y}$ denote the inputs and one-hot ground truth labels of our neural architecture.
|
| 107 |
+
Let $\mathrm{L}$ be the light net with an output softmax as
|
| 108 |
+
$\bs{p}(\bs{x})=\mathrm{softmax}(\bs{l}(\bs{x}))$,
|
| 109 |
+
where $\bs{l}(\bs{x})$ is the weighted sum before the softmax activation.
|
| 110 |
+
Parameters for the light net consist of two components: parameters in shared layers $\bs{\mathrm{W}}_\mathrm{S}$ and
|
| 111 |
+
parameters in its lightweight particular layers for prediction $\bs{\mathrm{W}}_\mathrm{L}$.
|
| 112 |
+
We let $\mathrm{B}$ denote the booster network with shared parameters $\bs{\mathrm{W}}_\mathrm{S}$ and
|
| 113 |
+
its particular weights $\bs{\mathrm{W}}_\mathrm{B}$ to get the final output.
|
| 114 |
+
Similar to the light net, we have $\bs{q}(\bs{x})=\mathrm{softmax}(\bs{z}(\bs{x}))$
|
| 115 |
+
as the output softmax for the booster,
|
| 116 |
+
where $\bs{z}(\bs{x})$ is the weighted sum before the softmax activation.
|
| 117 |
+
We expect that the light net is trained similar to the true labels $\bs{y}$,
|
| 118 |
+
as well as approximate to the knowledge learned by the booster net with much more representation capability.
|
| 119 |
+
To solve this problem, we take hint loss in the training objective in order to
|
| 120 |
+
convey knowledge from the booster net to the light net.
|
| 121 |
+
The objective function for rocket launching is defined as follows:
|
| 122 |
+
\begin{eqnarray}
|
| 123 |
+
\begin{split}
|
| 124 |
+
\mathcal{L}(\bs{x};\boldsymbol{\mathrm{W}}_\mathrm{S},\boldsymbol{\mathrm{W}}_\mathrm{L},\boldsymbol{\mathrm{W}}_\mathrm{B}) = \ &\mathcal{H}(\bs{y}, \bs{p}(\bs{x}))+\mathcal{H}(\bs{y}, \bs{q}(\bs{x}))\\
|
| 125 |
+
&+\lambda\|\bs{l}(\bs{x}) - \bs{z}(\bs{x})\|_2^2,
|
| 126 |
+
\end{split}
|
| 127 |
+
\label{eq:obj}
|
| 128 |
+
\end{eqnarray}
|
| 129 |
+
where the last term is the hint loss function as the mean square error (MSE)
|
| 130 |
+
between the logits $\bs{z}(\bs{x})$ and $\bs{l}(\bs{x})$,
|
| 131 |
+
$\mathcal{H}(\bs{p}, \bs{q})=-\sum_i p_i\log q_i$ is the cross-entropy,
|
| 132 |
+
$\lambda$ is the parameter to balance the cross-entropy and the hint loss.
|
| 133 |
+
Here we use the cross-entropy terms for the booster and light nets to learn the true labels,
|
| 134 |
+
and use hint loss function to exploit the knowledge learned by the booster to guide the learning process
|
| 135 |
+
of the light network.
|
| 136 |
+
\subsection{Characters of our method}
|
| 137 |
+
\label{subsec:character}
|
| 138 |
+
There are some highlights in our method, which have notable effects on the training process
|
| 139 |
+
and distinguish our method from other teacher-student approaches.
|
| 140 |
+
\subsubsection{Parameter sharing}
|
| 141 |
+
In our approach, the light net shares parameter with the booster net.
|
| 142 |
+
This scheme helps the light net get direct thrust from the booster,
|
| 143 |
+
which pushes it get better performance.
|
| 144 |
+
|
| 145 |
+
The technique of parameter sharing is not new in deep learning.
|
| 146 |
+
In the area of computer vision, it is a common scheme to train deep convolutional neural networks in a multi-task manner.
|
| 147 |
+
We assume that these tasks can be built on some shared low-level representations of the images.
|
| 148 |
+
Given this assumption, we could reduce the parameters in neural network and improve its generalization capability.
|
| 149 |
+
It is noticeable that, in industrial applications, e.g.~CTR prediction,
|
| 150 |
+
reusing the embedding layers from other tasks helps a new task converge more easily and get a better performance.
|
| 151 |
+
\subsubsection{Simultaneous training}
|
| 152 |
+
In most teacher-student methods, the teacher network is trained on the target database in advance,
|
| 153 |
+
and its parameters are fixed when guiding the training process of the student net.
|
| 154 |
+
Different from these approaches, we have the light and booster nets trained simultaneously,
|
| 155 |
+
the whole learning process of the target light net is guided by the booster net.
|
| 156 |
+
The light model can learn from not only the difference between the target and its temporary outputs, but also the possible path towards the final target provided by a complex model with more learning capability.
|
| 157 |
+
|
| 158 |
+
Notice that instead of training the teacher and student nets separately,
|
| 159 |
+
the whole training time of our proposed architecture is shortened.
|
| 160 |
+
Therefore, the compressed model can be trained more efficiently to meet the requirement in industrial applications
|
| 161 |
+
that the inference model be updated frequently.
|
| 162 |
+
\subsubsection{Hint loss functions}
|
| 163 |
+
In our approach, we transfer the booster net's knowledge to the light net by minimizing the hint loss.
|
| 164 |
+
Several different hint loss functions are considered in this work:
|
| 165 |
+
\begin{itemize}
|
| 166 |
+
\item MSE of final softmax: $\mathcal{L}_\mathrm{MSE}(\bs{x})=\|\bs{p}(\bs{x}) - \bs{q}(\bs{x})\|_2^2$,
|
| 167 |
+
\item MSE of logits before softmax activation, which is also adopted in SNN-MIMIC~\cite{ba2014deep}:
|
| 168 |
+
$\mathcal{L}_\mathrm{mimic}(\bs{x})=\|\bs{l}(\bs{x}) - \bs{z}(\bs{x})\|_2^2$,
|
| 169 |
+
\item knowledge distillation~\cite{hinton2015distill}: $\mathcal{L}_\mathrm{KD}(\bs{x})=\mathcal{H}(\frac{\bs{p}(\bs{x})}{T}, \frac{\bs{q}(\bs{x})}{T})$,
|
| 170 |
+
where $T$ is the temperature.
|
| 171 |
+
\end{itemize}
|
| 172 |
+
|
| 173 |
+
For the MSE of final softmax $\mathcal{L}_\mathrm{MSE}$,
|
| 174 |
+
we have the derivative of the hint loss with respect to $\bs{l}_i(\bs{x})$:
|
| 175 |
+
\begin{eqnarray}
|
| 176 |
+
\begin{split}
|
| 177 |
+
\frac{\partial\mathcal{L}_\mathrm{MSE}(\bs{x})}{\partial \bs{l}_i(\bs{x})} &= 2\bs{p}_i(\bs{x})\Big[\bs{p}_i(\bs{x}) - \bs{q}_i(\bs{x}) \\
|
| 178 |
+
&+ \sum\nolimits_k \bs{p}_k(\bs{x})(\bs{q}_k(\bs{x}) - \bs{p}_k(\bs{x}))\Big].
|
| 179 |
+
\end{split}
|
| 180 |
+
\end{eqnarray}
|
| 181 |
+
Notice that the gradient is proportional to the prediction outputs of the light net.
|
| 182 |
+
If $\bs{l}_i(\bs{x})$ is very negative, causing $\bs{p}_i(\bs{x})$ close to zero and the gradient to vanish,
|
| 183 |
+
the MSE of final softmax may fail to learn the difference in outputs,
|
| 184 |
+
even when the light net makes radically different outputs from the booster net.
|
| 185 |
+
|
| 186 |
+
SNN-MIMIC learning~\cite{ba2014deep} uses the formulation of $\mathcal{L}_\mathrm{mimic}$
|
| 187 |
+
between the teacher and student networks.
|
| 188 |
+
We have the derivative w.r.t. $\bs{l}_i(\bs{x})$:
|
| 189 |
+
\begin{eqnarray}
|
| 190 |
+
\frac{\partial\mathcal{L}_\mathrm{mimic}(\bs{x})}{\partial \bs{l}_i(\bs{x})} = \bs{l}_i(\bs{x}) - \bs{z}_i(\bs{x}).
|
| 191 |
+
\end{eqnarray}
|
| 192 |
+
We observe that the update directly reduces the difference between the logits before softmax,
|
| 193 |
+
which prevents the problem of gradient vanishing with $\mathcal{L}_\mathrm{MSE}$.
|
| 194 |
+
Experimental results also present that training with $\mathcal{L}_\mathrm{mimic}$
|
| 195 |
+
achieves the best performance among these different hint loss formulations.
|
| 196 |
+
|
| 197 |
+
Knowledge distillation~\cite{hinton2015distill} uses cross-entropy to restrict the probability outputs of two models.
|
| 198 |
+
In their work, a temperature $T$ is introduced to produce a softer probability distribution among classes.
|
| 199 |
+
They think that knowledge distillation is the general case of matching logits.
|
| 200 |
+
They prove that with a high temperature, the gradient w.r.t.~$\bs{l}_i(\bs{x})$ is:
|
| 201 |
+
\begin{eqnarray}
|
| 202 |
+
\frac{\partial\mathcal{L}_\mathrm{KD}(\bs{x})}{\partial \bs{l}_i(\bs{x})}\approx\frac{1}{NT^2}(\bs{l}_i(\bs{x}) - \bs{z}_i(\bs{x})),
|
| 203 |
+
\end{eqnarray}
|
| 204 |
+
where $N$ is the number of classes, and approximation $\mathrm{e}^{\bs{l}_i(\bs{x})/T}\approx 1 + \bs{l}_i(\bs{x})/T$ is used.
|
| 205 |
+
Their approximation neglects the term $(\bs{l}_i(\bs{x})/T)^2$ in Taylor series
|
| 206 |
+
when the temperature is high enough compared with the magnitude of the logits.
|
| 207 |
+
Notice that the approximate gradient $\frac{1}{NT^2}(\bs{l}_i(\bs{x})-\bs{z}_i(\bs{x}))$ is the same order of infinitesimal to the neglected term $(\bs{l}_i(\bs{x})/T)^2$, this approximation may also cause a negligible gradient.
|
| 208 |
+
But we approve the temperature's effect that it can soften class probability,
|
| 209 |
+
which makes the distillation pays more attention to matching the negative logits below the average.
|
| 210 |
+
In practice, Hinton et al.~\cite{hinton2015distill} suggest that intermediate temperatures work best,
|
| 211 |
+
which ignores the very negative logits that might be noisy.
|
| 212 |
+
While in this work, we find that the optimization of all the logits' difference in our framework outperforms using the formulation of $\mathcal{L}_\mathrm{KD}$.
|
| 213 |
+
We think that some very negative logits may convey useful knowledge acquired by the cumbersome net,
|
| 214 |
+
which helps the student network to get a better performance.
|
| 215 |
+
\subsubsection{Gradient block}
|
| 216 |
+
\begin{figure}[!t]
|
| 217 |
+
\centering
|
| 218 |
+
\includegraphics[width=70mm ]{figures/GradientBlock.pdf}
|
| 219 |
+
\caption{{Gradient backward with the gradient block scheme.}}
|
| 220 |
+
\label{fig:gb}
|
| 221 |
+
\end{figure}
|
| 222 |
+
In our proposed training process, the light net shares parameters and is trained together
|
| 223 |
+
with the booster net.
|
| 224 |
+
This simultaneous training scheme has an inevitable effect on the performance of the booster network.
|
| 225 |
+
Using both cross-entropy $\mathcal{H}(\bs{y},\bs{q}(\bs{x}))$ and hint loss as the objective to update booster's parameters will make the categorical outputs of the booster strongly affected by those of the light net, and hinder the booster from learning on the task directly.
|
| 226 |
+
Since the learning capability of the light model is limited,
|
| 227 |
+
the performance of the booster net will be inevitably deteriorated.
|
| 228 |
+
Notice that the light model learns from the knowledge conveyed by the booster net during training,
|
| 229 |
+
this deterioration in the booster model's learning will further
|
| 230 |
+
diminish the learning potential of the light network.
|
| 231 |
+
|
| 232 |
+
|
| 233 |
+
In order to solve this problem, during the training process, we develop the gradient block scheme to prevent the booster model
|
| 234 |
+
from minimizing the hint loss objective. As we can see from Fig.~\ref{fig:gb}, during the back-propagation of the hint loss term, we fix the gradient of booster net's specific parameters~($\bs{\mathrm{W}}_\mathrm{B}$), and use this moment booster net's probability as target to supervise light net's study.
|
| 235 |
+
|
| 236 |
+
This operation makes the specific parameters $\bs{\mathrm{W}}_\mathrm{B}$ in booster net away from the effect given by
|
| 237 |
+
the light model, thus the booster can directly learn from the ground truth labels to achieve its best performance.
|
| 238 |
+
For the light net, the parameters are normally updated to optimize the objective function in Eq.~\ref{eq:obj}.
|
| 239 |
+
Both the supervisory information and the booster's knowledge are the targets for the light model to learn from.
|
| 240 |
+
|
| 241 |
+
\begin{table*}[!t]
|
| 242 |
+
\caption{Comparisons of classification performance(test error) on CIFAR-10}
|
| 243 |
+
\label{tab:cifar10}
|
| 244 |
+
\centering{
|
| 245 |
+
\centerline{
|
| 246 |
+
\begin{threeparttable}
|
| 247 |
+
\begin{tabular}{ccccccccc}
|
| 248 |
+
\toprule
|
| 249 |
+
light & booster & base\tnote{1} & AT & KD & rocket\tnote{2} & rocket+KD\tnote{3} & booster\tnote{4} & booster only\tnote{5}\\
|
| 250 |
+
\midrule
|
| 251 |
+
WRN-16-1,~0.2M(b) & WRN-40-1,~0.6M & 8.77 & 8.25 & 8.39 & 7.87 & 7.52 & 6.64 & \textbf{6.58} \\
|
| 252 |
+
WRN-16-2,~0.7M(b) & WRN-40-2,~2.2M & 6.31 & 5.85 & 6.08 & 5.67 & 5.64 & 5.20 & \textbf{5.23} \\
|
| 253 |
+
WRN-16-1,~0.2M(a) & WRN-40-1,~0.6M & 8.69 & -\tnote{6} & 8.34 & 7.85 & 7.51 & 7.27 & \textbf{6.58} \\
|
| 254 |
+
\bottomrule
|
| 255 |
+
\end{tabular}
|
| 256 |
+
\begin{tablenotes}[para,flushleft]
|
| 257 |
+
\item[1] base means WRN-16 trains individually.
|
| 258 |
+
\item[2] rocket means light net's result in rocket launching.
|
| 259 |
+
\item[3] rocket+KD means light net's result using rocket launching combined with KD.
|
| 260 |
+
\item[4] booster means booster net's result in rocket launching.
|
| 261 |
+
\item[5] booster only means WRN-40 trains individually.
|
| 262 |
+
\item[6] WRN-16-1,~0.2M(b) can't be applied on AT directly, so we did not report this result.
|
| 263 |
+
\end{tablenotes}
|
| 264 |
+
\end{threeparttable}}}
|
| 265 |
+
\end{table*}
|
| 266 |
+
\section{Experiments}
|
| 267 |
+
In this section, we evaluate our rocket launching on several classification datasets and a real advertisement database from a Chinese leading e-commerce site. Experimental results present that our proposed approach achieves notable
|
| 268 |
+
improvements in the light net's performance and outperforms other teacher-student methods.
|
| 269 |
+
In experiments on public benchmarks, we compare our method with knowledge distillation~(KD)~\cite{hinton2015distill} and attention transfer~(AT)~\cite{Zagoruyko2016attenion}.
|
| 270 |
+
\subsection{Experiments on CIFAR-10}
|
| 271 |
+
The CIFAR-10 dataset~\cite{krizhevsky2009learning} consists of $32\times32$ color images
|
| 272 |
+
from $10$ class.
|
| 273 |
+
These images are split into $50,000$ training samples and $10,000$ testing samples.
|
| 274 |
+
We preprocess the data with the same operations as in~\citeauthor{Zagoruyko2016attenion}\shortcite{Zagoruyko2016attenion}.
|
| 275 |
+
All the experiments are repeated $3$ times with different seed,
|
| 276 |
+
and we take the median of error rates as the final results. All the experiments, we use the same learning rate tuning and epochs as in~\citeauthor{Zagoruyko2016attenion}\shortcite{Zagoruyko2016attenion}. We set the initial learning rate to be $0.1$ with momentum to be $0.9$, while we drop learning rate by $0.2$ at $[60,120,160]$ epochs and train for total $200$ epochs.
|
| 277 |
+
|
| 278 |
+
We employ wide residual net~\cite{Zagoruyko2016wide} to be the instantiation of rocket launching
|
| 279 |
+
on CIFAR-10 datasets. %
|
| 280 |
+
Wide residual net (WRN) has three groups of block, each block has two convolutional layers with larger width
|
| 281 |
+
in contrast with the original ResNet.
|
| 282 |
+
The wider layers are accompanied with more parameters, which could offer more representation capability.
|
| 283 |
+
Fig.~\ref{fig:structure}(a) shows the schematics of the rocket net structure based on wide residual networks.
|
| 284 |
+
Layers in red are shared by the light net and the booster. As we can see, sharing layers~(layers in red) are in the lower group of wide residual net. The yellow part is the specific structure designed for light net to make prediction.
|
| 285 |
+
The blue part is the specific layers of the booster, which is removed at inference phrase.
|
| 286 |
+
Attention transfer~(AT) uses teacher net's output activations of each group of residual blocks to supervise student net's each group's activations. In order to compare with AT fairly, we design another sharing way. As Fig.~\ref{fig:structure}(b) shows, the light net shares some lower blocks with the booster in each group.
|
| 287 |
+
|
| 288 |
+
|
| 289 |
+
|
| 290 |
+
|
| 291 |
+
|
| 292 |
+
We explore rocket launching on light and booster net with different network depths and widths~(e.g.~WRN-16-1(a),0.2M means wide residual network with depth of $16$ and widening factor of $1$, using the layer sharing way like Fig.~\ref{fig:structure}(a), its parameters' size is $0.2$M).
|
| 293 |
+
As shown in Table~\ref{tab:cifar10}, our approach achieves consistently notable improvement compared to the base light net with different experimental settings.
|
| 294 |
+
Taking the first line of Table~\ref{tab:cifar10} as example, using the same WRN-16-1(b) net structure, our rocket launching get $0.9\%$ improvement compared with this net trained individual.
|
| 295 |
+
We also observe that our approach outperforms other teacher-student methods,
|
| 296 |
+
such as knowledge distillation~(KD)~\cite{hinton2015distill} and attention transfer~\cite{Zagoruyko2016attenion}. It's notable that benefitting from
|
| 297 |
+
the structure characteristic of residual net, the way of sharing shown in Fig.~\ref{fig:structure}(b) still obtains decent result.
|
| 298 |
+
|
| 299 |
+
Besides comparing with other approaches, we also try to combine KD with our method by adding $\mathcal{L}_\mathrm{KD}$ to the objective in Eq.~\ref{eq:obj}. It's notable that we use probability that pre-trained by booster net in $\mathcal{L}_\mathrm{KD}$, which means light net can also obtain additional guidance from a pre-trained booster network. From Table~\ref{tab:cifar10}, we see that the performance can be further improved with the application of KD,
|
| 300 |
+
which means our rocket launching has different effect on the light net with KD.
|
| 301 |
+
The light net benefits from both the supervisory information brought by the pre-trained teacher network,
|
| 302 |
+
and the knowledge conveyed by the booster network during the training process.
|
| 303 |
+
|
| 304 |
+
\begin{table*}[!t]
|
| 305 |
+
|
| 306 |
+
\caption{Comparisons of different framework design's result~(test error) on CIFAR-10.}
|
| 307 |
+
\label{tab:ablation}
|
| 308 |
+
\centering{{
|
| 309 |
+
\begin{threeparttable}
|
| 310 |
+
\begin{tabular}{ccccccc}
|
| 311 |
+
\toprule
|
| 312 |
+
light& booster & base & rocket~(no GB)\tnote{1}& rocket~(no sharing)\tnote{2} & rocket~(no joint training)\tnote{3}& rocket \\
|
| 313 |
+
\midrule
|
| 314 |
+
WRN-16-1(b) & WRN-40-1 & 8.77 & 8.50 & 8.06 & 8.04 & \textbf{7.87} \\
|
| 315 |
+
WRN-16-1(a) & WRN-40-1 & 8.69 & 8.30 & 8.23 & 8.23 & \textbf{7.85}\\
|
| 316 |
+
\bottomrule
|
| 317 |
+
\end{tabular}
|
| 318 |
+
\begin{tablenotes}[para,flushleft]
|
| 319 |
+
\item[1] rocket~(no GB) means rocket launching without gradient block.
|
| 320 |
+
\item[2] rocket~(no sharing) means rocket launching without parameter sharing.
|
| 321 |
+
\item[3] rocket~(no joint training) means booster net trains first, then light net use some layers of booster to initialize, and use hint loss to learn booster net's logits.
|
| 322 |
+
\end{tablenotes}
|
| 323 |
+
\end{threeparttable}}}
|
| 324 |
+
\end{table*}
|
| 325 |
+
We also investigate our framework with different hint loss formulations.
|
| 326 |
+
From Table~\ref{tab:hint}, we see that the adopted hint loss to match the logits achieves the best performance
|
| 327 |
+
among the different objectives.
|
| 328 |
+
While hint loss to match the probability performs worst, which means gradient vanishing affects the training process.
|
| 329 |
+
The experimental results are in accordance with our previous analysis.\par
|
| 330 |
+
\subsubsection{Performance of each part of our framework}
|
| 331 |
+
Experiments are also carried out on CIFAR-10 to evaluate our framework design~(see Fig.~\ref{fig:structure}).
|
| 332 |
+
We observe that simultaneous training, layer sharing and gradient block all contribute to the improvements of our approach. For WRN-16-1(b), gradient block~(GB) gets $0.63\%$ improvement compared with rocket~(no GB); Parameter sharing gets $0.19\%$ improvement compared with rocket~(no sharing). Using part parameter from booster to initialize the light net, using both cross-entropy %
|
| 333 |
+
which learns the ground truth
|
| 334 |
+
and $\mathcal{L}_\mathrm{mimic}$ between light net's logits and fixed logits from booster to train light net alone, we get worse results than rocket, which shows the effectiveness of simultaneous training.\par
|
| 335 |
+
Besides, our rocket launching with joint training could reduce the whole training time. On CIFAR-10 dataset, the training process of 40-layer booster takes 173 epochs to converge, with 24.6s per epoch on average, and the training of the 16-layer light net takes 165 epochs, with 18.3s for each epoch. The total time is 7275.3s. In contrast, our rocket launching process takes 180 epochs and a total time of 6153.0s to converge, with 34.2s for each epoch. We see that the rocket launching do shorten the time for training the architecture when compared with training the two networks separately.
|
| 336 |
+
|
| 337 |
+
\begin{table}[!t]
|
| 338 |
+
\caption{Different hint loss functions on CIFAR-10}
|
| 339 |
+
\label{tab:hint}
|
| 340 |
+
\centering{\footnotesize
|
| 341 |
+
\centerline{\begin{tabular}{ccccc}
|
| 342 |
+
\toprule
|
| 343 |
+
light & booster & $\mathcal{L}_\mathrm{mimic}$ & $\mathcal{L}_\mathrm{MSE}$ & $\mathcal{L}_\mathrm{KD}$ \\
|
| 344 |
+
\midrule
|
| 345 |
+
WRN-16-1 (b) & WRN-40-1 & 7.87 & 8.32 & \textbf{7.98} \\
|
| 346 |
+
WRN-16-1 (a) & WER-40-1 & 7.85 & 8.36 & \textbf{8.26} \\
|
| 347 |
+
\bottomrule
|
| 348 |
+
\end{tabular}}}
|
| 349 |
+
\end{table}
|
| 350 |
+
|
| 351 |
+
|
| 352 |
+
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
\begin{figure}
|
| 356 |
+
\centering
|
| 357 |
+
\subfigure[bottom rocket net on wide residual net]{
|
| 358 |
+
\begin{minipage}[b]{0.45\textwidth}
|
| 359 |
+
\includegraphics[width=1\textwidth]{figures/bottomnet.pdf}
|
| 360 |
+
\end{minipage}
|
| 361 |
+
}
|
| 362 |
+
|
| 363 |
+
\subfigure[interval rocket net on wide residual net]{
|
| 364 |
+
\begin{minipage}[b]{0.45\textwidth}
|
| 365 |
+
\includegraphics[width=1\textwidth]{figures/widenet.pdf}
|
| 366 |
+
\end{minipage}
|
| 367 |
+
}
|
| 368 |
+
\caption{Proposed network structures for rocket net.}
|
| 369 |
+
\label{fig:structure}
|
| 370 |
+
\end{figure}
|
| 371 |
+
\subsubsection{Performance with different depths}
|
| 372 |
+
In this part, we investigate the learning capability of the light model with different depths and parameter sizes.
|
| 373 |
+
Different from previous net structure, in order to make the size of parameter proportional to the layers, we use residual net with fixed width from bottom to top. Light net shares the bottom $n_s$ convolutional layers with booster net. we tune the number of $n_s$ from $10$ to $18$ while the number of booster net's layers is 40(In order to make booster has prominent better learning ability than light net, we set $n_s$ less than half of booster's depth).\par
|
| 374 |
+
From Fig.~\ref{fig:parasize}, we see that the light model performs better than base and KD stably, which means our light net with different depths all can get extra information with the help of cumbersome booster. It's notable that the gap between base and rocket is not proportional to the depth of light net, this phenomenon may be caused by the balance between light learning ability and extra information from booster net.
|
| 375 |
+
|
| 376 |
+
|
| 377 |
+
|
| 378 |
+
\begin{figure}[!t]
|
| 379 |
+
\begin{minipage}[h]{0mm}
|
| 380 |
+
\centering
|
| 381 |
+
\includegraphics[width=80mm ]{figures/para_size.png}\\
|
| 382 |
+
\end{minipage}
|
| 383 |
+
\caption{{The accuracy with different sharing layers of light net on CIFAR-10}}
|
| 384 |
+
\label{fig:parasize}
|
| 385 |
+
\end{figure}
|
| 386 |
+
\subsubsection{Visualization of rocket launching and attention transfer }
|
| 387 |
+
\begin{figure}[!t]
|
| 388 |
+
\centering
|
| 389 |
+
\subfigure[different group's visualization result on attention transfer]{
|
| 390 |
+
\begin{minipage}[htb]{0.45\textwidth}
|
| 391 |
+
\includegraphics[width=1\textwidth]{figures/vis_att.png}
|
| 392 |
+
\end{minipage}}
|
| 393 |
+
\subfigure[different group's visualization result on rocket launching]{
|
| 394 |
+
\begin{minipage}[htb]{0.45\textwidth}
|
| 395 |
+
\includegraphics[width=1\textwidth]{figures/vis_rocket.png}
|
| 396 |
+
\end{minipage}
|
| 397 |
+
}
|
| 398 |
+
\caption{The visualization results on both rocket launching and attention transfer, in each group, the first and second picture in each group stands for booster net and light net respectively }
|
| 399 |
+
\label{fig:vis}
|
| 400 |
+
\end{figure}
|
| 401 |
+
|
| 402 |
+
In order to explain our method intuitively, we visualize each group's output of light net and booster net respectively. To be consist with previous part, we use Fig.~\ref{fig:structure}(b) as the basic net. For comparison, we visualize the corresponding results of spatial attention mapping.
|
| 403 |
+
As we can see from Fig.~\ref{fig:vis}, for both rocket launching and attention transfer (AT), the feature maps generated from lower groups are similar between light and booster net. It indicates that parameter sharing and attention have similar effect on lower layers. It can also show that these methods can learn the feature representation from booster net in low layer.
|
| 404 |
+
|
| 405 |
+
\begin{table*}[htbp]
|
| 406 |
+
\caption{Comparisons of classification performance~(test error) on CIFAR-100 and SVHN}
|
| 407 |
+
\label{tab:svhn}
|
| 408 |
+
\centering{
|
| 409 |
+
\centerline{\begin{tabular}{cccccccc}
|
| 410 |
+
\toprule
|
| 411 |
+
dataset & light & booster & base & AT & KD & rocket & rocket+KD \\
|
| 412 |
+
\midrule
|
| 413 |
+
SVHN & WRN-16-1,~0.2M(b) & WRN-40-1,~0.6M & 3.58 & 2.99 & 2.31 & 2.29 & \textbf{2.20} \\
|
| 414 |
+
CIFAR-100 & WRN-16-1,~0.2M(b) & WRN-40-1,~0.6M & 43.7 & 34.1 & 36.4 & 33.3 & \textbf{33.0} \\
|
| 415 |
+
\bottomrule
|
| 416 |
+
\end{tabular}}}
|
| 417 |
+
\end{table*}
|
| 418 |
+
|
| 419 |
+
\begin{table*}[htbp]
|
| 420 |
+
\caption{Experiments on real Advertisement Dataset}
|
| 421 |
+
\label{tab:Alibaba}
|
| 422 |
+
\centering{\small
|
| 423 |
+
\centerline{\begin{tabular}{ccccc}
|
| 424 |
+
\toprule
|
| 425 |
+
\ model & \# params in FC layers & \# multiplications in FC layers & \# inference time of FC Layers & GAUC\\
|
| 426 |
+
\midrule
|
| 427 |
+
base & 576 $\times$ 200 $\times$ 80 $\times$ 2 & 131360 & 7.6 ms & 0.632 \\
|
| 428 |
+
rocket & 576 $\times$ 200 $\times$ 80 $\times$ 2 & 131360 & 7.6 ms & 0.635 \\
|
| 429 |
+
booster only & 576 $\times$ 720 $\times$ 360 $\times$ 240 $\times$ 180 $\times$ 90 $\times$ 2 & 837900 & 23.2 ms & 0.637 \\
|
| 430 |
+
\bottomrule
|
| 431 |
+
\end{tabular}}}
|
| 432 |
+
\end{table*}
|
| 433 |
+
\subsection{Experiments on SVHN and CIFAR-100}
|
| 434 |
+
Aiming to verify the effectiveness of rocket launching further, we apply our method on CIFAR-100 and SVHN respectively. In order to compare with AT (which is based on WRN), we still use WRN as basic net structure, and the sharing method is shown in Fig.~\ref{fig:structure}(b) .
|
| 435 |
+
|
| 436 |
+
The CIFAR-100 dataset~\cite{krizhevsky2009learning} consists of $32\times32$ color images from $100$ classes.
|
| 437 |
+
Like CIFAR-10, these images are still split into $50,000$ training and $10,000$ testing samples. The experiment setting of CIFAR-100 is same as CIFAR-10.\par
|
| 438 |
+
The SVHN database~\cite{netzer2011reading} is obtained from house numbers in Google Street View images. It contains $32\times 32$ images with RGB color channels in $10$ class. There are $73,257$ images in the training set, $26,032$ images in testing set and $531,131$ samples in extra set. We follow the same evaluation procedure as Sermanet et al.~\cite{sermanet2012convolutional} to compose our training, validation and test sets. For this dataset, we use validation dataset to choose the final model. In our experiment, we use Adam~\cite{kingma2014adam} with initial learning rate 0.001, while we drop learning rate by $0.2$ at $[20,40,60]$ epochs. Because this dataset is easy to learn, we add dropout after each specific layer of booster net with dropout rate $20\%$ to prevent overfitting. For booster trained alone, same dropout layers are added to keep consistent.
|
| 439 |
+
|
| 440 |
+
Error rate on above two dataset is shown in Table~\ref{tab:svhn}. We observe that our approach gets $1.29\%$ improvement on SVHN and $10.4\%$ improvement on CIFAR-100 compared with base model. What's more, rocket launching outperforms other teacher-student methods on all settings.
|
| 441 |
+
\subsection{Experiments on real Advertisement Dataset}
|
| 442 |
+
In order to verity the effectiveness of rocket launching further, we test our method on huge real industry dataset. The dataset\footnote{ https://tianchi.aliyun.com/datalab/dataSet.htm?spm=5176100\par073.888.26.70c5adaeMeJQpW\&id=19} comes from productive display advertising system in Alibaba, we use rocket launching to predict whether user clicks given product. The size of training set is $4$ billion, the test set is $0.285$ billion.\par
|
| 443 |
+
The network that we use is shown in DIN~\cite{zhou2017deep}.
|
| 444 |
+
In the online system, most calculations focus on the fully connected layers after the embedding layers. So we try to use a booster net with more complex fully connected layers to guide our light net. The light net shares embedding layers with booster net. The booster net has seven wide hidden layers using complicated operation like batch normalization\cite{BatchNorm}, light net's specific layers with less hidden units and has only fully connected layers. The light net in the huge real data gets 0.3\% improvement on GAUC (the generalization of AUC)~\cite{zhou2017deep} with the same latency as the base model. The booster net gets the best performance on the offline metric,
|
| 445 |
+
but it needs $23.2$ ms for one requirement to infer hundreds candidate advertisements,
|
| 446 |
+
which is unacceptable for online system. Our approach can get improvement on a model with same structure and parameter quantity. And this experiment proves that one can use our approach to break the boundary brought by the latency limitation to some degree.
|
| 447 |
+
\section{Conclusion}
|
| 448 |
+
We propose a general framework named rocket launching to get a efficient well-performing light model with the help of a cumbersome booster net.
|
| 449 |
+
In order to get as much as information from the booster model, we make the booster and the light net train on the same task together with the hint loss objective,
|
| 450 |
+
which pushes the booster model to supervise the whole training process of the light one.
|
| 451 |
+
Besides, the light model shares parameter with the booster to make the light net get low-level representation directly from the booster.
|
| 452 |
+
We also analyze different hint loss functions cludethat can convey knowledge from the booster to the light model.
|
| 453 |
+
Moreover, we develop the gradient block scheme to prevent the booster net from deterioration.
|
| 454 |
+
For future work, we would like to explore training networks with not only smaller depths but also fewer neurons
|
| 455 |
+
in each layer to further improve the inference efficiency.
|
| 456 |
+
|
| 457 |
+
|
| 458 |
+
\bibliography{reference}
|
| 459 |
+
\bibliographystyle{aaai}
|
1708.04728v2.txt
ADDED
|
@@ -0,0 +1,468 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Recent years have witnessed the breakthrough of deep learning techniques for many computer vision tasks, e.g., image classification~\cite{alexnet,googlenet}, object detection and tracking~\cite{fasterrcnn,POI,du_detection}, video understanding~\cite{donahue2015long,Li_2017_ICCV}, content generation~\cite{goodfellow2014generative,zhang2017age}, disease diagnosis~\cite{shen2017deep,DBLP:journals/corr/abs-1709-00042} and privacy image analytics~\cite{DBLP:conf/aaai/TranKJ016}. %
|
| 3 |
+
More and more mobile applications {\color{black}{adopt deep learning techniques}} to provide accurate, intelligent and effective services.
|
| 4 |
+
However, the execution speed of deep learning models on mobile devices becomes a bottleneck for deployment of many applications due to limited computing resources. %
|
| 5 |
+
|
| 6 |
+
In this paper, we focus on improving the execution efficiency of deep learning models on mobile devices, which is a highly intriguing feature. Here we define the execution efficiency as the model inference speed, the energy cost and the run-time memory consumption.
|
| 7 |
+
In reality, it takes more than 651ms to recognize an image using GoogleNet on Samsung S5 (Table 4) with 33.2 MB run-time memory and 984mJ energy costs (Table 5). The effective solution is expected to provide minimum accuracy loss by leveraging widely used deep neural network architectures (such as GoogLeNet and ResNet) with support of {\color{black}{deep model acceleration}} on different types of layers.
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
\begin{figure*}[!t]
|
| 12 |
+
\centering
|
| 13 |
+
\begin{subfigure}{.32\textwidth}
|
| 14 |
+
\centering
|
| 15 |
+
\includegraphics[width=0.9\linewidth]{alexnet.png}
|
| 16 |
+
\caption{AlexNet}
|
| 17 |
+
\label{fig:alex_fine}
|
| 18 |
+
\end{subfigure}%
|
| 19 |
+
\begin{subfigure}{.32\textwidth}
|
| 20 |
+
\centering
|
| 21 |
+
\includegraphics[width=0.9\linewidth]{googlenet.png}
|
| 22 |
+
\caption{GoogLeNet}
|
| 23 |
+
\label{fig:google_fine}
|
| 24 |
+
\end{subfigure}%
|
| 25 |
+
\begin{subfigure}{.32\textwidth}
|
| 26 |
+
\centering
|
| 27 |
+
\includegraphics[width=0.9\linewidth]{resnet_50.png}
|
| 28 |
+
\caption{ResNet-50}
|
| 29 |
+
\label{fig:resnet50_fine}
|
| 30 |
+
\end{subfigure}
|
| 31 |
+
\caption{Time Decomposition for each layer. Non-tensor layers (e.g., dropout, ReLU, LRN, softmax, pooling, etc) shown in red color while tensor layers (e.g., convolution, inner-product) shown in black color.}
|
| 32 |
+
\label{fig:layers_fine}
|
| 33 |
+
\end{figure*}
|
| 34 |
+
|
| 35 |
+
{\bf Excessive execution time in Non-tensor layers}
|
| 36 |
+
|
| 37 |
+
In this work, we find that {\color{black}{non-tensor}} layers consume too much time in model execution (shown in Fig.~\ref{fig:layers_fine}) where \emph{tensor layer} and \emph{non-tensor layer}
|
| 38 |
+
are defined based on whether the layer contains tensor-type parameters. For example,
|
| 39 |
+
fully connected layers and convolutional layers are tensor layers since they contain 2-d and 4-d tensor-type weight parameters, respectively. Whereas pooling layer and LRN layer are both non-tensor layers because they do not contain any high-order tensor-type weight parameters. Motivated by this,
|
| 40 |
+
this paper proposes \pname{}, a new deep learning model acceleration framework that significantly reduces the execution time on non-tensor layers. In particular,
|
| 41 |
+
we paid our efforts in two directions: (a) \emph{streamline slimming}; (b) \emph{branch slimming}. In streamline slimming, the new tensor layers are re-generated by {\color{black}{substituting}} the original non-tensor layers and their neighborhood tensor layers in the feed-forward model (shown in Figure \ref{fig:layer_merging}), while in branch slimming, the newly generated tensor layers are created by fusing non-tensor {\color{black}{branches}} with their parallel tensor branches horizontally (shown in Figure \ref{fig:branch_merging}, such as the inception module in GoogLeNet~\cite{googlenet}). Overall, reducing the execution time on non-tensor layers can greatly reduce the model inference time given the fact that tensor-layer has been able to get optimized to the minimum as suggested by ~\cite{DeepCompression,kimtucker}. Finally, we can combine both non-tensor and tensor layer optimization and further reduce {\color{black}{the}} latency as well as the model size. %
|
| 42 |
+
|
| 43 |
+
\begin{table}%
|
| 44 |
+
\caption{Compare \pname{} with Existing Acceleration Methods on CPU of Samsung Galaxy S5 Mobile Device.}
|
| 45 |
+
\label{compare}
|
| 46 |
+
\begin{center}
|
| 47 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 48 |
+
\begin{tabular}{ccccc}
|
| 49 |
+
\multicolumn{1}{c}{\bf } &\multicolumn{1}{c}{\bf
|
| 50 |
+
\begin{tabular}{@{}c@{}}Parameter Compression\footnote{The accuracy reported here is based on an compression rate of roughly 50\%. In the original paper, the authors reported a small 0.24\% accuracy loss with compressed rate 31.9\%. For our model at the same 31.9\% compression rate, we also only have a small 0.31\% accuracy loss. } \\ \cite{kimtucker}\end{tabular}
|
| 51 |
+
|
| 52 |
+
} &\multicolumn{1}{c}{\bf
|
| 53 |
+
\begin{tabular}{@{}c@{}}SqueezeNet \\ \cite{SqueezeNet}\end{tabular}
|
| 54 |
+
} &\multicolumn{1}{c}{\bf
|
| 55 |
+
\begin{tabular}{@{}c@{}}MobileNet\footnote{We use the Caffe implementation of 0.5 MobileNet-224 which has similar speed with our model.} \\ \cite{mobilenets}\end{tabular}
|
| 56 |
+
} &\multicolumn{1}{c}{ \bf
|
| 57 |
+
\begin{tabular}{@{}c@{}}\pname{} \\ (ours)\end{tabular}
|
| 58 |
+
}\\
|
| 59 |
+
\hline \\
|
| 60 |
+
Accuracy & 85.7\% & 80.3\% & 83.7\% & \textbf{86.5\%}\\
|
| 61 |
+
Execution Time & 558.3 ms & 122.7 ms & 109.5 ms & \textbf{106.3 ms}\\
|
| 62 |
+
Energy Cost & 902 mJ & 288 mJ & 243 mJ & \textbf{226 mJ}\\
|
| 63 |
+
Memory Cost & 35.8 MB & 36.5 MB & 22.6 MB & \textbf{14.8 MB}\\
|
| 64 |
+
\end{tabular}}
|
| 65 |
+
\end{center}
|
| 66 |
+
\end{table}
|
| 67 |
+
|
| 68 |
+
{\bf Difference with existing works} The central idea of \pname{} is based on the acceleration of non-tensor layers because
|
| 69 |
+
\emph{non-tensor layers are {\color{black}{major obstacles}} for real-time mobile CPU execution (\S \ref{sec:non-tensor}). }
|
| 70 |
+
Compared to existing works, ~\cite{DeepCompression,kimtucker,cvpr2017} are designed to reduce the model size by approximating the tensor-type layers using methods like low rank approximation and quantization. For non-tensor layers (e.g., normalization and pooling layers) which are generally designed and used for speeding up the network training and obtaining better generalization performance, optimization for faster execution has \emph{not} been discussed so far. In this paper, we emphasize and validate experimentally that the proposed method is orthogonal to compression techniques on tensor-type layers. Consequently,
|
| 71 |
+
our method can be combined with these techniques for further acceleration.
|
| 72 |
+
|
| 73 |
+
To summarize, we make the following contributions:
|
| 74 |
+
|
| 75 |
+
$\bullet$ \pname{} is the first work that identifies {\color{black}{the}} excessive execution time of non-tensor layers is the major obstacle for real-time deep model processing on mobile devices.
|
| 76 |
+
|
| 77 |
+
$\bullet$ \pname{} is also the first work that focuses on optimizing non-tensor layers and significantly accelerates a deep learning model on mobile devices while reducing the required runtime-memory with less layers.%
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
$\bullet$ \pname{} performs both streamline slimming and branch slimming by merging non-tensor layers with its neighboring tensor layers vertically and horizontally, where the new generated tensor layer parameters are re-trained in a principled way that achieves the same functionality as the original layers. %
|
| 82 |
+
|
| 83 |
+
$\bullet$ \pname{} obtained the state-of-the-art speeding up on popular deep learning models with negligible accuracy loss, which enables GoogLeNet to achieve 3x-5x speed-up for processing a single image with only 0.4\% drop on Top-5 accuracy on ImageNet without any weights compression method. \pname{} achieves around $106.3$ ms for processing a single image with Top-5 accuracy {\color{black}{up to}} 86.5\%.
|
| 84 |
+
\section{Non-tensor layer execution latency}
|
| 85 |
+
\label{sec:non-tensor}
|
| 86 |
+
|
| 87 |
+
\begin{table}[t]
|
| 88 |
+
\caption{Percentage of Forwarding Time on Non-tensor Layers}
|
| 89 |
+
\label{wf-impact}
|
| 90 |
+
\begin{center}
|
| 91 |
+
\resizebox{0.34\textwidth}{!}{%
|
| 92 |
+
\begin{tabular}{cccc}
|
| 93 |
+
\multicolumn{1}{c}{\bf Network} &\multicolumn{1}{c}{\bf Intel x86} &\multicolumn{1}{c}{\bf Arm} &\multicolumn{1}{c}{\bf Titan X}\\
|
| 94 |
+
\hline \\
|
| 95 |
+
AlexNet & 32.08\% & 25.08\% & 22.37\%\\
|
| 96 |
+
GoogLeNet & 62.03\% & 37.81\% & 26.14\%\\
|
| 97 |
+
ResNet-50 & 55.66\% & 36.61\% & 47.87\%\\
|
| 98 |
+
ResNet-152 & 49.77\% & N/A & 44.49\%\\
|
| 99 |
+
\textbf{Average} & 49.89\% & 33.17\% & 35.22\%\\
|
| 100 |
+
\end{tabular}}
|
| 101 |
+
\end{center}
|
| 102 |
+
\end{table}
|
| 103 |
+
|
| 104 |
+
|
| 105 |
+
To give a better understanding of the deep learning model execution latency, we evaluate the execution time cost of different types of layers within a given network structure on several major processors ({\color{black}{Intel}} x86 CPU, Arm CPU and Titan X GPU) using state-of-the-art network structures including AlexNet (Figure \ref{fig:alex_fine}, ~\cite{alexnet}), GoogLeNet(Figure \ref{fig:google_fine}, ~\cite{googlenet}) and ResNet(Figure \ref{fig:resnet50_fine}, ~\cite{resnet}).
|
| 106 |
+
|
| 107 |
+
We define ``percentage non-tensor layer latency" (denoted as $\%$ Latency) as the {\color{black}{time ratio spent}} on non-tensor layers across the {\color{black}{whole}} network, {\it i.e.,}
|
| 108 |
+
\begin{eqnarray}
|
| 109 |
+
\text{ \% Latency} = \frac{ \text{Time {\color{black}{spent}} on Non-tensor layer}}{ \text{Time {\color{black}{spent}} over the entire network}},
|
| 110 |
+
\end{eqnarray}
|
| 111 |
+
where larger value indicates the larger execution time cost.
|
| 112 |
+
|
| 113 |
+
{\bf Observations and Insights} The results are shown in Figure \ref{fig:layers_fine} and Table~\ref{wf-impact}. {\color{black}{We can see}}, for classical deep models (e.g., AlexNet), among {\color{black}{these}} non-tensor layers, ``LRN" and ``Pooling" layers are {\color{black}{major}} obstacles that slow-down the model execution. ResNet-50 has abandoned the ``LRN" layers by introducing the \textit{batch normalization} layer, but the findings remain valid as it takes up more than 25\% of the time on ARM CPU and more than 40\% on Intel x86 CPU (in Caffe~\cite{caffe}, it was decomposed into a ``BatchNorm" layer followed by a ``Scale" layer as shown in Figure \ref{fig:resnet50_fine}). The time fraction spent over such layers ranges from 22.37\% to 62.03\%. Among different types of processors, non-tensor layers have the largest impact on Intel x86 CPUs, and more specifically 62.03\% of the computing time. On the other hand, although non-tensor layers do not have as high affect on the mainstream ARM CPUs, on average they still cost about 1/3 of the computing time. Therefore, %
|
| 114 |
+
\emph{there is a great potential to accelerate models by optimizing non-tensor layers.}
|
| 115 |
+
\section{\pname{}}
|
| 116 |
+
To reduce the inference time on non-tensor layers, we propose \pname{} to accelerate the model execution at both streamline substructure and branching substructure. The idea of our method is to merge these highly correlated layers and substitute them as a new ``slim'' layer from the analysis and modeling of the correlations of the current layer and preceding layers (or parallel layers). As in general deep learning models, the probability distribution of the dataset can be represented by these large redundant tensor layers.
|
| 117 |
+
This process is similar to
|
| 118 |
+
viewing the Inception model as a logical culmination as suggested by \cite{AroraBGM13}.
|
| 119 |
+
\pname{} covers two major components: (a) streamline slimming; (b) branch slimming; which will be illustrated in the following.
|
| 120 |
+
\subsection{Streamline Slimming}
|
| 121 |
+
For deep network architecture with streamline layer connections, in order to accelerate the execution, we first identify the layers which have large latency and redundancy. The slimming design is motivated by the key observations: %
|
| 122 |
+
|
| 123 |
+
$\bullet$ Non-tensor layers usually follow a tensor layer such as convolution layer as shown in Figure \ref{fig:layer_merging}.
|
| 124 |
+
|
| 125 |
+
$\bullet$ Several consecutive layers can be viewed as a black box for non-linear transformations, and therefore this can be replaced by a new tensor-layer by parameter learning to simulate the functionality of original several layers (Figure~\ref{fig:layer_merging}).
|
| 126 |
+
|
| 127 |
+
|
| 128 |
+
{\bf Method} The streamline slimming regenerates a new tensor layer (i.e., slim layer) by merging non-tensor layers with its bottom tensor units in the feed-forward structure. After layer-wise regeneration, we retrain the deep neural network model by fine-tuning the parameters of the new generated layers. There are two types of streamline slimming in the proposed scheme. The choice of operation depends on the type of non-tensor layers.
|
| 129 |
+
|
| 130 |
+
$\bullet$ {\textit{Pooling Layer}:} The pooling layer down-samples feature maps learned from previous layers. Therefore, to absorb a pooling layer to a convolution layer, we remove the pooling layer and set the stride value of the new convolution layer as the product of the stride values for both the original pooling layer and the convolution layer. With a larger stride value for the new slim layer, it further reduces the computation required for executing the new model.
|
| 131 |
+
|
| 132 |
+
$\bullet$ {\textit{Non-Pooling Layer}:} For non-pooling layers such as LRN and batch normalization, we directly prune those layers from the original deep neural network.
|
| 133 |
+
|
| 134 |
+
{\bf Example} Figure \ref{fig:layer_merging} illustrates how the streamline slimming works. This is one representative part in GoogLeNet where the convolution layer $conv2/3\times3$ is followed by a LRN layer $conv2/norm2$ and a pooling layer $poo2/3\times3\_s2$ (The ReLU layer with negligible latency is retained to keep accuracy). Before processing, the 2 non-tensor layers without a single learned parameter weight take even more time than running the convolution layer. After slimming, we generate a new slim convolution layer $conv2/3\times3\_merge$, the time spent on the new layer is greatly reduced compare to original layers.
|
| 135 |
+
|
| 136 |
+
\begin{figure}
|
| 137 |
+
\centering
|
| 138 |
+
\epsfig{file=merge2.png, width=0.46\textwidth}
|
| 139 |
+
\caption{Streamline Slimming: The GoogLeNet example and the running time is measured using bvlc\_googlenet model in Caffe on a Samsung Galaxy S5. Left panel: convolution (in green), LRN (in red), pooling (in red). Right Panel: single convolution layer. The three layers in the left panel are merged and regenerated as a convolution layer (i.e., slim layer) in the right panel. }
|
| 140 |
+
\label{fig:layer_merging}
|
| 141 |
+
\end{figure}
|
| 142 |
+
|
| 143 |
+
{\bf Theoretical analysis} Given the input image $X^i$, after several tensor and non-tensor layers, we can get the output feature map $Y_{\text{CNN}}^i$.
|
| 144 |
+
More mathematically,
|
| 145 |
+
\begin{eqnarray}
|
| 146 |
+
\label{EQ:f_map}
|
| 147 |
+
X^i \xrightarrow{f_{\text{conv}}} Y^i_{\text{cv}} \xrightarrow{f_{\text{bn}}} Y^i_{\text{cv+bn}} \xrightarrow{f_{\text{sl}}} Y^i_{\text{cv+bn+sl}} \nonumber \\
|
| 148 |
+
\xrightarrow{f_{\text{pooling}}} Y^i_{\text{cv+bn+sl+pl}} \xrightarrow ......:= Y_{\text{CNN}}^i
|
| 149 |
+
\end{eqnarray}
|
| 150 |
+
where $f_{\text{conv}}$, ${f_{\text{bn}}} $, $f_{\text{sl}}$, and $f_{\text{pooling}}$ denote convolution layer, batch normalization layer, scaling layer and pooling layer respectively. There could be other types of layers in the pipeline such as LRN layer $f_{\text{LRN}}$. %
|
| 151 |
+
The layer parameters are represented by: %
|
| 152 |
+
\begin{eqnarray}
|
| 153 |
+
\label{EQ:conv_bn_sl}
|
| 154 |
+
\;\;\;\;
|
| 155 |
+
\begin{cases}
|
| 156 |
+
f_{\text{conv}}: \WW_{\text{conv}}, \bb_{\text{conv}}; \\
|
| 157 |
+
f_{\text{bn}}: m, \;\; \bf{\mu}, \;\; \bf{\sigma^2}; \\
|
| 158 |
+
f_{\text{sl}}: \bf{\gamma}, \;\; \bf{\beta}; \\
|
| 159 |
+
f_{\text{pooling}}: p; \\
|
| 160 |
+
f_{\text{LRN}}: \kappa, \;\; \rho \;\; \alpha. \\
|
| 161 |
+
\cdots
|
| 162 |
+
\end{cases}
|
| 163 |
+
\end{eqnarray}
|
| 164 |
+
where $\WW_{\text{conv}}$, $\bb_{\text{conv}}$ represent convolution layer weight and bias matrix respectively,
|
| 165 |
+
$\bf{\mu}$, $\bf{\sigma^2}$ and $m$ are mean, variance, and sample number in mini-batch of normalization layer $f_{\text{bn}}$, %
|
| 166 |
+
{\bf $\gamma$} and {\bf $\beta$} are scaling weight and bias in scaling layer $f_{\text{sl}}$ respectively, %
|
| 167 |
+
$p$ represents the nearby $p$ regions in pooling layer $f_{\text{pooling}}$,
|
| 168 |
+
and $\kappa$, $\rho$ and $\alpha$ are consecutive feature channel parameters and normalization parameters in LRN layer $f_{\text{LRN}}$.
|
| 169 |
+
|
| 170 |
+
To achieve the desired functionality with acceleration, the idea is to find a new mapping function $$ \tilde{f}(\tilde{\WW}, \tilde{\bb} ) :\;\; X^i \rightarrow Y_{\text{CNN}}^i,
|
| 171 |
+
$$ such that it can get the same feature map value $ Y_{\text{CNN}}^i$ given the same input feature map $X^i$ for any image $i$.
|
| 172 |
+
Note that operations in Eq.(\ref{EQ:f_map}) transform the feature maps using convolution operations before changing the distributions of activations to avoid ``Internal covariate shift'' in batch normalization ~\cite{DBLP:conf/icml/IoffeS15} at min-batch level, which can be viewed as a new ``scaling convolution" which transforms the input features in the fully connected layers, and therefore we build a single unique convolution operation that replaces several non-tensor layers by setting the new optimization goal, {\it i.e., }
|
| 173 |
+
\begin{eqnarray}
|
| 174 |
+
\label{EQ:y_i = Y_com}
|
| 175 |
+
\tilde{f}(\tilde{\WW}, \tilde{\bb} ) =: \tilde{f_{\text{conv}}}(\tilde{\WW_{\text{conv}}}, \tilde{\bb_{\text{conv}}} ) ;
|
| 176 |
+
\end{eqnarray}
|
| 177 |
+
Clearly, the optimal solution is given by:
|
| 178 |
+
\begin{eqnarray}
|
| 179 |
+
\label{EQ:w_b}
|
| 180 |
+
(\tilde{\WW^*}, \tilde{\bb^*} ) = argmin_{\WW, \bb} \sum_i \| Y_{\text{CNN}}^i - \tilde{f}( \WW, \bb; X^i ) \|_F^2.
|
| 181 |
+
\end{eqnarray}
|
| 182 |
+
More formally, we have lemma ~\ref{lemma1}.
|
| 183 |
+
\begin{lemma}
|
| 184 |
+
\label{lemma1}
|
| 185 |
+
Given the input/output feature map pairs ($X^i, Y^i$) $\forall i$, operations on the convolution layers followed by non-tensor layers ({\it e.g.}, normalization layer in Eq.~\ref{EQ:conv_bn_sl}) can be re-trained by learning the new convolution layer $ \tilde{f}(\tilde{\WW}, \tilde{\bb}) $ via Eq.(\ref{EQ:w_b}) using SGD.
|
| 186 |
+
\end{lemma}
|
| 187 |
+
The proof is obvious and therefore we skip it here. In particular, we have lemma ~\ref{lemma_tmp}.
|
| 188 |
+
\begin{lemma}
|
| 189 |
+
\label{lemma_tmp}
|
| 190 |
+
Let $W_j$, $B_j$, $\mu_j$, $\sigma^2_j$, $\gamma_j$ and $b_j$ be the corresponding $j$-th dimension in the reshaped weight vector or bias vector in Eq.(\ref{EQ:conv_bn_sl}), and $\tilde{W_j}$, $\tilde{B_j}$ be the learned new convolution layer parameter in Eq.(\ref{EQ:w_b}). Then,
|
| 191 |
+
if $Y_{\text{CNN}}^i$ is obtained after the three layers of $f_{\text{conv}}$, ${f_{\text{bn}}} $, $f_{\text{sl}}$ in the sequence order, {\it i.e.,}
|
| 192 |
+
$Y_{\text{CNN}}^i := Y^i_{\text{cv+bn+sl}}, $
|
| 193 |
+
we have closed form solution for the parameters in the new convolution layer: %
|
| 194 |
+
\begin{eqnarray}
|
| 195 |
+
\label{EQ:W_B_S}
|
| 196 |
+
\begin{split}
|
| 197 |
+
& \tilde{W_j} = \eta_j W_j, \\
|
| 198 |
+
& \tilde{B_j} = \eta_j B_j + \beta_j - \eta_j \frac{\mu_j}{m}, \\
|
| 199 |
+
& \eta_j = \frac{\gamma_j}{ \sqrt{\frac{\sigma^2_j}{m}}}.
|
| 200 |
+
\end{split}
|
| 201 |
+
\end{eqnarray}
|
| 202 |
+
\end{lemma}
|
| 203 |
+
\begin{proof}
|
| 204 |
+
Let $Y_j$ be the $j$-th dimension in feature map after convolution operation in Eqs.(\ref{EQ:y_i = Y_com}, \ref{EQ:w_b}), {\it i.e., $Y_j = \Big(Y_{\text{CNN}}^i\Big)_j$} . On one hand, based on the definition of convolution operations (denoted as $*$), we have
|
| 205 |
+
\begin{eqnarray}
|
| 206 |
+
\label{EQ:tY_j = tW}
|
| 207 |
+
Y_j = (\tilde W * X)_j + \tilde{B_j} .
|
| 208 |
+
\end{eqnarray}
|
| 209 |
+
On the other hand, according to the definition of batch normalization~\cite{DBLP:conf/icml/IoffeS15} and scaling, we have
|
| 210 |
+
\begin{eqnarray}
|
| 211 |
+
\label{EQ:Y_batch_scala_conv}
|
| 212 |
+
\begin{split}
|
| 213 |
+
Y_j &= \gamma_j \Big(f_{\text{bn}} \cdot f_{\text{conv}}(X) \Big)_j + \beta_j, \;\;\; \triangleright \text{ Scaling} \\
|
| 214 |
+
&= \gamma_j \Big( \frac{f_{\text{conv}}(X)_j - \mu_j }{ \sqrt{\sigma^2_j} } \Big)+ \beta_j, \;\;\; \triangleright \text{ BN} \\
|
| 215 |
+
& = \gamma_j \Big( \frac{ (W * X) _j + B_j - \frac{\mu_j}{m} }{ \sqrt{\frac{\sigma^2_j}{m}} } \Big)+ \beta_j. \;\;\; \triangleright \text{ Convolution}
|
| 216 |
+
\end{split}
|
| 217 |
+
\end{eqnarray}
|
| 218 |
+
Let $ \eta_j = \frac{\gamma_j}{ \sqrt{\frac{\sigma^2_j}{m}}}$, then Eq.(\ref{EQ:Y_batch_scala_conv}) is equivalent to:
|
| 219 |
+
\begin{eqnarray}
|
| 220 |
+
\label{EQ:Y_j=}
|
| 221 |
+
\begin{split}
|
| 222 |
+
Y_j = \underbrace{ \eta_j (W * X)_j }_{weight} + \underbrace{ \Big( \eta_j B_j - \frac{ \eta_j \mu_j}{m} + \beta_j \Big) }_{bias}.
|
| 223 |
+
\end{split}
|
| 224 |
+
\end{eqnarray}
|
| 225 |
+
Compared to Eq.(\ref{EQ:tY_j = tW}), we have
|
| 226 |
+
$ \tilde{W_j} = \eta_j W_j $ and
|
| 227 |
+
$ \tilde{B_j} = \eta_j B_j + \beta_j - \eta_j \frac{\mu_j}{m}.$
|
| 228 |
+
This completes the proof.
|
| 229 |
+
\end{proof}
|
| 230 |
+
\subsection{Branch Slimming}
|
| 231 |
+
\begin{figure*}
|
| 232 |
+
\centering
|
| 233 |
+
\epsfig{file=branch_merge2.png, width=0.9\textwidth}%
|
| 234 |
+
\caption{Branch Slimming: The GoogLeNet example and the running time is measured using bvlc\_googlenet model in Caffe on a Samsung Galaxy S5. Left panel: four branches in parallel, convolution layer, convolution + convolution, convolution + convolution, convolution + pooling. Right panel: two branches in parallel, convolution + convolution, convolution + convolution. Two branches are reduced. }
|
| 235 |
+
\label{fig:branch_merging}
|
| 236 |
+
\end{figure*}
|
| 237 |
+
|
| 238 |
+
Given the fact that non-tensor layers require more time on computation, if we can learn new tensor layers by fusing non-tensor layers with the tensor units at the same level, then the the execution time will be decreased. Then we have the deign of \emph{branch slimming}.
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
{\bf Example}
|
| 242 |
+
One representative unit is the inception module in GoogLeNet. For example, in Figure \ref{fig:branch_merging}, layer ``inception\_3a" of GoogLeNet has 4 branches: 3 convolution branches take feature maps from the bottom layer at various scales ($1\times1$, $3\times3$ and $5\times5$) and one $3\times3$ pooling branch \cite{googlenet}. The output feature maps of each branch are concatenated as input of the following layer.
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
|
| 250 |
+
|
| 251 |
+
|
| 252 |
+
{\bf Method} For deep network architecture with parallel branches, the output of each branch constitutes part of the feature maps as the input for the next layer. We identify non-tensor branches that have large latency (e.g., the pooling branch in Figure \ref{fig:branch_merging}). Similar to streamline slimming, if we can use a faster tensor branch to simulate the function of the non-tensor branch by relearning its parameters, we can achieve clear speed-up.
|
| 253 |
+
|
| 254 |
+
To absorb a non-tensor branch into a tensor branch, we re-create a new tensor layer (i.e., slim layer) by fusing the non-tensor branch and a tensor unit with relatively small latency to output the feature maps that were originally generated by the non-tensor branch. If the non-tensor branch has a kernel size larger than $1\times1$ (e.g., the $3\times3$ pooling branch in Figure \ref{fig:branch_merging}), the picked tensor branch's kernel size should be at least the size of the non-tensor branch. As shown in Figure \ref{fig:branch_merging}, we re-learn a new tensor layer ``inception\_3a" by merging the $3\times3$ pooling branch with the $5\times5$ convolution branch at the same level, and the number of feature maps obtained by the $5\times5$ convolution is increased from 32 to 64.
|
| 255 |
+
|
| 256 |
+
$\bullet$ \textit{Branch Reducing}:
|
| 257 |
+
Current deep neural networks usually include convolution branches with $1\times1$ convolution layers (e.g., inception\_3a/3x3\_reduce in Figure \ref{fig:branch_merging}) aiming to reduce feature maps channels. This unit will be processed by a following convolution layer with larger kernel size. For greater speed-up, we further reduce the number of feature maps generated by the $1\times1$ ``reducer". For layer inception\_3a/3x3\_reduce, we reduce the number of output feature maps from 96 to 48. %
|
| 258 |
+
|
| 259 |
+
$\bullet$ \textit{Tensor-Branch Slimming}:
|
| 260 |
+
A convolution branch with a smaller kernel size can be absorbed to a convolution branch with a larger kernel size. The method is similar to the slimming of non-tensor branches. To keep other layers' structures in network unchanged, we remove the small-kernel convolution branch and increase the number of feature maps generated by the large-kernel convolution layers. For examples, for layer inception\_3a/3x3\_reduce, we remove the $1\times1$ convolution branch and increase the number of feature maps generated by the $3\times3$ convolution from 128 to 196.
|
| 261 |
+
|
| 262 |
+
Slimming over tensor-branches should be careful. In our work, we demonstrate that in GoogLeNet architecture, the tensor-branch with smaller convolutional kernel can be slimmed without affecting the performance, and thus we are able to reduce 4 branches (3 tensor branches and 1 non-tensor branch) into 2 tensor branches. However, when the original architecture only has 2 tensor branches (e.g., in ResNet), slimming any branch will affect the performance.
|
| 263 |
+
|
| 264 |
+
|
| 265 |
+
{\bf Branch convolutional layer slimming analysis}
|
| 266 |
+
Let $Y_{\text{L}}$ and $Y_{\text{R}}$ be the feature map learned using convolution layers respectively given model parameter weight and bias, {\it i.e.,}
|
| 267 |
+
\begin{eqnarray}
|
| 268 |
+
\label{EQ:left+right}
|
| 269 |
+
\begin{cases}
|
| 270 |
+
Y^i_{\text{L}} = {\WW}_{\text{L}} * X^i + {\bb}_{\text{L}}; \;\;\; \triangleright \text{ left branch} \\
|
| 271 |
+
Y^i_{\text{R}} = {\WW}_{\text{R}} * X^i + {\bb}_{\text{R}}; \;\;\; \triangleright \text{ right branch}
|
| 272 |
+
\end{cases}
|
| 273 |
+
\end{eqnarray}
|
| 274 |
+
Let $Y^i_{\text{L}}$ be the concatenation of feature maps in left and right branches. We wish to learn a new convolution function $\hat{f}(\WW_{\text{LR}}, \bb_{\text{LR}})$, such that
|
| 275 |
+
\begin{eqnarray}
|
| 276 |
+
\label{EQ:LR}
|
| 277 |
+
Y_{LR}^i =[ Y_{\text{left}}^i; Y_{\text{right}}^i ], \;\;\;
|
| 278 |
+
Y_{LR}^i = {\WW}_{\text{LR}} * X^i + {\bb}_{\text{LR}},
|
| 279 |
+
\end{eqnarray}
|
| 280 |
+
with $ Y^{L}_i \in \RR^{ M' \times N' \times K'_L} $ and $ Y^{R}_i \in \RR^{ M' \times N' \times K'_R} $ having the same kernel size.
|
| 281 |
+
|
| 282 |
+
If ${\WW}_{\text{L}} $ and ${\WW}_{\text{R}}$ have the same kernel size, we can get
|
| 283 |
+
\begin{eqnarray}
|
| 284 |
+
\label{EQ:W_b}
|
| 285 |
+
{\WW}_{\text{LR}} = [{\WW}_{\text{left}} ; {\WW}_{\text{right}} ] , \;\;\;
|
| 286 |
+
{\bb}_{\text{LR}} = [{\bb}_{\text{left}} ; {\bb}_{\text{right}} ] .
|
| 287 |
+
\end{eqnarray}
|
| 288 |
+
by substituting Eq.(\ref{EQ:left+right}) into Eq.(\ref{EQ:LR}).
|
| 289 |
+
Otherwise, we need to adjust $Y_{\text{L}}$ and $Y_{\text{R}}$ to the same size and learn the model
|
| 290 |
+
parameters by minimizing:
|
| 291 |
+
\begin{eqnarray}
|
| 292 |
+
\label{EQ:wb-dif}
|
| 293 |
+
(\hat{\WW^*}_{\text{LR}}, \hat{\bb^*}_{\text{LR}} ) = argmin_{\hat{\WW},\hat{\bb}} \sum_i \| Y_{\text{LR}}^i - (\hat{\WW} * X^i + \hat{\bb}) \|_F^2. \nonumber
|
| 294 |
+
\end{eqnarray}
|
| 295 |
+
\subsection{Adapting \pname{} to Overall Pipeline }
|
| 296 |
+
%
|
| 297 |
+
|
| 298 |
+
\pname{} can be easily applied to a pre-trained deep learning model as modern deep model architectures are well-structured with repeating substructures such as the inception module in GoogLeNet and the residual module in ResNet. Generally, there are three golden rules we need to follow: (1) identify the repeating substructures, (2) determine the input dimension and output dimension for each substructure, and (3) apply either streamline slimming or branch slimming based on the substructure type.
|
| 299 |
+
|
| 300 |
+
To reconcile the new learned layer with other parts of model, one further step is to fine-tuning the model parameters\footnote{One exception is the BatchNorm layer which can be directly merged to a preceding convolutional layer using Eq.(\ref{EQ:Y_j=})}, as suggested
|
| 301 |
+
in ~\cite{finetune1,finetune2}. In \pname{}, we leverage Xavier \cite{xavier} initialization to initialize the parameters in the new layer while keeping the weights of other layers unchanged. In the optimization procedure, we set the learning rate of new layers 10 times over those in other layers empirically. Generally, the proposed optimization scheme is applied from the bottom layer to the top layer. Another alternative is to learn multiple slim layers at the same time (we merge and fine-tune 3 sequential inception layers 4b-4d together for GoogLeNet) or merge layers in sequential orders other than from bottom to top. We will explore this discussion in our future work.
|
| 302 |
+
\section{Evaluation}
|
| 303 |
+
To evaluate the performance of \pname{}, we performed the comprehensive evaluation on top of GoogLeNet, AlexNet and ResNet. Our implementation is based on Caffe~\cite{caffe} deep learning framework, and we compile it using Android NDK for mobile evaluation. OpenBLAS~\cite{xianyi2014openblas} is used for efficient linear algebra calculations.
|
| 304 |
+
\subsection{GoogLeNet}
|
| 305 |
+
We use Caffe's GoogLeNet implementation (i.e., bvlc\_googlenet) with its pre-trained weights. Then we apply the proposed \pname{} optimization scheme to accelerate the running speed of GoogLeNet, which is denoted as ``GoogLeNet-Slim''.
|
| 306 |
+
After non-tensor layer optimization (streamline and branch slimming), we further apply tucker decomposition approach~\cite{kimtucker} to reduce the model size (i.e., the number of learned weights) by 50\%, represented as ``GoogLeNet-Slim-Tucker''.
|
| 307 |
+
In addition, we directly employ tucker decomposition method to compress original GoogLeNet. This is indicated as ``GoogLeNet-Tucker''. Thus, we have 4 variations of GoogLeNet to compare, namely GoogLeNet, GoogLeNet-Slim, GoogLeNet-Tucker and GoogLeNet-Slim-Tucker. We also compare with SqueezeNet \cite{SqueezeNet}, a state-of-the-art compact neural network which includes only 1.2M learnable parameters (vs. 5M for GoogLeNet).
|
| 308 |
+
|
| 309 |
+
\begin{table}%
|
| 310 |
+
\caption{GoogLeNet Accuracy on Slimming Each Layer}
|
| 311 |
+
\label{layer-accuracy}
|
| 312 |
+
\begin{center}
|
| 313 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 314 |
+
\begin{tabular}{cccc}
|
| 315 |
+
\multicolumn{1}{c}{\bf Step} &\multicolumn{1}{c}{\bf Slim Layer(s)}&\multicolumn{1}{c}{\bf Top-1 Accuracy} &\multicolumn{1}{c}{\bf Top-5 Accuracy} \\
|
| 316 |
+
\hline \\
|
| 317 |
+
0 & N/A & 68.72\% & 88.89\% \\
|
| 318 |
+
1 & conv1 & 68.65\% & 88.73\% \\
|
| 319 |
+
2 & conv2 & 68.66\% & 88.82\% \\
|
| 320 |
+
3 & inception\_3a & 68.35\% & 88.50\% \\
|
| 321 |
+
4 & inception\_3b & 68.21\% & 88.27\% \\
|
| 322 |
+
5 & inception\_4a & 68.34\% & 88.60\% \\
|
| 323 |
+
6 & inception\_4b-4d & 68.31\% & 88.61\% \\
|
| 324 |
+
7 & inception\_4e & 68.26\% & 88.43\% \\
|
| 325 |
+
8 & inception\_5a & 68.22\% & 88.41\% \\
|
| 326 |
+
9 & inception\_5b & 68.03\% & \textbf{88.43\%} \\
|
| 327 |
+
\textbf{Tucker Decomposition} & \textbf{ALL} & 66.71\% & \textbf{86.54\%} \\
|
| 328 |
+
\end{tabular}}
|
| 329 |
+
\end{center}
|
| 330 |
+
\end{table}
|
| 331 |
+
|
| 332 |
+
{\bf \underline{Accuracy}} We evaluate the accuracy loss in contrast to original ones after performing the accelerated models. %
|
| 333 |
+
The accuracy changing along with the optimization steps conducted on ImageNet ILSVRC-2012 validation dataset are listed in Table \ref{layer-accuracy}. During the whole optimization procedure of model training, we set the base learning rate for the re-generated layer as 0.01 (the rest layers are 0.001). We apply stochastic gradient descent training method~\cite{sgd} to learn the parameters with a batch size of 32. During our training phase, we set 40,000 as the step size together with 0.1 for gamma value and 0.9 for momentum parameter. At each step, the model generally converges at around 90,000 iterations (2 epochs).
|
| 334 |
+
|
| 335 |
+
The result indicates that \pname{} has almost negligible impact on the model accuracy, and the accuracy even increases at certain step (e.g., step 5). This indicates that ``the new-born" layers perfectly simulate the functionality of previous non-tensor layers before optimization. By applying tucker decomposition method on the slim model to reduce the weights by half (GoogLeNet-Slim-Tucker), we observe that there is a larger drop on accuracy (around 2\%). However, directly applying tucker decomposition method (GoogLeNet-Tucker) to reduce the GoogLeNet weights to a half drops the top-5 accuracy to 85.7\%. %
|
| 336 |
+
These results %
|
| 337 |
+
imply that our method
|
| 338 |
+
performs reasonable well even after streamline and branch slimming.
|
| 339 |
+
|
| 340 |
+
|
| 341 |
+
{\bf \underline{Speed-Up}} To evaluate and compare the latency of different optimization approaches, we evaluate the layer-wise running speed on a Samsung Galaxy S5 smartphone with Caffe. Each test run includes 50 subtests with a random input and we report the best test run in terms of forwarding time. During the whole experiment, we turn on the airplane mode and close all other apps. As demonstrated %
|
| 342 |
+
in Table \ref{layer-speed}, we observe that GoogLeNet-Slim is 3x faster than GoogLeNet. In addition, as pointed \cite{kimtucker}, the original GoogLeNet model has too many small layers and this results in performance fluctuation. In the worst scenario, GoogLeNet takes around 950 ms for a single forwarding while with reduced number of layers, GoogLeNet-Slim takes only up to 250 ms, which is almost 4x speed-up. The Tucker Decomposition method further reduces the computation for around 50\% at the cost of around 2\% accuracy loss. On the other hand, directly applying tucker decomposition on tensor layers doesn't show any significant acceleration.
|
| 343 |
+
|
| 344 |
+
\begin{table}
|
| 345 |
+
\caption{Layer breakdown of GoogLeNet forwarding time cost}
|
| 346 |
+
\label{layer-speed}
|
| 347 |
+
\begin{center}
|
| 348 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 349 |
+
\begin{tabular}{ccccc}
|
| 350 |
+
\multicolumn{1}{c}{\bf Layer} &\multicolumn{1}{c}{\bf GoogLeNet} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Tucker\end{tabular}} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Slim (ours)\end{tabular}} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Slim-Tucker (ours)\end{tabular}}\\
|
| 351 |
+
\hline \\
|
| 352 |
+
conv1 & 94.92 ms & 87.85 ms & 8.424 ms & 6.038 ms \\
|
| 353 |
+
conv2 & 153.8 ms & 179.4 ms & 16.62 ms & 9.259 ms\\
|
| 354 |
+
inception\_3a & 55.23 ms & 85.62 ms & 21.17 ms & 9.459 ms \\
|
| 355 |
+
inception\_3b & 98.41 ms & 66.51 ms & 25.94 ms & 11.74 ms \\
|
| 356 |
+
inception\_4a & 30.53 ms & 36.91 ms & 16.80 ms & 8.966 ms \\
|
| 357 |
+
inception\_4b & 32.60 ms & 41.82 ms & 20.29 ms & 11.65 ms \\
|
| 358 |
+
inception\_4c & 46.96 ms & 30.46 ms & 18.71 ms & 9.102 ms \\
|
| 359 |
+
inception\_4d & 36.88 ms & 21.05 ms & 24.67 ms & 10.05 ms \\
|
| 360 |
+
inception\_4e & 48.24 ms & 32.19 ms & 28.08 ms & 14.08 ms \\
|
| 361 |
+
inception\_5a & 24.64 ms & 14.43 ms & 10.69 ms & 5.36 ms \\
|
| 362 |
+
inception\_5b & 24.92 ms & 15.87 ms & 14.58 ms & 6.65 ms \\
|
| 363 |
+
loss3 & 3.014 ms & 2.81 ms & 2.97 ms & 2.902 ms \\
|
| 364 |
+
\textbf{Total} & \textbf{651.4 ms} & \textbf{614.9 ms (1.06x)} & \textbf{210.6 ms (3.09x)} & \textbf{106.3 ms (6.13x)} \\
|
| 365 |
+
\end{tabular}}
|
| 366 |
+
\end{center}
|
| 367 |
+
\end{table}
|
| 368 |
+
|
| 369 |
+
We evaluate the speed-up on other popular processors besides Galaxy S5, including (1) Moto E: a low-end mobile ARM CPU, (2) Samsung Galaxy S6: a high-end mobile ARM CPU, (3) Macbook Pro: an Intel x86 CPU, and (4) Titan X: a powerful server GPU. We demonstrate the experimental results in Table \ref{device-speed} and observe significant speed-up on various types of CPUs. Even on the low-end mobile CPU (i.e., Moto E), around 200 ms model forwarding time is achieved by combining tensor weights compression method. Finally, comparing the proposed approach with SqueezeNet~\cite{SqueezeNet}, we are very excited to see that our optimization approach can obtain faster speed on all mobile devices with much higher accuracy (the Top-5 accuracy for SqueezeNet is 80\%) as listed in Table \ref{device-speed}. %
|
| 370 |
+
\begin{table}
|
| 371 |
+
\caption{Execution time using different methods (including SqueezeNet) on different processors}
|
| 372 |
+
\label{device-speed}
|
| 373 |
+
\begin{center}
|
| 374 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 375 |
+
\begin{tabular}{cccccc}
|
| 376 |
+
\multicolumn{1}{c}{\bf Device} &\multicolumn{1}{c}{\bf GoogLeNet} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Tucker\end{tabular}} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Slim\end{tabular}} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}GoogLeNet \\ -Slim-Tucker\end{tabular}} &\multicolumn{1}{c}{\bf SqueezeNet}\\
|
| 377 |
+
\hline \\
|
| 378 |
+
Moto E & 1168.8 ms & 897.9 ms & 406.7 ms & \textbf{213.3 ms} & 291.4 ms\\
|
| 379 |
+
Samsung Galaxy S5 & 651.4 ms & 614.9 ms & 210.6 ms & \textbf{106.3 ms} & 136.3 ms\\
|
| 380 |
+
Samsung Galaxy S6 & 424.7 ms & 342.5 ms & 107.7 ms & \textbf{65.34 ms} & 75.34 ms \\
|
| 381 |
+
Macbook Pro (CPU) & 91.77 ms & 78.22 ms & 23.69 ms & \textbf{15.18 ms } & 17.63 ms \\
|
| 382 |
+
Titan X & 10.17 ms & 10.74 ms & 6.57 ms & 7.68 ms & \textbf{3.29 ms} \\
|
| 383 |
+
\end{tabular}}
|
| 384 |
+
\end{center}
|
| 385 |
+
\end{table}
|
| 386 |
+
|
| 387 |
+
\begin{table}%
|
| 388 |
+
\caption{Storage, Energy and Runtime-Memory Comparison}
|
| 389 |
+
\label{storage-memory}
|
| 390 |
+
\begin{center}
|
| 391 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 392 |
+
\begin{tabular}{ccccc}
|
| 393 |
+
\multicolumn{1}{c}{\bf Model} &\multicolumn{1}{c}{\bf Energy} &\multicolumn{1}{c}{\bf Storage} &\multicolumn{1}{c}{\bf Memory} &\multicolumn{1}{c}{\bf \begin{tabular}{@{}c@{}}Max Batch Size \\ on Titan X\end{tabular}} \\
|
| 394 |
+
\hline \\
|
| 395 |
+
GoogLeNet & 984 mJ & 26.72 MB & 33.2 MB & 350 \\
|
| 396 |
+
GoogLeNet-Tucker & 902 mJ & 14.38 MB & 35.8 MB & 323\\
|
| 397 |
+
GoogLeNet-Slim & \textbf{447 mJ (2.2x)} & 23.77 MB & 13.2 MB & \textbf{882 (2.52x)}\\
|
| 398 |
+
GoogLeNet-Slim-Tucker & \textbf{226 mJ (4.4x)} & 11.99 MB & 14.8 MB & \textbf{785 (2.24x)}\\
|
| 399 |
+
SqueezeNet & 288 mJ & 4.72 MB & 36.5 MB & 321 \\
|
| 400 |
+
\end{tabular}}
|
| 401 |
+
\end{center}
|
| 402 |
+
\end{table}
|
| 403 |
+
|
| 404 |
+
{\bf \underline{Energy, Storage and Runtime-Memory Cost}}
|
| 405 |
+
We measure the energy cost of each compared model using PowerTutor Android app on Samsung Galaxy S5 (similar results are obtained on other mobile devices). The original GoogLeNet consumes almost 1 Joule per image while GoogLeNet-Slim consumes only 447 mJ. Applying tucker decomposition further reduces the energy cost to only 1/4 at 226 mJ. When deploying to the mobile devices, we remove the loss1 and loss2 branches from the trained models so that the storage cost of each model is reduced by 24.33 MB. GoogLeNet-Slim which achieves significant speed-up does not save much storage cost compared to the original GoogLeNet model. However, for modern mobile devices, storage is not a scarce resource (e.g., Samsung Galaxy S5 has 16 GB or 32 GB storage), so a 20 MB deep learning model is ``affordable" on mobile devices. Meanwhile, we can always perform the tensor weights compression method to further reduce the storage cost.
|
| 406 |
+
|
| 407 |
+
|
| 408 |
+
|
| 409 |
+
Another benefit of layer slimming is run-time memory saving. The generated GoogLeNet-Slim model reduces the number of layers and consumes only 13.2 MB to process one image. This feature is also very useful for the cloud based deep learning service which can process a much larger batch at one run. As shown in table~\ref{storage-memory}, one Titan X GPU can run a batch size of 882 with the GoogLeNet-Slim model while the original GoogLeNet can only allow a batch size of 350. On the other hand, SqueezeNet though has much less trained parameters, it has much larger run-time memory impact due to the increased number of layers.
|
| 410 |
+
\subsection{AlexNet and ResNet}
|
| 411 |
+
We apply the proposed framework to other popular deep neural structures: AlexNet~\cite{alexnet} and ResNet~\cite{resnet}. Note that we did not apply tensor weights compression to those two models which can further reduce the model forwarding latency. First, we study the classical AlexNet model. We apply streamline slimming approach to re-generate new slim layers by merging the first two convolution layers followed by LRN layers. We illustrate the result in Table \ref{alex-result}. This indicates that by applying slimming to the first two layers, the model forwarding time of AlexNet is reduced from 445 ms to 274 ms on Samsung Galaxy S5, and the Top-5 accuracy is slightly dropped from 80.03\% to 79.57\%.
|
| 412 |
+
|
| 413 |
+
\begin{table}
|
| 414 |
+
\caption{AlexNet Result (Accuracy vs. Speed vs. Energy cost)}
|
| 415 |
+
\label{alex-result}
|
| 416 |
+
\begin{center}
|
| 417 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 418 |
+
\begin{tabular}{ccccc}
|
| 419 |
+
\multicolumn{1}{c}{\bf Step} &\multicolumn{1}{c}{\bf Slim Layer(s)} &\multicolumn{1}{c}{\bf Top-5 Accuracy} &\multicolumn{1}{c}{\bf Speed-up}&\multicolumn{1}{c}{\bf Energy Cost}\\
|
| 420 |
+
\hline \\
|
| 421 |
+
0 & N/A & 80.03\% & 445 ms & 688 mJ \\
|
| 422 |
+
1 & conv1+norm1 $\,\to\,$ conv1 & 79.99\% & 343 ms (1.29x) & 555 mJ (1.24x) \\
|
| 423 |
+
2 & conv2+norm2 $\,\to\,$ conv2 & 79.57\% & 274 ms (1.63x) & 458 mJ (1.51x) \\
|
| 424 |
+
\end{tabular}}
|
| 425 |
+
\end{center}
|
| 426 |
+
\end{table}
|
| 427 |
+
|
| 428 |
+
\begin{table}
|
| 429 |
+
\caption{ResNet (conv1-res2a) Result (Accuracy vs. Speed up). For each step, we absorb the ``BatchNorm" and ``Scale" layers to the bottom convolution layer. }
|
| 430 |
+
\label{resnet-result}
|
| 431 |
+
\begin{center}
|
| 432 |
+
\resizebox{0.46\textwidth}{!}{%
|
| 433 |
+
\begin{tabular}{ccccc}
|
| 434 |
+
\multicolumn{1}{c}{\bf Step} &\multicolumn{1}{c}{\bf Slim Layer(s)} &\multicolumn{1}{c}{\bf Top-5 Accuracy} &\multicolumn{1}{c}{\bf Speed-up}&\multicolumn{1}{c}{\bf Runtime-Mem Batch32}\\
|
| 435 |
+
\hline \\
|
| 436 |
+
0 & N/A & 92.36\% & 189 ms & 2505 MB \\
|
| 437 |
+
1 & conv1 & 92.13\% & 162 ms (1.17x) & 2113 MB (1.19x)\\
|
| 438 |
+
2 & res2a\_branch1 & 92.01\% & 140 ms (1.35x) & 1721 MB (1.46x)\\
|
| 439 |
+
3 & res2a\_branch2a-2c & 91.88\% & 104 ms (1.82x) & 1133 MB (2.21x)\\
|
| 440 |
+
\end{tabular}}
|
| 441 |
+
\end{center}
|
| 442 |
+
\end{table}
|
| 443 |
+
|
| 444 |
+
We apply the acceleration scheme to the more advanced ResNet model. In the experiment, we use the popular 50-layer ResNet-50 model as baseline. We mainly apply the acceleration framework to conv1 and res2a layers (res2a has 2 branches; one branch has 1 convolution layer and another branch has 3 convolution layers). We present the result in Table \ref{resnet-result}. The time latency on Samsung Galaxy S5 for the processed layers (i.e., conv1 and res2a) is reduced from 189 ms to 104 ms. Moreover, the run-time memory cost is reduced by 2.21x. The accuracy is only slightly reduced. Meanwhile, since batch normalization layers can be directly merged to their preceding convolutional layers using Eq.(\ref{EQ:Y_j=}), additional 30\%-45\% speed-up can be achieved without accuracy loss as indicated by Figure \ref{fig:resnet50_fine}.
|
| 445 |
+
\section{Related Work}
|
| 446 |
+
Reducing the model size and accelerating the running speed are two general ways to facilitate the deployment of deep learning models on mobile devices. Many efforts have been spent on reducing the model size. In particular, most works focus on optimizing tensor-layers to reduce the model size due to the high redundancy in the learned parameters in tensor layers of a given deep model. Vanhoucke et al. \cite{vanhoucke2011improving} proposed a fixed-point implementation with 8-bit integer activation to reduce the number of parameter used in the deep neural network while \cite{gong2014compressing} applied vector quantization to compressed deep convnets. These approaches, however, mainly focus on compressing the fully connected layer without considering the convolutional layers.
|
| 447 |
+
To reduce the parameter size, Denten {\it et al.} \cite{denton2014exploiting} applied the low-rank approximation approach to compress the neural networks with linear structures. Afterwards, hashing functions, which have been widely adopted to improve efficiency of traditional computer vision tasks~\cite{hasing0,du_hashing}, were utilized to reduce model sizes by randomly grouping connection weights~\cite{chen2015compressing}. More recently, Han et al.\cite{DeepCompression} proposed to effectively reduce model size and achieve speed-up by the combination of pruning, Huffman coding and quantization. However, the benefits can only be achieved by running the compressed model on a specialized processor \cite{han2016eie}.
|
| 448 |
+
|
| 449 |
+
|
| 450 |
+
|
| 451 |
+
|
| 452 |
+
Recently, SqueezeNet~\cite{SqueezeNet} has became widely used for its much smaller memory cost and increased speed. However, the near-AlexNet accuracy is far below the state-of-the-art performance. Compared with these two newly networks, our approach has much better accuracy with more significant acceleration. Springenberg et al. \cite{DBLP:journals/corr/SpringenbergDBR14} showed that the conv-relu-pool substructure may not be necessary for a neural network architecture. The authors find that max-pooling can simply be replaced by another convolution layer with increased stride without loss in accuracy. Different from this work, \pname{} replaces a complete substructure (e.g., conv-relu-pool, conv-relu-LRN-pool) with a single convolution layer, and aims to speed-up the model execution on the mobile device. In addition, our work slims a well-trained network by relearning the merged layers and does not require to train from scratch. Essentially, \pname{} can be considered as a special form of distillation \cite{distillation} that transfers the knowledge from the cumbersome substructure of multiple layers to the new accelerated substructure.
|
| 453 |
+
\section{Conclusion and Future Work}
|
| 454 |
+
An acceleration framework -- \pname{} is proposed to speed up the neural networks with satisfactory accuracy, which operates by re-generating new tensor layers from optimizing non-tensor layers and their neighborhood units. %
|
| 455 |
+
\pname{}
|
| 456 |
+
is also compatible with state-of-the-art deep models like GoogleNet and ResNet, where most parameter weight compression methods failed. By applying \pname{} on different deep learning architectures,
|
| 457 |
+
we obtain significant speed-up on different processors (including mobile processors), which will readily facilitate the deployment of deep learning models on mobile devices
|
| 458 |
+
in the new AI tide.
|
| 459 |
+
|
| 460 |
+
In future work, we plan to integrate \pname{} with other state-of-the-art tensor layer compression methods and also extend our evaluation to heterogeneous mobile processors such as mobile GPUs, DSPs. We envision that understanding the characteristics of these different chips can help us design better algorithms and further improve the model execution efficiency.
|
| 461 |
+
\section{Acknowledgements}
|
| 462 |
+
We thank all the anonymous reviewers for their insightful comments and valuable suggestions.
|
| 463 |
+
|
| 464 |
+
{
|
| 465 |
+
\small
|
| 466 |
+
\bibliographystyle{aaai}
|
| 467 |
+
\bibliography{iclr2017_conference}
|
| 468 |
+
}
|
1708.05239v3.txt
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Markov chain Monte Carlo (MCMC) methods (see, e.g., Brooks et al., (2011)) are generally regarded as the gold standard approach for sampling from high-dimensional distributions. In particular, MCMC algorithms have been extensively applied within the field of Bayesian statistics to sample from posterior distributions when the posterior density can only be evaluated up to a constant of proportionality. Under mild conditions, it can be shown that asymptotically, the limiting distribution of the samples generated from the MCMC algorithm will converge to the posterior distribution of interest. While theoretically elegant, one of the main drawbacks of MCMC methods is that running the algorithm to stationarity can be prohibitively expensive if the posterior distribution is of a complex form, for example, contains multiple unknown modes. Notable examples of multi-modality include the posterior over model parameters in mixture models (McLachlan and Peel,, 2000), deep neural networks (Neal,, 2012), and differential equation models (Calderhead and Girolami,, 2009).
|
| 2 |
+
|
| 3 |
+
In this paper, we present the pseudo-extended Markov chain Monte Carlo method as an approach for augmenting the state-space of the original posterior distribution to allow the MCMC sampler to easily move between areas of high posterior density. The pseudo-extended method introduces pseudo-samples on the extended space to improve the mixing of the Markov chain. To illustrate how this method works, in Figure 1 we plot a mixture of two univariate Gaussian distributions (left). The area of low probability density between the two Gaussians will make it difficult for an MCMC sampler to traverse between them. Using the pseudo-extended approach (as detailed in Section 2), we can extend the state-space to two dimensions (right), where on the extended space, the modes are now connected allowing the MCMC sampler to easily mix between them.
|
| 4 |
+
|
| 5 |
+
The pseudo-extended framework can be applied for general MCMC sampling, however, in this paper, we focus on using ideas from tempered MCMC (Jasra et al.,, 2007) to improve multi-modal posterior sampling. Unlike previous approaches which use MCMC to sample from multi-modal posteriors, i) we do not require a priori information regarding the number, or location, of modes, ii) nor do we need to specify a sequence of intermediary tempered distributions (Geyer,, 1991).
|
| 6 |
+
|
| 7 |
+
We show that samples generated using the pseudo-extended method admit the correct posterior of interest as the limiting distribution. Furthermore, once weighted using a post-hoc correction step, it is possible to use all pseudo-samples for approximating the posterior distribution. The pseudo-extended method can be applied as an extension to many popular MCMC algorithms, including the random-walk Metropolis (Roberts et al.,, 1997) and Metropolis-adjusted Langevin algorithm (Roberts and Tweedie,, 1996). However, in this paper, we focus on applying the popular Hamiltonian Monte Carlo (HMC) algorithm (Neal,, 2010) within the pseudo-extended framework and show that this leads to improved posterior exploration compared to standard HMC.
|
| 8 |
+
|
| 9 |
+
Let π𝜋\pi be a target probability density on ℝdsuperscriptℝ𝑑\mathbb{R}^{d} defined for all 𝐱∈𝒳:=ℝd𝐱𝒳assignsuperscriptℝ𝑑\mathbf{x}\in\mathcal{X}:=\mathbb{R}^{d} byπ(𝐱):=γ(𝐱)Z=exp{−ϕ(𝐱)}Z,assign𝜋𝐱𝛾𝐱𝑍italic-ϕ𝐱𝑍\displaystyle\pi(\mathbf{x}):=\frac{\gamma(\mathbf{x})}{Z}=\frac{\exp\{-\phi(\mathbf{x})\}}{Z},(1)where ϕ:𝒳→ℝ:italic-ϕ→𝒳ℝ\phi:\mathcal{X}\rightarrow\mathbb{R} is a continuously differentiable function and Z𝑍Z is the normalizing constant. Throughout, we will refer to π(𝐱)𝜋𝐱\pi(\mathbf{x}) as the target density. In the Bayesian setting, this would be the posterior, where for data 𝐲∈𝒴𝐲𝒴\mathbf{y}\in\mathcal{Y}, the likelihood is denoted as p(𝐲|𝐱)𝑝conditional𝐲𝐱p(\mathbf{y}|\mathbf{x}) with parameters 𝐱𝐱\mathbf{x} assigned a prior density π0(𝐱)subscript𝜋0𝐱\pi_{0}(\mathbf{x}). The posterior density of the parameters given the data is derived from Bayes theorem π(𝐱)=p(𝐲|𝐱)π0(𝐱)/p(𝐲)𝜋𝐱𝑝conditional𝐲𝐱subscript𝜋0𝐱𝑝𝐲\pi(\mathbf{x})=p(\mathbf{y}|\mathbf{x})\pi_{0}(\mathbf{x})/p(\mathbf{y}), where the marginal likelihood p(𝐲)𝑝𝐲p(\mathbf{y}) is the normalizing constant Z𝑍Z, which is typically not available analytically.
|
| 10 |
+
|
| 11 |
+
We extend the state-space of the original target distribution eq. (1) by introducing N𝑁N pseudo-samples, 𝐱1:N={𝐱i}i=1Nsubscript𝐱:1𝑁superscriptsubscriptsubscript𝐱𝑖𝑖1𝑁\mathbf{x}_{1:N}=\{\mathbf{x}_{i}\}_{i=1}^{N}, where the extended-target distribution πN(𝐱1:N)superscript𝜋𝑁subscript𝐱:1𝑁\pi^{N}(\mathbf{x}_{1:N}) is defined on 𝒳Nsuperscript𝒳𝑁\mathcal{X}^{N}. The pseudo-samples act as auxiliary variables, where for each 𝐱isubscript𝐱𝑖\mathbf{x}_{i}, we introduce an instrumental distribution q(𝐱i)∝exp{−δ(𝐱i)}proportional-to𝑞subscript𝐱𝑖𝛿subscript𝐱𝑖q(\mathbf{x}_{i})\propto\exp\{-\delta(\mathbf{x}_{i})\}with support covering that of π(𝐱)𝜋𝐱\pi(\mathbf{x}).In a similar vein to the pseudo-marginal MCMC algorithm (Beaumont,, 2003; Andrieu and Roberts,, 2009)our extended-target, including the auxiliary variables, is now of the form,πN(𝐱1:N)superscript𝜋𝑁subscript𝐱:1𝑁\displaystyle\pi^{N}(\mathbf{x}_{1:N}):=1N∑i=1Nπ(𝐱i)∏j≠iq(𝐱j)=1Z{1N∑i=1Nγ(𝐱i)q(𝐱i)}×∏iq(𝐱i),assignabsent1𝑁superscriptsubscript𝑖1𝑁𝜋subscript𝐱𝑖subscriptproduct𝑗𝑖𝑞subscript𝐱𝑗1𝑍1𝑁superscriptsubscript𝑖1𝑁𝛾subscript𝐱𝑖𝑞subscript𝐱𝑖subscriptproduct𝑖𝑞subscript𝐱𝑖\displaystyle:=\frac{1}{N}\sum_{i=1}^{N}\pi(\mathbf{x}_{i})\prod_{j\neq i}q(\mathbf{x}_{j})=\frac{1}{Z}\left\{\frac{1}{N}\sum_{i=1}^{N}\frac{\gamma(\mathbf{x}_{i})}{q(\mathbf{x}_{i})}\right\}\times\prod_{i}q(\mathbf{x}_{i}),(2)where γ(⋅)𝛾⋅\gamma(\cdot) and Z𝑍Z are defined in eq. (1). In pseudo-marginal MCMC, q(⋅)𝑞⋅q(\cdot) is an instrumental distribution used for importance sampling to compute unbiased estimates of the intractable normalizing constant (see Section 2.2 for details). However, with the pseudo-extended method we use q(⋅)𝑞⋅q(\cdot) to improve the mixing of the MCMC algorithm. Additionally, unlike pseudo-marginal MCMC, we do not require that q(⋅)𝑞⋅q(\cdot) can be sampled from; a fact that we will exploit in Section 3.
|
| 12 |
+
|
| 13 |
+
In the case where N=1𝑁1N=1, our extended-target eq. (2) simplifies back to the original target π(𝐱)=πN(𝐱1:N)𝜋𝐱superscript𝜋𝑁subscript𝐱:1𝑁\pi(\mathbf{x})=\pi^{N}(\mathbf{x}_{1:N}) eq. (1). For N>1𝑁1N>1, the resulting marginal distribution of the i𝑖ith pseudo-sample is a mixture between the target and the instrumental distributionπN(𝐱i)=1Nπ(𝐱i)+N−1Nq(𝐱i).superscript𝜋𝑁subscript𝐱𝑖1𝑁𝜋subscript𝐱𝑖𝑁1𝑁𝑞subscript𝐱𝑖\pi^{N}(\mathbf{x}_{i})=\frac{1}{N}\pi(\mathbf{x}_{i})+\frac{N-1}{N}q(\mathbf{x}_{i}).We then use a post-hoc weighting step to convert the samples from the extended-target to samples from the original target of interest π(𝐱)𝜋𝐱\pi(\mathbf{x}). In Theorem 2.1, we show that samples from the extended target give unbiased expectations of arbitrary functions f𝑓f, under the target of interest π𝜋\pi.
|
| 14 |
+
|
| 15 |
+
The proof follows from the invariance of particle Gibbs (Andrieu et al.,, 2010) and is given in Section A of the Supplementary Material.
|
| 16 |
+
|
| 17 |
+
We use an MCMC algorithm to sample from the pseudo-extended target eq. (2). In this paper, we use the HMC algorithm because of its impressive mixing times, however, a disadvantage of HMC, and other gradient-based MCMC algorithms is that they tend to be mode-seeking and are more prone to getting trapped in local modes of the target. The pseudo-extended framework creates a target where the modes are connected on the extended space, which reduces the mode-seeking behavior of HMC and allows the sampler to move easily between regions of high density.
|
| 18 |
+
|
| 19 |
+
Recalling that our parameters are 𝐱∈𝒳:=ℝd𝐱𝒳assignsuperscriptℝ𝑑\mathbf{x}\in\mathcal{X}:=\mathbb{R}^{d}, we introduce artificial momentum variables 𝝆∈ℝd𝝆superscriptℝ𝑑\boldsymbol{\rho}\in\mathbb{R}^{d} that are independent of 𝐱𝐱\mathbf{x}. The Hamiltonian H(𝐱,𝝆)𝐻𝐱𝝆H(\mathbf{x},\boldsymbol{\rho}), represents the total energy of the system as the combination of the potential function ϕ(𝐱)italic-ϕ𝐱\phi(\mathbf{x}), as defined in eq. (1), and kinetic energy 12𝝆⊤𝐌−1𝝆12superscript𝝆topsuperscript𝐌1𝝆\frac{1}{2}\boldsymbol{\rho}^{\top}\mathbf{M}^{-1}\boldsymbol{\rho},H(𝐱,𝝆):=ϕ(𝐱)+12𝝆⊤𝐌−1𝝆,assign𝐻𝐱𝝆italic-ϕ𝐱12superscript𝝆topsuperscript𝐌1𝝆H(\mathbf{x},\boldsymbol{\rho}):=\phi(\mathbf{x})+\frac{1}{2}\boldsymbol{\rho}^{\top}\mathbf{M}^{-1}\boldsymbol{\rho},where 𝐌𝐌\mathbf{M} is a mass matrix and is often set to the identity matrix. The Hamiltonian now augments our target distribution so that we are sampling (𝐱,𝝆)𝐱𝝆(\mathbf{x},\boldsymbol{\rho}) from the joint distribution π(𝐱,𝝆)∝exp{H(𝐱,𝝆)}=π(𝐱)𝒩(𝝆|0,𝐌)proportional-to𝜋𝐱𝝆𝐻𝐱𝝆𝜋𝐱𝒩conditional𝝆0𝐌\pi(\mathbf{x},\boldsymbol{\rho})\propto\exp\{H(\mathbf{x},\boldsymbol{\rho})\}=\pi(\mathbf{x})\mathcal{N}(\boldsymbol{\rho}|0,\mathbf{M}), which admits the target as the marginal. In the case of the pseudo-extended target eq. (2), the Hamiltonian is,HN(𝐱1:N,𝝆)superscript𝐻𝑁subscript𝐱:1𝑁𝝆\displaystyle H^{N}(\mathbf{x}_{1:N},\boldsymbol{\rho})=−log[∑i=1Nexp{−ϕ(𝐱i)+δ(𝐱i)}]+∑i=1Nδ(𝐱i)+12𝝆⊤𝐌−1𝝆,absentsuperscriptsubscript𝑖1𝑁italic-ϕsubscript𝐱𝑖𝛿subscript𝐱𝑖superscriptsubscript𝑖1𝑁𝛿subscript𝐱𝑖12superscript𝝆topsuperscript𝐌1𝝆\displaystyle=-\log\left[\sum_{i=1}^{N}\exp\{-\phi(\mathbf{x}_{i})+\delta(\mathbf{x}_{i})\}\right]+\sum_{i=1}^{N}\delta(\mathbf{x}_{i})+\frac{1}{2}\boldsymbol{\rho}^{\top}\mathbf{M}^{-1}\boldsymbol{\rho},(4)where now 𝝆∈ℝd×N𝝆superscriptℝ𝑑𝑁\boldsymbol{\rho}\in\mathbb{R}^{d\times N}, and δ(𝐱)𝛿𝐱\delta(\mathbf{x}) is a potential function of the instrumental distribution that is arbitrary but differentiable, eq. (2).
|
| 20 |
+
|
| 21 |
+
Aside from a few special cases, we generally cannot simulate from the Hamiltonian system eq. (4) exactly (Neal,, 2010). Instead, we discretize time using small step-sizes ϵitalic-ϵ\epsilon and calculate the state at ϵitalic-ϵ\epsilon, 2ϵ2italic-ϵ2\epsilon, 3ϵ3italic-ϵ3\epsilon, etc. using a numerical integrator. Several numerical integrators are available which preserve the volume and reversibility of the Hamiltonian system (Girolami and Calderhead,, 2011), the most popular being the leapfrog integrator which takes L𝐿L steps, each of size ϵitalic-ϵ\epsilon, though the Hamiltonian dynamics (pseudo-code is given in the Supplementary Material). After a fixed number of iterations T𝑇T, the algorithm generates samples (𝐱1:N(t),𝝆(t)),t=1,…,Tformulae-sequencesuperscriptsubscript𝐱:1𝑁𝑡superscript𝝆𝑡𝑡1…𝑇(\mathbf{x}_{1:N}^{(t)},\boldsymbol{\rho}^{(t)}),\ t=1,\ldots,T approximately distributed according to the joint distribution π(𝐱1:N,𝝆)𝜋subscript𝐱:1𝑁𝝆\pi(\mathbf{x}_{1:N},\boldsymbol{\rho}), where after discarding the momentum variables 𝝆𝝆\boldsymbol{\rho}, our MCMC samples will be approximately distributed according to the target πN(𝐱1:N)superscript𝜋𝑁subscript𝐱:1𝑁\pi^{N}(\mathbf{x}_{1:N}). In this paper, we use the No-U-turn sampler (NUTS) introduced by Hoffman and Gelman, (2014) as implemented in the STAN (Carpenter et al.,, 2017) software package to automatically tune L𝐿L and ϵitalic-ϵ\epsilon.
|
| 22 |
+
|
| 23 |
+
The pseudo-extended target eq. (2) can be viewed as a special case of the pseudo-marginal target of Andrieu and Roberts, (2009). In the pseudo-marginal setting, it is (typically) assumed that the target density is of the form π(𝜽)=∫𝒳π(𝜽,𝐱)d𝐱𝜋𝜽subscript𝒳𝜋𝜽𝐱differential-d𝐱\pi(\boldsymbol{\theta})=\int_{\mathcal{X}}\pi(\boldsymbol{\theta},\mathbf{x})\mathrm{d}\mathbf{x}, where 𝜽𝜽\boldsymbol{\theta} is some “top-level” parameter, and where 𝐱𝐱\mathbf{x} are latent variables that cannot be integrated out analytically. Using importance sampling, an unbiased Monte Carlo estimate of the target π~(𝜽)~𝜋𝜽\tilde{\pi}(\boldsymbol{\theta}) is computed using latent variable samples 𝐱1,𝐱2,…,𝐱Nsubscript𝐱1subscript𝐱2…subscript𝐱𝑁\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{N} from an instrumental distribution with density q(𝐱)𝑞𝐱q(\mathbf{x}) and then approximating the integral asπ~(𝜽):=1N∑i=1Nπ(𝜽,𝐱i)q(𝐱i),where𝐱i∼q(⋅).formulae-sequenceassign~𝜋𝜽1𝑁superscriptsubscript𝑖1𝑁𝜋𝜽subscript𝐱𝑖𝑞subscript𝐱𝑖wheresimilar-tosubscript𝐱𝑖𝑞⋅\tilde{\pi}(\boldsymbol{\theta}):=\frac{1}{N}\sum_{i=1}^{N}\frac{\pi(\boldsymbol{\theta},\mathbf{x}_{i})}{q(\mathbf{x}_{i})},\quad\mbox{where}\quad\mathbf{x}_{i}\sim q(\cdot).The pseudo-marginal target is then defined, analogously to the pseudo-extended target eq. (2), asπ~N(𝜽,𝐱):=1N∑i=1Nπ(𝜽,𝐱i)∏j≠iq(𝐱j),assignsuperscript~𝜋𝑁𝜽𝐱1𝑁superscriptsubscript𝑖1𝑁𝜋𝜽subscript𝐱𝑖subscriptproduct𝑗𝑖𝑞subscript𝐱𝑗\tilde{\pi}^{N}(\boldsymbol{\theta},\mathbf{x}):=\frac{1}{N}\sum_{i=1}^{N}\pi(\boldsymbol{\theta},\mathbf{x}_{i})\prod_{j\neq i}q(\mathbf{x}_{j}),(5)which admits π(𝜽)𝜋𝜽\pi(\boldsymbol{\theta}) as a marginal.In the original pseudo-marginal method, the extended-target is sampled from using MCMC, with an independent proposal for 𝐱𝐱\mathbf{x} (corresponding to importance sampling for these variables) and a standard MCMC proposal (e.g., random-walk) used for 𝜽𝜽\boldsymbol{\theta}.
|
| 24 |
+
|
| 25 |
+
There are two key differences between pseudo-marginal MCMC and pseudo-extended MCMC. Firstly, we do not distinguish between latent variables and parameters, and simply view all unknown variables, or parameters, of interest as being part of 𝐱𝐱\mathbf{x}. Secondly, we do not use an importance-sampling-based proposal to sample 𝐱𝐱\mathbf{x}, but instead, we propose to simulate directly from the pseudo-extended target eq. (2) using HMC as explained in Section 2.1. An important consequence of this is that we can use instrumental distributions q(⋅)𝑞⋅q(\cdot) without needing to sample from them. In Section 3 we exploit this fact to construct the instrumental distribution by tempering.
|
| 26 |
+
|
| 27 |
+
In summary, the pseudo-marginal framework is a powerful technique for sampling from models with intractable likelihoods. The pseudo-extended method, on the other hand, is designed for sampling from complex target distributions, where the landscape of the target is difficult for standard MCMC samplers to traverse without an exhaustive number of MCMC iterations. In particular, where the target distribution is multi-modal, we show that extending the state-space allows our MCMC sampler to more easily explore the modes of the target.
|
| 28 |
+
|
| 29 |
+
In the case of importance sampling, we would choose an instrumental distribution q(⋅)𝑞⋅q(\cdot) which closely approximates the target π(⋅)𝜋⋅\pi(\cdot). However, this would assume that we could find a tractable instrumental distribution for q(⋅)𝑞⋅q(\cdot) which i) sufficiently covers the support of the target and ii) captures its multi-modality. Approximations, such as the Laplace approximation (Rue et al.,, 2009) and variational methods (e.g., Bishop, (2006), Chapter 10) could be used to choose q(⋅)𝑞⋅q(\cdot), however, such approximations tend to be unimodal and not appropriate for approximating a multi-modal target.
|
| 30 |
+
|
| 31 |
+
A significant advantage of the pseudo-extended framework eq. (2) is that it permits a wide range of potential instrumental distributions. Unlike standard importance sampling, we also do not require q(⋅)𝑞⋅q(\cdot) to be a distribution that we can sample from, only that it can be evaluated point-wise up to proportionality. This is a simpler condition to satisfy and allows us to find better instrumental distributions for connecting the modes of the target. In this paper, we utilize a simple approach for choosing the instrumental distribution which does not require a closed-form approximation of the target. Specifically, we create an instrumental distribution by tempering the target.
|
| 32 |
+
|
| 33 |
+
Tempering has previously been utilized in the MCMC literature to improve the sampling of multi-modal targets. Here we use a technique inspired by Graham and Storkey, (2017) (see Section 3), where we consider the family of approximating distributions,Π:={πβ(𝐱)=γβ(𝐱)Z(β):β∈(0,1]},assignΠconditional-setsubscript𝜋𝛽𝐱subscript𝛾𝛽𝐱𝑍𝛽𝛽01\displaystyle\Pi:=\left\{\pi_{\beta}(\mathbf{x})=\frac{\gamma_{\beta}(\mathbf{x})}{Z(\beta)}:\beta\in(0,1]\right\},(6)where γβ(𝐱)=exp{−βϕ(𝐱)}subscript𝛾𝛽𝐱𝛽italic-ϕ𝐱\gamma_{\beta}(\mathbf{x})=\exp\{-\beta\phi(\mathbf{x})\} can be evaluated point-wise and Z(β)𝑍𝛽Z(\beta) is typically intractable.
|
| 34 |
+
|
| 35 |
+
We will construct an extended target distribution πN(𝐱1:N,β1:N)superscript𝜋𝑁subscript𝐱:1𝑁subscript𝛽:1𝑁\pi^{N}(\mathbf{x}_{1:N},\beta_{1:N}) on 𝒳N×(0,1]Nsuperscript𝒳𝑁superscript01𝑁\mathcal{X}^{N}\times(0,1]^{N} with N𝑁N pairs (𝐱i,βi)subscript𝐱𝑖subscript𝛽𝑖(\mathbf{x}_{i},\beta_{i}), for i=1,…,N𝑖1…𝑁i=1,\,\dots,\,N. This target distribution will be constructed in such a way that the marginal distribution of each 𝐱isubscript𝐱𝑖\mathbf{x}_{i} is a mixture, with components selected from ΠΠ\Pi. This will typically make the marginal distribution more diffuse than the target π𝜋\pi itself, encouraging better mixing.
|
| 36 |
+
|
| 37 |
+
If we let q(𝐱,β)=πβ(𝐱)q(β)𝑞𝐱𝛽subscript𝜋𝛽𝐱𝑞𝛽q(\mathbf{x},\beta)=\pi_{\beta}(\mathbf{x})q(\beta) and choose q(β)=Z(β)g(β)C𝑞𝛽𝑍𝛽𝑔𝛽𝐶q(\beta)=\frac{Z(\beta)g(\beta)}{C}, where g(β)𝑔𝛽g(\beta) can be evaluated point-wise and C𝐶C is a normalizing constant, then we can cancel the intractable normalizing constants Z(β)𝑍𝛽Z(\beta),q(𝐱,β)=γβ(𝐱)g(β)C.𝑞𝐱𝛽subscript𝛾𝛽𝐱𝑔𝛽𝐶\displaystyle q(\mathbf{x},\beta)=\frac{\gamma_{\beta}(\mathbf{x})g(\beta)}{C}.(7)The joint instrumental q(𝐱,β)𝑞𝐱𝛽q(\mathbf{x},\beta) does not admit a closed-form expression and in general we cannot sample from it. However, we do not need to sample from it, as we instead use an MCMC algorithm on the extended-target which only requires that q(𝐱,β)𝑞𝐱𝛽q(\mathbf{x},\beta) can be evaluated point-wise, up to a constant of proportionality. Under the instrumental proposal eq. (7), the pseudo-extended target eq. (2) is nowπN(𝐱1:N,β1:N)superscript𝜋𝑁subscript𝐱:1𝑁subscript𝛽:1𝑁\displaystyle\pi^{N}(\mathbf{x}_{1:N},\beta_{1:N}):=1N∑i=1Nπ(𝐱i)π(βi)∏j≠iq(𝐱j,βj)assignabsent1𝑁superscriptsubscript𝑖1𝑁𝜋subscript𝐱𝑖𝜋subscript𝛽𝑖subscriptproduct𝑗𝑖𝑞subscript𝐱𝑗subscript𝛽𝑗\displaystyle:=\frac{1}{N}\sum_{i=1}^{N}\pi(\mathbf{x}_{i})\pi(\beta_{i})\prod_{j\neq i}q(\mathbf{x}_{j},\beta_{j})(8)=1ZCN−1{1N∑i=1Nγ(𝐱i)π(βi)γβi(𝐱i)g(βi)}∏j=1Nγβj(𝐱j)g(βj),absent1𝑍superscript𝐶𝑁11𝑁superscriptsubscript𝑖1𝑁𝛾subscript𝐱𝑖𝜋subscript𝛽𝑖subscript𝛾subscript𝛽𝑖subscript𝐱𝑖𝑔subscript𝛽𝑖superscriptsubscriptproduct𝑗1𝑁subscript𝛾subscript𝛽𝑗subscript𝐱𝑗𝑔subscript𝛽𝑗\displaystyle=\frac{1}{ZC^{N-1}}\left\{\frac{1}{N}\sum_{i=1}^{N}\frac{\gamma(\mathbf{x}_{i})\pi(\beta_{i})}{\gamma_{\beta_{i}}(\mathbf{x}_{i})g(\beta_{i})}\right\}\prod_{j=1}^{N}\gamma_{\beta_{j}}(\mathbf{x}_{j})g(\beta_{j}),
|
| 38 |
+
|
| 39 |
+
where π(β)𝜋𝛽\pi(\beta) is some arbitrary user-chosen target distribution for β𝛽\beta. Through our choice of q(𝐱,β)𝑞𝐱𝛽q(\mathbf{x},\beta), the normalizing constants for the target and instrumental distributions, Z𝑍Z and C𝐶C respectively are not dependent on 𝐱𝐱\mathbf{x} or β𝛽\beta and so cancel in the Metropolis-Hastings ratio.
|
| 40 |
+
|
| 41 |
+
Tempered MCMC is the most popular approach to sampling from multi-modal target distributions (see Jasra et al., (2007) for a full review). The main idea behind tempered MCMC is to sample from a sequence of tempered targets,πk(𝐱)∝exp{−βkϕ(𝐱)},k=1,…,K,formulae-sequenceproportional-tosubscript𝜋𝑘𝐱subscript𝛽𝑘italic-ϕ𝐱𝑘1…𝐾\pi_{k}(\mathbf{x})\propto\exp\left\{-\beta_{k}\phi(\mathbf{x})\right\},\quad\quad k=1,\ldots,K,where βksubscript𝛽𝑘\beta_{k} is a tuning parameter referred to as the temperature that is associated with πk(𝐱)subscript𝜋𝑘𝐱\pi_{k}(\mathbf{x}). A sequence of temperatures, commonly known as the ladder, is chosen a priori, where 0=β1<β2<…<βK=10subscript𝛽1subscript𝛽2…subscript𝛽𝐾10=\beta_{1}<\beta_{2}<\ldots<\beta_{K}=1. The intuition behind tempered MCMC is that when βksubscript𝛽𝑘\beta_{k} is small, the modes of the target are flattened out making it easier for the MCMC sampler to traverse through the regions of low density separating the modes. One of the most popular tempering algorithms is parallel tempering (PT) (Geyer,, 1991), where in parallel, K𝐾K separate MCMC algorithms are run with each sampling from one of the tempered targets πk(𝐱)subscript𝜋𝑘𝐱\pi_{k}(\mathbf{x}). Samples from neighboring Markov chains are exchanged (i.e. sample from chain k𝑘k exchanged with chain k−1𝑘1k-1 or k+1𝑘1k+1) using a Metropolis-Hastings step. These exchanges improve the convergence of the Markov chain to the target of interest π(𝐱)𝜋𝐱\pi(\mathbf{x}), however, information from low βksubscript𝛽𝑘\beta_{k} targets is often slow to traverse up the temperature ladder. There is also a serial version of this algorithm, known as simulated tempering (ST) (Marinari and Parisi,, 1992). An alternative approach is annealed importance sampling (AIS) (Neal,, 2001), which draws samples from a simple base distribution and then, via a sequence of intermediate transition densities, moves the samples along the temperature ladder giving a weighted sample from the target distribution. Generally speaking, these tempered approaches can be very difficult to apply in practice often requiring extensive tuning. In the case of PT, the user needs to choose the number of parallel chains K𝐾K, temperature schedule, step-size for each chain and the number of exchanges at each iteration.
|
| 42 |
+
|
| 43 |
+
Our proposed tempering scheme is closely related to the continuously-tempered HMC algorithm of Graham and Storkey, (2017). They propose to run HMC on a distribution similar to eq. (7) and then apply an importance weighting as a post-correction to account for the different temperatures. It thus has some resemblance with ST, in the sense that a single chain is used to explore the state space for different temperature levels. On the contrary, for our proposed pseudo-extended method, the distribution eq. (7) is not used as a target, but merely as an instrumental distribution to construct the pseudo-extended target eq. (8). The resulting method, therefore, has some resemblance with PT, since we propagate N𝑁N pseudo-samples in parallel, all possibly exploring different temperature levels. Furthermore, by mixing in part of the actual target π𝜋\pi we ensure that the samples do not simultaneously “drift away” from regions with high probability under π𝜋\pi.
|
| 44 |
+
|
| 45 |
+
Graham and Storkey, (2017) propose to use a variational approximation to the target, both when defining the family of distributions eq. (6) and for choosing the function g(β)𝑔𝛽g(\beta). This is also possible with the pseudo-extended method, but we do not consider this possibility here for brevity. Finally, we note that in the pseudo-extended method the temperature parameter β𝛽\beta can be estimated as part of the MCMC scheme, rather than pre-tuning it as a sequence of fixed temperatures. This is advantageous because using a coarse grid of temperatures can cause the sampler to miss modes of the target, whereas a fine grid of temperatures leads to a significantly increased computational cost of running the sampler.
|
| 46 |
+
|
| 47 |
+
We compare the pseudo-extended method on three test models. The first two (Sections 4.1 and 4.2) are chosen to show how the pseudo-extended method performs on simulated data when the target is multi-modal. The third example (Section 4.3) is a sparsity-inducing logistic regression model, where multi-modality occurs in the posterior from three real-world datasets. We compare against popular competing algorithms from the literature, including methods discussed in Section 3.
|
| 48 |
+
|
| 49 |
+
All simulations for the pseudo-extended method use the tempered instrumental distribution and thus the pseudo-extended target is given by eq. (8). For each simulation study, we set π(β)∝1proportional-to𝜋𝛽1\pi(\beta)\propto 1, g(β)∝1proportional-to𝑔𝛽1g(\beta)\propto 1 and use a logit transformation for β𝛽\beta to map the parameters onto the unconstrained space. Additionally, we consider the special case of pseudo-extended HMC where β𝛽\beta is fixed along a temperature ladder (akin to parallel tempering). The pseudo-extended HMC method is implemented within STAN 111https://github.com/chris-nemeth/pseudo-extended-mcmc-code
|
| 50 |
+
|
| 51 |
+
Background: We consider a popular example from the literature (Kou et al.,, 2006; Tak et al.,, 2016), where the target is a mixture of 20 bivariate Gaussians,π(𝐱)=∑j=120wj2πσj2exp{−12σj2(𝐱−𝝁j)⊤(𝐱−𝝁j)},𝜋𝐱superscriptsubscript𝑗120subscript𝑤𝑗2𝜋superscriptsubscript𝜎𝑗212superscriptsubscript𝜎𝑗2superscript𝐱subscript𝝁𝑗top𝐱subscript𝝁𝑗\pi(\mathbf{x})=\sum_{j=1}^{20}\frac{w_{j}}{2\pi\sigma_{j}^{2}}\exp\left\{\frac{-1}{2\sigma_{j}^{2}}(\mathbf{x}-\boldsymbol{\mu}_{j})^{\top}(\mathbf{x}-\boldsymbol{\mu}_{j})\right\},and where {𝝁1,𝝁2,…,𝝁20}subscript𝝁1subscript𝝁2…subscript𝝁20\{\boldsymbol{\mu}_{1},\boldsymbol{\mu}_{2},\ldots,\boldsymbol{\mu}_{20}\} are specified in Kou et al., (2006). We compare the pseudo-extended sampler against parallel tempering (PT) (Geyer,, 1991), repelling-attracting Metropolis (RAM) (Tak et al.,, 2016) and the equi-energy (EE) MCMC sampler (Kou et al.,, 2006), all of which are designed for sampling from multi-modal distributions.
|
| 52 |
+
|
| 53 |
+
Setup: We consider two simulation settings. In Scenario (a) each mixture component has weight wj=1/20subscript𝑤𝑗120w_{j}=1/20 and variance σj2=1/100subscriptsuperscript𝜎2𝑗1100\sigma^{2}_{j}=1/100 resulting in well-separated modes with most modes more than 15 standard deviations apart. In Scenario (b) the weights wj=1/‖𝝁j−(5,5)⊤‖subscript𝑤𝑗1normsubscript𝝁𝑗superscript55topw_{j}=1/||\boldsymbol{\mu}_{j}-(5,5)^{\top}|| and variances σj2=‖𝝁j−(5,5)⊤‖/20subscriptsuperscript𝜎2𝑗normsubscript𝝁𝑗superscript55top20\sigma^{2}_{j}=||\boldsymbol{\mu}_{j}-(5,5)^{\top}||/20 are unequal where the modes far from (5,5) have a lower weight with larger variance, creating regions of higher density between distant modes (see Figure 2 with further discussion in the Supplementary Material).
|
| 54 |
+
|
| 55 |
+
Results: Table 1 gives the root mean squared error (RMSE) of the Monte Carlo estimates, over 20 independent simulations, for the first and second moments. Each sampler was run for 50,000 iterations (after burn-in) and the specific tuning details for the temperature ladder of PT and the energy rings for EE are given in Kou et al., (2006). All the samplers perform worse under Scenario (a) where the modes are well-separated, the HMC sampler is only able to explore the modes locally clustered together, whereas the pseudo-extended HMC sampler is able to explore all of the modes with the same number of iterations (see Section C of the Supplementary Material for posterior plots). Under Scenario (b), there is a higher density region separating the modes making it easier for the HMC sampler to move between the mixture components. While not reported here, the HMC samplers produce Markov chains with significantly reduced auto-correlation compared to the EE and RAM samplers, which both rely on random-walk updates. We note from Table 1 that increasing the number of pseudo-samples leads to improved estimates, but at an increased computational cost. In the Supplementary Material we show that when taking account for computational cost, the optimal number of pseudo-samples is 2≤N≤52𝑁52\leq N\leq 5. Additionally, we can fix rather than estimate β𝛽\beta and Table 2 in the Supplementary Material shows that this can lead to a small improvement in RMSE if β𝛽\beta is correctly tuned, but can also (and often does) lead to poorer RMSE if β𝛽\beta is not well tuned. The conclusion therefore is that it is better to jointly estimate πN(𝐱1:N,β1:N)superscript𝜋𝑁subscript𝐱:1𝑁subscript𝛽:1𝑁\pi^{N}(\mathbf{x}_{1:N},\beta_{1:N}) in the absence of a priori knowledge of an optimal β𝛽\beta.
|
| 56 |
+
|
| 57 |
+
Background: Sampling from a Boltzmann machine distribution (Jordan et al.,, 1999) is a challenging inference problem from the statistical physics literature. The probability mass function,P(𝐬)=1Zbexp{12𝐬⊤𝐖𝐬+𝐬⊤𝐛},withZb=∑𝐬∈𝒮exp{12𝐬⊤𝐖𝐬+𝐬⊤𝐛},formulae-sequence𝑃𝐬1subscript𝑍𝑏12superscript𝐬top𝐖𝐬superscript𝐬top𝐛withsubscript𝑍𝑏subscript𝐬𝒮12superscript𝐬top𝐖𝐬superscript𝐬top𝐛\displaystyle P(\mathbf{s})=\frac{1}{Z_{b}}\exp\left\{\frac{1}{2}\mathbf{s}^{\top}\mathbf{W}\mathbf{s}+\mathbf{s}^{\top}\mathbf{b}\right\},\quad\mbox{with}\quad Z_{b}=\sum_{\mathbf{s}\in\mathcal{S}}\exp\left\{\frac{1}{2}\mathbf{s}^{\top}\mathbf{W}\mathbf{s}+\mathbf{s}^{\top}\mathbf{b}\right\},(9)is defined on the binary space 𝐬∈{−1,1}db:=𝒮𝐬superscript11subscript𝑑𝑏assign𝒮\mathbf{s}\in\{-1,1\}^{d_{b}}:=\mathcal{S}, where 𝐖𝐖\mathbf{W} is a db×dbsubscript𝑑𝑏subscript𝑑𝑏d_{b}\times d_{b} real symmetric matrix and 𝐛∈ℝdb𝐛superscriptℝsubscript𝑑𝑏\mathbf{b}\in\mathbb{R}^{d_{b}} are the model parameters. Sampling from this distribution typically requires Gibbs steps (Geman and Geman,, 1984) which tend to mix very poorly as the states can be strongly correlated when the Boltzmann machine has high levels of connectivity (Salakhutdinov,, 2010). HMC methods have been shown to perform significantly better than Gibbs sampling when the states of the target distribution are highly correlated (Girolami and Calderhead,, 2011). Unfortunately, HMC is generally restricted to sampling on continuous spaces. Using the Gaussian integral trick (Hertz et al.,, 1991), we introduce auxiliary variables 𝐱∈ℝd𝐱superscriptℝ𝑑\mathbf{x}\in\mathbb{R}^{d} and transform the problem to sampling from π(𝐱)𝜋𝐱\pi(\mathbf{x}) rather than eq. (9) (see Section D in the Supplementary Material for full details).
|
| 58 |
+
|
| 59 |
+
Setup: We let 𝐛∼𝒩(0,0.12)similar-to𝐛𝒩0superscript0.12\mathbf{b}\sim\mathcal{N}(0,0.1^{2}) and set 𝐖=𝐑diag(𝐞)𝐑⊤𝐖𝐑diag𝐞superscript𝐑top\mathbf{W}=\mathbf{R}\mbox{diag}(\mathbf{e})\mathbf{R}^{\top}, with diagonal elements set to zero, and simulate a db×dbsubscript𝑑𝑏subscript𝑑𝑏d_{b}\times d_{b} random orthogonal matrix for 𝐑𝐑\mathbf{R} (Stewart,, 1980). 𝐞𝐞\mathbf{e} is a vector of eigenvalues, with ei=λ1tanh(λ2ηi)subscript𝑒𝑖subscript𝜆1subscript𝜆2subscript𝜂𝑖e_{i}=\lambda_{1}\tanh(\lambda_{2}\eta_{i}) and ηi∼𝒩(0,1)similar-tosubscript𝜂𝑖𝒩01\eta_{i}\sim\mathcal{N}(0,1), for i=1,2,…,db𝑖12…subscript𝑑𝑏i=1,2,\ldots,d_{b}. We set db=28subscript𝑑𝑏28d_{b}=28 (d=27𝑑27d=27) and let (λ1,λ2)=(6,2)subscript𝜆1subscript𝜆262(\lambda_{1},\lambda_{2})=(6,2), as these settings have been shown to produce highly multi-modal distributions (see Figure 3 for an example). We compare the HMC and pseudo-extended (PE) HMC algorithms against annealed importance sampling (AIS), simulated tempering (ST), and the continuously-tempered HMC algorithm of Graham and Storkey, (2017) (GS). Full set-up details are given in the Supplementary Material.
|
| 60 |
+
|
| 61 |
+
Results: We can analytically derive the first two moments of the Boltzmann distribution (see Section D of the Supplementary Material for details), and in Figure 4 we give the RMSE of the moment approximations taken over 10 independent runs. These results support the conclusion that better exploration of the target space leads to improved estimation of integrals of interest. Additionally, we note that fixing β𝛽\beta can produce lower RMSE for PE as we reduce the number of parameters that need to be estimated. However, fixing β𝛽\beta poorly (e.g. β=0.1𝛽0.1\beta=0.1 in this case) can lead to an increase in RMSE, whereas estimating β𝛽\beta as part of the inference procedure gives a balanced RMSE result. Further simulations are given in the Supplementary Material which includes plots of posterior samples and the effect of varying the number of pseudo-samples. When taking into account the computational cost, the RMSE is minimized when 2≤N≤52𝑁52\leq N\leq 5, which corroborates with the conclusion from the mixture of Gaussians example (Section 4.1).
|
| 62 |
+
|
| 63 |
+
Background: We apply the pseudo-extended approach to the problem of sparse Bayesian inference. This is a common problem in statistics and machine learning, where the number of parameters to be estimated is much larger than the data used to fit the model. Taking a Bayesian approach, we can use shrinkage priors to shrink model parameters to zero and prevent the model from over-fitting to the data. There are a range of shrinkage priors presented in the literature (Griffin and Brown,, 2013) and here we use the horseshoe prior (Carvalho et al.,, 2010), in particular, the regularized horseshoe as proposed by Piironen and Vehtari, (2017). From a sampling perspective, sparse Bayesian inference can be challenging as the posterior distributions are naturally multi-modal, where there is a spike at zero (indicating that variable is inactive) and some posterior mass centered away from zero.
|
| 64 |
+
|
| 65 |
+
Setup and results: Following Piironen and Vehtari, (2017), we apply the regularized horseshoe prior on a logistic regression model (see Section E of the Supplementary Material for full details). We apply this model to three real-world data sets using micro-array data for cancer classification (prostate data results are given in Section E of the Supplementary Material, see Piironen and Vehtari, (2017) for further details regarding the data). We compare the pseudo-extended HMC algorithm against standard HMC and give the log-predictive density on a held-out test dataset in Figure 5. In order to ensure a fair comparison between HMC and pseudo-extended HMC, we run HMC for 10,000 iterations and reduce the number of iterations of the pseudo-extended algorithms (with N=2𝑁2N=2 and N=5𝑁5N=5) to give equal total computational cost. The results show that there is an improvement in using the pseudo-extended method, but with a strong performance from standard HMC, which is not surprising in this setting as the posterior density plots (given in the Supplementary Material) show that the posterior modes are close together. As seen in Scenario (b) of Section 4.1, the HMC sampler can usually locate and traverse between modes that are close together. The RMSE for the pseudo-extended method can be improved using a fixed β𝛽\beta, but as noted in the previous examples, β𝛽\beta is not known a priori and fixing it incorrectly can lead to poorer results.
|
| 66 |
+
|
| 67 |
+
We have introduced the pseudo-extended method as a simple approach for augmenting the target distribution for MCMC sampling. We have shown that the pseudo-extended method can be applied within any general MCMC framework to sample from multi-modal distributions, a challenging scenario for standard MCMC algorithms, and does not require prior knowledge of where, or how many, modes there are in the target. We have shown that a natural instrumental distribution for q(⋅)𝑞⋅q(\cdot) is a tempered version of the target, which has the added benefit of automating the choice of instrumental distribution. Alternative instrumental distributions, and methods for estimating the temperature parameter β𝛽\beta, are worthy of further investigation. For example, mixture proposals qisubscript𝑞𝑖q_{i} where each pseudo-variable is associated with a different proposal. Alternatively, the proposal could be stratified to encourage each of the pseudo-samples for the temperature parameters β1:Nsubscript𝛽:1𝑁\beta_{1:N} to explore different regions of the parameter space. This could be achieved through the choice of the function g(⋅)𝑔⋅g(\cdot) (7). If we let g(β1:N)𝑔subscript𝛽:1𝑁g(\beta_{1:N}) be a Gaussian distribution, then a valid N×N𝑁𝑁N\times N covariance matrix ΣΣ\Sigma could be chosen by letting Σii=1subscriptΣ𝑖𝑖1\Sigma_{ii}=1 and Σij=−(N−1)−1subscriptΣ𝑖𝑗superscript𝑁11\Sigma_{ij}=-(N-1)^{-1}, which would induce negative correlation between the pseudo-samples and force the temperatures to be roughly evenly spaced.
|
1708.06510v2.txt
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Neural machine translation (NMT; Sutskever et al. (2014); Bahdanau et al. (2015), §2), a method for MT that performs translation in an end-to-end fashion using neural networks, is quickly becoming the de-facto standard in MT applications due to its impressive empirical results.One of the drivers behind these results is the ability of NMT to capture long-distance context using recurrent neural networks in both the encoder, which takes the input and turns it into a continuous-space representation, and the decoder, which tracks the target-sentence state, deciding which word to output next.As a result of this ability to capture long-distance dependencies, NMT has achieved great improvements in a number of areas that have bedeviled traditional methods such as phrase-based MT (PBMT; Koehn et al. (2003)), including agreement and long-distance syntactic dependencies Neubig et al. (2015); Bentivogli et al. (2016).
|
| 2 |
+
|
| 3 |
+
One other phenomenon that was poorly handled by PBMT was homographs – words that have the same surface form but multiple senses.As a result, PBMT systems required specific separate modules to incorporate long-term context, performing word-sense Carpuat and Wu (2007b); Pu et al. (2017) or phrase-sense Carpuat and Wu (2007a) disambiguation to improve their handling of these phenomena.Thus, we may wonder: do NMT systems suffer from the same problems when translating homographs? Or are the recurrent nets applied in the encoding step, and the strong language model in the decoding step enough to alleviate all problems of word sense ambiguity?
|
| 4 |
+
|
| 5 |
+
In §3 we first attempt to answer this question quantitatively by examining the word translation accuracy of a baseline NMT system as a function of the number of senses that each word has.Results demonstrate that standard NMT systems make a significant number of errors on homographs, a few of which are shown in Fig. 1.
|
| 6 |
+
|
| 7 |
+
With this result in hand, we propose a method for more directly capturing contextual information that may help disambiguate difficult-to-translate homographs.Specifically, we learn from neural models for word sense disambiguation Kalchbrenner et al. (2014); Iyyer et al. (2015); Kågebäck and Salomonsson (2016); Yuan et al. (2016); Šuster et al. (2016), examining three methods inspired by this literature (§4).In order to incorporate this information into NMT, we examine two methods: gating the word-embeddings in the model (similarly to Choi et al. (2017)), and concatenating the context-aware representation to the word embedding (§5).
|
| 8 |
+
|
| 9 |
+
To evaluate the effectiveness of our method, wecompare our context-aware models with a strong baseline Luong et al. (2015) on the English-German, English-French, and English-Chinese WMT dataset.We show that our proposed model outperforms the baseline in the overall BLEU score across three different language pairs. Quantitative analysis demonstrates that our model performs better on translating homographs. Lastly, we show sample translations of the baseline system and our proposed model.
|
| 10 |
+
|
| 11 |
+
We follow the global-general-attention NMT architecture with input-feeding proposed by Luong et al. (2015), which we will briefly summarize here. The neural network models the conditional distribution over translations Y=(y1,y2,…,ym)𝑌subscript𝑦1subscript𝑦2…subscript𝑦𝑚Y=(y_{1},y_{2},\dots,y_{m}) given a sentence in source language X=(x1,x2,…xn)𝑋subscript𝑥1subscript𝑥2…subscript𝑥𝑛X=(x_{1},x_{2},\dots x_{n}) as P(Y|X)𝑃conditional𝑌𝑋P(Y|X). A NMT system consists of an encoder that summarizes the source sentence X𝑋X as a vector representation 𝒉𝒉\boldsymbol{h}, and a decoder that generates a target word at each time step conditioned on both 𝒉𝒉\boldsymbol{h} and previous words. The conditional distribution is optimized with cross-entropy loss at each decoder output.
|
| 12 |
+
|
| 13 |
+
The encoder is usually a uni-directional or bi-directional RNN that reads the input sentence word by word. In the more standard bi-directional case, before being read by the RNN unit, each word in X𝑋X is mapped to an embedding in continuous vector space by a function fesubscript𝑓𝑒f_{e}.fe(xt)=𝑴𝒆⊤⋅𝟏(xt)subscript𝑓𝑒subscript𝑥𝑡⋅superscriptsubscript𝑴𝒆top1subscript𝑥𝑡\displaystyle f_{e}(x_{t})=\boldsymbol{M_{e}}^{\top}\cdot\boldsymbol{1}(x_{t})(1)𝑴𝒆∈ℛ|Vs|×dsubscript𝑴𝒆superscriptℛsubscript𝑉𝑠𝑑\boldsymbol{M_{e}}\in\mathcal{R}^{|V_{s}|\times d} is a matrix that maps a one-hot representation of xtsubscript𝑥𝑡x_{t}, 𝟏(xt)1subscript𝑥𝑡\boldsymbol{1}(x_{t}) to a d𝑑d-dimensional vector space, and Vssubscript𝑉𝑠V_{s} is the source vocabulary. We call the word embedding computed this way Lookup embedding.The word embeddings are then read by a bi-directional RNN𝒉→t=RNN→e(𝒉→t−1,fe(xt))subscript→𝒉𝑡subscript→RNN𝑒subscript→𝒉𝑡1subscript𝑓𝑒subscript𝑥𝑡\displaystyle\overrightarrow{\boldsymbol{h}}_{t}=\overrightarrow{\text{RNN}}_{e}(\overrightarrow{\boldsymbol{h}}_{t-1},f_{e}(x_{t}))(2)𝒉←t=RNN←e(𝒉←t+1,fe(xt))subscript←𝒉𝑡subscript←RNN𝑒subscript←𝒉𝑡1subscript𝑓𝑒subscript𝑥𝑡\displaystyle\overleftarrow{\boldsymbol{h}}_{t}=\overleftarrow{\text{RNN}}_{e}(\overleftarrow{\boldsymbol{h}}_{t+1},f_{e}(x_{t}))(3)After being read by both RNNs we can compute the actual hidden state at step t𝑡t, 𝒉t=[𝒉→t;𝒉←t]subscript𝒉𝑡subscript→𝒉𝑡subscript←𝒉𝑡\boldsymbol{h}_{t}=[\overrightarrow{\boldsymbol{h}}_{t};\overleftarrow{\boldsymbol{h}}_{t}], and the encoder summarized representation 𝒉=𝒉n𝒉subscript𝒉𝑛\boldsymbol{h}=\boldsymbol{h}_{n}. The recurrent units RNN→esubscript→RNN𝑒\overrightarrow{\text{RNN}}_{e} and RNN←esubscript←RNN𝑒\overleftarrow{\text{RNN}}_{e} are usually either LSTMs Hochreiter and Schmidhuber (1997) or GRUs Chung et al. (2014).
|
| 14 |
+
|
| 15 |
+
The decoder is a uni-directional RNN that decodes the t𝑡tth target word conditioned on (1) previous decoder hidden state 𝒈t−1subscript𝒈𝑡1\boldsymbol{g}_{t-1}, (2) previous word yt−1subscript𝑦𝑡1y_{t-1} , and (3) the weighted sum of encoder hidden states 𝒂tsubscript𝒂𝑡\boldsymbol{a}_{t}. The decoder maintains the t𝑡tth hidden state gtsubscript𝑔𝑡g_{t} as follows,𝒈t=RNN→d(𝒈t−1,fd(yt−1),𝒂t)subscript𝒈𝑡subscript→RNN𝑑subscript𝒈𝑡1subscript𝑓𝑑subscript𝑦𝑡1subscript𝒂𝑡\displaystyle\boldsymbol{g}_{t}=\overrightarrow{\text{RNN}}_{d}(\boldsymbol{g}_{t-1},f_{d}(y_{t-1}),\boldsymbol{a}_{t})(4)Again, RNN→dsubscript→RNN𝑑\overrightarrow{\text{RNN}}_{d} is either LSTM or GRU, and fdsubscript𝑓𝑑f_{d} is a mapping function in target language space.
|
| 16 |
+
|
| 17 |
+
The general attention mechanism for computing the weighted encoder hidden states 𝒂tsubscript𝒂𝑡\boldsymbol{a}_{t} first computes the similarity between 𝒈t−1subscript𝒈𝑡1\boldsymbol{g}_{t-1} and 𝒉t′subscript𝒉superscript𝑡′\boldsymbol{h}_{t^{\prime}} for t′=1,2,…,nsuperscript𝑡′12…𝑛t^{\prime}=1,2,\dots,n.score(𝒈t−1,𝒉t′)=𝒈t−1𝑾att𝒉t′⊤scoresubscript𝒈𝑡1subscript𝒉superscript𝑡′subscript𝒈𝑡1subscript𝑾𝑎𝑡𝑡subscriptsuperscript𝒉topsuperscript𝑡′\displaystyle\text{score}(\boldsymbol{g}_{t-1},\boldsymbol{h}_{t^{\prime}})=\boldsymbol{g}_{t-1}\boldsymbol{W}_{att}\boldsymbol{h}^{\top}_{t^{\prime}}(5)The similarities are then normalized through a softmax layer , which results in the weights for encoder hidden states.αt,t′=exp(score(𝒈t−1,𝒉t′))∑k=1nexp(score(𝒈t−1,𝒉k))subscript𝛼𝑡superscript𝑡′scoresubscript𝒈𝑡1subscript𝒉superscript𝑡′superscriptsubscript𝑘1𝑛scoresubscript𝒈𝑡1subscript𝒉𝑘\displaystyle\alpha_{t,t^{\prime}}=\frac{\exp(\text{score}(\boldsymbol{g}_{t-1},\boldsymbol{h}_{t^{\prime}}))}{\sum_{k=1}^{n}\exp(\text{score}(\boldsymbol{g}_{t-1},\boldsymbol{h}_{k}))}(6)We can then compute 𝒂tsubscript𝒂𝑡\boldsymbol{a}_{t} as follows,𝒂t=∑k=1nαt,k𝒉ksubscript𝒂𝑡superscriptsubscript𝑘1𝑛subscript𝛼𝑡𝑘subscript𝒉𝑘\displaystyle\boldsymbol{a}_{t}=\sum_{k=1}^{n}\alpha_{t,k}\boldsymbol{h}_{k}(7)Finally, we compute the distribution over ytsubscript𝑦𝑡y_{t} as,𝒈^t=tanh(𝑾1[𝒈t;𝒂t])subscript^𝒈𝑡tanhsubscript𝑾1subscript𝒈𝑡subscript𝒂𝑡\displaystyle\hat{\boldsymbol{g}}_{t}=\text{tanh}(\boldsymbol{W}_{1}[\boldsymbol{g}_{t};\boldsymbol{a}_{t}])(8)p(yt|y<t,X)=softmax(𝑾2𝒈^t)𝑝conditionalsubscript𝑦𝑡subscript𝑦absent𝑡𝑋softmaxsubscript𝑾2subscript^𝒈𝑡\displaystyle p(y_{t}|y_{<t},X)=\text{softmax}(\boldsymbol{W}_{2}\hat{\boldsymbol{g}}_{t})(9)
|
| 18 |
+
|
| 19 |
+
As described in Eqs. (2) and (3), NMT models encode the words using recurrent encoders, theoretically endowing them with the ability to handle homographs through global sentential context.However, despite the fact that they have this ability, our qualitative observation of NMT results revealed a significant number of ambiguous words being translated incorrectly, casting doubt on whether the standard NMT setup is able to appropriately learn parameters that disambiguate these word choices.
|
| 20 |
+
|
| 21 |
+
To demonstrate this more concretely, in Fig. 2 we show the translation accuracy of an NMT system with respect to words of varying levels of ambiguity.Specifically, we use the best baseline NMT system to translate three different language pairs from WMT test set (detailed in §6) and plot the F1-score of word translations by the number of senses that they have.The number of senses for a word is acquired from the Cambridge English dictionary,222http://dictionary.cambridge.org/us/dictionary/english/ after excluding stop words.333We use the stop word list from NLTK Bird et al. (2009).
|
| 22 |
+
|
| 23 |
+
We evaluate the translation performance of words in the source side by aligning them to the target side using fast-align Dyer et al. (2013).The aligner outputs a set of target words to which the source words aligns for both the reference translation and the model translations. F1 score is calculated between the two sets of words.
|
| 24 |
+
|
| 25 |
+
After acquiring the F1 score for each word, we bucket the F1 scores by the number of senses, and plot the average score of four consecutive buckets as shown in Fig. 2. As we can see from the results, the F1 score for words decreases as the number of senses increases for three different language pairs. This demonstrates that the translation performance of current NMT systems on words with more senses is significantly decreased from that for words with fewer senses.From this result, it is evident that modern NMT architectures are not enough to resolve the problem of homographs on their own.The result corresponds to the findings in prior work Rios et al. (2017).
|
| 26 |
+
|
| 27 |
+
Word sense disambiguation (WSD) is the task of resolving the ambiguity of homographs Ng and Lee (1996); Mihalcea and Faruque (2004); Zhong and Ng (2010); Di Marco and Navigli (2013); Chen et al. (2014); Camacho-Collados et al. (2015), and we hypothesize that by learning from these models we can improve the ability of the NMT model to choose the correct translation for these ambiguous words.Recent research tackles this problem with neural models and has shown state-of-the art results on WSD datasets Kågebäck and Salomonsson (2016); Yuan et al. (2016). In this section, we will summarize three methods for WSD which we will further utilize as three different context networks to improve NMT.
|
| 28 |
+
|
| 29 |
+
Kalchbrenner et al. (2014); Iyyer et al. (2015) have shown success by representing full sentences with a context vector, which is the average of the Lookup embeddings of the input sequence𝒄t=1n∑k=1n𝑴c⊤𝟏(xk)subscript𝒄𝑡1𝑛superscriptsubscript𝑘1𝑛superscriptsubscript𝑴𝑐top1subscript𝑥𝑘\displaystyle\boldsymbol{c}_{t}=\frac{1}{n}\sum_{k=1}^{n}\boldsymbol{M}_{c}^{\top}\boldsymbol{1}(x_{k})(10)This is a simple way to model sentences, but has the potential to capture the global topic of the sentence in a straightforward and coherent way. However, in this case, the context vector would be the same for every word in the input sequence.
|
| 30 |
+
|
| 31 |
+
Kågebäck and Salomonsson (2016) leveraged a bi-directional LSTM that learns a context vector for the target word in the input sequence and predicts the word sense with a multi-layer perceptron. Specifically, we can compute the context vector ctsubscript𝑐𝑡c_{t} for t𝑡tth word similarly to bi-directional encoder as follows,𝒄→t=RNN→c(𝒄→t−1,fc(xt))subscript→𝒄𝑡subscript→RNN𝑐subscript→𝒄𝑡1subscript𝑓𝑐subscript𝑥𝑡\displaystyle\overrightarrow{\boldsymbol{c}}_{t}=\overrightarrow{\text{RNN}}_{c}(\overrightarrow{\boldsymbol{c}}_{t-1},f_{c}(x_{t}))(11)𝒄←t=RNN←c(𝒄←t+1,fc(xt))subscript←𝒄𝑡subscript←RNN𝑐subscript←𝒄𝑡1subscript𝑓𝑐subscript𝑥𝑡\displaystyle\overleftarrow{\boldsymbol{c}}_{t}=\overleftarrow{\text{RNN}}_{c}(\overleftarrow{\boldsymbol{c}}_{t+1},f_{c}(x_{t}))(12)𝒄t=[𝒄→t;𝒄←t]subscript𝒄𝑡subscript→𝒄𝑡subscript←𝒄𝑡\displaystyle\boldsymbol{c}_{t}=[\overrightarrow{\boldsymbol{c}}_{t};\overleftarrow{\boldsymbol{c}}_{t}](13)
|
| 32 |
+
|
| 33 |
+
RNN→csubscript→RNN𝑐\overrightarrow{\text{RNN}}_{c}, RNN←csubscript←RNN𝑐\overleftarrow{\text{RNN}}_{c} are forward and backward LSTMs repectively, and fc(xt)=𝑴c⊤𝟏(xt)subscript𝑓𝑐subscript𝑥𝑡superscriptsubscript𝑴𝑐top1subscript𝑥𝑡f_{c}(x_{t})=\boldsymbol{M}_{c}^{\top}\boldsymbol{1}(x_{t}) is a function that maps a word to continous embedding space.
|
| 34 |
+
|
| 35 |
+
Yuan et al. (2016) trained a LSTM language model, which predicts a held-out word given the surrounding context, with a large amount of unlabeled text as training data. Given the context vector from this language model, they predict the word sense with a WSD classifier. Specifically, we can compute the context vector ctsubscript𝑐𝑡c_{t} for t𝑡tth word by first replacing t𝑡tth word with a special symbol (e.g. <<$>>). We then feed the replaced sequence to a uni-directional LSTM:
|
| 36 |
+
|
| 37 |
+
𝒄~i=RNN→c(𝒄~i−1,fc(xi))subscript~𝒄𝑖subscript→RNN𝑐subscript~𝒄𝑖1subscript𝑓𝑐subscript𝑥𝑖\displaystyle\tilde{\boldsymbol{c}}_{i}=\overrightarrow{\text{RNN}}_{c}(\tilde{\boldsymbol{c}}_{i-1},f_{c}(x_{i}))(14)Finally, we can get context vector for the t𝑡tth word𝒄t=𝒄~nsubscript𝒄𝑡subscript~𝒄𝑛\displaystyle\boldsymbol{c}_{t}=\tilde{\boldsymbol{c}}_{n}(15)RNN→csubscript→RNN𝑐\overrightarrow{\text{RNN}}_{c} and fcsubscript𝑓𝑐f_{c} are defined in BiLSTM paragraph, and n𝑛n is the length of the sequence. Despite the fact that the context vector is always the last hidden state of the LSTM no matter which word we are targeting, the input sequence read by the HoLSTM is actually different every time.
|
| 38 |
+
|
| 39 |
+
Now that we have several methods to incorporate global context regarding a single word, it is necessary to incorporate this context with NMT.Specifically, we propose two methods to either Gate or Concatenate a context vector 𝒄tsubscript𝒄𝑡\boldsymbol{c}_{t} with the Lookup embedding 𝑴e⊤⋅𝟏(xt)⋅superscriptsubscript𝑴𝑒top1subscript𝑥𝑡\boldsymbol{M}_{e}^{\top}\cdot\boldsymbol{1}(x_{t}) to form a context-aware word embedding before feeding it into the encoder as shown in Fig. 3. The detail of these methods is described below.
|
| 40 |
+
|
| 41 |
+
Inspired by Choi et al. (2017), as our first method for integration of context-aware word embeddings, we use a gating function as follows:fe′(xt)subscriptsuperscript𝑓′𝑒subscript𝑥𝑡\displaystyle f^{\prime}_{e}(x_{t})=fe(xt)⊙σ(𝒄t)absentdirect-productsubscript𝑓𝑒subscript𝑥𝑡𝜎subscript𝒄𝑡\displaystyle=f_{e}(x_{t})\odot\sigma(\boldsymbol{c}_{t})(16)=𝑴e⊤𝟏(xt)⊙σ(𝒄t)absentdirect-productsuperscriptsubscript𝑴𝑒top1subscript𝑥𝑡𝜎subscript𝒄𝑡\displaystyle=\boldsymbol{M}_{e}^{\top}\boldsymbol{1}(x_{t})\odot\sigma(\boldsymbol{c}_{t})(17)The symbol ⊙direct-product\odot represents element-wise multiplication, and σ𝜎\sigma is element-wise sigmoid function.Choi et al. (2017) use this method in concert with averaged embeddings from words in source language like the NBOW model above, which naturally uses the same context vectors for all time steps.In this paper, we additionally test this function with context vectors calculated using the BiLSTM and HoLSTM .
|
| 42 |
+
|
| 43 |
+
We also propose another way for incorporating context: by concatenating the context vector with the word embeddings.This is expressed as below:fe′(xt)subscriptsuperscript𝑓′𝑒subscript𝑥𝑡\displaystyle f^{\prime}_{e}(x_{t})=𝑾3[fe(xt);𝒄t]absentsubscript𝑾3subscript𝑓𝑒subscript𝑥𝑡subscript𝒄𝑡\displaystyle=\boldsymbol{W}_{3}[f_{e}(x_{t});\boldsymbol{c}_{t}](18)=𝑾3[𝑴e⊤𝟏(xt);𝒄t]absentsubscript𝑾3superscriptsubscript𝑴𝑒top1subscript𝑥𝑡subscript𝒄𝑡\displaystyle=\boldsymbol{W}_{3}[\boldsymbol{M}_{e}^{\top}\boldsymbol{1}(x_{t});\boldsymbol{c}_{t}](19)𝑾3subscript𝑾3\boldsymbol{W}_{3} is used to project the concatenated vector back to the original d𝑑d-dimensional space.
|
| 44 |
+
|
| 45 |
+
For each method can compute context vector 𝒄tsubscript𝒄𝑡\boldsymbol{c}_{t} with either the NBOW, BiLSTM, or HoLSTM described in §4. We share the parameters in fesubscript𝑓𝑒f_{e} with fcsubscript𝑓𝑐f_{c} (i.e. 𝑴e=𝑴csubscript𝑴𝑒subscript𝑴𝑐\boldsymbol{M}_{e}=\boldsymbol{M}_{c}) since the vocabulary space is the same for context network and encoder. As a result, our context network only slightly increases the number of model parameters. Details about the number of parameters of each model we use in the experiments are shown in Table 1.
|
| 46 |
+
|
| 47 |
+
We evaluate our model on three different language pairs:English-French (WMT’14), and English-German (WMT’15), English-Chinese (WMT’17) with English as the source side. For German and French, we use a combination of Europarl v7, Common Crawl, and News Commentary as training set. For development set, newstest2013 is used for German and newstest2012 is used for French. For Chinese, we use a combination of News Commentary v12 and the CWMT Corpus as the training set and held out 2357 sentences as the development set. Translationperformances are reported in case-sensitiveBLEU on newstest2014 (2737 sentences), newstest2015 (2169 sentences) for German, newstest2013 (3000 sentences), newstest2014 (3003 sentences) for French, and newsdev2017 (2002 sentences) for Chinese.444We use the development set as testing data because the official test set hasn’t been released. Details about tokenization are as follows. For German, we use the tokenized dataset from Luong et al. (2015); for French, we used the moses Koehn et al. (2007) tokenization script with the “-a” flag; for Chinese, we split sequences of Chinese characters, but keep sequences of non-Chinese characters as they are, using the script from IWSLT Evaluation 2015.555https://sites.google.com/site/iwsltevaluation2015/mt-track
|
| 48 |
+
|
| 49 |
+
We compare our context-aware NMT systems with strong baseline models on each dataset.
|
| 50 |
+
|
| 51 |
+
We limit our vocabularies tobe the top 50K most frequent words for both source and target language.Words not in these shortlisted vocabulariesare converted into an ⟨⟨\langleunk⟩⟩\rangle token.
|
| 52 |
+
|
| 53 |
+
When training our NMT systems, followingBahdanau et al. (2015), we filterout sentence pairs whose lengths exceed50 words and shuffle mini-batches as we proceed. We train our model with the following settings using SGD as our optimization method. (1) We start with a learning rate of 1 and we begin to halve the learningrate every epoch once it overfits. 666We define overfitting to be when perplexity on the dev set of the current epoch is worse than the previous epoch. (2) We train until the model converges. (i.e. the difference between the perplexity for the current epoch and the previous epoch is less than 0.01) (3) We batched the instances with the same length and our maximum mini-batch size is 256,and (4) the normalized gradient is rescaled whenever its norm exceeds 5. (6) Dropout is applied between vertical RNN stacks with probability 0.3. Additionally, the context network is trained jointly with the encoder-decoder architecture.Our model is built upon OpenNMT Klein et al. (2017) with the default settings unless otherwise noted.
|
| 54 |
+
|
| 55 |
+
In this section, we compare our proposed context-aware NMT models with baseline models on English-German dataset. Our baseline models are encoder-decoder models using global-general attention and input feeding on the decoder side as described in §2, varying the settings on the encoder side. Our proposed model builds upon baseline models by concatenating or gating different types of context vectors. We use LSTM for encoder, decoder, and context network. The decoder is the same across baseline models and proposed models, having 500 hidden units. During testing, we use beam search with a beam size of 5. The dimension for input word embedding d𝑑d is set to 500 across encoder, decoder, and context network. Settings for three different baselines are listed below.
|
| 56 |
+
|
| 57 |
+
Baseline 1:An uni-directional LSTM with 500 hidden units and 2 layers of stacking LSTM.Baseline 2:A bi-directional LSTM with 250 hidden units and 2 layers of stacking LSTM. Each state is summarized by concatenating the hidden states of forward and backward encoder into 500 hidden units.Baseline 3:A bi-directional LSTM with 250 hidden units and 3 layers of stacking LSTM.This can be compared with the proposed method, which adds an extra layer of computation before the word embeddings, essentially adding an extra layer.The context network uses the below settings.NBOW:Average word embedding of the input sequence.BiLSTM:A single-layer bi-directional LSTM with 250 hidden units. The context vector is represented by concatenating the hidden states of forward and backward LSTM into a 500 dimensional vector.HoLSTM:A single-layer uni-directional LSTM with 500 hidden units.
|
| 58 |
+
|
| 59 |
+
The results are shown in Table 1.The first thing we observe is that the best context-aware model (results in bold in the table) achieved improvements of around 0.7 BLEU on both WMT14 and WMT15 over the respective baseline methods with 2 layers.This is in contrast to simply using a 3-layer network, which actually degrades performance, perhaps due to the vanishing gradients problem it increases the difficulty in learning.
|
| 60 |
+
|
| 61 |
+
Next, comparing different methods for incorporating context, we can see that BiLSTM performs best across all settings. HoLSTM performs slightly better than NBOW, and NBOW obviously suffers from having the same context vector for every word in the input sequence failing to outperform the corresponding baselines.Comparing the two integration methods that incorporate context into word embeddings. Both methods improve over the baseline with BiLSTM as the context network. Concatenating the context vector and the word embedding performed better than gating.Finally, in contrast to the baseline, it is not obvious whether using uni-directional or bi-directional as the encoder is better for our proposed models, particularly when BiLSTM is used for calculating the context network.This is likely due to the fact that bi-directional information is already captured by the context network, and may not be necessary in the encoder itself.
|
| 62 |
+
|
| 63 |
+
We further compared the two systems on two different languages, French and Chinese. We achieved 0.5-0.8 BLEU improvement, showing our proposed models are stable and consistent across different language pairs. The results are shown in Table 2.
|
| 64 |
+
|
| 65 |
+
To show that our 3-layer models are properly trained, we ran a 3-layer bidirectional encoder with residual networks on En-Fr and got 27.45 for WMT13 and 30.60 for WMT14, which is similarly lower than the two layer result. It should be noted that previous work such as Britz et al. (2017) have also noted that the gains for encoders beyond two layers is minimal.
|
| 66 |
+
|
| 67 |
+
In order to examine whether our proposed model can better translate words with multiple senses, we evaluate our context-aware model on a list of homographs extracted from Wikipedia777 https://en.wikipedia.org/wiki/List_of_English_homographs compared to the baseline model on three different language pairs. For the baseline model, we choose the best-performing model, as described in §6.2.
|
| 68 |
+
|
| 69 |
+
To do so, we first acquire the translation of homographs in the source language using fast-align Dyer et al. (2013). We run fast-align on all the parallel corpora including training data and testing data888Reference translation, and all the system generated translations. because the unsupervised nature of the algorithm requires it to have a large amount of training data to obtain accurate alignments. The settings follow the default command on fast-align github page including heuristics combining forward and backward alignment.Since there might be multiple aligned words in the target language given a word in source language, we treat a match between the aligned translation of a targeted word of the reference and the translation of a given model as true positives and use F1, precision, and recall as our metrics, and take the micro-average across all the sentence pairs.999The link to the evaluation script – https://goo.gl/oHYR8EWe calculated the scores for the 50000 words/characters from our source vocabulary using only English words.The results are shown in Table 3.The table shows two interesting results:(1) The score for the homographs is lower than the score obtained from all the words in the vocabulary.This shows that words with more meanings are harder to translate with Chinese as the only exception.101010One potential explanation for Chinese is that because the Chinese results are generated on the character level, the automatic alignment process was less accurate.(2) The improvement of our proposed model over baseline model is larger on the homographs compared to all the words in vocabulary. This shows that although our context-aware model is better overall, the improvements are particularly focused on words with multiple senses, which matches the intuition behind the design of the model.
|
| 70 |
+
|
| 71 |
+
We show sample translations on English-Chinese WMT’17 dataset in Table 4 with three kinds of examples. We highlighted the English homograph in bold, correctly translated words in blue, and wrongly translated words in red. (1) Target homographs are translated into the correct sense with the help of context network. For the first sample translation, “meets” is correctly translated to “会见” by our model, and wrongly translated to “符合” by baseline model. In fact, “会见” is closer to the definition “come together intentionally” and “符合” is closer to ”satisfy” in the English dictionary. (2) Target homographs are translated into different but similar senses for both models in the forth example. Both models translate the word “believed” to common translations “被认为” or“相信”, but these meaning are both close to reference translation “据信”. (3) Target homograph is translated into the wrong sense for the baseline model, but is not translated in our model in the fifth example.
|
| 72 |
+
|
| 73 |
+
Word sense disambiguation (WSD), the task of determining thecorrect meaning or sense of a word in context is a long standing task in NLP Yarowsky (1995); Ng and Lee (1996); Mihalcea and Faruque (2004); Navigli (2009); Zhong and Ng (2010); Di Marco and Navigli (2013); Chen et al. (2014); Camacho-Collados et al. (2015).Recent research on tackling WSD and capturing multi-senses includes work leveraging LSTM Kågebäck and Salomonsson (2016); Yuan et al. (2016), which we extended as a context network in our paper and predicting senses with word embeddings that capture context. Šuster et al. (2016); Kawakami and Dyer (2016) also showed that bilingual data improves WSD.In contrast to the standard WSD formulation, Vickrey et al. (2005) reformulated the task of WSD for Statistical Machine Translation (SMT) as predicting possible target translations which directly improves the accuracy of machine translation. Following this reformulation, Chan et al. (2007); Carpuat and Wu (2007a, b) integrated WSD systems into phrase-based systems. Xiong and Zhang (2014) breaks the process into two stages. First predicts the sense of the ambiguous source word. The predictedword senses together with other contextfeatures are then used to predict possibletarget translation.Within the framework of Neural MT, there are works that has similar motivation to ours. Choi et al. (2017) leverage the NBOW as context and gate the word-embedding on both encoder and decoder side.However, their work does not distinguish context vectors for words in the same sequence, in contrast to the method in this paper, and our results demonstrate that this is an important feature of methods that handle homographs in NMT. In addition, our quantitative analysis of the problems that homographs pose to NMT and evaluation of how context-aware models fix them was not covered in this previous work. Rios et al. (2017) tackled the problem by adding sense embedding learned with additional corpus and evaluated the performance on the sentence level with contrastive translation.
|
| 74 |
+
|
| 75 |
+
Theoretically, NMT systems should be able to handle homographs if the encoder captures the clues to translate them correctly. In this paper, we empirically show that this may not be the case; the performance of word level translation degrades as the number of senses for each word increases. We hypothesize that this is due to the fact that each word is mapped to a word vector despite them being in different contexts, and propose to integrate methods from neural WSD systems into an NMT system to alleviate this problem. We concatenated the context vector computed from the context network with the word embedding to form a context-aware word embedding, successfully improving the NMT system. We evaluated our model on three different language pairs and outperformed a strong baseline model according to BLEU score in all of them. We further evaluated our results targeting the translation of homographs, and our model performed better in terms of F1 score.
|
| 76 |
+
|
| 77 |
+
While the architectures proposed in this work do not solve the problem of homographs, our empirical results in Table 3 demonstrate that they do yield improvements (larger than those on other varieties of words).We hope that this paper will spark discussion on the topic, and future work will propose even more focused architectures.
|
1708.06551v2.txt
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Real-world applications of reinforcement learning (RL) face two main challenges: complex long-running tasks and partial observability. Options, the particular instance of Hierarchical RL we focus on, addresses the first challenge by factoring a complex task into simpler sub-tasks (?; ?; ?). Instead of learning what action to perform depending on an observation, the agent learns a top-level policy that repeatedly selects options, that in turn execute sequences of actions before returning (?). The second challenge, partial observability, is addressed by maintaining a belief of what the agent thinks the full state is (?; ?), reasoning about possible future observations (?; ?), storing information in an external memory for later reuse (?; ?; ?), or using recurrent neural networks (RNNs) to allow information to flow between time-steps (?; ?).
|
| 2 |
+
|
| 3 |
+
Combined solutions to the above two challenges have recently been designed for planning (?), but solutions for learning algorithms are not yet ideal. HQ-Learning decomposes a task into a sequence of fully-observable subtasks (?), which precludes cyclic tasks from being solved. Using recurrent neural networks in options and for the top-level policy (?) addresses both challenges, but brings in the design complexity of RNNs (?; ?; ?). RNNs also have limitations regarding long time horizons, as their memory decays over time (?).
|
| 4 |
+
|
| 5 |
+
In her PhD thesis, Precup (?, page 126) suggests that options may already be close to addressing partial observability, thus removing the need for more complicated solutions. In this paper, we prove this intuition correct by:
|
| 6 |
+
|
| 7 |
+
1.Showing that standard options do not suffice in POMDPs;2.Introducing Option-Observation Initiation Sets (OOIs), that make the initiation sets of options conditional on the previously-executed option;3.Proving that OOIs make options at least as expressive as Finite State Controllers (Section 3.2), thus able to tackle challenging POMDPs.
|
| 8 |
+
|
| 9 |
+
In contrast to existing HRL algorithms for POMDPs (?; ?; ?), OOIs handle repetitive tasks, do not restrict the action set available to sub-tasks, and keep the top-level and option policies memoryless. A wide range of robotic and simulated experiments in Section 4 confirm that OOIs allow partially observable tasks to be solved optimally, demonstrate that OOIs are much more sample-efficient than a recurrent neural network over options, and illustrate the flexibility of OOIs regarding the amount of domain knowledge available at design time. In Section 4.5, we demonstrate the robustness of OOIs to sub-optimal option sets. While it is generally accepted that the designer provides the options and their initiation sets, we show in Section 4.4 that random initiation sets, combined with learned option policies and termination functions, allow OOIs to be used without any domain knowledge.
|
| 10 |
+
|
| 11 |
+
OOIs are designed to solve complex partially-observable tasks that can be decomposed into a set of fully-observable sub-tasks. For instance, a robot with first-person sensors may be able to avoid obstacles, open doors or manipulate objects even if its precise location in the building is not observed. We now introduce such an environment, on which our robotic experiments of Section 4.3 are based.
|
| 12 |
+
|
| 13 |
+
A Khepera III robot111http://www.k-team.com/mobile-robotics-products/old-products/khepera-iiihas to gather objects from two terminals separated by a wall, and to bring them to the root (see Figure 1). Objects have to be gathered one by one from a terminal until it becomes empty, which requires many journeys between the root and a terminal. When a terminal is emptied, the other one is automatically refilled. The robot therefore has to alternatively gather objects from both terminals, and the episode finishes after the terminals have been emptied some random number of times. The root is colored in red and marked by a paper QR-code encoding 1. Each terminal has a screen displaying its color and a dynamic QR-code (1 when full, 2 when empty). Because the robot cannot read QR-codes from far away, the state of a terminal cannot be observed from the root, where the agent has to decide to which terminal it will go. This makes the environment partially observable, and requires the robot to remember which terminal was last visited, and whether it was full or empty.
|
| 14 |
+
|
| 15 |
+
The robot is able to control the speed of its two wheels. A wireless camera mounted on top of the robot detects bright color blobs in its field of view, and can read nearby QR-codes. Such low-level actions and observations, combined with a complicated task, motivate the use of hierarchical reinforcement learning. Fixed options allow the robot to move towards the largest red, green or blue blob in its field of view. The options terminate as soon as a QR-code is in front of the camera and close enough to be read. The robot has to learn a policy over options that solves the task.
|
| 16 |
+
|
| 17 |
+
The robot may have to gather a large number of objects, alternating between terminals several times. The repetitive nature of this task is incompatible with HQ-Learning (?). Options with standard initiation sets are not able to solve this task, as the top-level policy is memoryless (?) and cannot remember from which terminal the robot arrives at the root, and whether that terminal was full or empty. Because the terminals are a dozen feet away from the root, almost a hundred primitive actions have to be executed to complete any root/terminal journey. Without options, this represents a time horizon much larger than usually handled by recurrent neural networks (?) or finite history windows (?).
|
| 18 |
+
|
| 19 |
+
OOIs allow each option to be selected conditionally on the previously executed one (see Section 3.1), which is much simpler than combining options and recurrent neural networks (?). The ability of OOIs to solve complex POMDPs builds on the time abstraction capabilities and expressiveness of options. Section 4.3 shows that OOIs allow a policy for our robotic task to be learned to expert level. Additional experiments demonstrate that both the top-level and option policies can be learned by the agent (see Section 4.4), and that OOIs lead to substantial gains over standard initiation sets even if the option set is reduced or unsuited to the task (see Section 4.5).
|
| 20 |
+
|
| 21 |
+
This section formally introduces Markov Decision Processes (MDPs), Options, Partially Observable MDPs (POMDPs) and Finite State Controllers, before presenting our main contribution in Section 3.
|
| 22 |
+
|
| 23 |
+
A discrete-time Markov Decision Process (MDP) ⟨S,A,R,T,γ⟩𝑆𝐴𝑅𝑇𝛾\langle S,A,R,T,\gamma\rangle with discrete actions is defined by a possibly-infinite set S𝑆S of states, a finite set A𝐴A of actions, a reward function R(st,at,st+1)∈ℛ𝑅subscript𝑠𝑡subscript𝑎𝑡subscript𝑠𝑡1ℛR(s_{t},a_{t},s_{t+1})\in\mathcal{R}, that provides a scalar reward rtsubscript𝑟𝑡r_{t} for each state transition, a transition function T(st,at,st+1)∈[0,1]𝑇subscript𝑠𝑡subscript𝑎𝑡subscript𝑠𝑡101T(s_{t},a_{t},s_{t+1})\in[0,1], that outputs a probability distribution over new states st+1subscript𝑠𝑡1s_{t+1} given a (st,at)subscript𝑠𝑡subscript𝑎𝑡(s_{t},a_{t}) state-action pair, and 0≤γ<10𝛾10\leq\gamma<1 the discount factor, that defines how sensitive the agent should be to future rewards.
|
| 24 |
+
|
| 25 |
+
A stochastic memoryless policy π(st,at)∈[0,1]𝜋subscript𝑠𝑡subscript𝑎𝑡01\pi(s_{t},a_{t})\in[0,1] maps a state to a probability distribution over actions. The goal of the agent is to find a policy π∗superscript𝜋\pi^{*} that maximizes the expected cumulative discounted reward Eπ∗[∑tγtrt]subscript𝐸superscript𝜋delimited-[]subscript𝑡superscript𝛾𝑡subscript𝑟𝑡E_{\pi^{*}}[\sum_{t}\gamma^{t}r_{t}] obtainable by following that policy.
|
| 26 |
+
|
| 27 |
+
The options framework, defined in the context of MDPs (?), consists of a set of options O𝑂O where each option ω∈O𝜔𝑂\omega\in O is a tuple ⟨πω,Iω,βω⟩subscript𝜋𝜔subscript𝐼𝜔subscript𝛽𝜔\langle\pi_{\omega},I_{\omega},\beta_{\omega}\rangle, with πω(st,at)∈[0,1]subscript𝜋𝜔subscript𝑠𝑡subscript𝑎𝑡01\pi_{\omega}(s_{t},a_{t})\in[0,1] the memoryless option policy, βω(st)∈[0,1]subscript𝛽𝜔subscript𝑠𝑡01\beta_{\omega}(s_{t})\in[0,1] the termination function that gives the probability for the option ω𝜔\omega to terminate in state stsubscript𝑠𝑡s_{t}, and Iω⊆Ssubscript𝐼𝜔𝑆I_{\omega}\subseteq S the initiation set that defines in which states ω𝜔\omega can be started (?).
|
| 28 |
+
|
| 29 |
+
The memoryless top-level policy μ(st,ωt)∈[0,1]𝜇subscript𝑠𝑡subscript𝜔𝑡01\mu(s_{t},\omega_{t})\in[0,1] maps states to a distribution over options and allows to choose which option to start in a given state. When an option ω𝜔\omega is started, it executes until termination (due to βωsubscript𝛽𝜔\beta_{\omega}), at which point μ𝜇\mu selects a new option based on the now current state.
|
| 30 |
+
|
| 31 |
+
Most real-world problems are not completely captured by MDPs, and exhibit at least some degree of partial observability. A Partially Observable MDP (POMDP) ⟨Ω,S,A,R,T,W,γ⟩Ω𝑆𝐴𝑅𝑇𝑊𝛾\langle\Omega,S,A,R,T,W,\gamma\rangle is an MDP extended with two components: the possibly-infinite set ΩΩ\Omega of observations, and the W:S→Ω:𝑊→𝑆ΩW:S\rightarrow\Omega function that produces observations x𝑥x based on the unobservable state s𝑠s of the process. Two different states, requiring two different optimal actions, may produce the same observation. This makes POMDPs remarkably challenging for reinforcement learning algorithms, as memoryless policies, that select actions or options based only on the current observation, typically no longer suffice.
|
| 32 |
+
|
| 33 |
+
Finite State Controllers (FSCs) are commonly used in POMDPs. An FSC ⟨𝒩,ψ,η,η0⟩𝒩𝜓𝜂superscript𝜂0\langle\mathcal{N},\psi,\eta,\eta^{0}\rangle is defined by a finite set 𝒩𝒩\mathcal{N} of nodes, an action function ψ(nt,at)∈[0,1]𝜓subscript𝑛𝑡subscript𝑎𝑡01\psi(n_{t},a_{t})\in[0,1] that maps nodes to a probability distribution over actions, a successor function η(nt−1,xt,nt)∈[0,1]𝜂subscript𝑛𝑡1subscript𝑥𝑡subscript𝑛𝑡01\eta(n_{t-1},x_{t},n_{t})\in[0,1] that maps nodes and observations to a probability distribution over next nodes, and an initial function η0(x1,n1)∈[0,1]superscript𝜂0subscript𝑥1subscript𝑛101\eta^{0}(x_{1},n_{1})\in[0,1] that maps initial observations to nodes (?).
|
| 34 |
+
|
| 35 |
+
At the first time-step, the agent observes x1subscript𝑥1x_{1} and activates a node n1subscript𝑛1n_{1} by sampling from η0(x1,⋅)superscript𝜂0subscript𝑥1⋅\eta^{0}(x_{1},\cdot). An action is performed by sampling from ψ(n1,⋅)𝜓subscript𝑛1⋅\psi(n_{1},\cdot). At each time-step t𝑡t, a node ntsubscript𝑛𝑡n_{t} is sampled from η(nt−1,xt,⋅)𝜂subscript𝑛𝑡1subscript𝑥𝑡⋅\eta(n_{t-1},x_{t},\cdot), then an action atsubscript𝑎𝑡a_{t} is sampled from ψ(nt,⋅)𝜓subscript𝑛𝑡⋅\psi(n_{t},\cdot). FSCs allow the agent to select actions according to the entire history of past observations (?), which has been shown to be one of the best approaches for POMDPs (?). OOIs, our main contribution, make options at least as expressive and as relevant to POMDPs as FSCs, while being able to leverage the hierarchical structure of the problem.
|
| 36 |
+
|
| 37 |
+
Our main contribution, Option-Observation Initiation Sets (OOIs), make the initiation sets of options conditional on the option that has just terminated. We prove that OOIs make options at least as expressive as FSCs (thus suited to POMDPs, see Section 3.2), even if the top-level and option policies are memoryless, while options without OOIs are strictly less expressive than FSCs (see Section 3.3). In Section 4, we show on one robotic and two simulated tasks that OOIs allow challenging POMDPs to be solved optimally.
|
| 38 |
+
|
| 39 |
+
Descriptions of partially observable tasks in natural language often contain allusions at sub-tasks that must be sequenced or cycled through, possibly with branches. This is easily mapped to a policy over options (learned by the agent) and sets of options that may or may not follow each other.
|
| 40 |
+
|
| 41 |
+
A good memory-based policy for our motivating example, where the agent has to bring objects from two terminals to the root, can be described as “go to the green terminal, then go to the root, then go back to the green terminal if it was full, to the blue terminal otherwise”, and symmetrically so for the blue terminal. This sequence of sub-tasks, that contains a condition, is easily translated to a set of options. Two options, ωGFsubscript𝜔𝐺𝐹\omega_{GF} and ωGEsubscript𝜔𝐺𝐸\omega_{GE}, sharing a single policy, go from the green terminal to the root (using low-level motor actions). ωGFsubscript𝜔𝐺𝐹\omega_{GF} is executed when the terminal is full, ωGEsubscript𝜔𝐺𝐸\omega_{GE} when it is empty. At the root, the option that goes back to the green terminal can only follow ωGFsubscript𝜔𝐺𝐹\omega_{GF}, not ωGEsubscript𝜔𝐺𝐸\omega_{GE}. When the green terminal is empty, going back to it is therefore forbidden, which forces the agent to switch to the blue terminal when the green one is empty.
|
| 42 |
+
|
| 43 |
+
We now formally define our main contribution, Option-Observation Initiation Sets (OOIs), that allow to describe which options may follow which ones. We define the initiation set Iωsubscript𝐼𝜔I_{\omega} of option ω𝜔\omega so that the set 𝒪tsubscript𝒪𝑡\mathcal{O}_{t} of options available at time t𝑡t depends on the observation xtsubscript𝑥𝑡x_{t} and previously-executed option ωt−1subscript𝜔𝑡1\omega_{t-1}:
|
| 44 |
+
|
| 45 |
+
Iωsubscript𝐼𝜔\displaystyle I_{\omega}⊆Ω×(O∪{∅})absentΩ𝑂\displaystyle\subseteq\Omega\times(O\cup\{\emptyset\})𝒪tsubscript𝒪𝑡\displaystyle\mathcal{O}_{t}≡{ω∈O:(xt,ωt−1)∈Iω}absentconditional-set𝜔𝑂subscript𝑥𝑡subscript𝜔𝑡1subscript𝐼𝜔\displaystyle\equiv\{\omega\in O:(x_{t},\omega_{t-1})\in I_{\omega}\}
|
| 46 |
+
|
| 47 |
+
with ω0=∅subscript𝜔0\omega_{0}=\emptyset, ΩΩ\Omega the set of observations and O𝑂O the set of options. 𝒪tsubscript𝒪𝑡\mathcal{O}_{t} allows the agent to condition the option selected at time t𝑡t on the one that has just terminated, even if the top-level policy does not observe ωt−1subscript𝜔𝑡1\omega_{t-1}. The top-level and option policies remain memoryless. Not having to observe ωt−1subscript𝜔𝑡1\omega_{t-1} keeps the observation space of the top-level policy small, instead of extending it to Ω×OΩ𝑂\Omega\times O, without impairing the representational power of OOIs, as shown in the next sub-section.
|
| 48 |
+
|
| 49 |
+
Finite State Controllers are state-of-the-art in policies applicable to POMDPs (?). By proving that options with OOIs are as expressive as FSCs, we provide a lower bound on the expressiveness of OOIs and ensure that they are applicable to a wide range of POMDPs.
|
| 50 |
+
|
| 51 |
+
The reduction from any FSC to options requires one option ⟨nt−1′,nt⟩subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡\langle n^{\prime}_{t-1},n_{t}\rangle per ordered pair of nodes in the FSC, and one option ⟨∅,n1⟩subscript𝑛1\langle\emptyset,n_{1}\rangle per node in the FSC. Assuming that n0=∅subscript𝑛0n_{0}=\emptyset and η(∅,x1,⋅)=η0(x1,⋅)𝜂subscript𝑥1⋅superscript𝜂0subscript𝑥1⋅\eta(\emptyset,x_{1},\cdot)=\eta^{0}(x_{1},\cdot), the options are defined by:
|
| 52 |
+
|
| 53 |
+
β⟨nt−1′,nt⟩(xt)subscript𝛽subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡subscript𝑥𝑡\displaystyle\beta_{\langle n^{\prime}_{t-1},n_{t}\rangle}(x_{t})=1absent1\displaystyle=1(1)π⟨nt−1′,nt⟩(xt,at)subscript𝜋subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡subscript𝑥𝑡subscript𝑎𝑡\displaystyle\pi_{\langle n^{\prime}_{t-1},n_{t}\rangle}(x_{t},a_{t})=ψ(nt,at)absent𝜓subscript𝑛𝑡subscript𝑎𝑡\displaystyle=\psi(n_{t},a_{t})(2)μ(xt,⟨nt−1′,nt⟩)𝜇subscript𝑥𝑡subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡\displaystyle\mu(x_{t},\langle n^{\prime}_{t-1},n_{t}\rangle)=η(nt−1′,xt,nt)absent𝜂subscriptsuperscript𝑛′𝑡1subscript𝑥𝑡subscript𝑛𝑡\displaystyle=\eta(n^{\prime}_{t-1},x_{t},n_{t})(3)I⟨∅,n1⟩subscript𝐼subscript𝑛1\displaystyle I_{\langle\emptyset,n_{1}\rangle}=Ω×{∅}absentΩ\displaystyle=\Omega\times\{\emptyset\}I⟨nt−1′,nt⟩subscript𝐼subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡\displaystyle I_{\langle n^{\prime}_{t-1},n_{t}\rangle}=Ω×{⟨nt−2′,nt−1⟩:nt−1′=nt−1}absentΩconditional-setsubscriptsuperscript𝑛′𝑡2subscript𝑛𝑡1subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡1\displaystyle=\Omega\times\{\langle n^{\prime}_{t-2},n_{t-1}\rangle:n^{\prime}_{t-1}=n_{t-1}\}
|
| 54 |
+
|
| 55 |
+
Each option corresponds to an edge of the FSC. Equation 1 ensures that every option stops after having emitted a single action, as the FSC takes one transition every time-step. Equation 2 maps the current option to the action emitted by the destination node of its corresponding FSC edge. We show that μ𝜇\mu and I⟨nt−1′,nt⟩subscript𝐼subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡I_{\langle n^{\prime}_{t-1},n_{t}\rangle} implement η(nt−1,xt,nt)𝜂subscript𝑛𝑡1subscript𝑥𝑡subscript𝑛𝑡\eta(n_{t-1},x_{t},n_{t}), with ωt−1=⟨nt−2′,nt−1⟩subscript𝜔𝑡1subscriptsuperscript𝑛′𝑡2subscript𝑛𝑡1\omega_{t-1}=\langle n^{\prime}_{t-2},n_{t-1}\rangle, by:
|
| 56 |
+
|
| 57 |
+
μ𝜇\displaystyle\mu(xt,⟨nt−1′,nt⟩)=subscript𝑥𝑡subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡absent\displaystyle(x_{t},\langle n^{\prime}_{t-1},n_{t}\rangle)={η(nt−1,xt,nt)⟨nt−2′,nt−1⟩∈I⟨nt−1′,nt⟩⇔nt−1′=nt−10⟨nt−2′,nt−1⟩∉I⟨nt−1′,nt⟩⇔nt−1′≠nt−1cases𝜂subscript𝑛𝑡1subscript𝑥𝑡subscript𝑛𝑡subscriptsuperscript𝑛′𝑡2subscript𝑛𝑡1subscript𝐼subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡⇔absentsubscriptsuperscript𝑛′𝑡1subscript𝑛𝑡10subscriptsuperscript𝑛′𝑡2subscript𝑛𝑡1subscript𝐼subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡⇔absentsubscriptsuperscript𝑛′𝑡1subscript𝑛𝑡1\displaystyle\begin{cases}\eta(n_{t-1},x_{t},n_{t})&\begin{array}[]{l}\langle n^{\prime}_{t-2},n_{t-1}\rangle\in I_{\langle n^{\prime}_{t-1},n_{t}\rangle}\\\Leftrightarrow n^{\prime}_{t-1}=n_{t-1}\end{array}\\0&\begin{array}[]{l}\langle n^{\prime}_{t-2},n_{t-1}\rangle\notin I_{\langle n^{\prime}_{t-1},n_{t}\rangle}\\\Leftrightarrow n^{\prime}_{t-1}\neq n_{t-1}\end{array}\end{cases}
|
| 58 |
+
|
| 59 |
+
Because η𝜂\eta maps nodes to nodes and μ𝜇\mu selects options representing pairs of nodes, μ𝜇\mu is extremely sparse and returns a value different from zero, η(nt−1,xt,nt)𝜂subscript𝑛𝑡1subscript𝑥𝑡subscript𝑛𝑡\eta(n_{t-1},x_{t},n_{t}), only when ⟨nt−2′,nt−1⟩subscriptsuperscript𝑛′𝑡2subscript𝑛𝑡1\langle n^{\prime}_{t-2},n_{t-1}\rangle and ⟨nt−1′,nt⟩subscriptsuperscript𝑛′𝑡1subscript𝑛𝑡\langle n^{\prime}_{t-1},n_{t}\rangle agree on nt−1subscript𝑛𝑡1n_{t-1}.∎
|
| 60 |
+
|
| 61 |
+
Our reduction uses options with trivial policies, that execute for a single time-step, which leads to a large amount of options to compensate. In practice, we expect to be able to express policies for real-world POMDPs with much less options than the number of states an FSC would require, as shown in our simulated (Section 4.4, 2 options) and robotic experiments (Section 4.3, 12 options). In addition to being sufficient, the next sub-section proves that OOIs are necessary for options to be as expressive as FSCs.
|
| 62 |
+
|
| 63 |
+
While options with regular initiation sets are able to express some memory-based policies (?, page 7), the tiny but valid Finite State Controller presented in Figure 3 cannot be mapped to a set of options and a policy over options (without OOIs). This proves that options without OOIs are strictly less expressive than FSCs.
|
| 64 |
+
|
| 65 |
+
Figure 3 shows a Finite State Controller that emits a sequence of alternating A’s and B’s, based on a constant uninformative observation x∅subscript𝑥x_{\emptyset}. This task requires memory because the observation does not provide any information about what was the last letter to be emitted, or which one must now be emitted. Options having memoryless policies, options executing for multiple time-steps are unable to represent the FSC exactly. A combination of options that execute for a single time-step cannot represent the FSC either, as the options framework is unable to represent memory-based policies with single-time-step options (?).∎
|
| 66 |
+
|
| 67 |
+
The experiments in this section illustrate how OOIs allow agents to perform optimally in environments where options without OOIs fail. Section 4.3 shows that OOIs allow the agent to learn an expert-level policy for our motivating example (Section 1.1). Section 4.4 shows that the top-level and option policies required by a repetitive task can be learned, and that learning option policies allow the agent to leverage random OOIs, thereby removing the need for designing them. In Section 4.5, we progressively reduce the amount of options available to the agent, and demonstrate how OOIs still allow good memory-based policies to emerge when a sub-optimal amount of options are used.
|
| 68 |
+
|
| 69 |
+
All our results are averaged over 20 runs, with standard deviation represented by the light regions in the figures. The source code, raw experimental data, run scripts, and plotting scripts of our experiments, along with a detailed description of our robotic setup, are available as supplementary material. A video detailing our robotic experiment is available at http://steckdenis.be/oois_demo.mp4.
|
| 70 |
+
|
| 71 |
+
All our agents learn their top-level and option policies (if not provided) using a single feed-forward neural network, with one hidden layer of 100 neurons, trained using Policy Gradient (?) and the Adam optimizer (?). Our neural network π𝜋\pi takes three inputs and produces one output. The inputs are problem-specific observation features 𝐱𝐱\mathbf{x}, the one-hot encoded current option 𝝎𝝎\boldsymbol{\omega} (𝝎=𝟎𝝎0\boldsymbol{\omega}=\mathbf{0} when executing the top-level policy), and a mask, 𝐦𝐚𝐬𝐤𝐦𝐚𝐬𝐤\mathbf{mask}. The output 𝐲𝐲\mathbf{y} is the joint probability distribution over selecting actions or options (so that the same network can be used for the top-level and option policies), while terminating or continuing the current option:
|
| 72 |
+
|
| 73 |
+
𝐡𝟏subscript𝐡1\displaystyle\mathbf{h_{1}}=tanh(𝐖1[𝐱T𝝎T]T+𝐛1),absentsubscript𝐖1superscriptdelimited-[]superscript𝐱𝑇superscript𝝎𝑇𝑇subscript𝐛1\displaystyle=\tanh(\mathbf{W}_{1}[\mathbf{x}^{T}\boldsymbol{\omega}^{T}]^{T}+\mathbf{b}_{1}),𝐲^^𝐲\displaystyle\mathbf{\hat{y}}=σ(𝐖2𝐡𝟏+𝐛2)∘𝐦𝐚𝐬𝐤,absent𝜎subscript𝐖2subscript𝐡1subscript𝐛2𝐦𝐚𝐬𝐤\displaystyle=\sigma(\mathbf{W}_{2}\mathbf{h_{1}}+\mathbf{b}_{2})\circ\mathbf{mask},𝐲𝐲\displaystyle\mathbf{y}=𝐲^𝟏T𝐲^,absent^𝐲superscript1𝑇^𝐲\displaystyle=\frac{\mathbf{\hat{y}}}{\mathbf{1}^{T}\mathbf{\hat{y}}},
|
| 74 |
+
|
| 75 |
+
with Wisubscript𝑊𝑖W_{i} and bisubscript𝑏𝑖b_{i} the trainable weights and biases of layer i𝑖i, σ𝜎\sigma the sigmoid function, and ∘\circ the element-wise product of two vectors. The fraction ensures that a valid probability distribution is produced by the network. The initiation sets of options are implemented using the 𝐦𝐚𝐬𝐤𝐦𝐚𝐬𝐤\mathbf{mask} input of the neural network, a vector of 2×(|A|+|O|)2𝐴𝑂2\times(|A|+|O|) integers, the same dimension as the 𝐲𝐲\mathbf{y} output. When executing the top-level policy (𝝎=𝟎𝝎0\boldsymbol{\omega}=\mathbf{0}), the mask forces the probability of primitive actions to zero, preserves option ωisubscript𝜔𝑖\omega_{i} according to Iωisubscript𝐼subscript𝜔𝑖I_{\omega_{i}}, and prevents the top-level policy from terminating. When executing an option policy (𝝎≠𝟎𝝎0\boldsymbol{\omega}\neq\mathbf{0}), the mask only allows primitive actions to be executed. For instance, if there are two options and three actions,𝐦𝐚𝐬𝐤=endcont(0011100111)𝐦𝐚𝐬𝐤𝑒𝑛𝑑𝑐𝑜𝑛𝑡0011100111\mathbf{mask}=\begin{smallmatrix}end\\cont\end{smallmatrix}(\begin{smallmatrix}0&0&1&1&1\\0&0&1&1&1\end{smallmatrix})when executing any of the options. When executing the top-level policy,𝐦𝐚𝐬𝐤=endcont(00000ab000)𝐦𝐚𝐬𝐤𝑒𝑛𝑑𝑐𝑜𝑛𝑡00000𝑎𝑏000\mathbf{mask}=\begin{smallmatrix}end\\cont\end{smallmatrix}(\begin{smallmatrix}0&0&0&0&0\\a&b&0&0&0\end{smallmatrix}),with a=1𝑎1a=1 if and only if the option that has just finished is in the initiation set of the first option, and b=1𝑏1b=1 according to the same rule but for the second option. The neural network π𝜋\pi is trained using Policy Gradient, with the following loss:
|
| 76 |
+
|
| 77 |
+
ℒ(π)ℒ𝜋\displaystyle\mathcal{L}(\pi)=−∑t=0T(ℛt−V(xt,ωt))log(π(xt,ωt,at))absentsuperscriptsubscript𝑡0𝑇subscriptℛ𝑡𝑉subscript𝑥𝑡subscript𝜔𝑡𝜋subscript𝑥𝑡subscript𝜔𝑡subscript𝑎𝑡\displaystyle=-\sum\limits_{t=0}^{T}(\mathcal{R}_{t}-V(x_{t},\omega_{t}))\log(\pi(x_{t},\omega_{t},a_{t}))
|
| 78 |
+
|
| 79 |
+
with at∼π(xt,ωt,⋅)similar-tosubscript𝑎𝑡𝜋subscript𝑥𝑡subscript𝜔𝑡⋅a_{t}\sim\pi(x_{t},\omega_{t},\cdot) the action executed at time t𝑡t. The return ℛt=∑τ=tTγτrτsubscriptℛ𝑡superscriptsubscript𝜏𝑡𝑇superscript𝛾𝜏subscript𝑟𝜏\mathcal{R}_{t}=\sum_{\tau=t}^{T}\gamma^{\tau}r_{\tau}, with rτ=R(sτ,aτ,sτ+1)subscript𝑟𝜏𝑅subscript𝑠𝜏subscript𝑎𝜏subscript𝑠𝜏1r_{\tau}=R(s_{\tau},a_{\tau},s_{\tau+1}), is a simple discounted sum of future rewards, and ignores changes of current option. This gives the agent information about the complete outcome of an action or option, by directly evaluating its flattened policy. A baseline V(xt,ωt)𝑉subscript𝑥𝑡subscript𝜔𝑡V(x_{t},\omega_{t}) is used to reduce the variance of the ℒℒ\mathcal{L} estimate (?). V(xt,ωt)𝑉subscript𝑥𝑡subscript𝜔𝑡V(x_{t},\omega_{t}) predicts the expected cumulative reward obtainable from xtsubscript𝑥𝑡x_{t} in option ωtsubscript𝜔𝑡\omega_{t} using a separate neural network, trained on the monte-carlo return obtained from xtsubscript𝑥𝑡x_{t} in ωtsubscript𝜔𝑡\omega_{t}.
|
| 80 |
+
|
| 81 |
+
In order to provide a complete evaluation of OOIs, a variant of the π𝜋\pi and V𝑉V networks of Section 4.1, where the hidden layer is replaced with a layer of 20 LSTM units (?; ?), is also evaluated on every task. We use 20 units as this leads to the best results in our experiments, which ensures a fair comparison of LSTM against OOIs. In all experiments, the LSTM agents are provided the same set of options as the agent with OOIs. Not providing any option, or less options, leads to worse results. Options allow the LSTM network to focus on important observations, and reduces the time horizon to be considered. Shorter time horizons have been shown to be beneficial to LSTM (?).
|
| 82 |
+
|
| 83 |
+
Despite our efforts, LSTM over options only manages to learn good policies in our robotic experiment (see Section 4.3), and requires more than twice the amount of episodes as OOIs to do so. In our repetitive task, dozens of repetitions seem to confuse the network, that quickly diverges from any good policy it may learn (see Section 4.4). On TreeMaze, a much more complex version of the T-maze task, originally used to benchmark reinforcement learning LSTM agents (?), the LSTM agent learns the optimal policy after more than 100K episodes (not shown on the figures). These results illustrate how learning with recurrent neural networks is sometimes difficult, and how OOIs allow to reliably obtain good results, with minimal engineering effort.
|
| 84 |
+
|
| 85 |
+
The first experiment illustrates how OOIs allow an expert-level policy to be learned for a complex robotic partially-observable repetitive task. The experiment takes place in the environment described in Section 1.1. A robot has to gather objects one by one from two terminals, green and blue, and bring them back to the root location. Because our actual robot has no effector, it navigates between the root and the terminals, but only pretends to move objects. The agent receives a reward of +2 when it reaches a full terminal, -2 when the terminal is empty. At the beginning of the episode, each terminal contains 2 to 4 objects, this amount being selected randomly for each terminal. When the agent goes to an empty terminal, the other one is re-filled with 2 to 4 objects. The episode ends after 2 or 3 emptyings (combined across both terminals). Whether a terminal is full or empty is observed by the agent only when it is at the terminal. The agent therefore has to remember information acquired at terminals in order to properly choose, at the root, to which terminal it will go.
|
| 86 |
+
|
| 87 |
+
The agent has access to 12 memoryless options that go to red (ωR1..R4\omega_{R1..R4}), green (ωG1..G4\omega_{G1..G4}) or blue objects (ωB1..B4\omega_{B1..B4}), and terminate when the agent is close enough to them to read a QR-code displayed on them. The initiation set of ωR1,R2subscript𝜔𝑅1𝑅2\omega_{R1,R2} is ωG1..G4\omega_{G1..G4}, of ωR3,R4subscript𝜔𝑅3𝑅4\omega_{R3,R4} is ωB1..B4\omega_{B1..B4}, and of ωGi,Bisubscript𝜔subscript𝐺𝑖subscript𝐵𝑖\omega_{G_{i},B_{i}} is ωRi∀i=1..4subscript𝜔subscript𝑅𝑖for-all𝑖1..4\omega_{R_{i}}~{}\forall i=1..4. This description of the options and their OOIs is purposefully uninformative, and illustrates how little information the agent has about the task. The option set used in this experiment is also richer than the simple example of Section 3.1, so that the solution of the problem, not going back to an empty terminal, is not encoded in OOIs but must be learned by the agent.
|
| 88 |
+
|
| 89 |
+
Agents with and without OOIs learn top-level policies over these options. We compare them to a fixed agent, using an expert top-level policy that interprets the options as follows: ωR1..R4\omega_{R1..R4} go to the root from a full/empty green/blue terminal (and are selected accordingly at the terminals depending on the QR-code displayed on them), while ωG1..G4,B1..B4\omega_{G1..G4,B1..B4} go to the green/blue terminal from the root when the previous terminal was full/empty and green/blue. At the root, OOIs ensure that only one option amongst go to green after a full green, go to green after an empty blue, go to blue after a full blue and go to blue after an empty green is selected by the top-level policy: the one that corresponds to what color the last terminal was and whether it was full or empty. The agent goes to a terminal until it is empty, then switches to the other terminal, leading to an average reward of 10.2222+32×(−2+2+42×2)23222422\frac{2+3}{2}\times(-2+\frac{2+4}{2}\times 2), 2 or 3 emptyings of terminals that contain 2 to 4 objects. Average confirmed experimentally from 1000 episodes using the policy, p>0.30𝑝0.30p>0.30.
|
| 90 |
+
|
| 91 |
+
When the top-level policy is learned, OOIs allow the task to be solved, as shown in Figure 4, while standard initiation sets do not allow the task to be learned. Because experiments on a robot are slow, we developed a small simulator for this task, and used it to produce Figure 4 after having successfully asserted its accuracy using two 1000-episodes runs on the actual robot. The agent learns to properly select options at the terminals, depending on the QR-code, and to output a proper distribution over options at the root, thereby matching our expert policy. The LSTM agent learns the policy too, but requires more than twice the amount of episodes to do so. The high variance displayed in Figure 4 comes from the varying amounts of objects in the terminals, and the random selection of how many times they have to be emptied.
|
| 92 |
+
|
| 93 |
+
Because fixed option policies are not always available, we now show that OOIs allow them to be learned at the same time as the top-level policy.
|
| 94 |
+
|
| 95 |
+
In some cases, a hierarchical reinforcement learning agent may not have been provided policies for several or any of its options. In this case, OOIs allow the agent to learn its top-level policy, the option policies and their termination functions. In this experiment, the agent has to learn its top-level and option policies to copy characters from an input tape to an output tape, removing duplicate B’s and D’s (mapping ABBCCEDD to ABCCED for instance; B’s and D’s always appear in pairs). The agent only observes a single input character at a time, and can write at most one character to the output tape per time-step.
|
| 96 |
+
|
| 97 |
+
The input tape is a sequence of N𝑁N symbols x∈Ω𝑥Ωx\in\Omega, with Ω={A,B,C,D,E}Ω𝐴𝐵𝐶𝐷𝐸\Omega=\{A,B,C,D,E\} and N𝑁N a random number between 20 and 30. The agent observes a single symbol xt∈Ωsubscript𝑥𝑡Ωx_{t}\in\Omega, read from the i𝑖i-th position in the input sequence, and does not observe i𝑖i. When t=1𝑡1t=1, i=0𝑖0i=0. There are 20 actions (5×2×25225\times 2\times 2), each of them representing a symbol (5), whether it must be pushed onto the output tape (2), and whether i𝑖i should be incremented or decremented (2). A reward of 1 is given for each correct symbol written to the output tape. The episode finishes with a reward of -0.5 when an incorrect symbol is written.
|
| 98 |
+
|
| 99 |
+
The agent has access to two options, ω1subscript𝜔1\omega_{1} and ω2subscript𝜔2\omega_{2}. OOIs are designed so that ω2subscript𝜔2\omega_{2} cannot follow itself, with no such restriction on ω1subscript𝜔1\omega_{1}. No reward shaping or hint about what each option should do is provided. The agent automatically discovers that ω1subscript𝜔1\omega_{1} must copy the current character to the output, and that ω2subscript𝜔2\omega_{2} must skip the character without copying it. It also learns the top-level policy, that selects ω2subscript𝜔2\omega_{2} (skip) when observing B or D and ω2subscript𝜔2\omega_{2} is allowed, ω1subscript𝜔1\omega_{1} otherwise (copy).
|
| 100 |
+
|
| 101 |
+
Figure 5 shows that an agent with two options and OOIs learns the optimal policy for this task, while an agent with two options and only standard initiation sets (Iω=Ω∀ωsubscript𝐼𝜔Ωfor-all𝜔I_{\omega}=\Omega~{}\forall\omega) fails to do so. The agent without OOIs only learns to copy characters and never skips any (having two options does not help it). This shows that OOIs are necessary for learning this task, and allow to learn top-level and option policies suited to our repetitive partially observable task.
|
| 102 |
+
|
| 103 |
+
When the option policies are learned, the agent becomes able to adapt itself to random OOIs, thereby removing the need for designing OOIs. For an agent with N𝑁N options, each option has N2𝑁2\frac{N}{2} randomly-selected options in its initiation set, with the initiation sets re-sampled for each run. The agents learn how to leverage their option set, and achieve good results on average (16 options used in Figure 5, more options lead to better results). When looking at individual runs, random OOIs allow optimal policies to be learned, but several runs require more time than others to do so. This explains the high variance and noticeable steps shown in Figure 5.
|
| 104 |
+
|
| 105 |
+
The next section shows that an improperly-defined set of human-provided options, as may happen in design phase, still allows the agent to perform reasonably well. Combined with our results with random OOIs, this shows that OOIs can be tailored to the exact amount of domain knowledge available for a particular task.
|
| 106 |
+
|
| 107 |
+
The optimal set of options and OOIs may be difficult to design. When the agent learns the option policies, the previous section demonstrates that random OOIs suffice. This experiment focuses on human-provided option policies, and shows that a sub-optimal set of options, arising from a mis-specification of the environment or normal trial-and-error in design phase, does not prevent agents with OOIs from learning reasonably good policies.
|
| 108 |
+
|
| 109 |
+
TreeMaze is our generalization of the T-maze environment (?) to arbitrary heights. The agent starts at the root of the tree-like maze depicted in Figure 6, and has to reach the extremity of one of the 8 leaves. The leaf to be reached (the goal) is chosen uniformly randomly before each episode, and is indicated to the agent using 3 bits, observed one at a time during the first 3 time-steps. The agent receives no bit afterwards, and has to remember them in order to navigate to the goal. The agent observes its position in the current corridor (0 to 4) and the number of T junctions it has already crossed (0 to 3). A reward of -0.1 is given each time-step, +10 when reaching the goal. The episode finishes when the agent reaches any of the leaves. The optimal reward is 8.2.
|
| 110 |
+
|
| 111 |
+
We consider 14 options with predefined memoryless policies, several of them sharing the same policy, but encoding distinct states (among 14) of a 3-bit memory where some bits may be unknown. 6 partial-knowledge options ω0−−subscript𝜔limit-from0\omega_{0{-}{-}}, ω1−−subscript𝜔limit-from1\omega_{1{-}{-}}, ω00−subscript𝜔limit-from00\omega_{00{-}}, …, ω11−subscript𝜔limit-from11\omega_{11{-}} go right then terminate. 8 full-knowledge options ω000subscript𝜔000\omega_{000}, ω001subscript𝜔001\omega_{001}, …, ω111subscript𝜔111\omega_{111} go to their corresponding leaf. OOIs are defined so that any option may only be followed by itself, or one that represents a memory state where a single 0 or - has been flipped to 1. Five agents have to learn their top-level policy, which requires them to learn how to use the available options to remember to which leaf to go. The agents do not know the name or meaning of the options. Three agents have access to all 14 options (with, without OOIs, and LSTM). The agent with OOIs (8) only has access to full-knowledge options, and therefore cannot disambiguate unknown and 0 bits. The agent with OOIs (4) is restricted to options ω000subscript𝜔000\omega_{000}, ω010subscript𝜔010\omega_{010}, ω100subscript𝜔100\omega_{100} and ω110subscript𝜔110\omega_{110} and therefore cannot reach odd-numbered goals. The options of the (8) and (4) agents terminate in the first two cells of the first corridor, to allow the top-level policy to observe the second and third bits.
|
| 112 |
+
|
| 113 |
+
Figure 7 shows that the agent with OOIs (14) consistently learns the optimal policy for this task. When the number of options is reduced, the quality of the resulting policies decreases, while still remaining above the agent without OOIs. Even the agent with 4 options, that cannot reach half the goals, performs better than the agent without OOIs but 14 options. This experiment demonstrates that OOIs provide measurable benefits over standard initiation sets, even if the option set is largely reduced.
|
| 114 |
+
|
| 115 |
+
Combined, our three experiments demonstrate that OOIs lead to optimal policies in challenging POMDPs, consistently outperform LSTM over options, allow the option policies to be learned, and can still be used when reduced or no domain knowledge is available.
|
| 116 |
+
|
| 117 |
+
This paper proposes OOIs, an extension of the initiation sets of options so that they restrict which options are allowed to be executed after one terminates. This makes options as expressive as Finite State Controllers. Experimental results confirm that challenging partially observable tasks, simulated or on physical robots, one of them requiring exact information storage for hundreds of time-steps, can now be solved using options. Our experiments also illustrate how OOIs lead to reasonably good policies when the option set is improperly defined, and that learning the option policies allow random OOIs to be used, thereby providing a turnkey solution to partial observability.
|
| 118 |
+
|
| 119 |
+
Options with OOIs also perform surprisingly well compared to an LSTM network over options. While LSTM over options does not require the design of OOIs, their ability to learn without any a-priori knowledge comes at the cost of sample efficiency and explainability. Furthermore, random OOIs are as easy to use as an LSTM and lead to superior results (see Section 4.4). OOIs therefore provide a compelling alternative to recurrent neural networks over options, applicable to a wide range of problems.
|
| 120 |
+
|
| 121 |
+
Finally, the compatibility between OOIs and a large variety of reinforcement learning algorithms leads to many future research opportunities. For instance, we have obtained very encouraging results in continuous action spaces, using CACLA (?) to implement parametric options, that take continuous arguments when executed, in continuous-action hierarchical POMDPs.
|
1708.06578v2.txt
ADDED
|
@@ -0,0 +1,280 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\noindent Brain-computer interface (BCI) enables users to directly communicate with the outside world or to control instruments using brain intentions alone, thus providing an alternatively practical way to help people who are suffering from severe motor disabilities. Recent research has also found its applications for healthy users, such as BCI games in entertainment industries \cite{ahn2014review}. Scalp-recording electroencephalography (EEG) is considered to be one of the most practical pathways to realize BCI systems due to its portable acquisition system and convenient implementation \cite{wang2014asynchronous}. When a person {\em imagines} moving different parts of his body or different controlling commands for an instrument, the EEG signals from his scalp fluctuates in different modes. In this way, human intentions can be recognized by analyzing the EEG signals. It has been attracting increasing attentions, and various research has attempted to engage EEG based BCI in real-world applications such as mind controlled wheelchairs \cite{wang2014asynchronous}, prosthetic \cite{bright2016eeg} and exoskeletons \cite{qiu2017brain}.
|
| 3 |
+
|
| 4 |
+
\begin{figure*}[htb!]
|
| 5 |
+
\centering
|
| 6 |
+
\includegraphics[width=1\textwidth]{"arch"}
|
| 7 |
+
\caption{EEG data acquisition and preprocessing. EEG signals are first captured using a BCI headset with multiple electrodes and recorded as time series data vectors. These data vectors are then converted to 2D data meshes according to the electrode map of the BCI headset. The converted 2D meshes are finally segmented to clips using sliding window techniques.}
|
| 8 |
+
\label{fig:data precess}
|
| 9 |
+
\end{figure*}
|
| 10 |
+
|
| 11 |
+
However, real-world EEG based BCI systems are still immature due to diverse open challenges. First, EEG signals usually have a mass of noises.
|
| 12 |
+
Apart from the common noises of sensory systems, such as power line interference or inappropriate electrode connections, EEG signals have some unique inevitable noises. During the recording process, physiological activities like eye blinks, muscle activity and heart beat are all harm to collecting high signal-noise ratio EEG signals. It is hard to make sure that the participants concentrate on the performing tasks during the whole experiment period. Also, a typical EEG based BCI system usually has 8 to 128 signal channels resulting in limited signal resolution compared to image or video related tasks. Second, the correlations between the EEG signals and their corresponding brain intentions in deep structures are ambiguous. Unlike the body actions which can be easily explained by monitoring accelerometers or gyroscopes, it is not straightforward to infer the brain intentions by directly observing EEG signals. Third, widely utilized brain intention recognition methods heavily rely on handcrafted features, requiring extensive preprocessing before making a prediction \cite{sun2014review}. Some methods include signal de-noising \cite{heydari2015adaptive} or feature selection steps \cite{yin2017cross} followed by final recognition model. Such a two-stage model is inconvenient to train and implement, and the whole process is time-consuming and highly dependent on professional knowledge in this domain. Finally, current work mainly targets either intra-subject (test data and train data are from the same subject) or binary EEG signal classification scenarios. Little research has been carried out on both cross-subject and multi-class scenarios. However, the cross-subject and multi-class scenarios are highly desired for implementing real-world applications. Furthermore, even under intra-subject or binary classification scenarios, many existing works suffer poor performance near 80\% accuracy.
|
| 13 |
+
|
| 14 |
+
In recent years, deep learning's revolutionary advances in audio and visual signals recognition have gained significant attentions \cite{lecun2015deep}. Some recent deep learning based EEG classification approaches have enhanced the recognition accuracy \cite{pouya2016learning,tabar2016novel}. However, these approaches either focus on complex preprocessing, such as converting raw EEG signals to images \cite{pouya2016learning}, or neglecting the subtle spatial and temporal information contained within EEG signals. Hence, current methods still have limited capabilities in dealing with cross-subject and multi-class scenarios.
|
| 15 |
+
|
| 16 |
+
To tackle the above obstacles for further developing EEG-based BCIs, we present in this paper, two kinds of convolutional recurrent neural networks, which we call cascade and parallel models,
|
| 17 |
+
to detect human intentions through learning the effective compositional spatio-temporal dynamics from {\em raw} EEG streaming signals without preprocessing. In particular, we build a mesh-like raw EEG signal hierarchy from 1D chain-like EEG vectors by mapping the EEG recordings with the spatial information of EEG acquisition electrodes, to align the correlations between neighbouring EEG signals and corresponding brain areas. Next, both cascade and parallel convolutional recurrent network models are developed to decode robust EEG representations from both space and time dimensions in sequence or in parallel respectively. The proposed models are unified end-to-end trainable models, simultaneously learning the robust feature representations and classifying the EEG raw signals to detect movement or instruction intentions. The proposed models have good generalization in more complex and practical scenarios (both cross-subject and multi-class). Both the cascade and parallel models achieve high accuracy of near 98.3\% for movement intention recognition, significantly outperforming the state-of-the-art methods by near 18\%. We also evaluate our models on a real-world BCI system, and obtain a satisfactory accuracy of 93\% on recognizing five instruction intentions with limited EEG channels. This reveals that our proposed models have robust capabilities to recognize diverse kinds of human intentions using different BCI systems.
|
| 18 |
+
\section{The Proposed Method}
|
| 19 |
+
In this section, we describe the detailed architectures of the proposed cascade and parallel convolutional recurrent network approaches.
|
| 20 |
+
\subsection{Converting 1D EEG Sequences to 2D EEG Meshes}
|
| 21 |
+
The overall EEG data acquisition and preprocessing flowchart of our proposed method is shown in Figure \ref{fig:data precess}. The EEG based BCI system uses a wearable headset with multiple electrodes to capture the EEG signals. When a subject {\em imagines} performing a certain instruction, the electrodes of the headset acquire the fluctuations of the voltages from the scalp. The EEG electrode map in Figure \ref{fig:data precess} depicts the electrodes placement of an example BCI headset.
|
| 22 |
+
The electrode map varies from different BCI systems according to the different number of recording channels. The sensory readings from the EEG acquisition system represent time series data at the acquiring frequency. Typically, the raw data from EEG signal acquisition system at time index \textbf{\textit{t}} is a one-dimensional (1D) data vector $\textbf{r}_{t} = [s_{t}^{1},\enspace s_{t}^{2}\enspace, s_{t}^{i}...\enspace, s_{t}^{n}]^{T}$, where $s_{t}^{i}$ is the reading data of the $i$th electrode channel at time stamp $t$. The acquisition system totally contains $n$ channels. For the observation period $[t,\enspace t+N]$, there are $(N+1)$ 1D data vectors, each of which contains $n$ elements corresponding to $n$ electrodes of the acquisition headset.
|
| 23 |
+
|
| 24 |
+
From the EEG electrode map, it is observed that each electrode is physically neighboring multiple electrodes which measures the EEG signals in a certain area of brain, while the elements of the chain-like 1D EEG data vectors are restricted to two neighbors. Furthermore, different brain regions correspond to different brain activities. From this conceptualization, we convert the 1D EEG data vectors to 2D EEG data meshes according to the spatial information of the electrode distribution of the acquisition system. The transformation function of the 1D data vector $\textbf{r}_{t}$ at time stamp $t$ for its corresponding 2D data mesh $\textbf{m}_{t}$ is denoted as follows:
|
| 25 |
+
|
| 26 |
+
\begin{equation}\label{eq:1}
|
| 27 |
+
\textsl{T}(\textbf{r}_{t}) = \left[ \begin{smallmatrix} 0&0&0&0&s_{t}^{22}&s_{t}^{23}&s_{t}^{24}&0&0&0&0\\ 0&0&0&s_{t}^{25}&s_{t}^{26}&s_{t}^{27}&s_{t}^{28}&s_{t}^{28}&0&0&0\\
|
| 28 |
+
0&s_{t}^{30}&s_{t}^{31}&s_{t}^{32}&s_{t}^{33}&s_{t}^{34}&s_{t}^{35}&s_{t}^{36}&s_{t}^{37}&s_{t}^{38}&0\\
|
| 29 |
+
0&s_{t}^{39}&s_{t}^{1}&s_{t}^{2}&s_{t}^{3}&s_{t}^{4}&s_{t}^{5}&s_{t}^{6}&s_{t}^{7}&s_{t}^{40}&0\\
|
| 30 |
+
s_{t}^{43}&s_{t}^{41}&s_{t}^{8}&s_{t}^{9}&s_{t}^{10}&s_{t}^{11}&s_{t}^{12}&s_{t}^{13}&s_{t}^{14}&s_{t}^{42}&s_{t}^{44}\\
|
| 31 |
+
0&s_{t}^{45}&s_{t}^{15}&s_{t}^{16}&s_{t}^{17}&s_{t}^{18}&s_{t}^{19}&s_{t}^{20}&s_{t}^{21}&s_{t}^{46}&0\\
|
| 32 |
+
0&s_{t}^{47}&s_{t}^{48}&s_{t}^{49}&s_{t}^{50}&s_{t}^{51}&s_{t}^{52}&s_{t}^{53}&s_{t}^{54}&s_{t}^{55}&0\\
|
| 33 |
+
0&0&0&s_{t}^{56}&s_{t}^{57}&s_{t}^{58}&s_{t}^{59}&s_{t}^{60}&0&0&0\\
|
| 34 |
+
0&0&0&0&s_{t}^{61}&s_{t}^{62}&s_{t}^{63}&0&0&0&0\\
|
| 35 |
+
0&0&0&0&0&s_{t}^{64}&0&0&0&0&0\\ \end{smallmatrix} \right]
|
| 36 |
+
\end{equation}
|
| 37 |
+
|
| 38 |
+
\noindent where the positions of the \textit{null} electrodes are padding with zeros. Through this transformation, the raw 1D data vector series $[\textbf{r}_{t},\enspace\textbf{r}_{t+1}\enspace...\enspace\textbf{r}_{t+N}]$ is converted to the 2D data mesh series $[\textbf{m}_{t},\enspace\textbf{m}_{t+1}\enspace...\enspace\textbf{m}_{t+N}]$. During observation duration $[t,\enspace t+N]$, the number of 2D data meshes is still $(N+1)$. After 2D data mesh transformation, the data mesh is normalized across the non-zero elements using Z-score normalization. Each of the resulted 2D data meshes contains the spatial information of the brain activity at its recording time. During the recording process, some EEG readings are variably missing largely due to issues of electrical conductivity and subjects movement, resulting in all channels recording zeros. This issue is unavoidable in sensor-based systems, and it might not be tolerated by BCIs. From the application point of view, smooth manipulation of the BCI system provides improved user experience. For this reason, a BCI system should preferably translate brain activities to the output information continuously without interruption. As missing information is a clinical reality, in this work we preserve the incomplete recordings which are discarded in previous work \cite{kim2016motor} to maintain the integrity of EEG signals. The experimental results show our 2D EEG meshes perform well in dealing with the ``missing readings".
|
| 39 |
+
|
| 40 |
+
Up to this point, we apply the sliding window approach to divide the streaming 2D meshes to individual clips as shown in the last step of Figure \ref{fig:data precess}. Each clip has fixed length of time series 2D data meshes with 50\% overlapping between continuous neighbors. The data meshes segment $\textbf{S}_j$ is created as follows:
|
| 41 |
+
|
| 42 |
+
\begin{ceqn}
|
| 43 |
+
\begin{align*}
|
| 44 |
+
\textbf{S}_{j} = [\textbf{m}_{t}, \enspace\textbf{m}_{t+1}\enspace...\enspace\textbf{m}_{t+S-1}]
|
| 45 |
+
\end{align*}
|
| 46 |
+
\end{ceqn}
|
| 47 |
+
where $S$ is the window size and $j = 1,2,...,q$ with $q$ segments during the observation period. Our goal is to develop an effective model to recognize a set of human intentions $\textbf{A} = [a_{1},\enspace a_{2}\enspace...\enspace a_{K}]^{T}$ from each windowed data meshes segment $\textbf{S}_{j}$. The recognition approach tries to predict the human intention $\textbf{Y}_{t}\in\textbf{A}$ performed during this windowed period.
|
| 48 |
+
|
| 49 |
+
\begin{figure}[htb]
|
| 50 |
+
\centering
|
| 51 |
+
\includegraphics[width=.47\textwidth]{"flow_cascade"}
|
| 52 |
+
\caption{Cascade convolutional recurrent neural network architecture.}
|
| 53 |
+
\label{fig:cascade}
|
| 54 |
+
\end{figure}
|
| 55 |
+
\subsection{Cascade Convolutional Recurrent Network}
|
| 56 |
+
We first design a cascade deep convolutional recurrent neural network framework illustrated in Figure \ref{fig:cascade}, capturing the spatial and temporal features in EEG sequences. The input to the model is the preprocessed segment of 2D data meshes (e.g., $\textbf{S}_{j}$), creating a 3D data architecture containing both spatial and temporal information. We first extract the spatial features of each data mesh, and then feed the sequence of the extracted spatial features into the RNN to extract temporal features. One fully connected layer receives the output of the last time step of the RNN layers, and feeds the softmax layer for final intention prediction.
|
| 57 |
+
|
| 58 |
+
To extract the spatial features of each data mesh, we apply a mesh-wise deep 2D-CNN as shown in Figure \ref{fig:cascade}. The $j$th input segment is defined as $\textbf{S}_{j}= [\textbf{m}_{t},\enspace\textbf{m}_{t+1}\enspace...\enspace\textbf{m}_{t+S-1}]\in \mathbb{R}^{S\times h \times w}$, where there are $S$ data meshes denoted as $\textbf{m}_k\enspace(k=t,\enspace t+1\enspace...\enspace t+S-1$), and each data mesh is of size $h\times w$. The data meshes are input to a 2D-CNN individually, and each resolves to a spatial feature representation $\textbf{f}_k\enspace(k=t,\enspace t+1\enspace...\enspace t+S-1)$:
|
| 59 |
+
|
| 60 |
+
\begin{ceqn}
|
| 61 |
+
\begin{align*}
|
| 62 |
+
\text{CasCNN:}\enspace\textbf{f}_k &= C_{2D}(\textbf{m}_k),\enspace\textbf{f}_k\in \mathbb{R}^{l}.
|
| 63 |
+
\end{align*}
|
| 64 |
+
\end{ceqn}
|
| 65 |
+
|
| 66 |
+
\noindent The final spatial feature representation $\textbf{f}_k$ is a feature vector with $l$ elements. Through the 2D-CNN spatial feature extraction step, the input segments are transformed to sequences of spatial feature representations:
|
| 67 |
+
\begin{ceqn}
|
| 68 |
+
\begin{align*}
|
| 69 |
+
\text{CasCNN:}\enspace\textbf{S}_{j} \Rightarrow \textbf{F}_{j},
|
| 70 |
+
\text{where}\enspace\textbf{F}_{j}= [\textbf{f}_{t}\enspace...\enspace\textbf{f}_{t+S-1}]\in\mathbb{R}^{S\times l}.
|
| 71 |
+
\end{align*}
|
| 72 |
+
\end{ceqn}
|
| 73 |
+
|
| 74 |
+
Concretely, there are three 2D convolutional layers with the same kernel size of $3 \times 3$ for spatial feature extraction. In each convolutional operation we use zero-padding techniques to prevent missing the information at the edge of the input data mesh. This creates feature maps with the same size as the raw input EEG data mesh of $h\times w$. We start the first convolutional layer with 32 feature maps, and double the feature maps in each of the following convolutional layers. As a result, there are 128 feature maps in the last convolutional layer. After these three convolutional layers, a fully connected layer with 1024 neurons is applied to convert the 128 feature maps to the final spatial feature representation $\textbf{f}_k\in \mathbb{R}^{1024}$. This fully connected layer is optional for feeding the 2D-CNN results to RNN. However, we observe that this layer is essential in helping with convergence and marginally improvement of the performance of the whole framework.
|
| 75 |
+
|
| 76 |
+
The spatial feature representation sequence $\textbf{F}_j$ is input to a RNN to computes the temporal features. We use Long Short-Term Memory (LSTM) units to construct two stacked RNN layers. LSTM is a modified RNN cell addressing the gradient vanishing and exploding problem. There are $S$ LSTM units in each layer, and the input to the second RNN layer is the output time sequence of the previous RNN layer. The hidden state of the LSTM unit of the first RNN layer at current time step $t$ is denoted as $h_t$, and the $h_{t-1}$ is the hidden state of the previous time step $t-1$. The information from the previous time step is conveyed to the current step, and influence the final output. We use the hidden state of the LSTM unit as the output of the LSTM unit. Therefore, the input sequence of the second LSTM layer, is the hidden state sequence of the first LSTM layer $[\textbf{h}_t,\enspace \textbf{h}_{t+1}\enspace...\enspace \textbf{h}_{t+S-1}]$. Since we are interested in what the brain is directing during the whole segment period, the extracted features when the LSTM has observed the entire samples of the sliding window are used for further analysis. Only the output of the last time step LSTM, $\textbf{h}'_{t_S-1}$, is fed into the next fully connected layer as shown in the final stage of Figure \ref{fig:cascade}. The temporal feature representation $\textbf{h}'_{t+S-1}$ of the segment $\textbf{S}_j$ is:
|
| 77 |
+
|
| 78 |
+
\begin{ceqn}
|
| 79 |
+
\begin{align*}
|
| 80 |
+
\text{CasRNN:}\enspace\textbf{h}'_{t+S-1} &= R_{lstm}(\textbf{F}_j),\enspace\textbf{h}'_{t+S-1}\in \mathbb{R}^{d},
|
| 81 |
+
\end{align*}
|
| 82 |
+
\end{ceqn}
|
| 83 |
+
where $d$ is the size of the hidden state of an LSTM unit. On top of the fully connected layer is the final softmax layer yielding final probability prediction of each class:
|
| 84 |
+
\begin{ceqn}
|
| 85 |
+
\begin{align*}
|
| 86 |
+
\text{FC-softmax:}\enspace\textbf{P}_{j} &= S_m(\textbf{h}'_{t+S-1}),\enspace\textbf{P}_{j}\in \mathbb{R}^{K},
|
| 87 |
+
\end{align*}
|
| 88 |
+
\end{ceqn}
|
| 89 |
+
where the framework aims to classify $K$ categories. We induce dropout operations as a form of regularization after the fully connected layers in both the 2D-CNN stage and the final classification stage.
|
| 90 |
+
|
| 91 |
+
Overall, the framework converts and splits the EEG recording streams to segments of 2D data meshes, and classifies each segment to one of the $K$ categories. Each segment $\textbf{S}_j$ contains $S$ EEG data recordings, which have been converted to $S$ 2D meshes $[\textbf{m}_{t},\enspace\textbf{m}_{t+1}\enspace...\enspace\textbf{m}_{t+S-1}]$. A 2D-CNN is applied mesh-wise in a segment to extract spatial features $[\textbf{f}_{t},\enspace\textbf{f}_{t+1}\enspace...\enspace\textbf{f}_{t+S-1}]$, and a RNN is consequently applied to extract the temporal features $\textbf{h}'_{t+S-1}$ across the data meshes. Softmax classifier finally computes the classification probabilities over $K$ brain intentions for each individual segment.
|
| 92 |
+
|
| 93 |
+
\begin{figure}[ht]
|
| 94 |
+
\centering
|
| 95 |
+
\includegraphics[width=.47\textwidth]{"flow_parallel"}
|
| 96 |
+
\caption{Parallel recurrent convolutional neural network architecture. The concatenation operation in the final spatio-temporal fusion part is used for an example.}
|
| 97 |
+
\label{fig:parallel}
|
| 98 |
+
\end{figure}
|
| 99 |
+
\subsection{Parallel Convolutional Recurrent Network}
|
| 100 |
+
We also propose a parallel convolutional recurrent network. It is illustrated in Figure \ref{fig:parallel}. It also contains two parts, CNN and RNN, for spatial and temporal feature extraction respectively. However, different from the cascade model, the parallel model extracts the spatial and temporal features of EEG signals in parallel and fuses the extracted features at last for final intention recognition. Particularly, the RNN part of the parallel model receives the data from the same segments to that feed the corresponding CNN part. The $j$th input windowed segment to the RNN part is:
|
| 101 |
+
\begin{ceqn}
|
| 102 |
+
\begin{align*}
|
| 103 |
+
\textbf{R}_{j} &= [\textbf{r}_{t}, \enspace\textbf{r}_{t+1}\enspace...\enspace\textbf{r}_{t+S-1}],
|
| 104 |
+
\end{align*}
|
| 105 |
+
\end{ceqn}
|
| 106 |
+
\noindent where $\textbf{r}_t$ is the data vector at time step $t$, and $S$ denotes the window size. The RNN part of the parallel model also has two LSTM layers, each containing the same number of LSTM units with that of the cascade model due to the same window size we use. The hidden state of the last time step in one segment is used for further analysis as well:
|
| 107 |
+
\begin{ceqn}
|
| 108 |
+
\begin{align*}
|
| 109 |
+
\textbf{h}'_{t+S-1} &= R_{lstm}(\textbf{R}_j),\enspace\textbf{h}'_{t+S-1}\in \mathbb{R}^{v},
|
| 110 |
+
\end{align*}
|
| 111 |
+
\end{ceqn}
|
| 112 |
+
where $v$ is the hidden state size of the LSTM unit. A fully connected layer is applied both before and after LSTM layers to enhance the temporal information representation capabilities. Thus the final temporal features from the parallel RNN part is denoted as:
|
| 113 |
+
\begin{ceqn}
|
| 114 |
+
\begin{align*}
|
| 115 |
+
\text{ParaRNN:}\textbf{O}_j &= \text{FC}(\textbf{h}'_{t+S-1}),\enspace\textbf{O}_j\in \mathbb{R}^{l},
|
| 116 |
+
\end{align*}
|
| 117 |
+
\end{ceqn}
|
| 118 |
+
where $l$ is the size of the finally fully connected layer of the parallel RNN part. The parallel CNN part which is responsible for extracting spatial features, receives the segment of 2D data meshes $\textbf{S}_{j}$ as input, and applies mesh-wise convolutional operations as the CNN part of the cascade model does. The CNN structure of the parallel model is the same with that of the cascade model as well. To be comparable to the temporal features in terms of size, the extracted spatial features $\textbf{f}_k$ at each time step in one segment are added up to a single feature vector $\textbf{L}_j$:
|
| 119 |
+
\begin{ceqn}
|
| 120 |
+
\begin{align*}
|
| 121 |
+
\text{ParaCNN:}\enspace\textbf{L}_{j} &= \sum_{k=t}^{t+S-1}\textbf{f}_k\enspace (\textbf{L}_j,\enspace\textbf{f}_k\in\mathbb{R}^{l}),
|
| 122 |
+
\end{align*}
|
| 123 |
+
\end{ceqn}
|
| 124 |
+
\noindent where $l$ is the size of the fully connected layer in the CNN part, which is the same with that of the RNN part.
|
| 125 |
+
|
| 126 |
+
The concurrently extracted spatial and temporal features are fused to a joint spatio-temporal feature vector. Various fusion approaches are developed, and the detailed results are shown in the following experiment section. A softmax layer receives the fused spatio-temporal features to finally predict the human intentions:
|
| 127 |
+
\begin{ceqn}
|
| 128 |
+
\begin{align*}
|
| 129 |
+
\text{softmax:}\enspace\textbf{P}_{j} &= S_m([\textbf{L}_j,\enspace\textbf{O}_j]),\enspace\textbf{P}_{j}\in \mathbb{R}^{K}.
|
| 130 |
+
\end{align*}
|
| 131 |
+
\end{ceqn}
|
| 132 |
+
|
| 133 |
+
In the 2D-CNN part of both the cascade and parallel models, convolutional layers are not followed by a pooling operation. Although in a typical CNN architecture a convolutional operation is often coupled with a pooling operation, it is not mandated. The pooling operation is usually used for reducing data dimensions at the cost of missing some information. However, in this EEG data analysis problem, the data dimension is much smaller than that used in computer vision research, so in order to keep all information, we concatenate three CNN layers directly without pooling operations.
|
| 134 |
+
\section{Experiments and Result Summary}
|
| 135 |
+
We focus on the PhysioNet EEG Dataset \cite{goldberger2000physiobank} of the cross-subject, multi-class scenario to evaluate the proposed cascade and parallel models for movement intention recognition. The developed models are compared against those previous reported to show the superior performance. Meanwhile, we also systematically investigate the influence of the spatial and temporal information, and the performance of different variants of both cascade and parallel models. At last a case study using a real-world BCI system is conducted to evaluate the proposed models.
|
| 136 |
+
\subsection{Dataset and Model Implementation}
|
| 137 |
+
The movement intention EEG data is collected using BCI2000 instrumentation \cite{schalk2004bci2000} with 64 electrode channels and 160Hz sampling rate. To the best of our knowledge, this dataset is so far the largest EEG-based movement intention dataset with 109 subjects. But in the data preprocessing stage, we found that the labels of the \#89 subject were severely damaged, so this participant's record was removed from further analysis. We used the EEG data from 108 subjects to build the cross-subject dataset. The dataset contains five brain activities with eye closed (baseline), imagining moving both feet, both fists, left fist and right fist.
|
| 138 |
+
|
| 139 |
+
All neural networks were implemented with the TensorFlow framework and trained on a Nvidia Titan X pascal GPU from scratch in a fully-supervised manner. The stochastic gradient descent with Adam update rule \cite{kingma2014adam}
|
| 140 |
+
is used to minimize the cross-entropy loss function. The network parameters are optimized with a learning rate of $10^{-4}$. The keep probability of the dropout operation is 0.5. According to the EEG data recording process of the evaluation dataset, the 2D data meshes are transformed with the size of $10\times11$ as shown in Figure \ref{fig:data precess}. The length of the window $S$ is set to 10. The hidden states of the LSTM cell for cascade model $d$ and parallel model $v$ are 64 and 16 respectively. All fully connected layers have the same size of 1024.
|
| 141 |
+
\subsection{Comparison Models}
|
| 142 |
+
|
| 143 |
+
\subsubsection{State-of-the-arts}
|
| 144 |
+
We will give a brief introduction of the compared state-of-the-art models. All the models are based on the same dataset with our work.
|
| 145 |
+
|
| 146 |
+
\begin{itemize}
|
| 147 |
+
\item \cite{major2017effects} researches independent component analysis (ICA) to reduce noises and feed the result to a neural network for final prediction on intra-subject binary MI-EEG classification;
|
| 148 |
+
\item \cite{shenoy2015shrinkage} uses shrinkage regularized filter bank common spatial patterns (SR-FBCSP) for intra-subject binary MI-EEG classification;
|
| 149 |
+
\item \cite{pinheiro2016wheelchair} focuses on one-against-all EEG classification using SVM, nearest neighbour and C4.5 algorithms;
|
| 150 |
+
\item \cite{kim2016motor} extracts EEG features with strong uncorrelating transform complex common spatial patterns (SUTCCSP) algorithm, and make final predictions with random forest classifier for the cross-subject binary classification;
|
| 151 |
+
\item \cite{xiang2017mobiquitous} uses autoencoder for EEG feature extraction and XGboost for final classification on five-category, cross-subject motor imagery scenario;
|
| 152 |
+
\item \cite{pouya2016learning} extracts the frequency features of EEG data, and converts the extracted features to images to feed into recurrent-convolutional
|
| 153 |
+
network. We reproduce their method on the same MI-EEG dataset with this work using their open access code.
|
| 154 |
+
\end{itemize}
|
| 155 |
+
\subsubsection{Baseline models}
|
| 156 |
+
Apart from a set of state-of-the-arts, we also compare our model with the variants of CNN- and RNN-based models. We use 1D-CNN (without spatial or temporal information), 2D-CNN (only with spatial information) and 3D-CNN (with both spatial and temporal information) models for comparison and investigating the influence of spatial and temporal information on brain intention recognition. The 1D-CNN model just uses the raw EEG vectors as input. The 2D-CNN model is fed with the data meshes transformed by equation (\ref{eq:1}), but without sliding window segmentation. The 3D-CNN model uses the same input data with that fed into the cascade model. Each of the three CNN models has three convolutional layers without subsampling layers, one fully connected layer with 1024 neurons and one softmax output layer. The kernel size of the models are $3$, $3\times 3$ and $3\times 3\times 3$ for 1D, 2D and 3D, respectively, and the stride keeps constant of $1$. There are $32$, $64$ and $128$ feature maps in CNN for all baseline models. For comparison purpose, we keep all the hyper-parameters of the baseline CNN models the same with the CNN part of our proposed method. To make a fair comparison with both the cascade model and the parallel model, we use two RNN baseline models both with two LSTM layers between two fully connected layers, and choose 64 and 16 as the hidden state size of LSTM cells respectively.
|
| 157 |
+
\subsection{Experimental Results}
|
| 158 |
+
In this section, we will present the overall performance of our proposed models and the comparison results. The influence of spatial and temporal information, and variants of the proposed models will also be systematically analyzed.
|
| 159 |
+
\subsubsection{Overall Performance}
|
| 160 |
+
\begin{table}[!htb]
|
| 161 |
+
\centering
|
| 162 |
+
\begin{scriptsize}
|
| 163 |
+
\caption{Comparison with the state-of-the-art methods and baseline methods. All the methods are based on the same dataset. RNN(64) and RNN(16) denote RNN models with hidden state size of 64 and 16 respectively. Cross-Sub (108) refers to the number of subjects included in the experiments.}
|
| 164 |
+
\begin{tabular}{ >{\centering}m{2.8cm} ccc}
|
| 165 |
+
\hline
|
| 166 |
+
\textbf{Method} &\textbf{Multi-class}&\textbf{Validation}& \textbf{Accuracy}\\
|
| 167 |
+
\hline
|
| 168 |
+
\cite{major2017effects}&Binary&Intra-Sub&0.72\\
|
| 169 |
+
\cite{shenoy2015shrinkage}&Binary&Intra-Sub&0.8206\\
|
| 170 |
+
\cite{pinheiro2016wheelchair}&Binary&Cross-Sub(10)&0.8505\\
|
| 171 |
+
\cite{kim2016motor}&Binary&Cross-Sub(105)&0.805\\
|
| 172 |
+
\cite{xiang2017mobiquitous}&Multi(5)&Cross-Sub(20)&0.794\\
|
| 173 |
+
\cite{pouya2016learning}\footnotemark&Multi(5)&Cross-Sub(108)&0.6731\\
|
| 174 |
+
\hline
|
| 175 |
+
1D-CNN&Multi(5)&Cross-Sub(108)&0.8622\\
|
| 176 |
+
2D-CNN&Multi(5)&Cross-Sub(108)&0.8841\\
|
| 177 |
+
3D-CNN&Multi(5)&Cross-Sub(108)&0.9238\\
|
| 178 |
+
\hline
|
| 179 |
+
RNN(64)&Multi(5)&Cross-Sub(108)&0.8493\\
|
| 180 |
+
RNN(16)&Multi(5)&Cross-Sub(108)&0.7468\\
|
| 181 |
+
\hline
|
| 182 |
+
\textbf{Cascade model}&Multi(5)&Cross-Sub(108)&\textbf{0.9831}\\
|
| 183 |
+
\textbf{Parallel model}&Multi(5)&Cross-Sub(108)&\textbf{0.9828}\\
|
| 184 |
+
\hline
|
| 185 |
+
\end{tabular}
|
| 186 |
+
\label{tab: stat of art}
|
| 187 |
+
\end{scriptsize}
|
| 188 |
+
\end{table}
|
| 189 |
+
|
| 190 |
+
\footnotetext{We reproduce the approach on our dataset using the open access code on github https://github.com/pbashivan/EEGLearn}
|
| 191 |
+
The overall performance of our proposed models and the comparison models are summarized in Table \ref{tab: stat of art}. It is observed that both our cascade and parallel models achieve high accuracy near 98.3\%, consistently outperforming the state-of-the-art methods and the baseline models. Even though some work is focused on simple scenarios, such as intra-subject or binary classification, our method surpasses their methods significantly. Furthermore, our 3D-CNN baseline model also achieves competitive results to the state-of-the-art work. Bashivan et al. also proposed to use CNN and RNN for EEG signal analysis \cite{pouya2016learning}. However, they used complex preprocessing steps extracting the spectral features of EEG signals and converting to 2D images instead of using the raw signal data. To make a comparison, we reproduced their method on our dataset using their open access code on Github, and the results are also shown in Table \ref{tab: stat of art}. Our approach outperforms Bashavan's models by some 30\%. This is probably because their spectral feature extraction steps include a data compression process over a large continuous sampling period, while the movement intention tasks are periodic short duration brain activities. So extracting the spectral features may lose critical informative messages within the raw signals. What's more, they also use the interpolation approach to extend the raw 64-channel data to a $32\times32$ matrix, which brings in lots of noises. Compared with previous studies, our models directly utilize the raw EEG data, with no need for domain knowledge to select related frequency bands or complicated preprocess steps at the risk of missing critical information or introducing a mass of noises.
|
| 192 |
+
In addition, less preprocess making it more favourable for real-time applications, such as BCI.
|
| 193 |
+
\subsubsection{Impact of Temporal and Spatial Information}
|
| 194 |
+
To investigate the influence of spatial and temporal information on movement intention recognition, we build up CNN and RNN baseline models as as depicted above, and their performance is also summarized in Table \ref{tab: stat of art}. It is noted that increasing the CNN model's dimension, which means adding spatial or temporal information, obviously enhances the model's performance. What's more, sole CNN or RNN models are not able to achieve comparative performance with both the cascade and parallel models. It is also observed that the 3D-CNN model, which just represents the local temporal information, is not as powerful as the proposed models that involve the global temporal information by the RNN parts. These comparison results imply that it is crucial to use both the spatial and temporal information to boost EEG-based intention recognition and analysis.
|
| 195 |
+
\subsubsection{Variants of Cascade and Parallel models}
|
| 196 |
+
\begin{table}
|
| 197 |
+
\centering
|
| 198 |
+
\begin{scriptsize}
|
| 199 |
+
\caption{Comparison of different variants of cascade convolutional recurrent network model}
|
| 200 |
+
\begin{tabular}{c|cc}
|
| 201 |
+
\hline
|
| 202 |
+
\textbf{Cascade structure}& \textbf{Accuracy}& \textbf{F1 score}\\
|
| 203 |
+
\hline
|
| 204 |
+
1-layer CNN+FC+2-layer RNN+FC&0.9310&0.9207\\
|
| 205 |
+
2-layer CNN+FC+2-layer RNN+FC&0.9712&0.9676\\
|
| 206 |
+
\textbf{3-layer CNN+FC+2-layer RNN+FC}&\textbf{0.9831}&\textbf{0.9804}\\
|
| 207 |
+
\hline
|
| 208 |
+
3-layer CNN+2-layer RNN+FC&0.9217&0.9117\\
|
| 209 |
+
3-layer CNN+FC+2-layer RNN&0.9801&0.9783\\
|
| 210 |
+
\hline
|
| 211 |
+
3-layer CNN+FC+1-layer RNN+FC&0.9813&0.9791\\
|
| 212 |
+
\hline
|
| 213 |
+
\end{tabular}
|
| 214 |
+
\label{tab: cascade}
|
| 215 |
+
\end{scriptsize}
|
| 216 |
+
\end{table}
|
| 217 |
+
|
| 218 |
+
\begin{table}[!htb]
|
| 219 |
+
\centering
|
| 220 |
+
\begin{scriptsize}
|
| 221 |
+
\caption{Comparison of different structures of parallel convolutional recurrent network model. Conv is short for point-wise convolutional operation.}
|
| 222 |
+
\begin{tabular}{cc|cc}
|
| 223 |
+
\hline
|
| 224 |
+
\textbf{Parallel structure}& \textbf{Fusion method}& \textbf{Accuracy}& \textbf{F1 score}\\
|
| 225 |
+
\hline
|
| 226 |
+
|
| 227 |
+
1-layer CNN+FC&\multirow{2}{*}{Concatenation}&\multirow{2}{*}{0.9487}&\multirow{2}{*}{0.9432}\\
|
| 228 |
+
FC+2-layer RNN+FC&&\\
|
| 229 |
+
|
| 230 |
+
2-layer CNN+FC&\multirow{2}{*}{Concatenation}&\multirow{2}{*}{0.9727}&\multirow{2}{*}{0.9697}\\
|
| 231 |
+
FC+2-layer RNN+FC&&\\
|
| 232 |
+
|
| 233 |
+
\textbf{3-layer CNN+FC}&\multirow{2}{*}{\textbf{Concatenation}}&\multirow{2}{*}{\textbf{0.9828}}&\multirow{2}{*}{\textbf{0.9810}}\\
|
| 234 |
+
\textbf{FC+2-layer RNN+FC}&&\\
|
| 235 |
+
|
| 236 |
+
3-layer CNN+FC&\multirow{2}{*}{Concatenation}&\multirow{2}{*}{0.9821}&\multirow{2}{*}{0.9793}\\
|
| 237 |
+
FC+1-layer RNN+FC&&\\
|
| 238 |
+
\hline
|
| 239 |
+
3-layer CNN+FC&\multirow{2}{*}{Summation}&\multirow{2}{*}{0.9813}&\multirow{2}{*}{0.9792}\\
|
| 240 |
+
FC+2-layer RNN+FC&&\\
|
| 241 |
+
\hline
|
| 242 |
+
3-layer CNN+FC&\multirow{2}{*}{Concatenation+FC}&\multirow{2}{*}{0.9696}&\multirow{2}{*}{0.9661}\\
|
| 243 |
+
FC+2-layer RNN+FC&&\\
|
| 244 |
+
\hline
|
| 245 |
+
3-layer CNN+FC&\multirow{2}{*}{Concatenation+Conv}&\multirow{2}{*}{0.9666}&\multirow{2}{*}{0.9626}\\
|
| 246 |
+
FC+2-layer RNN+FC&&\\
|
| 247 |
+
\hline
|
| 248 |
+
\end{tabular}
|
| 249 |
+
\label{tab: parallel}
|
| 250 |
+
\end{scriptsize}
|
| 251 |
+
\end{table}
|
| 252 |
+
Since it is impossible to exhaustively investigate the neural network architectures, here we study the effects of the key components of the proposed models. The results are summarized in Table \ref{tab: cascade} and Table \ref{tab: parallel} for the cascade model and the parallel model respectively. It is shown that more CNN or RNN layers would result better accuracy for both frameworks. However this performance improvement is at the cost of computational resources, thus we choose three CNN layers and two RNN layers by the trade-off between performance and efficiency. Fully connected layers are also critical components for the cascade model to create robust spatio-temporal representations, especially the layer linking the CNN part and the RNN part. In the parallel model, the data flows through the CNN and RNN concurrently, and there are diverse methods to fuse the parallel features. Here two basic fusion approaches (concatenation and summation) as well as two improved fusion approaches (concatenation joint fully connected layer and concatenation joint pointwise convolutional operation \cite{Chollet_2017_CVPR}) are studied. It is interesting to find that the basic fusion methods perform better results with accuracy higher than 98\%. Complex or advanced neural network needs careful training and parameter tuning to achieve better performance, thus it is redundant to add more operations when basic approaches are capable to achieve satisfactory results.
|
| 253 |
+
|
| 254 |
+
\begin{figure}[htb]
|
| 255 |
+
\subfloat{
|
| 256 |
+
\includegraphics[width=.195\textwidth]{"collection"}}
|
| 257 |
+
\subfloat{
|
| 258 |
+
\includegraphics[width=.265\textwidth]{"eeg"}}
|
| 259 |
+
\caption{EEG signal recording process (a) A participant performing the prompted intention task (b) Raw EEG signal recording interface}
|
| 260 |
+
\label{fig:recording}
|
| 261 |
+
\end{figure}
|
| 262 |
+
\subsection{Case Study}
|
| 263 |
+
We evaluate the proposed models on our experimental dataset for instruction intention recognition. The 14-channel wireless EMOTIV Epoc+ EEG acquisition system was used to record raw EEG signals with sampling rate of 128Hz. The recording process is shown in Figure \ref{fig:recording}. Each participant executed five kinds of instruction intentions according to the prompts on the indicator in front of him. Arrows of four directions prompt the participants to perform intending to move the arrows to the corresponding directions, namely forward, backward, left and right. A circle prompts the participant to think nothing but to stare at the screen, representing \textit{null} intentions. In one recording trial, the participants perform an intention task for 10 seconds followed by a 10-second rest. Every volunteer performs 30 trials, and there are totally 9 volunteers including 3 females and 6 males. Finally we got 270 trials, 54 trials for each intention. All the recordings are mixed up to form a cross-subject multi-class dataset for further evaluating. During the experimental process, it is found that physiological activities such as eye blinks have significant affect on the quality of the recorded signals (Figure \ref{fig:recording}), which makes intention recognition difficult.
|
| 264 |
+
\begin{figure}[htb]
|
| 265 |
+
\subfloat{
|
| 266 |
+
\includegraphics[width=.275\textwidth]{"confusion"}}
|
| 267 |
+
\subfloat{
|
| 268 |
+
\includegraphics[width=.185\textwidth]{"case_study"}}
|
| 269 |
+
\caption{Instruction intention recognition results (a) Confusion matrix of cascade model (b) Confusion matrix of parallel model (c) Performance comparison}
|
| 270 |
+
\label{fig:casestudy}
|
| 271 |
+
\end{figure}
|
| 272 |
+
The instruction intention recognition is of more practical significance for general BCI applications. Figure \ref{fig:casestudy} shows the evaluating results on the case study dataset. Both the cascade and parallel models achieve excellent recognition accuracy higher than 90\%. The parallel model obtains the highest accuracy of 93.1\%, surpassing the best baseline model by more than 20\%. It is also noticed that the 2D-CNN model outperforms the 1D-CNN model, emphasizing the importance of spatial information for recognizing human intentions. Unexpectedly, the 3D-CNN model performs almost the same as the 2D-CNN model. This is probably due to the local temporal representations are of less effect on EEG signal analysis. However the global temporal information induced by the cascade and parallel models enhance the recognition performance considerably. We notice that the resulting performance is marginally lower than that using the PhysioNet dataset. This is due to the limited recording resolution of 14 EEG channels in our case study experiments compared with 64 recording channels in the PhysioNet dataset.
|
| 273 |
+
\subsubsection{Demonstration}
|
| 274 |
+
The proposed framework was finally deployed on a customized BCI typing system. The alphabet is divided into clusters and instruction intentions of different directions are used to select different clusters. When one cluster is selected, its contained letters will be further divided until there is only one letter left in one cluster. \footnote{https://youtu.be/A9oqzNXejkg}
|
| 275 |
+
\section{Conclusions}
|
| 276 |
+
In this paper, we propose the use of spatio-temporal representations to enhance EEG-based intention recognition in a more practical scenario of cross-subject and multi-class, and develop two unified end-to-end trainable deep learning models for both movement intention and instruction intention recognition.
|
| 277 |
+
Experiments on both the public dataset and the real-world BCI dataset demonstrate the effectiveness and feasibility of our models over diverse human intentions and various EEG resolutions. The variants of the proposed models and the influence of the spatio-temporal information are also systematically investigated. This work makes an important developing step toward accurate human intention recognition for practical BCI system research.
|
| 278 |
+
|
| 279 |
+
\bibliography{Bibliography-File}
|
| 280 |
+
\bibliographystyle{aaai}
|
1708.06832v3.txt
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Recent years have seen advancement in visual recognition tasksby increasingly accurate convolutional neural networks, from AlexNet (Krizhevsky et al., 2012) and VGG (Simonyan & Zisserman, 2015), to ResNet (He et al., 2016), ResNeXt (Xie et al., 2017), and DenseNet (Huang et al., 2017b).As models become more accurate and computationally expensive, it becomes more difficult for applications to choose between slow predictors with high accuracy and fast predictors with low accuracy.Some applications also desire multiple trade-offs between computation and accuracy, because they have computational budgets that may vary at test time. E.g., web servers for facial recognition or spam filtering may have higher load during the afternoon than at midnight. Autonomous vehicles need faster object detection when moving rapidly than when it is stationary. Furthermore, real-time and latency sensitive applications may desire fast predictions on easy samples and slow but accurate predictions on difficult ones.
|
| 2 |
+
|
| 3 |
+
An anytime predictor (Horvitz, 1987; Boddy & Dean, 1989; Zilberstein, 1996; Grubb & Bagnell, 2012; Huang et al., 2017a) can automatically trade off between computation and accuracy. For each test sample, an anytime predictor produces a fast and crude initial prediction and continues to refine it as budget allows, so that at any test-time budget, the anytime predictor has a valid result for the sample, and the more budget is spent, the better the prediction.Anytime predictors are different from cascaded predictors (Viola & Jones, 2001; Xu et al., 2014; Cai et al., 2015; Bolukbasi et al., 2017; Guan et al., 2017) for budgeted prediction, which aim to minimize average test-time computational cost without sacrificing average accuracy: a different task (with relation to anytime prediction). Cascades achieve this by early exiting on easy samples to save computation for difficult ones, but cascades cannot incrementally improve individual samples after an exit. Furthermore, early exit policy of cascades can be combined with existing anytime predictors (Bolukbasi et al., 2017; Guan et al., 2017). Hence, we consider cascades to be orthogonal to anytime predictions.
|
| 4 |
+
|
| 5 |
+
This work studies how to convert well-known DNN architectures to produce competitive anytime predictions.We form anytime neural networks (ANNs) by appending auxiliary predictions and losses to DNNs, as we will detail in Sec. 3 and Fig. 1b. Inference-time prediction then can be stopped at the latest prediction layer that is within the budget. Note that this work deals with the case where it is not known apriori where the interrupt during inference time will occur.We define the optimal at each auxiliary loss as the result from training the ANN only for that loss to convergence. Then our objective is to have near-optimal final predictions and competitive early ones. Near-optimal final accuracy is imperative for anytime predictors, because, as demonstrated in Fig. 1a, accuracy gains are often exponentially more expensive as model sizes grow, so that reducing 1% error rate could take 50% extra computation. Unfortunately, existing anytime predictors often optimize the anytime losses in static weighted sums (Lee et al., 2015; Zamir et al., 2017; Huang et al., 2017a) that poorly optimize final predictions, as we will show in Sec. 3 and Sec. 5.
|
| 6 |
+
|
| 7 |
+
Instead, we optimize the losses in an adaptive weighted sum, where the weight of a loss is inversely proportional to the empirical mean of the loss on the training set. Intuitively, this normalizes losses to have the same scale, so that the optimization leads each loss to be about the same relative to its optimal. We provide multiple theoretical considerations to motivate such weights.First of all, when the losses are mean square errors, our approach is maximizing the likelihood of a model where the prediction targets have Gaussian noises. Secondly, inspired by the maximum likelihood estimation, we optimize the model parameters and the loss weights jointly, with log-barriers on the weights to avoid the trivial solution of zero weights. Finally, we find the joint optimization equivalent to optimizing the geometric mean of the expected training losses, an objective that treats the relative improvement of each loss equally. Empirically, we show on multiple models and visual recognition data-sets that the proposed adaptive weights outperform natural, non-adaptive weighting schemes as follows.We compare small ANNs using our adaptive weights against ANNs that are 50∼100%similar-to50percent10050\sim 100\% larger but use non-adaptive weights. The small ANNs can reach the same final accuracy as the larger ones, and reach each accuracy level faster.
|
| 8 |
+
|
| 9 |
+
Early and late accuracy in an ANN are often anti-correlated (e.g., Fig. 7 in (Huang et al., 2017a) shows ANNs with better final predictions have worse early ones). To mitigate this fundamental issue we propose to assemble ANNs of exponentially increasing depths. If ANNs are near-optimal in a late fraction of their layers, the exponential ensemble only pays a constant fraction of additional computation to be near-optimal at every test-time budget. In addition, exponential ensembles outperform linear ensembles of networks, which are commonly used baselines for existing works (Zamir et al., 2017; Huang et al., 2017a).In summary our contributions are:•We derive an adaptive weight scheme for training losses in ANNs from multiple theoretical considerations, and show that experimentally this scheme achieves near-optimal final accuracy and competitive anytime ones on multiple data-sets and models.•We assemble ANNs of exponentially increasing depths to achieve near-optimal anytime predictions at every budget at the cost of a constant fraction of additional consumed budget.
|
| 10 |
+
|
| 11 |
+
Meta-algorithms for anytime and budgeted prediction.Anytime and budgeted prediction has a rich history in learning literature.(Weinberger et al., 2009; Xu et al., 2012, 2013) sequentially generate features to empower the final predictor.(Reyzin, 2011; Grubb & Bagnell, 2012; Hu et al., 2016) apply boosting and greedy methods to order feature and predictor computation.(Karayev et al., 2012; Odena et al., 2017) form Markov Decision Processes for computation of weak predictors and features, and learn policies to order them. However, these meta-algorithms are not easily compatible with complex and accurate predictors like DNNs, because the anytime predictions without DNNs are inaccurate, and there are no intermediate results during the computation of the DNNs.Cascade designs for budgeted prediction (Viola & Jones, 2001; Lefakis & Fleuret, 2010; Chen et al., 2012; Xu et al., 2014; Cai et al., 2015; Nan & Saligrama, 2017; Bolukbasi et al., 2017; Guan et al., 2017) reduce the average test-time computation by early exiting on easy samples and saving computation for difficult ones. As cascades build upon existing anytime predictors, or combine multiple predictors, they are orthogonal to learning ANNs end-to-end.
|
| 12 |
+
|
| 13 |
+
Neural networks with early auxiliary predictions.Multiple works have addressed training DNNs with early auxiliary predictions for various purposes. (Lee et al., 2015; Szegedy et al., 2017; Zhao et al., 2017; Larsson et al., 2017) use them to regularize the networks for faster and better convergence. (Bengio et al., 2009; Zamir et al., 2017) set the auxiliary predictions from easy to hard for curriculum learning. (Xie & Tu, 2015; Chen & Koltun, 2017) make pixel level predictions in images, and find learning early predictions in coarse scales also improve the fine resolution predictions. (Huang et al., 2017a) shows the crucial importance of maintaining multi-scale features for high quality early classifications. The above works use manually-tuned static weights to combine the auxiliary losses, or change the weights only once (Chen & Koltun, 2017). This work proposes adaptive weights to balance the losses to the same scales online, and provides multiple theoretical motivations. We empirically show adaptive losses induce better ANNs on multiple models, including the state-of-the-art anytime predictor for image recognition, MSDNet (Huang et al., 2017a).
|
| 14 |
+
|
| 15 |
+
Model compression.Many works have studied how to compress neural networks. (Li et al., 2017; Liu et al., 2017) prune network weights and connections. (Hubara et al., 2016; Rastegari et al., 2016; Iandola et al., 2016) quantize weights within networks to reduce computation and memory footprint.(Wang et al., 2017; Veit & Belongie, 2017) dynamically skip network computation based on samples.(Ba & Caruana, 2014; Hinton et al., 2014) transfer knowledge of deep networks into shallow ones by changing the training target of shallow networks.These works are orthogonal to ours, because they train a separate model for each trade-off between computation and accuracy, but we train a single model to handle all possible trade-offs.
|
| 16 |
+
|
| 17 |
+
As illustrated in Fig. 1b, a feed-forward network consists of a sequence of transformations f1,…,fLsubscript𝑓1…subscript𝑓𝐿f_{1},...,f_{L} of feature maps. Starting with the input feature map x0subscript𝑥0x_{0}, each subsequent feature map is generated by xi=fi(xi−1)subscript𝑥𝑖subscript𝑓𝑖subscript𝑥𝑖1x_{i}=f_{i}(x_{i-1}). Typical DNNs use the final feature map xLsubscript𝑥𝐿x_{L} to produce predictions, and hence require the completion of the whole network for results. Anytime neural networks (ANNs) instead introduce auxiliary predictions and losses using the intermediate feature maps x1,…,xL−1subscript𝑥1…subscript𝑥𝐿1x_{1},...,x_{L-1}, and thus, have early predictions that are improving with computation.
|
| 18 |
+
|
| 19 |
+
Weighted sum objective. Let the intermediate predictions be y^i=gi(xi)subscript^𝑦𝑖subscript𝑔𝑖subscript𝑥𝑖\hat{y}_{i}=g_{i}(x_{i}) for some function gisubscript𝑔𝑖g_{i}, and let the corresponding expected loss be ℓi=E(x0,y)∼𝒟[ℓ(y,y^i)]subscriptℓ𝑖subscript𝐸similar-tosubscript𝑥0𝑦𝒟delimited-[]ℓ𝑦subscript^𝑦𝑖\ell_{i}=E_{(x_{0},y)\sim\mathcal{D}}[\ell(y,\hat{y}_{i})], where 𝒟𝒟\mathcal{D} is the distribution of the data, and ℓℓ\ell is some loss such as cross-entropy. Let θ𝜃\theta be the parameter of the ANN, and define the optimal loss at prediction y^isubscript^𝑦𝑖\hat{y}_{i} to be ℓi∗=minθℓi(θ)\ell_{i}*=\min_{\theta}\ell_{i}(\theta). Then the goal of anytime prediction is to seek a universalθ∗∈∩i=1L{θ′:θ′=argminθℓi(θ)}.superscript𝜃superscriptsubscript𝑖1𝐿conditional-setsuperscript𝜃′superscript𝜃′subscript𝜃subscriptℓ𝑖𝜃\theta^{*}\in\cap_{i=1}^{L}\{\theta^{\prime}:\theta^{\prime}=\arg\min_{\theta}\ell_{i}(\theta)\}.Such an ideal θ∗superscript𝜃\theta^{*} does not exist in general as this is a multi-objective optimization, which only has Pareto front, a set containing all solutions such that improving one ℓisubscriptℓ𝑖\ell_{i} necessitates degrading others. Finding all solutions in the Pareto front for ANNs is not practical or useful, since this requires training multiple models, but each ANN only runs one. Hence, following previous works on anytime models (Lee et al., 2015; Zamir et al., 2017; Huang et al., 2017a), we optimize the losses in a weighted summinθ∑i=1LBiℓi(θ),subscript𝜃superscriptsubscript𝑖1𝐿subscript𝐵𝑖subscriptℓ𝑖𝜃\min_{\theta}\sum_{i=1}^{L}B_{i}\ell_{i}(\theta),where Bisubscript𝐵𝑖B_{i} is the weight of the loss ℓisubscriptℓ𝑖\ell_{i}. We call the choices of Bisubscript𝐵𝑖B_{i} weight schemes.
|
| 20 |
+
|
| 21 |
+
Static weight schemes. Previous works often use static weight schemes as part of their formulation. Lee et al. (2015); Xie & Tu (2015); Huang et al. (2017a) use CONST scheme that sets Bi=1subscript𝐵𝑖1B_{i}=1 for all i𝑖i. Zamir et al. (2017) use LINEAR scheme that sets B1subscript𝐵1B_{1} to BLsubscript𝐵𝐿B_{L} to linearly increase from 0.250.250.25 to 111. However, as we will show in Sec. 5.2, these static schemes not only cannot adjust weights in a data and model-dependent manner, but also may significantly degrade predictions at later layers.
|
| 22 |
+
|
| 23 |
+
Qualitative weight scheme comparison. Before we formally introduce our proposed adaptive weights, we first shed light on how existing static weights suffer. We experiment with a ResNet of 15 basic residual blocks on CIFAR100 (Krizhevsky, 2009) data-set (See Sec. 5 for data-set details). An anytime predictor is attached to each residual block, and we estimate the optimal performance (OPT) in training cross entropy of predictor i𝑖i by training a network that has weight only on ℓisubscriptℓ𝑖\ell_{i} to convergence. Then for each weight scheme we train an ANN to measure the relative increase in training loss at each depth i𝑖i from the OPT. In Fig. 2a, we observe that the intuitive CONST scheme has high relative losses in late layers. This indicates that there is not enough weights in the late layers, though losses have the same Bisubscript𝐵𝑖B_{i}. We also note that balancing the weights is non-trivial. For instance, if we put half of the total weights in the final layer and distribute the other half evenly, we get the “Half-End” scheme. As expected, the final loss is improved, but this is at the cost of significant increases of early training losses. In contrast, the adaptive weight scheme that we propose next (AdaLoss), achieves roughly even relative increases in training losses automatically, and is much better than the CONST scheme in the late layers.
|
| 24 |
+
|
| 25 |
+
Adaptive Loss Balancing (AdaLoss).Given all losses are of the same form (cross-entropy), it may be surprisingthat better performance is achieved with differing weights.Because early features typically have less predictive power than later ones, early losses are naturally on a larger scale and possess larger gradients. Hence, if we weigh losses equally, early losses and gradients often dominate later ones, and the optimization becomes focused on the early losses.To automatically balance the weights among the losses of different scales, we propose an adaptive loss balancing scheme (AdaLoss). Specifically, we keep an exponential average of each loss ℓ^isubscript^ℓ𝑖\hat{\ell}_{i} during training, and set Bi∝1ℓ^iproportional-tosubscript𝐵𝑖1subscript^ℓ𝑖B_{i}\propto\frac{1}{\hat{\ell}_{i}}. This is inspired by (Chen & Koltun, 2017), which scales the losses to the same scale only once during training, and provides a brief intuitive argument: the adaptive weights set the losses to be on the same scale.We next present multiple theoretical justifications for AdaLoss.
|
| 26 |
+
|
| 27 |
+
Before considering general cases, we first consider a simple example, where the loss function ℓ(y,y^)=‖y−y^‖22ℓ𝑦^𝑦subscriptsuperscriptnorm𝑦^𝑦22\ell(y,\hat{y})=\|y-\hat{y}\|^{2}_{2} is the square loss. For this example, we model each y|xconditional𝑦𝑥y|x to be sampled from the multiplication of L𝐿L independent Gaussian distributions, 𝒩(y^i,σi2I)𝒩subscript^𝑦𝑖superscriptsubscript𝜎𝑖2𝐼\mathcal{N}(\hat{y}_{i},\sigma_{i}^{2}I) for i=1,…,L𝑖1…𝐿i=1,...,L, where y^i(x;θ)subscript^𝑦𝑖𝑥𝜃\hat{y}_{i}(x;\theta) is the ithsuperscript𝑖𝑡ℎi^{th} prediction, and σi2∈ℝ+superscriptsubscript𝜎𝑖2superscriptℝ\sigma_{i}^{2}\in\mathbb{R}^{+}, i.e.,Pr(y|x;θ,σ12,…,σL2)∝∏i=1L1σi2exp(−‖y−y^i‖222σi2)proportional-to𝑃𝑟conditional𝑦𝑥𝜃superscriptsubscript𝜎12…superscriptsubscript𝜎𝐿2superscriptsubscriptproduct𝑖1𝐿1superscriptsubscript𝜎𝑖2superscriptsubscriptnorm𝑦subscript^𝑦𝑖222superscriptsubscript𝜎𝑖2Pr(y|x;\theta,\sigma_{1}^{2},...,\sigma_{L}^{2})\propto\prod_{i=1}^{L}\frac{1}{\sqrt{\sigma_{i}^{2}}}\exp(-\frac{\|y-\hat{y}_{i}\|_{2}^{2}}{2\sigma_{i}^{2}}).Then we compute the empirical expected log-likelihood for a maximum likelihood estimator (MLE):E^[ln(Pr(y|x))]∝E^[∑i=1L(−‖y−y^i‖22σi2−lnσi2)]=∑i=1L(−ℓ~iσi2−lnσi2),proportional-to^𝐸delimited-[]𝑃𝑟conditional𝑦𝑥^𝐸delimited-[]superscriptsubscript𝑖1𝐿subscriptsuperscriptnorm𝑦subscript^𝑦𝑖22superscriptsubscript𝜎𝑖2superscriptsubscript𝜎𝑖2superscriptsubscript𝑖1𝐿subscript~ℓ𝑖superscriptsubscript𝜎𝑖2superscriptsubscript𝜎𝑖2\displaystyle\hat{E}\big{[}\ln(Pr(y|x))\big{]}\propto\hat{E}\big{[}\sum_{i=1}^{L}(-\frac{\|y-\hat{y}_{i}\|^{2}_{2}}{\sigma_{i}^{2}}-\ln\sigma_{i}^{2})\big{]}=\sum_{i=1}^{L}(-\frac{\tilde{\ell}_{i}}{\sigma_{i}^{2}}-\ln\sigma_{i}^{2}),(1)where E^^𝐸\hat{E} is averaging over samples, and ℓ~isubscript~ℓ𝑖\tilde{\ell}_{i} is the empirical estimate of ℓisubscriptℓ𝑖\ell_{i}. If we fix θ𝜃\theta and optimize over σi2superscriptsubscript𝜎𝑖2\sigma_{i}^{2}, we get σi2=ℓ~isuperscriptsubscript𝜎𝑖2subscript~ℓ𝑖\sigma_{i}^{2}=\tilde{\ell}_{i}.As computing the empirical means is expensive over large data-sets, AdaLoss replaces ℓ~isubscript~ℓ𝑖\tilde{\ell}_{i} with ℓ^isubscript^ℓ𝑖\hat{\ell}_{i}, the exponential moving average of the losses, and sets Bi∝ℓ^i−1≈σi−2proportional-tosubscript𝐵𝑖superscriptsubscript^ℓ𝑖1superscriptsubscript𝜎𝑖2B_{i}\propto\hat{\ell}_{i}^{-1}\approx\sigma_{i}^{-2} so as to solve the MLE online by jointly updating θ𝜃\theta and Bisubscript𝐵𝑖B_{i}. We note that the naturally appeared lnσi2superscriptsubscript𝜎𝑖2\ln\sigma_{i}^{2} terms in Eq. 1 are log-barriers preventing Bi=0subscript𝐵𝑖0B_{i}=0. Inspired by this observation, we form the following joint optimization over θ𝜃\theta and Bisubscript𝐵𝑖B_{i} for general losses without probability models:minθ,B1,…,BL∑i=1L(Biℓi(θ)−λlnBi),subscript𝜃subscript𝐵1…subscript𝐵𝐿superscriptsubscript𝑖1𝐿subscript𝐵𝑖subscriptℓ𝑖𝜃𝜆subscript𝐵𝑖\displaystyle\min_{\theta,B_{1},...,B_{L}}\sum_{i=1}^{L}(B_{i}\ell_{i}(\theta)-\lambda\ln B_{i}),(2)where λ>0𝜆0\lambda>0 is a hyper parameter to balance between the log-barriers and weighted losses. Under the optimal condition, Bi=λℓisubscript𝐵𝑖𝜆subscriptℓ𝑖B_{i}=\frac{\lambda}{\ell_{i}}. AdaLoss estimates this with Bi∝ℓ^i(θ)−1proportional-tosubscript𝐵𝑖subscript^ℓ𝑖superscript𝜃1B_{i}\propto\hat{\ell}_{i}(\theta)^{-1}.We can also eliminate Bisubscript𝐵𝑖B_{i} from Eq. 2 under the optimal condition, and we transform Eq. 2 to the following problem:minθ∑i=1Llnℓi(θ).subscript𝜃superscriptsubscript𝑖1𝐿subscriptℓ𝑖𝜃\displaystyle\min_{\theta}\sum_{i=1}^{L}\ln\ell_{i}(\theta).(3)This is equivalent to minimizing the geometric mean of the expected training losses, and it differs from minimizing the expected geometric mean of losses, as ln\ln and expectation are not commutable.Eq. 3 discards any constant scaling of losses automatically discarded as constant offsets, so that the scale difference between the early and late losses are automatically reconciled. Geometric mean is also known as the canonical mean to measure multiple positive quantities of various scales. To derive AdaLoss directly from Eq. 3, we note that the gradient of the objective in Eq. 3 is ∑i=1L∇ℓi(θ)ℓi(θ)superscriptsubscript𝑖1𝐿∇subscriptℓ𝑖𝜃subscriptℓ𝑖𝜃\sum_{i=1}^{L}\frac{\nabla\ell_{i}(\theta)}{\ell_{i}(\theta)}, and gradient descent combined with AdaLoss estimates the gradient with∑i=1L∇ℓi(θ)ℓ^i(θ)superscriptsubscript𝑖1𝐿∇subscriptℓ𝑖𝜃subscript^ℓ𝑖𝜃\sum_{i=1}^{L}\frac{\nabla\ell_{i}(\theta)}{\hat{\ell}_{i}(\theta)}.
|
| 28 |
+
|
| 29 |
+
In practice, we often observe ANNs using AdaLoss to be much more competitive in their later half than the early half on validation sets, such as in Table. 3a of Sec. 5.2. Fortunately, we can leverage this effect to form competitive anytime predictors at every budget, with a constant fraction of additional computation. Specifically, we assemble ANNs whose depths grow exponentially. Each ANN only starts computing if the smaller ones are finished, and its predictions are used if they are better than the best existing ones in validation. We call this ensemble an EANN, as illustrated in Fig. 2b. An EANN only delays the computation of any large ANN by at most a constant fraction of computation, because the earlier networks are exponentially smaller. Hence, if each ANN is near-optimal in later predictions, then we can achieve near-optimal accuracy at any test-time interruption, with the extra computation.Formally, the following proposition characterizes the exponential base and the increased computational cost.
|
| 30 |
+
|
| 31 |
+
This proposition says that an EANN is competitive at any budget B𝐵B against the optimal of the cost BC𝐵𝐶\frac{B}{C}. Furthermore, the stronger each anytime model is, i.e., the larger b𝑏b becomes, the smaller the computation inflation, C𝐶C, is: as b𝑏b approaches ∞\infty, supBCsubscriptsupremum𝐵𝐶\sup_{B}C, shrinks to 2, and E[C]𝐸delimited-[]𝐶E[C], shrinks to 1.Moreover, if we have M𝑀M number of parallel workers instead of one, we can speed up EANNs by computing ANNs in parallel in a first-in-first-out schedule, so that we effectively increase the constant b𝑏b to bMsuperscript𝑏𝑀b^{M} for computing C𝐶C. It is also worth noting that if we form the sequence using regular networks instead of ANNs, then we will lose the ability to output frequently, since at budget B𝐵B, we only produce Θ(log(B))Θ𝐵\Theta(\log(B)) intermediate predictions instead of the Θ(B)Θ𝐵\Theta(B) predictions in an EANN. We will further have a larger cost inflation, C𝐶C, such that supBC≥4subscriptsupremum𝐵𝐶4\sup_{B}C\geq 4 and E[C]≥1.5+2≈2.91𝐸delimited-[]𝐶1.522.91E[C]\geq 1.5+\sqrt{2}\approx 2.91, so that the average cost inflation is at least about 2.912.912.91.We defer the proofs to the appendix.
|
| 32 |
+
|
| 33 |
+
We list the key questions that our experiments aim to answer.•How do anytime predictions trained with adaptive weights compare against those trained with static constant weights (over different architectures)?(Sec. 5.2)•How do underlying DNN architectures affect ANNs? (Sec. 5.2)•How can sub-par early predictions in ANNs be mitigated by ANN ensembles?(Sec. 5.3)•How does data-set difficulty affect the adaptive weights scheme?(Sec. 5.4)
|
| 34 |
+
|
| 35 |
+
Data-sets. We experiment on CIFAR10, CIFAR100 (Krizhevsky, 2009), SVHN (Netzer et al., 2011)111Both CIFAR data-sets consist of 32x32 colored images. CIFAR10 and CIFAR100 have 10 and 100 classes, and each have 50000 training and 10000 testing images. We held out the last 5000 training samples in CIFAR10 and CIFAR100 for validation; the same parameters are then used in other models. We adopt the standard augmentation from Lee et al. (2015); He et al. (2016).SVHN contains around 600000 training and around 26032 testing 32x32 images of numeric digits from the Google Street Views. We adopt the same pad-and-crop augmentations of CIFAR for SVHN, and also add Gaussian blur.and ILSVRC (Russakovsky et al., 2015)222ILSVRC2012 (Russakovsky et al., 2015) is a visual recognition data-set containing around 1.2 million natural and 50000 validation images for 1000 classes. We report the top-1 error rates on the validation set using a single-crop of size 224x224, after scaling the smaller side of the image to 256, following (He et al., 2016)..
|
| 36 |
+
|
| 37 |
+
Training details. We optimize the models using stochastic gradient descent, with initial learning rate of 0.1, momentum of 0.9 and a weight decay of 1e-4. On CIFAR and SVHN, we divide the learning rate by 10 at 1/2 and 3/4 of the total epochs. We train for 300 epochs on CIFAR and 60 epochs on SVHN. On ILSVRC, we train for 90 epochs, and divide the learning rate by 10 at epoch 30 and 60. We evaluate test error using single-crop.
|
| 38 |
+
|
| 39 |
+
Base models. We compare our proposed AdaLoss weights against the intuitive CONST weights. On CIFAR and SVHN, we also compare AdaLoss against LINEAR and OPT, defined in Sec. 3.We evaluate the weights on multiple models including ResNet (He et al., 2016) and DenseNet (Huang et al., 2017b), and MSDNet (Huang et al., 2017a). For ResNet and DenseNet, we augment them with auxiliary predictors and losses, and call the resulting models ResANN and DenseANN, and defer the details of these models to the appendix Sec. C.
|
| 40 |
+
|
| 41 |
+
AdaLoss vs. CONST on the same models. Table 3a presents the average relative test error rate increase from OPT on 12 ResANNs on CIFAR10, CIFAR100 and SVHN333The 12 models are named by (n,c)𝑛𝑐(n,c) drawn from {7,9,13,17,25}×{16,32}791317251632\{7,9,13,17,25\}\times\{16,32\} and {(9,64),(9,128)}9649128\{(9,64),(9,128)\}, where n𝑛n represents the number of residual units in each of the three blocks of the network, and c𝑐c is the filter size of the first convolution.. As training an OPT for each depth is too expensive, we instead report the average relative comparison at 1/4, 1/2, 3/4, and 1 of the total ANN costs.We observe that the CONST scheme makes 15∼18%similar-to15percent1815\sim 18\% more errors than the OPT, and the relative gap widens at later layers. The LINEAR scheme also has about 13% relative gap in later layers. In contrast, AdaLoss enjoys small performance gaps in the later half of layers.
|
| 42 |
+
|
| 43 |
+
On ILSVRC, we compare AdaLoss against CONST on ResANN50, DenseANN169, and MSDNet38, which have similar final errors and total computational costs (See Fig. 4f). In Table 3b, we observe the trade-offs between early and late accuracy on ResANN50 and MSDNet38. Furthermore, DenseANN169 performs uniformly better with AdaLoss than with CONST.
|
| 44 |
+
|
| 45 |
+
Since comparing the weight schemes requires evaluating ANNs at multiple budget limits, and AdaLoss and CONST outperform each other at a significant fraction of depths on most of our experiments, we consider the two schemes incomparable on the same model. However, our next experiments will show later predictions to be vastly more important than the early ones.
|
| 46 |
+
|
| 47 |
+
Small networks with AdaLoss vs. large ones with CONST. Practitioners may be interested in finding the smallest anytime models that can reach certain final accuracy thresholds, and unfortunately, the accuracy gain is often exponentially more costly as the accuracy saturates. To showcase the importance of this common phenomenon and its effect on choices of weight schemes, we compare ANNs using AdaLoss against ANNs of about twice the cost but using CONST. On CIFAR100, we average the relative comparison of six such pairs of ResANNs 444AdaLoss takes (n,c)𝑛𝑐(n,c) from {7,9,13}×{16,32}79131632\{7,9,13\}\times\{16,32\}, and CONST takes (n,c)𝑛𝑐(n,c) from {13,17,25}×{16,32}1317251632\{13,17,25\}\times\{16,32\}. in Fig. 4b. E.g., the location (0.5, 200) in the plot means using half computation of the small ANN, and having 200% extra errors than it. We observe small ANNs with AdaLoss to achieve the same accuracy levels faster than large ones with CONST, because CONST neglects the late predictions and large networks, and early predictions of large networks are not as accurate of those of a small ones. The same comparisons using ResANNs result in similar results on CIFAR10 and SVHN (Fig. 4a and 4c).We also conduct similar comparisons on ILSVRC using ResANNs, and MSDNets, as shown in Fig. 4d and Fig. 4e, and observe that the smaller networks with AdaLoss can achieve accuracy levels faster than the large ones with CONST, without sacrificing much final accuracy.For instance, MSDNet (Huang et al., 2017a) is the state-of-the-art anytime predictor and is specially designed for anytime predictions, but by simply switching from their CONST scheme to AdaLoss, we significantly improve MSDNet32, which costs about 4.0e9 FLOPS (details in the appendix), to be about as accurate as the published result of MSDNet38, which has 6.6e9 total FLOPS in convolutions, and 72e6 parameters.
|
| 48 |
+
|
| 49 |
+
Various base networks on ILSVRC. We compare ResANNs, DenseANNs and MSDNets that have final error rate of near 24% in Fig. 4f, and observe that the anytime performance is mostly decided by the specific underlying model. Particularly, MSDNets are more cost-effective than DenseANNs, which in turn are better than ResANNs.However, AdaLoss is helpful regardless of underlying model. Both ResANN50 and DenseANN169 see improvements switching from CONST to AdaLoss, which is also shown in Table 3b.Thanks to AdaLoss, DenseANN169 achieves the same final error using similar FLOPS as the original published results of MSDNet38 (Huang et al., 2017a). This suggests that Huang et al. (2017a) improve over DenseANNs by having better early predictions without sacrificing the final cost efficiency via impressive architecture insight. Our AdaLoss brings a complementary improvement to MSDNets, as it enables smaller MSDNets to reach the final error rates of bigger MSDNets, while having similar or better early predictions, as shown in the previous paragraph and Fig. 4f.
|
| 50 |
+
|
| 51 |
+
EANNs on CIFAR100. In Fig. 5a, we assemble ResANNs to form EANNs555The ResANNs have c=32𝑐32c=32 and n=7,13,25𝑛71325n=7,13,25, so that they form an EANN with an exponential base b≈2𝑏2b\approx 2.By proposition 4.1, the average cost inflation is E[C]≈2.44𝐸delimited-[]𝐶2.44E[C]\approx 2.44 for b=2𝑏2b=2, so that the EANN shouldcompete against the OPT of n=20𝑛20n=20, using 2.442.442.44 times of original costs. on CIFAR100 and make three observations.First, EANNs are better than the ANN in early computation, because the ensembles dedicate early predictions to small networks. Even though CONST has the best early predictions as in Table 3a, it is still better to deploy small networks.Second, because the final prediction of each network is kept for a long period, AdaLoss leads to significantly better EANNs than CONST does, thanks to the superior final predictions from AdaLoss.Finally, though EANNs delay computation of large networks, it actually appears closer to the OPT, because of accuracy saturation. Hence, EANNs should be considered when performance saturation is severe.
|
| 52 |
+
|
| 53 |
+
EANN on ILSVRC.Huang et al. (2017a) and Zamir et al. (2017) use ensembles of networks of linearly growing sizes as baseline anytime predictors. However, in Fig. 5b, an EANN using ResANNs of depths 26, 50 and 101 outperforms the linear ensembles of ResNets and DenseNets significantly on ILSVRC.In particular, this drastically reduces the gap between ensembles and the state-of-the-art anytime predictor MSDNet (Huang et al., 2017a).Comparing ResANN 50 and the EANN, we note that the EANN achieves better early accuracy but delays final predictions.As the accuracy is not saturated by ResANN 26, the delay appears significant. Hence, EANNs may not be the best when the performance is not saturated or when the constant fraction of extra cost is critical.
|
| 54 |
+
|
| 55 |
+
In Fig. 5c, we plot the final AdaLoss weights of the same ResANN model (25,32) on CIFAR10, CIFAR100, and SVHN, in order to study the effects of the data-sets on the weights. We observe that from the easiest data-set, SVHN, to the hardest, CIFAR100, the weights are more concentrated on the final layers. This suggests that AdaLoss can automatically decide that harder data-sets need more concentrated final weights to have near-optimal final performance, whereas on easy data-sets, more efforts are directed to early predictions. Hence, AdaLoss weights may provide information for practitioners to design and choose models based on data-sets.
|
| 56 |
+
|
| 57 |
+
This work devises simple adaptive weights, AdaLoss, for training anytime predictions in DNNs. We provide multiple theoretical motivations for such weights, and show experimentally that adaptive weights enable small ANNs to outperform large ANNs with the commonly used non-adaptive constant weights. Future works on adaptive weights includes examining AdaLoss for multi-task problems and investigating its “first-order” variants that normalize the losses by individual gradient norms to address unknown offsets of losses as well as the unknown scales. We also note that this work can be combined with orthogonal works in early-exit budgeted predictions (Guan et al., 2017; Bolukbasi et al., 2017) for saving average test computation.
|
1708.07089v2.txt
ADDED
|
@@ -0,0 +1,429 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\label{sec:Intro}
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
\begin{figure}
|
| 6 |
+
\centering
|
| 7 |
+
\includegraphics[height=4.5cm]{fig/example}
|
| 8 |
+
\caption{Images with similar mean scores (i.e., around 5). The rating distributions are approximated by the score histograms (1-10). The hist., var., skew. and kur. are short for histogram, variance, skewness and kurtosis. The mean scores of the histogram are nearly the same. However, the histograms themselves with their statistics differ from each other. Images are from the AVA dataset \cite{MurrayCVPR2012}, which contains a list of photo IDs from www.dpchallenge.com.}
|
| 9 |
+
\label{fig:example}
|
| 10 |
+
\end{figure}
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
Recently, the ability of recognizing the semantic meaning of the objects in an image by computers is greatly increasing through deep convolutional neural networks. However, recognizing or assessing the aesthetic quality of an image by computers has not reached the practical precision people need.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
Subjective Image Aesthetic Quality Assessment (IAQA) is still challenging \cite{MaiCVPR2016} since the large intra class difference of images with high or low aesthetic quality, the large amount of low or high level aesthetic features, and the subjective evaluation of human rating. IAQA has been a hot topic in the communities of Computer Vision (CV), Computational Aesthetics (CA) and Computational Photography (CP).
|
| 21 |
+
|
| 22 |
+
\textbf{Related work}. As summarized by \cite{DengSPM2017}, in early work, various hand-crafted aesthetic features (i.e. aesthetic rule based features) are designed and connected with a machine classification or regression method. Another line is to use generic image description features. After that, the powerful deep feature representation learned from large amount of data has shown an ever-increased performance on this task, surpassing the capability of conventional hand-crafted features.
|
| 23 |
+
\cite{KarayevBMVC2014,LuMM2014,KaoICIP2015,LuICCV2015,LuTMM2015,DongNC2015,KaoSPIC2016,WangSP2016,MaiCVPR2016,KongECCV2016,JinWCSP2016,KaoTIP2017,MaCVPR2017}.
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
The training data of aesthetic quality assessment are often collected from the online photo sharing communities such as photo.net and dpchallenge.com, in which people rate an image by selecting one of the predefined ordinal basic integer ratings (i.e., 1-7 or 1-10). Higher values indicate better rating \cite{WuICCV2011}. Most of the above studies use the following strategies to encode the aesthetic quality, namely, 1D numerical encoding and binary encoding.
|
| 29 |
+
|
| 30 |
+
\begin{itemize}
|
| 31 |
+
|
| 32 |
+
\item \textbf{1D numerical encoding}: the 1-dimension numerical encoding use the weighted mean scores of human ratings. A regression model can be learned to predict the numerical aesthetic quality.
|
| 33 |
+
|
| 34 |
+
\item \textbf{binary encoding}: the binary encoding is used to classify the images into high or low aesthetic quality, which is determined by a threshold of the weighted mean scores of human ratings. A classifier can be learned to predict the high-low classification results.
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
\end{itemize}
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
However, although there exits consensus of the assessment of image aesthetic quality, it is still a subjective task in nature. The rated scores of multiple persons may differ greatly from each other. People tend to assign inconsistent scores to the same image \cite{WuICIP2010}. There is ambiguity in the image aesthetic quality assessment \cite{KeCVPR2006}. A scalar value is insufficient to capture the true nature of the subjectivity of image aesthetic quality \cite{WuICCV2011}. The main limitation of the above representations is that they do not provide an indicator of the degree of consensus or diversity of opinion among annotators \cite{MurrayCVPR2012}.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
Figure \ref{fig:example} shows some images from the AVA dataset \cite{MurrayCVPR2012}. Images with nearly the same mean scores (i.e., around 5) are listed. However, the distributions (approximated by the score histogram) are not that similar. Other statistics such as the variance, the median, the skewness, and the kurtosis differ greatly from each other. The human ratings are quite subjective. The mean score is greatly influenced by the low and high extremes of the rating scale, which makes it inappropriate to be a robust estimation of the whole distribution, especially when the distribution is skewed. For skewed distributions, the median value appears to be more appropriate to describe the distributions than the mean value \cite{WuICCV2011}. The Gaussian distribution is the best-performing model for only 62\% of images in AVA \cite{MurrayCVPR2012}. The others are the skewed ones and can be best fitted by the Gamma distribution \cite{MurrayCVPR2012}.
|
| 48 |
+
|
| 49 |
+
Most recently, some methods are proposed to use modified or generated score distributions for binary classification and numerical assessment on aesthetics \cite{JinICIP2016,WangIJCNN2017,HouArXiv2016}. Wu et al. \cite{WuICCV2011} propose a modified support vector regression algorithm to predict the score distribution in two small aesthetic datasets, before the large scale AVA dataset released and the popularity of deep CNNs.
|
| 50 |
+
|
| 51 |
+
Jin et al. \cite{JinICIP2016} use the weighted Chi-square distance as the loss function to predict the mean score and the standard deviation from the score distribution. Wang et al. \cite{WangIJCNN2017} explicitly modify the score distribution of the AVA dataset as Gaussian and jointly predict its mean and standard deviation. They use the asymmetrical Kullback-Leibler (KL) divergence as the loss function for their DBN network. Hou et al. \cite{HouArXiv2016} generate score distribution by mapping the real number labels to 10 aesthetic bins of the AADB dataset \cite{KongECCV2016}. They propose to use squared Earth mover's distance (EMD) as the loss function, which can be equivalent to the Euclidean distance of the two cumulative distribution functions for the ordinal basic human ratings prediction. Thus, the loss functions of \cite{HouArXiv2016} and \cite{WuICCV2011} are the same. Note that, all these methods use modified or generated score distributions for binary classification and numerical assessment on aesthetics. While our work is to directly predict the score distribution itself. Murray et al. \cite{MurrayArXiv2017} use the Huber loss combined with ResNet and SPPNet to predict the aesthetic score distribution of an image. Cui et al. \cite{CuiSigIR2017} propose to use the traditional LDL (Label Distribution Learning) technology to predict the aesthetic score distribution of an image.
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
\textbf{Our Approach}. In this work, we learn from the large aesthetic dataset to predict the aesthetic score distribution of an image, which is represented as a score vector (histogram) using the deep convolutional neural network (DCNN), so as to better capture the subjectivity of aesthetic quality assessment. Conventional CNN which aims to minimize the difference between the predicted scalar numbers or 0-1 classification vectors and the ground truth cannot be directly used for the ordinal basic rating distribution. Inspired by recent work on non-parametric Jensen-Shannon Divergence by Nguyen et al. \cite{NguyenECML2015}, a Cumulative distribution with Jensen-Shannon divergence based CNN (CJS-CNN) is presented to predict the aesthetic score distribution of human ratings. In addition, to alleviate the problem of unreliable human ratings, we propose a new reliability-sensitive learning method based on the kurtosis of the score distribution. The proposed kurtosis can be directly computed using the normalized score histogram. While the rating number is additional information of the normalized score histogram and is not always available in the training set. We compare the recently proposed loss functions designed for score distribution and LDL method with our CJS loss and RS-CJS loss in the experiments. Experimental results on large scale aesthetic dataset demonstrate the effectiveness of our introduced CJS-CNN in this task. The main contributions of our work can be summarized as follows:
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
\begin{itemize}
|
| 58 |
+
|
| 59 |
+
\item The first work that predicts a score distribution vector of the ordinal basic human ratings under the deep convolutional neural network framework on the large scale AVA dataset, which is designed to capture the subjectiveness of the human aesthetic quality assessment.
|
| 60 |
+
|
| 61 |
+
\item A novel CNN called the CJS-CNN (Cumulative distribution function with Jensen-Shannon Divergence) is introduced. Extensive comparisons with probability distribution function with Euclidean distance, cross entropy distance, Jensen-Shannon Divergence and cumulative distribution function with Euclidean distance are presented.
|
| 62 |
+
|
| 63 |
+
\item A new reliability-sensitive learning method is proposed based on the kurtosis of the score distribution.
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
\end{itemize}
|
| 68 |
+
|
| 69 |
+
Besides the overall aesthetic quality of an image, there are other targets related to aesthetics. Our score distribution prediction can be used for aesthetic image retrieval, guide for shooting good photos, automatic selector for the most aesthetic or attractive cover of a video, etc. From the score distribution, rich information can be outputted, such as mean, median, variance, skewness and kurtosis. For skewed distributions, the median value appears to be more appropriate to describe the distributions than the mean value. The variance, skewness and kurtosis can be jointly used to measure the controversy of an image. The controversy is a measure of the degree of consensus and diversity of the aesthetic assessment of an image. Some artworks may not be accepted today, but may yield potential fashion or masterpieces in the future.
|
| 70 |
+
\section{Subjectiveness Analysis of the AVA Dataset}
|
| 71 |
+
The assessment of image aesthetic quality is subjective in nature. The perception of aesthetics is affected by the nationality, ethnicity, era, age, education, emotion and many other factors of human beings. In this section we make a statistical analysis of subjectiveness or diversity of the opinion among annotators in a large-scale database for aesthetic visual analysis (AVA) \cite{MurrayCVPR2012}. This dataset is specifically constructed for the purpose of learning more about image aesthetics. All those images are directly downloaded from dpchallenge.com. For each image in AVA, there is an associated distribution of scores (1-10) voted by different viewers. The number of votes that per image gets is ranged in 78-549, with an average of 210, which enables us to have a deeper understanding of such distributions and deduce more information from them.
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
\textbf{The Standard Deviation or Variance}.
|
| 75 |
+
As described above, a mean score or a binary high-low label reveals only part of the information deduced from a score distribution. We make a statistical analysis on the number of images according to mean and standard deviation of the human ratings. The standard deviation represents the degree of consensus or diversity of human ratings for the same image, with a higher value meaning higher diversity. The number of images located in each mean and standard deviation interval is shown as a 2D histogram in Figure \ref{fig:std}. Most images' mean values are located in $[4,7]$. Images in this interval are not easy to be classified to a high-low label. Most images' standard deviation values are larger than $1.25$, which shows the diversity of the human ratings for the same image. In addition, as described in \cite{MurrayCVPR2012}, the variance or standard deviation tends to increase with the distance between the mean score and the mid-point of the rating scale.
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
|
| 79 |
+
\begin{figure}
|
| 80 |
+
\centering
|
| 81 |
+
\includegraphics[height=4cm]{fig/std}
|
| 82 |
+
\caption{The histogram of numbers of images located in different
|
| 83 |
+
intervals of the mean and standard deviation of the AVA dataset \cite{MurrayCVPR2012}. }
|
| 84 |
+
\label{fig:std}
|
| 85 |
+
\end{figure}
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
|
| 92 |
+
\textbf{The Skewness}.
|
| 93 |
+
The skewness \cite{JoanesCMSSK1998,Brown2016} is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. If the bulk of the data is at the left and the right tail is longer, we say that the distribution is skewed right or positively skewed; if the peak is toward the right and the left tail is longer, we say that the distribution is skewed left or negatively skewed. Boxplots of the skewness of score distributions for images with mean scores within a specified range are shown in the left side of Figure \ref{fig:skew_kur}. The skewness is a function of mean score in the AVA dataset. Images with mean score values from 4 to 7 tend to have a low absolute value of the skewness and can be considered as those with symmetrical score distributions. Images with mean score values lower than 4 and greater than 7 can be considered as those with positively and negatively skewed score distributions, respectively. This is likely due to the non-Gaussian nature of score distributions at the extremes of the rating scale \cite{MurrayCVPR2012}.
|
| 94 |
+
|
| 95 |
+
Most representative distributions in the AVA dataset are slightly skewed or heavily skewed. For skewed distributions, the median value appears to be more appropriate to describe the distributions than the mean value \cite{WuICCV2011}. The mean and the median values of score distributions for images with skewness within a specified range are shown in Figure \ref{fig:mean_median}. Images with low and high absolute values of the skewness can use the mean and the median to describe their score distributions, respectively.
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
\begin{figure}
|
| 99 |
+
\centering
|
| 100 |
+
\includegraphics[height=3cm]{fig/skewness}
|
| 101 |
+
\includegraphics[height=3cm]{fig/kurtosis}
|
| 102 |
+
\caption{Left: Distributions of skewness of score distributions, for images
|
| 103 |
+
with different mean scores. The red crosses are the outliers. The skewness tends to decrease from positive to negative with the mean score increasing.
|
| 104 |
+
Right: Distributions of kurtosis of score distributions, for images
|
| 105 |
+
with different mean scores.}
|
| 106 |
+
\label{fig:skew_kur}
|
| 107 |
+
\end{figure}
|
| 108 |
+
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
\textbf{The Kurtosis}.
|
| 116 |
+
The other common measure of shape is called the kurtosis \cite{JoanesCMSSK1998,Brown2016}. As skewness is the third moment of the distribution, kurtosis is the fourth moment. The kurtosis of a normal distribuation is 3. A distribution with kurtosis $<3$ and kurtosis $>3$ are called platykurtic and leptokurtic, receptively. Compared with a normal distribution, the platykurtic has shorter and thinner tails and its central peak is lower and broader and vice versa. Score distributions with larger absolute values of the kurtosis (after normalized by minus 3, i.e., normalizing the kurtosis of the normal distribution to 0) have larger divergences from the normal distribution. Boxplots of the kurtosis of score distributions for images with mean scores within a specified range are shown in the right side of Figure \ref{fig:skew_kur}. Within each range of the mean scores, there exist some images with high absolute values of kurtosis values (after normalized by minus 3), which are considered as those with unreliable score distributions.
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
\begin{figure}
|
| 120 |
+
\centering
|
| 121 |
+
\includegraphics[height=6.5cm]{fig/mean_median}
|
| 122 |
+
\caption{Distributions of mean and median of score distributions, for images
|
| 123 |
+
with different skewness scores. The divergences between the mean and the median distributions tends to increase with the distance between the skewness values and 0, which is the skewness of the symmetrical normal distribution.}
|
| 124 |
+
\label{fig:mean_median}
|
| 125 |
+
\end{figure}
|
| 126 |
+
\section{CJS based CNN for Score Hist. Prediction}
|
| 127 |
+
In this section, we introduce the proposed CJS-CNN (Cumulative distribution function with Jensen-Shannon divergence) and the reliability-sensitive learning method based on the kurtosis of the score distribution.
|
| 128 |
+
\subsection{The Score Distribution Representation}
|
| 129 |
+
With empirical data of the ordinal basic human ratings of an image from the AVA dataset, we use the score histogram to approximate the score distribution. We follow the definition in Wu et al. \cite{WuICCV2011}.
|
| 130 |
+
|
| 131 |
+
Assuming that there are $Z$ ordinal basic ratings $R = \{R_1,...R_Z\}$. In the AVA dataset, $Z=10, R = \{R_1,...R_{10}\}$. The human ratings for an image can be represented as $S = \{S(1),...,S(L)\}$, where $S(i) \in R$ is given by the $i^{th}$ person and $L$ is the number of persons who have rated this image. (In the AVA dataset, $L \in [78,549]$, with an average of 210). Then the score histogram or score vector of an image in the AVA dataset can be defined as:
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
\begin{eqnarray}
|
| 136 |
+
\begin{split}
|
| 137 |
+
y = \{h(1),...,h(i),...,h(Z)\}\\
|
| 138 |
+
h(i) = \frac{\sum_{j}^{L}\delta(S(j)=R_i)}{L},
|
| 139 |
+
\end{split}
|
| 140 |
+
\label{eq:hist}
|
| 141 |
+
\end{eqnarray}
|
| 142 |
+
where $\delta()$ is the indication function. With this representation, we can calculate the mean, median, variance, skewness, kurtosis using textbook methods.
|
| 143 |
+
\subsection{The CJS-CNN}
|
| 144 |
+
\label{sec:CJS-CNN}
|
| 145 |
+
|
| 146 |
+
We use the first $1/3$ part of the GoogLeNet (layers before the first softmax layer) as our DCNN for fast training and extensive comparisons. We replace the full connected layer before the first softmax layer of the GoogLeNet with a output layer of $Z=10$ dimensions. After each element of the output layer, we add a sigmoid layer to normalize each element to $[0,1]$. The layers after the first softmax layer of the GoogLeNet are removed for fast training and comparisons.
|
| 147 |
+
|
| 148 |
+
The score vector defined by Eq. \ref{eq:hist} can be considered as a vector. A straightforward way to calculate the loss is using the Euclidean distance. However, the score vector is an approximate of the underline probability distribution function (pdf). In addition, the score vector is built on the pre-defined ordinal basic ratings. Thus, a divergence between two cumulative distribution functions (cdf) is more appropriate for the loss function. Recently, Nguyen et al. \cite{NguyenECML2015} propose a non-parametric Jensen-Shannon divergence, which performs well in detecting differences between distributions, outperforming the state-of-the-art methods in both statistical power and efficiency for a wide range of tasks. As verified by \cite{NguyenECML2015}, the CJS is quite suit for non-parametric computation on empirical data without estimating the underline distribution, such as the ordinal basic rating data of the AVA dataset. They define the asymmetrical continuous cumulative Jensen-Shannon divergence ($ACCJS(p(X)||q(X))$) of two continuous probability distribution functions $p(X)$ and $q(X)$ as follows.
|
| 149 |
+
|
| 150 |
+
\begin{small}
|
| 151 |
+
\begin{equation}
|
| 152 |
+
\int P(x)log~\frac{P(x)}{\frac{1}{2}P(x)+\frac{1}{2}Q(x)}dx + \frac{1}{ln2} \int (Q(x)-P(x))dx
|
| 153 |
+
\end{equation}
|
| 154 |
+
\label{eq:ASCJS}
|
| 155 |
+
\end{small}
|
| 156 |
+
|
| 157 |
+
The cumulative distribution function $Y$ of the probability distribution function $y$ defined by Eq. \ref{eq:hist} is defined as follows.
|
| 158 |
+
|
| 159 |
+
\begin{equation}
|
| 160 |
+
Y(i) = \sum_{j=1}^{i} y(j)
|
| 161 |
+
\label{eq:cdf}
|
| 162 |
+
\end{equation}
|
| 163 |
+
|
| 164 |
+
\textbf{CJS}. Thus, we define the symmetrical discrete cumulative Jensen-Shannon divergence ($CJS(y_1||y_2)$) of two score histograms $y_1$ and $y_2$ defined by Eq. \ref{eq:hist} as follows, derived from ($ACCJS(p(X)||q(X))+ACCJS(q(X)||p(X))$).
|
| 165 |
+
|
| 166 |
+
\begin{small}
|
| 167 |
+
\begin{equation}
|
| 168 |
+
\frac{1}{2}
|
| 169 |
+
[
|
| 170 |
+
\sum_{i=1}^{Z}Y_1(i)log~\frac{Y_1(i)}{\frac{1}{2}Y_1(i)+\frac{1}{2}Y_2(i)}
|
| 171 |
+
+
|
| 172 |
+
\sum_{i=1}^{Z}Y_2(i)log~\frac{Y_2(i)}{\frac{1}{2}Y_1(i)+\frac{1}{2}Y_2(i)}
|
| 173 |
+
],
|
| 174 |
+
\end{equation}
|
| 175 |
+
\end{small}
|
| 176 |
+
\label{eq:D-CJS}
|
| 177 |
+
where $Y_1$ and $Y_2$ are defined by Eq. \ref{eq:cdf}. After that, we define our \textbf{CJS} loss function for the CJS-CNN as:
|
| 178 |
+
|
| 179 |
+
\begin{equation}
|
| 180 |
+
l^{CJS}(y,\hat{y}) = CJS(y||\hat{y}),
|
| 181 |
+
\label{eq:CJS}
|
| 182 |
+
\end{equation}
|
| 183 |
+
where $y$ is the ground truth score histogram, and $\hat{y}$ is the predicted score histogram by our CJS-CNN.
|
| 184 |
+
\subsection{The Reliability-sensitive Learning}
|
| 185 |
+
In Eq. \ref{eq:hist}, the larger the rating number $L$ is, the more reliable the distribution is. Wu et al. \cite{WuICCV2011} use the rating numbers to model the reliability of the score distribution. In the AVA dataset, the number of votes that per image gets is ranged in 78-549 with an average of 210, which limits the performance of the rating number based reliability learning. Besides, one cannot obtain the rating numbers from normalized score histograms. If another dataset has only normalized score histograms, one cannot use the rating number for the reliability learning.
|
| 186 |
+
|
| 187 |
+
\textbf{RS-CJS}. We propose to use the kurtosis to measure the reliability of a score distribution $y$ defined by Eq. \ref{eq:hist}. The kurtosis of a normal distribution is 3. Score distributions with kurtosis closer to 3 have smaller divergence from the normal distribution. Thus, inspired by Wu et al. \cite{WuICCV2011}, we define the reliability factor $r^{kurtosis}$ as follows.
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
\begin{eqnarray}
|
| 191 |
+
\begin{split}
|
| 192 |
+
r^{kurtosis}(y) & = \mu(T(y)), T(y) = \frac{1}{|kus(y)-3|}\\
|
| 193 |
+
\mu(T(y)) & =
|
| 194 |
+
\begin{cases}
|
| 195 |
+
\frac{ln(T(y)+1)}{ln(T(y)+1)+1}, & T(y)<Th \\
|
| 196 |
+
1, & \text{otherwise}
|
| 197 |
+
\end{cases},
|
| 198 |
+
\label{eq:r_kus}
|
| 199 |
+
\end{split}
|
| 200 |
+
\end{eqnarray}
|
| 201 |
+
where $r^{kurtosis}(y)$ equals to 1 if the kurtosis $kus(y)$ is sufficiently close to 3 and tends to 0 if $|kus(y)-3|$ is very large. In practice, we add a small number $\epsilon$ to $|kus(y)-3|$ to avoid the division by zero. We choose the threshold $Th$ using cross validation.
|
| 202 |
+
In practice, we use the percentage of the number of images above $Th$ against the total number of the training images to determine $Th$. When the percentage equals $10\%$, we obtain the best performance of our score distribution prediction task (the other candidate percentages are: $5\%, 20\%, 30\%$).
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
|
| 206 |
+
|
| 207 |
+
|
| 208 |
+
Thus, the reliability-sensitive CJS loss is defined as:
|
| 209 |
+
|
| 210 |
+
\begin{equation}
|
| 211 |
+
l^{RS-CJS}(y,\hat{y}) = r^{kurtosis}(y) CJS(y,\hat{y}),
|
| 212 |
+
\label{eq:RS-CJS}
|
| 213 |
+
\end{equation}
|
| 214 |
+
where $y$ is the ground truth score histogram in the AVA dataset, and $\hat{y}$ is the predicted score histogram by our CJS-CNN. The more reliable the training image is, the more penalty it should obtain when the prediction is not correct.
|
| 215 |
+
\section{Experiments}
|
| 216 |
+
In this section, we present the experimental results in the AVA dataset. We follow the standard partition method of the AVA dataset in previous work
|
| 217 |
+
\cite{MurrayCVPR2012,WangSP2016,KongECCV2016,LuTMM2015,LuICCV2015,MaiCVPR2016}
|
| 218 |
+
. The training and test sets contain 235,599 and 19,930 images respectively. In all the experiments, for fair comparisons of various loss functions, we use the first $1/3$ part of the GoogLeNet as the DCNN. We show the predicted score histograms by our proposed CJS-CNN and other compared loss functions on the test set of AVA in Figure \ref{fig:hist}. Our CJS-CNN achieves the most similar results to the ground truth human rating distributions.
|
| 219 |
+
|
| 220 |
+
\begin{figure}
|
| 221 |
+
\centering
|
| 222 |
+
\includegraphics[width=8.3cm]{fig/hist}
|
| 223 |
+
\caption{Predicted score histograms by the above loss functions. The numbers above each histograms are their mean scores. The first column is the images. The 2nd column is the human rating distributions (GT: Ground Truth). The 3rd and the 4th columns are the results predicted by our proposed RS-CJS and CJS based CNN, respectively. The other columns are the predicted results of other loss functions. Our results are more similar to the ground truth of human ratings than others. Images are from the AVA dataset \cite{MurrayCVPR2012}, which contains a list of photo IDs from www.dpchallenge.com.}
|
| 224 |
+
\label{fig:hist}
|
| 225 |
+
\end{figure}
|
| 226 |
+
\subsection{Implementation Details}
|
| 227 |
+
We fix the parameters of the layers before the first full connected layer of a pre-trained GoogLeNet model \footnote{\url{http://vision.princeton.edu/pvt/GoogLeNet/ImageNet/}} on the ImageNet \cite{DengCVPR2009} and fine tune the 2 full connected layers on the training set of the AVA dataset. We use the Caffe framework \cite{JiaMM2017} to train and test our models. The learning policy is set to \emph{step}. Stochastic gradient descent is used to train our model with a mini-batch size of 48 images, a momentum of 0.9, a gamma of 0.5 and a weight decay of 0.0005. The max number of iterations is 480000. The training time is about 3 days using GTX980-Ti GPU and about 2 days using Titan X Pascal GPU.
|
| 228 |
+
\subsection{Score Histogram Prediction and Comparisons}
|
| 229 |
+
|
| 230 |
+
\subsubsection{Baseline Loss Functions}
|
| 231 |
+
\label{sec:baseline}
|
| 232 |
+
Besides the CJS loss function we proposed, we also evaluate other distribution divergences based loss functions as the baseline methods, parts of which are described below. These divergences or distances are often used in computer vision and pattern recognition tasks to compute the difference between two distributions or feature vectors. All the probability or cumulative distribution functions in our paper refer to discrete histograms. The DCNN cooperated with each divergence or distance based loss function is the first $1/3$ part of the GoogLeNet for fair comparisons.
|
| 233 |
+
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
\begin{table*}[!t] %
|
| 238 |
+
\renewcommand{\arraystretch}{1}
|
| 239 |
+
\caption{The mean divergences (MD, Eq. \ref{eq:MD}) between the predicted score histogram and the ground truth of various loss functions. The dataset is AVA. In all the methods listed below, the DCNN is the first 1/3 part of the GoogLeNet. The LDL method proposed by \cite{CuiSigIR2017} does not use DCNN. Except the PED divergences, the performances of the other divergences we use are not reported in their work \cite{CuiSigIR2017}.}%
|
| 240 |
+
\label{tb:divergences}
|
| 241 |
+
\centering
|
| 242 |
+
\rowcolors{2}{gray!50}{white}
|
| 243 |
+
\begin{tabular}{|c||c|c|c|c|c|c|c|}
|
| 244 |
+
\hline
|
| 245 |
+
\backslashbox{loss}{MD} & PED & PCE & PJS & PCS & PKL & CED & CJS \\
|
| 246 |
+
\hline\hline
|
| 247 |
+
PED & 0.197 & 2.830 & 0.059 & 0.105 & 0.728 & 0.323 & 0.068\\
|
| 248 |
+
RS-PED & 0.189 & 2.733 & 0.055 & 0.094 & 0.657 & 0.324 & 0.067\\
|
| 249 |
+
\hline
|
| 250 |
+
PCE & 0.167 & 2.773 & 0.041 & 0.075 & 0.442 & 0.279 & 0.049\\
|
| 251 |
+
RS-PCE & 0.169 & 2.771 & 0.046 & 0.071 & 0.438 & 0.279 & 0.047\\
|
| 252 |
+
\hline
|
| 253 |
+
PJS & 0.185 & 2.828 & 0.051 & 0.093 & 0.527 & 0.326 & 0.053\\
|
| 254 |
+
RS-PJS & 0.183 & 2.776 & 0.049 & 0.091 & 0.523 & 0.327 & 0.049\\
|
| 255 |
+
\hline
|
| 256 |
+
PCS \cite{JinICIP2016} & 0.182 & 2.807 & 0.045 & 0.082 & 0.450 & 0.287 & 0.045\\
|
| 257 |
+
RS-PCS & 0.175 & 2.783 & 0.045 & 0.079 & 0.423 & 0.277 & 0.044\\
|
| 258 |
+
\hline
|
| 259 |
+
PKL \cite{WangIJCNN2017} & 0.163 & 2.779 & 0.039 & 0.073 & 0.389 & 0.270 & 0.044\\
|
| 260 |
+
RS-PKL & 0.164 & 2.778 & 0.037 & 0.071 & 0.386 & 0.268 & 0.043\\
|
| 261 |
+
\hline
|
| 262 |
+
MMD \cite{BorgwardtISMB2006} & 0.201 & 2.831 & 0.064 & 0.112 & 0.710 & 0.339 & 0.068\\
|
| 263 |
+
RS-MMD & 0.196 & 2.824 & 0.063 & 0.097 & 0.710 & 0.322 & 0.054\\
|
| 264 |
+
\hline
|
| 265 |
+
Huber \cite{MurrayArXiv2017} & 0.184 & 2.775 & 0.044 & 0.078 & 0.409
|
| 266 |
+
& 0.279 & 0.053\\
|
| 267 |
+
RS-Huber & 0.183 & 2.774 & 0.045 & 0.074 & 0.402 & 0.271 & 0.048\\
|
| 268 |
+
\hline
|
| 269 |
+
CED \cite{WuICCV2011,HouArXiv2016} & 0.182 & 2.799 & 0.047 & 0.085 & 0.502 & 0.294 & 0.049\\
|
| 270 |
+
RS-CED & 0.180 & 2.792 & 0.048 & 0.082 & 0.502 & 0.283 & 0.047\\
|
| 271 |
+
\hline
|
| 272 |
+
\textbf{Our CJS} & 0.163 & 2.779 & 0.039 & 0.072 & 0.382 & 0.266 & 0.041\\
|
| 273 |
+
\textbf{Our RS-CJS} & \textbf{0.158} & \textbf{2.760} & \textbf{0.037} & \textbf{0.068} & \textbf{0.381} & \textbf{0.260} & \textbf{0.040}\\
|
| 274 |
+
\hline
|
| 275 |
+
LDL Method \cite{CuiSigIR2017} & 0.303 & - & - & - & - & - & - \\
|
| 276 |
+
\hline
|
| 277 |
+
\end{tabular}
|
| 278 |
+
\end{table*}
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
\begin{table*}[!t] %
|
| 283 |
+
\renewcommand{\arraystretch}{1}
|
| 284 |
+
\caption{The ablation study of $\lambda$ in Eq. \ref{eq:lambda}. The dataset is AVA. The DCNN is the first 1/3 part of the GoogLeNet.} %
|
| 285 |
+
\label{tb:lambda}
|
| 286 |
+
\centering
|
| 287 |
+
\begin{tabular}{|c||c|c|c|c|c|c|c|}
|
| 288 |
+
\hline
|
| 289 |
+
\backslashbox{loss}{MD} & PED & PCE & PJS & PCS & PKL & CED & CJS\\
|
| 290 |
+
\hline\hline
|
| 291 |
+
$\lambda = 0$ & 0.159 & 2.760 & 0.037 & 0.068 & 0.387 & 0.260 & 0.040 \\
|
| 292 |
+
\hline
|
| 293 |
+
$\lambda = 0.1$ & 0.159 & 2.764 & 0.038 & 0.069 & 0.384 & 0.262 & 0.040\\
|
| 294 |
+
\hline
|
| 295 |
+
$\lambda = 0.3$ & 0.159 & 2.762 & 0.038 & 0.069 & 0.386 & 0.262 & 0.040\\
|
| 296 |
+
\hline
|
| 297 |
+
$\lambda = 0.5$ & 0.160 & 2.766 & 0.038 & 0.070 & 0.386 & 0.264 & 0.040\\
|
| 298 |
+
\hline
|
| 299 |
+
$\lambda = 0.7$ & 0.158 & 2.761 & 0.037 & 0.068 & 0.385 & 0.261 & 0.041\\
|
| 300 |
+
\hline
|
| 301 |
+
$\lambda = 0.9$ & 0.159 & 2.763 & 0.038 & 0.069 & 0.384 & 0.262 & 0.040\\
|
| 302 |
+
\hline
|
| 303 |
+
\textbf{Our RS-CJS ($\lambda = 1$)} & \textbf{0.158} & \textbf{2.760} & \textbf{0.037} & \textbf{0.068} & \textbf{0.381} & \textbf{0.260} & \textbf{0.040}\\
|
| 304 |
+
\hline
|
| 305 |
+
\end{tabular}
|
| 306 |
+
\end{table*}
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
\textbf{PED}. The loss function using the Euclidean distance of the two probability distribution functions is defined as:
|
| 313 |
+
|
| 314 |
+
\begin{equation}
|
| 315 |
+
l^{PED}(y,\hat{y}) = \sum_{i=1}^{Z}(y(i)-\hat{y}(i))^2
|
| 316 |
+
\label{eq:PED}
|
| 317 |
+
\end{equation}
|
| 318 |
+
|
| 319 |
+
\textbf{PCE}. The loss function using the cross entropy of the two probability distribution functions is defined as:
|
| 320 |
+
|
| 321 |
+
\begin{equation}
|
| 322 |
+
l^{PCE}(y,\hat{y}) = -\sum_{i=1}^{Z}[(y(i)log~\hat{y}(i)+(1-y(i))log~(1-\hat{y}(i))]
|
| 323 |
+
\label{eq:PCE}
|
| 324 |
+
\end{equation}
|
| 325 |
+
This is the standard and widely used loss function for image classification problems and can be used as histogram difference for our task.
|
| 326 |
+
|
| 327 |
+
\textbf{PJS}. The loss function using the symmetrical version of the Jensen-Shannon divergence of the two probability distribution functions is defined as:
|
| 328 |
+
|
| 329 |
+
|
| 330 |
+
\begin{small}
|
| 331 |
+
\begin{equation}
|
| 332 |
+
l^{PJS}(y,\hat{y}) =
|
| 333 |
+
\frac{1}{2}
|
| 334 |
+
[
|
| 335 |
+
\sum_{i=1}^{Z}y(i)log~\frac{y(i)}{m(y,\hat{y})}
|
| 336 |
+
+
|
| 337 |
+
\sum_{i=1}^{Z}\hat{y}(i)log~\frac{\hat{y}(i)}{m(y,\hat{y})}
|
| 338 |
+
],
|
| 339 |
+
\label{eq:PJS}
|
| 340 |
+
\end{equation}
|
| 341 |
+
\end{small}
|
| 342 |
+
where $m(y,\hat{y}) = \frac{1}{2}y(i)+\frac{1}{2}\hat{y}(i)$.
|
| 343 |
+
|
| 344 |
+
|
| 345 |
+
\textbf{PCS} \cite{JinICIP2016}. The loss function using the Chi-square distance of the two probability distribution functions is defined as:
|
| 346 |
+
|
| 347 |
+
|
| 348 |
+
\begin{small}
|
| 349 |
+
\begin{equation}
|
| 350 |
+
l^{PCS}(y,\hat{y}) =
|
| 351 |
+
\frac{1}{2}
|
| 352 |
+
\sum_{i=1}^{Z}\frac{(y(i)-\hat{y}(i))^2}{y(i)+\hat{y}(i)}
|
| 353 |
+
\label{eq:PCS}
|
| 354 |
+
\end{equation}
|
| 355 |
+
\end{small}
|
| 356 |
+
This loss function is proposed by Jin et al. \cite{JinICIP2016} to predict the mean score and standard deviation from the score distribution.
|
| 357 |
+
|
| 358 |
+
|
| 359 |
+
\textbf{PKL} \cite{WangIJCNN2017}. The loss function using the symmetrical version of the Kullback–Leibler divergence of the two probability distribution functions is defined as:
|
| 360 |
+
|
| 361 |
+
|
| 362 |
+
\begin{small}
|
| 363 |
+
\begin{equation}
|
| 364 |
+
l^{PKL}(y,\hat{y}) =
|
| 365 |
+
\frac{1}{2}
|
| 366 |
+
[
|
| 367 |
+
\sum_{i=1}^{Z}y(i)log~\frac{y(i)}{\hat{y}(i)}
|
| 368 |
+
+
|
| 369 |
+
\sum_{i=1}^{Z}\hat{y}(i)log~\frac{\hat{y}(i)}{y(i)}
|
| 370 |
+
]
|
| 371 |
+
\label{eq:PKL}
|
| 372 |
+
\end{equation}
|
| 373 |
+
\end{small}
|
| 374 |
+
The asymmetrical version of the KLD loss is used by Wang et al. \cite{WangIJCNN2017}, who
|
| 375 |
+
explicitly modify the score distribution of the AVA dataset as Gaussian and jointly predict its mean and standard deviation.
|
| 376 |
+
|
| 377 |
+
\textbf{CED} \cite{WuICCV2011,HouArXiv2016}. The loss function using the Euclidean distance of the two cumulative distribution functions is defined as:
|
| 378 |
+
|
| 379 |
+
\begin{equation}
|
| 380 |
+
l^{CED}(y,\hat{y}) = \sum_{i=1}^{Z}(Y(i)-\hat{Y}(i))^2,
|
| 381 |
+
\label{eq:CED}
|
| 382 |
+
\end{equation}
|
| 383 |
+
where $Y$ and $\hat{Y}$ are the cumulative distribution functions of the original probability distribution functions $y$ and $\hat{y}$, as defined in Eq. \ref{eq:cdf}. This loss function is also used in Wu et al. \cite{WuICCV2011} and can be derived from the squared Earth mover's distance (EMD) by Hou et al. \cite{HouArXiv2016} for the ordinal basic human ratings prediction.
|
| 384 |
+
|
| 385 |
+
|
| 386 |
+
|
| 387 |
+
We show the predicted score histograms by our proposed CJS-CNN and other compared loss functions on the test set of AVA in the supplementary material. Our CJS-CNN achieves the most similar results to the ground truth human rating distributions.
|
| 388 |
+
\subsubsection{Numerical Evaluation Results}
|
| 389 |
+
In Table \ref{tb:divergences}, we summarize the evaluation results of the loss functions over the divergences. We use the Mean Divergences (MD) to evaluate various divergences between the predicted score histogram and the ground truth on the test set of AVA. The MD is defined as:
|
| 390 |
+
|
| 391 |
+
|
| 392 |
+
\begin{equation}
|
| 393 |
+
\text{MD} = \frac{1}{n}\sum_{i=1}^{n}l(y,\hat{y}),
|
| 394 |
+
\label{eq:MD}
|
| 395 |
+
\end{equation}
|
| 396 |
+
where $l=\{l^{PED},l^{PCE},l^{PJS},l^{PCS},l^{PKL},l^{CED},l^{CJS}\}$ defined above. $n$ is size of the test set.
|
| 397 |
+
|
| 398 |
+
|
| 399 |
+
|
| 400 |
+
|
| 401 |
+
|
| 402 |
+
|
| 403 |
+
The results in Table \ref{tb:divergences} reveal that, our proposed RS-CJS and CJS based CNN outperform other methods. Among all the odd lines with white background, our CJS achieves the best performance. All the mean divergences of our RS-CJS on the test sets are the smallest. Typically, in a learning setting, optimizing directly a certain criterion should lead to higher performance than optimizing a related one. However, although our methods are optimizing the CJS loss, the learned model can achieve best performance in other related loss. This is mainly because that, as verified by \cite{NguyenECML2015}, the CJS is quite suitable for non-parametric computation on empirical data, such as the ordinal basic rating data of the AVA dataset. The line with header 'RS-' means adding our reliability-sensitive learning strategy. Almost all the RS version methods (the even lines) perform better than the corresponding ones (the odd lines). The reliability sensitive learning based on the kurtosis reduces the impacts of the unreliable training samples.
|
| 404 |
+
\subsubsection{The Ablation Study of the Reliability Factor}
|
| 405 |
+
Wu et al. \cite{WuICCV2011} propose to use the number of ratings of each image for the reliability factor $r^{ratnum}(y)$. The larger the rating number is, the larger the reliability of rating is. To compare with our kurtosis based reliability factor $r^{kurtosis}(y)$ in Eq. \ref{eq:r_kus} and Eq. \ref{eq:RS-CJS}, we use an balance factor $\lambda$ as follow to make ablation study.
|
| 406 |
+
|
| 407 |
+
\begin{equation}
|
| 408 |
+
r(y) = \lambda r^{kurtosis}(y) + (1-\lambda) r^{ratnum}(y)
|
| 409 |
+
\label{eq:lambda}
|
| 410 |
+
\end{equation}
|
| 411 |
+
For a fair comparison, we use $r(y)$ on the CJS loss: $r(y) CJS(y,\hat{y})$
|
| 412 |
+
|
| 413 |
+
The comparison results are shown in Table \ref{tb:lambda}. The results reveal that the performance of $r^{kurtosis}(y)$ are slightly better than that of $r^{ratnum}(y)$. The combination of these two reliability factors does not produce better performance. Note that, the kurtosis can be directly computed using the normalized score histogram. While the rating number is additional information of the normalized score histogram and is not always available in the training set.
|
| 414 |
+
\section{Conclusions and Discussions}
|
| 415 |
+
In this paper, we propose the CJS-CNN to predict the aesthetic score distribution of images. Unlike the object recognition, which definitely has right answers in most cases, the image aesthetic assessment is a subjective task in nature. Thus, only using a scalar to represent the aesthetics may not be the right direction.
|
| 416 |
+
|
| 417 |
+
Instead of only predicting the binary high-low label or the numerical score, we can output the aesthetic score distribution with rich statistics for various applications such as aesthetic image retrieval, aesthetic image enhancement. The overall aesthetic quality can be represented by the mean or median. The controversy or subjectiveness can be measured by the variance. The popularity of an image can be measured by the rating number of human. However, the rating number cannot be derived from the predicted score histogram. As shown in the experiments, we can use the kurtosis to approximate the popularity instead of the rating number.
|
| 418 |
+
|
| 419 |
+
|
| 420 |
+
|
| 421 |
+
The aesthetic quality assessment is a subjective task in nature. It has been a long time that people focused on the scalar representation (1D numerical or binary coding) of aesthetics. Wu et al. \cite{WuICCV2011} pointed out this problem and made an attempt to predict the score distribution. However, it was submerged in rich literatures which aim to rise the classification or regression accuracy of the scalar representation. With the powerful deep representation learning technologies, we think it is the right time to let the aesthetic quality assessment return to it's subjective nature. This paper is a restart of this direction. We hope it can inspire more work in the future, such as (1) mapping more statistics to the subjective evaluation of vast amount of images, (2) designing new large scale aesthetic datasets with unbiased data and specially for subjective assessment of aesthetics, (3) using more powerful and larger DCNNs or other machine learning technologies to make the assessment by computer better match that of human.
|
| 422 |
+
\section{ Acknowledgments}
|
| 423 |
+
We thank all the reviewers and ACs. This work is partially supported by the National Natural Science Foundation of China (Grant Nos. 61402021, 61401228, 61402463, 61772513), the Science and Technology Project of the State Archives Administrator (Grant No. 2015-B-10), the open funding project of State Key Laboratory of Virtual Reality Technology and Systems, Beihang University (Grant No. BUAA-VR-16KF-09), the Fundamental Research Funds for the Central Universities (Grant No. 3122014C017), the China Postdoctoral Science Foundation (Grant No. 2015M581841), and the Postdoctoral Science Foundation of Jiangsu Province (Grant No. 1501019A).
|
| 424 |
+
|
| 425 |
+
|
| 426 |
+
{\small
|
| 427 |
+
\bibliographystyle{aaai}
|
| 428 |
+
\bibliography{aaai18}
|
| 429 |
+
}
|
1708.08611v2.txt
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Advances in learning have enabled a new paradigm for developing controllers for autonomous systems that are able to accomplish complicated tasks in possibly uncertain and dynamic environments. For example, in reinforcement learning (RL), an agent acts to optimize a long-term return that models the desired behavior for the agent and is revealed to it incrementally in a reward signal as it interacts with its environment [18]. Increasing use of learning-based controllers in physical systems in the proximity of humans also strengthens the concern of whether these systems will operate safely.
|
| 2 |
+
|
| 3 |
+
While convergence, optimality and data-efficiency of learning algorithms are relatively well understood, safety or more generally correctness during learning and execution of controllers has attracted significantly less attention. A number of different notions of safety were recently explored [8, 15]. We approach the problem of ensuring safety in reinforcement learning from a formal methods perspective. We begin with an unambiguous and rich set of specifications of what safety and more generally correctness mean. To this end, we adopt temporal logic as a specificationlanguage [6]. For algorithmic purposes, we focus on the so-called safety fragment of (linear) temporal logic [12]. We then investigate the question “how can we let, whenever it is fine, a learning agent do whatever it is doing, and also monitor and interfere with its operation whenever absolutely needed in order to ensure safety?”In this paper, we introduce shielded learning, a framework that allows to apply machine learning to control systems in a way that the correctness of the system’s execution against a given specification is assured during the learning and controller execution phases, regardless of how fast the learning process converges.
|
| 4 |
+
|
| 5 |
+
In the traditional reinforcement learning setting, in every time step, the learning agent chooses an action and sends it to the environment. The environment evolves according to the action and sends the agent an observation of its state anda reward associated with the underlying transition. The objective of the learning agent is to optimize the reward accumulated over this evolution.
|
| 6 |
+
|
| 7 |
+
Our approach introduces a shield into the traditional reinforcement learning setting.The shield is computed upfront from the safety part of the given system specification and an abstraction of the agent’s environment dynamics. It ensures safetyand minimum interference. With minimum interference we mean that the shield restricts the agent as little as possibleand forbids actions only if they could endanger safe system behavior.
|
| 8 |
+
|
| 9 |
+
We modify the loop between the learning agent and its environment in two alternative ways, depending on the location at which the shield is implemented. In the first one, depicted in Fig. 1, the shield is implemented before the learning agent and acts each time the learning agent is to make a decision and provides a list of safe actions. This list restricts the choices for the learner. The shield provides minimum interference, since it allows the agent to follow any policy as long as it is safe. In the alternative implementation of the shield, depicted in Fig. 2, it monitors the actions selected by the learning agent and corrects them if and only if the chosen action is unsafe.
|
| 10 |
+
|
| 11 |
+
Shielding offers several pragmatic advantages: Even though the inner working of learning algorithms is often complex, shielding with respect to critical safety specifications may be manageable (as we demonstrate in upcoming sections). The algorithms we present for the computation of shields make relatively mild assumptions on the input-output structure of the learning algorithm (rather than its inner working). Consequently, the correctness guarantees are agnostic—to an extent to be described precisely—to the learning algorithm of choice. Our setup introduces a clear boundary between the learning agent and the shield. This boundary helps to separate the concerns, e.g., safety and correctness on one side and convergence and optimality on the other and provides a basis for the convergence analysis of a shielded reinforcement learning algorithm.Last but not least, the shielding framework is compatible with mechanisms such asfunction approximation, employed by learning algorithms in order to improve their scalability.
|
| 12 |
+
|
| 13 |
+
We now overview two complementing yet mostly isolated views on safety in reinforcement learning and in formal methods.
|
| 14 |
+
|
| 15 |
+
An exploration process is called safe if no undesirable statesare ever visited, which can only be achieved through the incorporation of external knowledge [8, 14]. The safety fragment of temporal logic that we consider is more general than the notion of safety of [8] (which is technically a so-called invariance property [1]).One way of guiding exploration in learning is to provide teacher advice.A teacher (usually a human) provides advice (e.g., safe actions) when either the learner [15, 4] or the teacher [22, 19] considers it to be necessary to prevent catastrophic situations.For example, in a Q-learning setting, the agentacts on the teacher’s advice, whenever advice is provided. Otherwise, the agent chooses randomly between the set of actions with the highest Q-values. In each time step, the human teacher tunes the reward signal before sending it to the agent [19, 20].Our work is closely related to teacher-guided RL, since a shield can be considered as a teacher, who provides safe actions only if absolutely necessary.In contrast to previous work, the reward signal does not have to bemanipulated by the shield, since the shield corrects unsafe actions in thelearning and deployment phases.
|
| 16 |
+
|
| 17 |
+
Traditional correct-by-construction controller computation techniques are based on computing an abstraction of the environment dynamics and deriving a controller that guaranteesto satisfy the specification under the known environment dynamics.Such methods combine reactive synthesis with faithful environment modelling and abstraction. Wongpiromsarn et al. [24] define a receding horizon control approach that combines continuous control with discrete correctness guarantees.For simple system dynamics, the controller can be computed directly [9]. For more complex dynamics, both approaches are computationally too difficult. A mitigation strategy is to compute a set of low-level motion primitives to be combined to an overall strategy [5]. Having many motion primitives however also leads to inefficiency.All of the above approaches have in common that a faithful, yet precise enough, abstraction of the physical environment is required, which is not only difficult to obtain in practice, but also introduces the mentioned computational burden. Control methods based on reinforcement learning partly address this problem, but do not typically incorporate any correctness guarantees. Wen et al. [23] propose a method to combine strict correctness guarantees with reinforcement learning.They start with a non-deterministic correct-by-construction strategy and then perform reinforcement learning to limit it towards cost optimality without having to know the cost function a priori. Unlike the approach in the paper, their technique does not work with function approximation, which prevents it from being used in complex scenarios. Junges et al. [10] adopt a similar framework in a stochastic setting. A major difference between the works by Wen et al. and Junges et al. [23, 10] on the one hand and the shielding framework on the other hand is the fact that the computational cost of the construction of the shield depends on the complexity of the specification and a very abstract version of the system, and is independent of the state space components of the system to be controlled that are irrelevant for enforcing the safety specification. Fu et al. [7] establish connections between temporal-logic-constrained strategy synthesis in Markov decision processes and probably-approximately-correct-type bounds in learning [21].Bloem et al. [3] proposed the idea to synthesize a shield that is attached to a system to enforce safety properties at run time.We adopt this idea, and present our own realization of a shield, geared to the needs of the learning setting.
|
| 18 |
+
|
| 19 |
+
We now introduce some basic concepts used in the following.
|
| 20 |
+
|
| 21 |
+
A word is defined to be a finite or infinite sequence of elements from some set ΣΣ\Sigma. The set of finite words over an alphabet ΣΣ\Sigma is denoted by Σ∗superscriptΣ\Sigma^{*}, and the set of infinite words over ΣΣ\Sigma is written as ΣωsuperscriptΣ𝜔\Sigma^{\omega}. The union of Σ∗superscriptΣ\Sigma^{*} and ΣωsuperscriptΣ𝜔\Sigma^{\omega} is denoted by the symbol Σ∞superscriptΣ\Sigma^{\infty}.
|
| 22 |
+
|
| 23 |
+
A probability distribution over a (finite) set X𝑋X is a function μ:X→[0,1]⊆ℝ:𝜇→𝑋01ℝ\mu:X\rightarrow[0,1]\subseteq\mathbb{R} with ∑x∈Xμ(x)=μ(X)=1subscript𝑥𝑋𝜇𝑥𝜇𝑋1\sum_{x\in X}\mu(x)=\mu(X)=1.The set of all distributions on X𝑋X is denoted by Distr(X)𝐷𝑖𝑠𝑡𝑟𝑋Distr(X).
|
| 24 |
+
|
| 25 |
+
A Markov decision process (MDP) ℳ=(S,sI,𝒜,𝒫,ℛ)ℳ𝑆subscript𝑠𝐼𝒜𝒫ℛ\mathcal{M}=(S,s_{I},\mathcal{A},\mathcal{P},\allowbreak\mathcal{R}) is a tuplewith a finite set S𝑆S of states, a unique initial state sI∈Ssubscript𝑠𝐼𝑆s_{I}\in S, a finite set 𝒜={a1…an}𝒜subscript𝑎1…subscript𝑎𝑛\mathcal{A}=\{a_{1}\dots a_{n}\} of Boolean actions,a probabilistic transition function 𝒫:S×𝒜→Distr(S):𝒫→𝑆𝒜𝐷𝑖𝑠𝑡𝑟𝑆\mathcal{P}:S\times\mathcal{A}\rightarrow Distr(S), and animmediate reward function ℛ:S×𝒜×S→ℝ:ℛ→𝑆𝒜𝑆ℝ\mathcal{R}:S\times\mathcal{A}\times S\rightarrow\mathbb{R}.
|
| 26 |
+
|
| 27 |
+
In reinforcement learning (RL), an agent must learn a behavior through trial-and-error via interactions with an unknown environment modeled by a MDP ℳ=(S,sI,𝒜,𝒫,ℛ)ℳ𝑆subscript𝑠𝐼𝒜𝒫ℛ\mathcal{M}=(S,s_{I},\mathcal{A},\mathcal{P},\mathcal{R}).Agent and environment interact in discrete time steps.At each step t𝑡t, the agent receives an observation stsubscript𝑠𝑡s_{t}.It then chooses an action at∈𝒜subscript𝑎𝑡𝒜a_{t}\in\mathcal{A}.The environment then moves to a state st+1subscript𝑠𝑡1s_{t+1} with the probability 𝒫(st,at,st+1)𝒫subscript𝑠𝑡subscript𝑎𝑡subscript𝑠𝑡1\mathcal{P}(s_{t},a_{t},s_{t+1})and determines the reward rt+1=ℛ(st,at,st+1)subscript𝑟𝑡1ℛsubscript𝑠𝑡subscript𝑎𝑡subscript𝑠𝑡1r_{t+1}=\mathcal{R}(s_{t},a_{t},s_{t+1}).We refer to negative rewards rt<0subscript𝑟𝑡0r_{t}<0 as punishments.The return R=∑t=0∞γtrt𝑅superscriptsubscript𝑡0superscript𝛾𝑡subscript𝑟𝑡R=\sum_{t=0}^{\infty}\gamma^{t}r_{t} is thecumulative future discounted reward, where rtsubscript𝑟𝑡r_{t} is the immediate reward at time step t𝑡t, and γ∈[0,1]𝛾01\gamma\in[0,1] is the discount factor that controls the influence of future rewards.The objective of the agent is to learn an optimal policy Π:S→𝒜:Π→𝑆𝒜\Pi:S\rightarrow\mathcal{A} that maximizes (over the class of policies considered by the learner) the expectation of the return; i.e. maxπ∈ΠEπ(R)𝑚𝑎subscript𝑥𝜋Πsubscript𝐸𝜋𝑅max_{\pi\in\Pi}E_{\pi}(R), where Eπ(.)E_{\pi}(.) stands for the expectation w.r.t. thepolicy π𝜋\pi.
|
| 28 |
+
|
| 29 |
+
We consider a reactive system with a finite setI={i1,…,im}𝐼subscript𝑖1…subscript𝑖𝑚I=\{i_{1},\ldots,i_{m}\} of Boolean input propositions and a finite setO={o1,…,on}𝑂subscript𝑜1…subscript𝑜𝑛O=\{o_{1},\ldots,o_{n}\} of Boolean output propositions.The input alphabet isΣI=2IsubscriptΣ𝐼superscript2𝐼\Sigma_{I}=2^{I}, the output alphabet is ΣO=2OsubscriptΣ𝑂superscript2𝑂\Sigma_{O}=2^{O}, andΣ=ΣI×ΣOΣsubscriptΣ𝐼subscriptΣ𝑂\Sigma=\Sigma_{I}\times\Sigma_{O}.We refer to words over ΣΣ\Sigma as traces σ¯¯𝜎\overline{\sigma}. We write |σ¯|¯𝜎|\overline{\sigma}| for thelength of a trace σ¯∈Σ∞¯𝜎superscriptΣ\overline{\sigma}\in\Sigma^{\infty}.A set of words ℒ⊆Σ∞ℒsuperscriptΣ\mathcal{L}\subseteq\Sigma^{\infty} is called a language.
|
| 30 |
+
|
| 31 |
+
A finite-state reactive system is a tuple 𝒮=(Q,q0,ΣI,ΣO,δ,λ)𝒮𝑄subscript𝑞0subscriptΣ𝐼subscriptΣ𝑂𝛿𝜆\mathcal{S}=(Q,q_{0},\Sigma_{I},\Sigma_{O},\delta,\lambda) with the input alphabet ΣIsubscriptΣ𝐼\Sigma_{I}, the output alphabet ΣOsubscriptΣ𝑂\Sigma_{O}, afinite set of states Q𝑄Q, and the initial state q0∈Qsubscript𝑞0𝑄q_{0}\in Q. We assume that ΣIsubscriptΣ𝐼\Sigma_{I} is a product of ΣI1superscriptsubscriptΣ𝐼1\Sigma_{I}^{1} and ΣI2superscriptsubscriptΣ𝐼2\Sigma_{I}^{2}, i.e., we have ΣI=ΣI1×ΣI2subscriptΣ𝐼superscriptsubscriptΣ𝐼1superscriptsubscriptΣ𝐼2\Sigma_{I}=\Sigma_{I}^{1}\times\Sigma_{I}^{2}. Then, δ:Q×ΣI→Q:𝛿→𝑄subscriptΣ𝐼𝑄\delta:Q\times\Sigma_{I}\rightarrow Q is a complete transitionfunction, and λ:Q×ΣI1→ΣO:𝜆→𝑄superscriptsubscriptΣ𝐼1subscriptΣ𝑂\lambda:Q\times\Sigma_{I}^{1}\rightarrow\Sigma_{O}is a complete output function. Given the input trace σI¯=(x01,x02)(x11,x12)…∈ΣI∞¯subscript𝜎𝐼subscriptsuperscript𝑥10subscriptsuperscript𝑥20subscriptsuperscript𝑥11subscriptsuperscript𝑥21…superscriptsubscriptΣ𝐼{\overline{\sigma_{I}}}=(x^{1}_{0},x^{2}_{0})(x^{1}_{1},x^{2}_{1})\ldots\in\Sigma_{I}^{\infty}, the system 𝒮𝒮\mathcal{S} produces theoutput trace σO¯=𝒮(σI¯)=λ(q0,x01)λ(q1,x11)…∈ΣO∞¯subscript𝜎𝑂𝒮¯subscript𝜎𝐼𝜆subscript𝑞0subscriptsuperscript𝑥10𝜆subscript𝑞1subscriptsuperscript𝑥11…superscriptsubscriptΣ𝑂{\overline{\sigma_{O}}}=\mathcal{S}({\overline{\sigma_{I}}})=\lambda(q_{0},x^{1}_{0})\lambda(q_{1},x^{1}_{1})\ldots\in\Sigma_{O}^{\infty}, where qi+1=δ(qi,(xi1,xi2))subscript𝑞𝑖1𝛿subscript𝑞𝑖subscriptsuperscript𝑥1𝑖subscriptsuperscript𝑥2𝑖q_{i+1}=\delta(q_{i},(x^{1}_{i},x^{2}_{i})) for all i≥0𝑖0i\geq 0.The input and output traces can be merged to the trace of 𝒮𝒮\mathcal{S} over the alphabet ΣI×ΣOsubscriptΣ𝐼subscriptΣ𝑂\Sigma_{I}\times\Sigma_{O}, which is defined as σ¯=((x01,x02),λ(q0,x01))((x11,x12),λ(q1,x1))…∈(ΣI×ΣO)ω¯𝜎subscriptsuperscript𝑥10subscriptsuperscript𝑥20𝜆subscript𝑞0subscriptsuperscript𝑥10subscriptsuperscript𝑥11subscriptsuperscript𝑥21𝜆subscript𝑞1superscript𝑥1…superscriptsubscriptΣ𝐼subscriptΣ𝑂𝜔{\overline{\sigma}}=((x^{1}_{0},x^{2}_{0}),\lambda(q_{0},x^{1}_{0}))((x^{1}_{1},x^{2}_{1}),\lambda(q_{1},x^{1}))\ldots\in(\Sigma_{I}\times\Sigma_{O})^{\omega}.
|
| 32 |
+
|
| 33 |
+
The finite-state reactive system definition is similar to that of a Mealy machine, except that for choosing the output along a transition of the machine, only a part of the input is available. The larger generality of this model is needed for one type of shield that we introduce later, and such an extended Mealy-type computational model has already been used by Saqib and Somenzi [17] in the past.
|
| 34 |
+
|
| 35 |
+
A specification φ𝜑\varphi defines a set ℒ(φ)⊆Σ∞ℒ𝜑superscriptΣ\mathcal{L}(\varphi)\subseteq\Sigma^{\infty} of allowed traces.The reactive system 𝒮𝒮\mathcal{S} realizes φ𝜑\varphi, denoted by 𝒮⊧φmodels𝒮𝜑\mathcal{S}\models\varphi, iffℒ(𝒮)⊆ℒ(φ)ℒ𝒮ℒ𝜑\mathcal{L}(\mathcal{S})\subseteq\mathcal{L}(\varphi).φ𝜑\varphi is realizable if there exists such an 𝒮𝒮\mathcal{S}.We assume φ𝜑\varphi is a set ofproperties {φ1,…,φl}subscript𝜑1…subscript𝜑𝑙\{\varphi_{1},\ldots,\varphi_{l}\} such that ℒ(φ)=⋂iℒ(φi)ℒ𝜑subscript𝑖ℒsubscript𝜑𝑖\mathcal{L}(\varphi)=\bigcap_{i}\mathcal{L}(\varphi_{i}). A system satisfies φ𝜑\varphi iff itsatisfies all its properties.
|
| 36 |
+
|
| 37 |
+
In most applications of formal methods, specifications of reactive systems are given as formulas in some temporal logic. Linear temporal logic [16] (LTL) is a commonly used formal specification language. Given a set of propositions 𝖠𝖯𝖠𝖯\mathsf{AP}, an LTL formula describes a language in (2𝖠𝖯)ωsuperscriptsuperscript2𝖠𝖯𝜔(2^{\mathsf{AP}})^{\omega}. LTL extends Boolean logic by the introduction of temporal operators such as 𝖷𝖷\mathsf{X} (next time), 𝖦𝖦\mathsf{G} (globally/always), 𝖥𝖥\mathsf{F} (eventually), and 𝖴𝖴\mathsf{U} (until).To use LTL for specifying a set of allowed traces by a reactive system, the joint alphabet Σ=ΣI×ΣOΣsubscriptΣ𝐼subscriptΣ𝑂\Sigma=\Sigma_{I}\times\Sigma_{O} of the system must be decomposable into Σ=2𝖠𝖯I×ΣI𝑟𝑒𝑠𝑡×2𝖠𝖯O×ΣO𝑟𝑒𝑠𝑡Σsuperscript2subscript𝖠𝖯𝐼subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝐼superscript2subscript𝖠𝖯𝑂subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝑂\Sigma=2^{\mathsf{AP}_{I}}\times\Sigma^{\mathit{rest}}_{I}\times 2^{\mathsf{AP}_{O}}\times\Sigma^{\mathit{rest}}_{O} for some system input and output components ΣI𝑟𝑒𝑠𝑡subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝐼\Sigma^{\mathit{rest}}_{I} and ΣO𝑟𝑒𝑠𝑡subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝑂\Sigma^{\mathit{rest}}_{O} that we do not want to reason about in the LTL specification. Then, the LTL formula can use 𝖠𝖯=𝖠𝖯I∪𝖠𝖯O𝖠𝖯subscript𝖠𝖯𝐼subscript𝖠𝖯𝑂\mathsf{AP}=\mathsf{AP}_{I}\cup\mathsf{AP}_{O} as the set of atomic propositions. Given a trace σ¯¯𝜎\overline{\sigma}, we write σ¯𝖠𝖯subscript¯𝜎𝖠𝖯\overline{\sigma}_{\mathsf{AP}} to denote a copy of the trace where, in each character, the factors ΣO𝑟𝑒𝑠𝑡subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝑂\Sigma^{\mathit{rest}}_{O} and ΣI𝑟𝑒𝑠𝑡subscriptsuperscriptΣ𝑟𝑒𝑠𝑡𝐼\Sigma^{\mathit{rest}}_{I} have been stripped away so that σ¯𝖠𝖯∈(2𝖠𝖯)ωsubscript¯𝜎𝖠𝖯superscriptsuperscript2𝖠𝖯𝜔\overline{\sigma}_{\mathsf{AP}}\in(2^{\mathsf{AP}})^{\omega}.
|
| 38 |
+
|
| 39 |
+
Let us consider an example for an LTL specification that we build from ground up. By default, LTL formulas are evaluated at the first element of a trace. The LTL formula r𝑟r holds on a trace σ¯𝖠𝖯=σ¯0σ¯1σ¯2…∈(2𝖠𝖯)ωsubscript¯𝜎𝖠𝖯subscript¯𝜎0subscript¯𝜎1subscript¯𝜎2…superscriptsuperscript2𝖠𝖯𝜔\overline{\sigma}_{\mathsf{AP}}=\overline{\sigma}_{0}\overline{\sigma}_{1}\overline{\sigma}_{2}\ldots\in(2^{\mathsf{AP}})^{\omega} if and only if r∈σ¯0𝑟subscript¯𝜎0r\in\overline{\sigma}_{0}. The next-time operator 𝖷𝖷\mathsf{X} allows to look one step into the future, so the LTL formula 𝖷g𝖷𝑔\mathsf{X}g holds if g∈σ¯1𝑔subscript¯𝜎1g\in\overline{\sigma}_{1}. We can take the disjunction between the formulas r𝑟r and 𝖷g𝖷𝑔\mathsf{X}g to obtain an LTL formula (r∨𝖷g)𝑟𝖷𝑔(r\vee\mathsf{X}g) which holds for a trace if at least one of r𝑟r or 𝖷g𝖷𝑔\mathsf{X}g hold. We can then wrap (r∨𝖷g)𝑟𝖷𝑔(r\vee\mathsf{X}g) into the temporal operator 𝖦𝖦\mathsf{G} to obtain 𝖦(r∨𝖷g)𝖦𝑟𝖷𝑔\mathsf{G}(r\vee\mathsf{X}g). The effect of adding this operator is that in order for σ¯𝖠𝖯subscript¯𝜎𝖠𝖯\overline{\sigma}_{\mathsf{AP}} to satisfy 𝖦(r∨𝖷g)𝖦𝑟𝖷𝑔\mathsf{G}(r\vee\mathsf{X}g) is that (r∨𝖷g)𝑟𝖷𝑔(r\vee\mathsf{X}g) has to hold at every position in the trace. All in all, we can formalize this description by stating that we have that σ¯⊧𝖦(r∨𝖷g)models¯𝜎𝖦𝑟𝖷𝑔\overline{\sigma}\models\mathsf{G}(r\vee\mathsf{X}g) holds if and only if for every i∈ℕ𝑖ℕi\in\mathbb{N}, at least one of r∈σ¯i𝑟subscript¯𝜎𝑖r\in\overline{\sigma}_{i} and g∈σ¯i+1𝑔subscript¯𝜎𝑖1g\in\overline{\sigma}_{i+1} hold.
|
| 40 |
+
|
| 41 |
+
A specification is called a safety specification if every trace σ¯¯𝜎\overline{\sigma} that is not in the language represented by the specification has a prefix such that all words starting with the prefix are also not in the language.Intuitively, a safety specification states that “something bad should never happen”. Safety specifications can be simple invariance properties (such as “the level of a water tank should never fall below 1 liter”), but can also also be more complex (such as “whenever a valve is opened, it stays open for at least three seconds”).For specifications in LTL, it is known how to check if it is a safety language and how to compute a safety automaton that represents it [11].
|
| 42 |
+
|
| 43 |
+
Such an automaton is defined as a tuple φs=(Q,q0,Σ,δ,F)superscript𝜑𝑠𝑄subscript𝑞0Σ𝛿𝐹\varphi^{s}=(Q,q_{0},\Sigma,\delta,F), where Σ=ΣI×ΣOΣsubscriptΣ𝐼subscriptΣ𝑂\Sigma=\Sigma_{I}\times\Sigma_{O},δ:Q×Σ→Q:𝛿→𝑄Σ𝑄\delta:Q\times\Sigma\rightarrow Q, and F⊆Q𝐹𝑄F\subseteq Q is a set of safe states.A run induced by a traceσ¯=σ0σ1…∈Σ∞¯𝜎subscript𝜎0subscript𝜎1…superscriptΣ\overline{\sigma}=\sigma_{0}\sigma_{1}\ldots\in\Sigma^{\infty} is a sequence ofstates q¯=q0q1…¯𝑞subscript𝑞0subscript𝑞1…\overline{q}=q_{0}q_{1}\ldots such that qi+1=δ(qi,σi)subscript𝑞𝑖1𝛿subscript𝑞𝑖subscript𝜎𝑖q_{i+1}=\delta(q_{i},\sigma_{i}). A trace σ¯¯𝜎\overline{\sigma} of a system 𝒮𝒮\mathcal{S}satisfies φssuperscript𝜑𝑠\varphi^{s} if the induced run visits only safestates, i.e., ∀i≥0.qi∈Ffor-all𝑖0.subscript𝑞𝑖𝐹\forall i\geq 0\operatorname{\mathbin{.}}q_{i}\in F.
|
| 44 |
+
|
| 45 |
+
A (2-player, alternating) game is a tuple 𝒢=(G,g0,ΣI,ΣO,δ,𝗐𝗂𝗇)𝒢𝐺subscript𝑔0subscriptΣ𝐼subscriptΣ𝑂𝛿𝗐𝗂𝗇\mathcal{G}=(G,g_{0},\Sigma_{I},\Sigma_{O},\delta,\mathsf{win}),where G𝐺G is a finite set of game states, g0∈Gsubscript𝑔0𝐺g_{0}\in G is the initial state,δ:G×ΣI×ΣO→G:𝛿→𝐺subscriptΣ𝐼subscriptΣ𝑂𝐺\delta:G\times\Sigma_{I}\times\Sigma_{O}\rightarrow Gis a complete transition function, and 𝗐𝗂𝗇:Gω→𝔹:𝗐𝗂𝗇→superscript𝐺𝜔𝔹\mathsf{win}:G^{\omega}\rightarrow\mathbb{B} is a winning condition. The game is played by the system and the environment. In every state g∈G𝑔𝐺g\in G(starting with g0subscript𝑔0g_{0}), the environment chooses an inputσI∈ΣIsubscript𝜎𝐼subscriptΣ𝐼{\sigma_{I}}\in\Sigma_{I}, and then the system chooses some output σO∈ΣOsubscript𝜎𝑂subscriptΣ𝑂{\sigma_{O}}\in\Sigma_{O}. These choices by the system and the environment define the next state g′=δ(g,σI,σO)superscript𝑔′𝛿𝑔subscript𝜎𝐼subscript𝜎𝑂g^{\prime}=\delta(g,{\sigma_{I}},{\sigma_{O}}), and so on. The resulting (infinite)sequence g¯=g0g1…¯𝑔subscript𝑔0subscript𝑔1…\overline{g}=g_{0}g_{1}\ldots is called a play. A play is won by the system iff𝗐𝗂𝗇(g¯)𝗐𝗂𝗇¯𝑔\mathsf{win}(\overline{g}) is 𝗍𝗋𝗎𝖾𝗍𝗋𝗎𝖾\mathsf{true}.A (memoryless) strategy for the system is a function ρ:G×ΣI→ΣO:𝜌→𝐺subscriptΣ𝐼subscriptΣ𝑂\rho:G\times\Sigma_{I}\rightarrow\Sigma_{O}.A strategy iswinning for the system if all plays g¯¯𝑔\overline{g} that can beconstructed when defining the outputs using the strategy satisfy𝗐𝗂𝗇(g¯)𝗐𝗂𝗇¯𝑔\mathsf{win}(\overline{g}). The winning region W𝑊W is the set of statesfrom which a winning strategy exists.
|
| 46 |
+
|
| 47 |
+
A safety game defines 𝗐𝗂𝗇𝗐𝗂𝗇\mathsf{win} via a set Fg⊆Gsuperscript𝐹𝑔𝐺F^{g}\subseteq G ofsafe states: 𝗐𝗂𝗇(g0g1…)𝗐𝗂𝗇subscript𝑔0subscript𝑔1…\mathsf{win}(g_{0}g_{1}\ldots) is 𝗍𝗋𝗎𝖾𝗍𝗋𝗎𝖾\mathsf{true} iff ∀i≥0.gi∈Fgfor-all𝑖0.subscript𝑔𝑖superscript𝐹𝑔\forall i\geq 0\operatorname{\mathbin{.}}g_{i}\in F^{g}, i.e., if only safe states are visited.We will use safety games tosynthesize a shield, which implements the winning strategy in a newreactive system 𝒮=(G,q0,ΣI,ΣO,δ′,ρ)𝒮𝐺subscript𝑞0subscriptΣ𝐼subscriptΣ𝑂superscript𝛿′𝜌\mathcal{S}=(G,q_{0},\Sigma_{I},\Sigma_{O},\delta^{\prime},\rho) with δ′(g,σI)=δ(g,σI,ρ(g,σI))superscript𝛿′𝑔subscript𝜎𝐼𝛿𝑔subscript𝜎𝐼𝜌𝑔subscript𝜎𝐼\delta^{\prime}(g,{\sigma_{I}})=\delta(g,{\sigma_{I}},\rho(g,{\sigma_{I}})).
|
| 48 |
+
|
| 49 |
+
The goal of this paper is to combine the best of two worlds, namely(1) the formal correctness guarantees of a controller with respect to a temporal logic specification, as provided by formal methods (and reactive synthesis in particular), and(2) the optimality with respect to an a priori unknown performance criterion, as provided by reinforcement learning.
|
| 50 |
+
|
| 51 |
+
Consider the example of a path planner for autonomous vehicles.Many general requirements on system behaviors such as safetyconcerns may be known and expressed as specifications in temporal logic and can be enforced by reactive controllers.This includes always driving in the correct lane, never jumping the red light, and never exceeding the speed limit [23].A learning algorithm is able to incorporate more subtle considerations, such as specific intentions for the current application scenario andpersonal preferences of the human driver, such as reaching some goalquickly but at the same time driving smoothly.
|
| 52 |
+
|
| 53 |
+
By combining reinforcement learning with reactive synthesis,we achieve safe reinforcement learning, which we define inthe following way:
|
| 54 |
+
|
| 55 |
+
In the following, we consider a safety specification to be given in the form of a deterministic safetyword automaton φs=(Q,q0,Σ,δ,F)superscript𝜑𝑠𝑄subscript𝑞0Σ𝛿𝐹\varphi^{s}=(Q,q_{0},\Sigma,\delta,F), i.e., an automaton in which only safe states in F𝐹F may be visited. Note that since safety specifications given in linear temporal logic can be translated to such automata [11], this assumption does not preclude the use of temporal logic as specification formalism.
|
| 56 |
+
|
| 57 |
+
Reactive synthesis enforces φssuperscript𝜑𝑠\varphi^{s} by solving a safety game built from φssuperscript𝜑𝑠\varphi^{s} and an abstraction of the environment in which the policy is to be executed. The game is played by the environment and the system.In every state q∈Q𝑞𝑄q\in Q, the environment chooses an inputσI∈ΣIsubscript𝜎𝐼subscriptΣ𝐼{\sigma_{I}}\in\Sigma_{I}, and then the system chooses some output σO∈ΣOsubscript𝜎𝑂subscriptΣ𝑂{\sigma_{O}}\in\Sigma_{O}. The play is won by the system if only safe states in F𝐹F are visited during the play.In order to win, the system has to plan ahead:it can never allow the play to visit a state from which the environmentcan force the play to visit an unsafe state in the future.
|
| 58 |
+
|
| 59 |
+
Planning ahead is the true power of synthesis.Let us revisit the autonomous driver example. Suppose that the car isheading towards a cliff. In order to enforce that the car never crosses the cliff, it has to be slowed down long before it reaches the cliff, and thus far before an abnormal operating condition such as falling down can possibly be detected. In particular, the system has to avoid all states from which avoiding to reach the cliffis no longer possible.
|
| 60 |
+
|
| 61 |
+
Planning ahead does not requirethe environment dynamics to be completely known in advance.However, to reason about when exactly a specification violation cannot be avoided, we have to give a (coarse finite-state) abstraction of the environment dynamics. Given that the environment is often represented as an MDP in reinforcement learning, such an abstraction has to be conservative with respect to the behavior of the real MDP. This approximation may have finitely many states even if the MDP has infinitely many states and/or is only approximately known.
|
| 62 |
+
|
| 63 |
+
Formally, given an MDP ℳ=(S,sI,𝒜,𝒫,ℛ)ℳ𝑆subscript𝑠𝐼𝒜𝒫ℛ\mathcal{M}=(S,s_{I},\mathcal{A},\mathcal{P},\allowbreak\mathcal{R}) and an MDP observer function f:S→L:𝑓→𝑆𝐿f:S\rightarrow L for some set L𝐿L, we call a deterministic safety word automaton φℳ=(Q,q0,Σ,δ,F)superscript𝜑ℳ𝑄subscript𝑞0Σ𝛿𝐹\varphi^{\mathcal{M}}=(Q,q_{0},\Sigma,\delta,F) an abstraction of ℳℳ\mathcal{M} if Σ=𝒜×LΣ𝒜𝐿\Sigma=\mathcal{A}\times L and for every trace s0s1s2…∈Sωsubscript𝑠0subscript𝑠1subscript𝑠2…superscript𝑆𝜔s_{0}s_{1}s_{2}\ldots\in S^{\omega} with the corresponding action sequence a0a1…∈𝒜ωsubscript𝑎0subscript𝑎1…superscript𝒜𝜔a_{0}a_{1}\ldots\in\mathcal{A}^{\omega} of the MDP, for every automaton run q¯=q0q1…∈Qω¯𝑞subscript𝑞0subscript𝑞1…superscript𝑄𝜔\overline{q}=q_{0}q_{1}\ldots\in Q^{\omega} of φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} with qi+1=δ(qi,(li,ai))subscript𝑞𝑖1𝛿subscript𝑞𝑖subscript𝑙𝑖subscript𝑎𝑖q_{i+1}=\delta(q_{i},(l_{i},a_{i})) for li=L(si)subscript𝑙𝑖𝐿subscript𝑠𝑖l_{i}=L(s_{i}) and all i∈ℕ𝑖ℕi\in\mathbb{N}, we have that q¯¯𝑞\overline{q} always stays in F𝐹F.An abstraction of an MDP describes how its executions can possibly evolve, and provides the needed information about the environment to allow planning ahead with respect to the safety properties of interest. Without loss of generality, we assume in the following that φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} has no states in F𝐹F from which all infinite paths eventually leave F𝐹F. This requirement ensures that paths that model traces that cannot occur in ℳℳ\mathcal{M} are rejected by φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} as early as possible.
|
| 64 |
+
|
| 65 |
+
The following example shows how specification automata and abstractions of MDPs are used.
|
| 66 |
+
|
| 67 |
+
In this section, we introduce a correct-by-construction reactive system, called a shield, into the traditional learning process.We propose two different ways to modify the loop between the learning agent and its environment: In Sec. 5.1we introduce the shield before the learning agent.In each time step, the shield modifies the list of actions available to the learner by providing a list of safe actions that the learning agent can choose from.In Sec. 5.2 the shield is implemented after the learning agent. The shield monitors the actions selected by thelearning agent, and overwrites them if and only if the chosen actionis unsafe. Based on the location at which the shield is applied,we call it preemptive shielding and post-posed shielding, respectively.For both settings we make the following assumptions.
|
| 68 |
+
|
| 69 |
+
We describe the operation of a learner and a shield together in this section, and give the construction for computing the shield in the next section. In both preemptive and post-posed shielding, the shield will be given as a reactive system 𝒮=(Q,q0,ΣI,ΣO,δ,λ)𝒮𝑄subscript𝑞0subscriptΣ𝐼subscriptΣ𝑂𝛿𝜆\mathcal{S}=(Q,q_{0},\Sigma_{I},\Sigma_{O},\delta,\lambda).
|
| 70 |
+
|
| 71 |
+
Fig. 6 depicts the preemptiveshielding setting.The interaction between the agent, the environment and the shield is as follows:At every time step t𝑡t, the shield computes a set of all safe actions{at1,…,atk}superscriptsubscript𝑎𝑡1…superscriptsubscript𝑎𝑡𝑘\{a_{t}^{1},\dots,a_{t}^{k}\}, i.e., it takes the set of all actions available, and removes all unsafe actions that would violate the safety specification φssubscript𝜑𝑠\varphi_{s}. The agent receives this list from the shield, and picks an action at∈{at1,…,atk}subscript𝑎𝑡superscriptsubscript𝑎𝑡1…superscriptsubscript𝑎𝑡𝑘a_{t}\in\{a_{t}^{1},\dots,a_{t}^{k}\} from it. The environment executes action atsubscript𝑎𝑡a_{t}, moves to a next state st+1subscript𝑠𝑡1s_{t+1}, and provides the reward rt+1subscript𝑟𝑡1r_{t+1}.The task of the shield is basically to modify the set of availableactions of the agent in every time step such that only safe actions remain.
|
| 72 |
+
|
| 73 |
+
More formally, for a preemptive shield, we have ΣO=2𝒜subscriptΣ𝑂superscript2𝒜\Sigma_{O}=2^{\mathcal{A}}, as the shield outputs the set of actions for the learner to choose from for the respective next step. The shield observes the label of the last MDP state in the sequence so far and provides the set of safe actions. For selecting the next transition of the finite-state machine that represents the shield, it also makes use of the action actually chosen by the agent. So for the input alphabet of the shield, we have ΣI=ΣI1×ΣI2subscriptΣ𝐼superscriptsubscriptΣ𝐼1superscriptsubscriptΣ𝐼2\Sigma_{I}=\Sigma_{I}^{1}\times\Sigma_{I}^{2} with ΣI1=LsuperscriptsubscriptΣ𝐼1𝐿\Sigma_{I}^{1}=L and ΣI2=𝒜superscriptsubscriptΣ𝐼2𝒜\Sigma_{I}^{2}=\mathcal{A}.
|
| 74 |
+
|
| 75 |
+
The shield and the learner together produce a trace s0a0s1a1…∈(S×𝒜)ωsubscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1…superscript𝑆𝒜𝜔s_{0}a_{0}s_{1}a_{1}\ldots\in(S\times\mathcal{A})^{\omega} in the MDP if there exists a trace q0q1…∈Qωsubscript𝑞0subscript𝑞1…superscript𝑄𝜔q_{0}q_{1}\ldots\in Q^{\omega} in the shield such that, for every i∈ℕ𝑖ℕi\in\mathbb{N}, we have ai∈λ(qi,L(si))subscript𝑎𝑖𝜆subscript𝑞𝑖𝐿subscript𝑠𝑖a_{i}\in\lambda(q_{i},L(s_{i})) and qi+1=δ(qi,(L(si),ai)q_{i+1}=\delta(q_{i},(L(s_{i}),a_{i}).
|
| 76 |
+
|
| 77 |
+
The preemptive shielding approach can also be seen as transforming the original MDP ℳℳ\mathcal{M} into a new MDP ℳ′=(S′,sI,𝒜′,𝒫′,ℛ′)superscriptℳ′superscript𝑆′subscript𝑠𝐼superscript𝒜′superscript𝒫′superscriptℛ′\mathcal{M}^{\prime}=(S^{\prime},s_{I},\mathcal{A}^{\prime},\mathcal{P}^{\prime},\mathcal{R}^{\prime}) with the unsafe actions at each state removed, and where S′superscript𝑆′S^{\prime} is the product of the original MDP and the state space of the shield.For each s∈S′𝑠superscript𝑆′s\in S^{\prime}, we create a new subset of available actions 𝒜s′⊆𝒜ssubscriptsuperscript𝒜′𝑠subscript𝒜𝑠\mathcal{A}^{\prime}_{s}\subseteq\mathcal{A}_{s} by applying the shield to 𝒜ssubscript𝒜𝑠\mathcal{A}_{s} and eliminating all unsafe actions.From each state s∈S′𝑠superscript𝑆′s\in S^{\prime}, the transition function 𝒫′superscript𝒫′\mathcal{P}^{\prime} contains only transition distributions from 𝒫𝒫\mathcal{P} for actions contained in 𝒜s′subscriptsuperscript𝒜′𝑠\mathcal{A}^{\prime}_{s}.
|
| 78 |
+
|
| 79 |
+
We propose a second shielding setting, in which the shieldis placed after the learning algorithm, as shown in Fig. 7.The shield monitors the actions of the agent,and substitutes the selected actions by safe actions whenever this is necessary to prevent the violation of φssuperscript𝜑𝑠\varphi^{s}.In each step t𝑡t, the agent selects an action at1superscriptsubscript𝑎𝑡1a_{t}^{1}. The shieldforwards at1superscriptsubscript𝑎𝑡1a_{t}^{1} to the environment, i.e., at=at1subscript𝑎𝑡superscriptsubscript𝑎𝑡1a_{t}=a_{t}^{1}.Only if at1superscriptsubscript𝑎𝑡1a_{t}^{1} is unsafe with respect to φssubscript𝜑𝑠\varphi_{s},the shield selects a different safe action at≠at1subscript𝑎𝑡superscriptsubscript𝑎𝑡1a_{t}\neq a_{t}^{1} instead.The environment executes atsubscript𝑎𝑡a_{t}, moves to st+1subscript𝑠𝑡1s_{t+1} and provides rt+1subscript𝑟𝑡1r_{t+1}.The agent receives atsubscript𝑎𝑡a_{t} and rt+1subscript𝑟𝑡1r_{t+1}, and performs policy updatesbased on that information. For theexecuted action atsubscript𝑎𝑡a_{t}, the agent updates its policy using rt+1subscript𝑟𝑡1r_{t+1}. The question is what the reward for at1superscriptsubscript𝑎𝑡1a_{t}^{1} shouldbe in case we have at≠at1subscript𝑎𝑡superscriptsubscript𝑎𝑡1a_{t}\neq a_{t}^{1}. We discuss two different approaches.1.Assign a punishment rt+1′subscriptsuperscript𝑟′𝑡1r^{\prime}_{t+1} to at1superscriptsubscript𝑎𝑡1a_{t}^{1}.The agent assigns a punishment rt+1′<0subscriptsuperscript𝑟′𝑡10r^{\prime}_{t+1}<0 to the unsafe action at1superscriptsubscript𝑎𝑡1a_{t}^{1} and learns that selecting at1subscriptsuperscript𝑎1𝑡a^{1}_{t} at state stsubscript𝑠𝑡s_{t} is unsafe, without ever violating φssuperscript𝜑𝑠\varphi^{s}.However, there is no guarantee that unsafe actions are not part of the final policy.Therefore, the shield has to remain active even after the learning phase.2.Assign the reward rt+1subscript𝑟𝑡1r_{t+1} to at1superscriptsubscript𝑎𝑡1a_{t}^{1}.The agent updates the unsafe action at1subscriptsuperscript𝑎1𝑡a^{1}_{t} with the reward rt+1subscript𝑟𝑡1r_{t+1}. Therefore, picking unsafe actions can likely be part of an optimal policy by the agent.Since an unsafe action is always mapped to a safe one, this does not pose a problem and the agent never has to learn to avoid unsafe actions.Consequently, the shield is (again) needed during the learning and execution phases.
|
| 80 |
+
|
| 81 |
+
The big advantage of post-posed shielding is that it works evenif the learning algorithm is already in the execution phase and therefore follows a fixed policy.In every step, the learning algorithm only sees the state of the MDP (without the state of the shield), and then the shield corrects the learner’s actions whenever this is necessary to ensure safe operation of the system. The learning agent does not even need to know that it is shielded.
|
| 82 |
+
|
| 83 |
+
In order to be less restrictive to the learning algorithm, we propose that in every time step, the agent provides a ranking rankt=(at1,…,atk)𝑟𝑎𝑛subscript𝑘𝑡superscriptsubscript𝑎𝑡1…superscriptsubscript𝑎𝑡𝑘rank_{t}=(a_{t}^{1},\dots,a_{t}^{k}) on the allowed actions, i.e., the agent wantsat1subscriptsuperscript𝑎1𝑡a^{1}_{t} to be executed the most, at2subscriptsuperscript𝑎2𝑡a^{2}_{t}to be executed the second most, etc.The ranking does not have to contain all available actions, i.e. 1≤|rankt|≤n1𝑟𝑎𝑛subscript𝑘𝑡𝑛1\leq|rank_{t}|\leq n, wheren𝑛n is the number of available actions in step t𝑡t.The shield selects the first action at∈ranktsubscript𝑎𝑡𝑟𝑎𝑛subscript𝑘𝑡a_{t}\in rank_{t}that is safe according to φssuperscript𝜑𝑠\varphi^{s}. Only if allactions in rankt𝑟𝑎𝑛subscript𝑘𝑡rank_{t} are unsafe, the shield selectsa safe action at∉ranktsubscript𝑎𝑡𝑟𝑎𝑛subscript𝑘𝑡a_{t}\notin rank_{t}.Both approaches for updating the policy discussed before can naturally be extended for a ranking of several actions.A second advantage of having a ranking on actions is thatthe learning agent can perform several policy updates at once;e.g., if all actions in rankt𝑟𝑎𝑛subscript𝑘𝑡rank_{t} are unsafe, the agent canperform |rankt|+1𝑟𝑎𝑛subscript𝑘𝑡1|rank_{t}|+1 policy updates in one step by using the rewards rt+1′subscriptsuperscript𝑟′𝑡1r^{\prime}_{t+1} or rt+1subscript𝑟𝑡1r_{t+1} for all of them, depending on which of the above variants is used.
|
| 84 |
+
|
| 85 |
+
A shield 𝒮𝒮\mathcal{S} is introduced into the traditional learning process, either before or after the learning agent.In both cases, 𝒮𝒮\mathcal{S} enforces two properties: correctness and minimum interference.First, 𝒮𝒮\mathcal{S} enforces correctness against a given safety specification φssuperscript𝜑𝑠\varphi^{s} at run time.With minimum interference, we mean that the shield restricts the agent as rarely as possible.The shield 𝒮𝒮\mathcal{S} is computed by reactive synthesis from φssuperscript𝜑𝑠\varphi^{s} and an MDP abstraction φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} that represents the environment in which the agent shall operate.
|
| 86 |
+
|
| 87 |
+
In this section, we give an algorithm to compute shields for preemptive shielding and post-posed shielding. We prove that the computed shields (1) enforce the correctness criterion, and (2) are the minimally interfering shields among those that enforce φssuperscript𝜑𝑠\varphi^{s} on all MDPs for which φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} is an abstraction.
|
| 88 |
+
|
| 89 |
+
The first steps of constructing the shield are the same for both variations of shielding.Given is an RL problem in which an agent has to learn an optimal policy for an unknown environment that can be modelled by an MDP ℳ=(S,sI,𝒜,𝒫,ℛ)ℳ𝑆subscript𝑠𝐼𝒜𝒫ℛ\mathcal{M}=(S,s_{I},\mathcal{A},\mathcal{P},\mathcal{R}) while satisfying a safety specification φs=(Q,q0,Σ,δ,F)superscript𝜑𝑠𝑄subscript𝑞0Σ𝛿𝐹\varphi^{s}=(Q,q_{0},\Sigma,\delta,F) with Σ=ΣI×ΣOΣsubscriptΣ𝐼subscriptΣ𝑂\Sigma=\Sigma_{I}\times\Sigma_{O} and 𝒜=ΣO𝒜subscriptΣ𝑂\mathcal{A}=\Sigma_{O}. We assume some abstraction φℳ=(Qℳ,q0,ℳ,𝒜×L,δℳ,Fℳ)superscript𝜑ℳsubscript𝑄ℳsubscript𝑞0ℳ𝒜𝐿subscript𝛿ℳsubscript𝐹ℳ\varphi^{\mathcal{M}}=(Q_{\mathcal{M}},q_{0,\mathcal{M}},\mathcal{A}\times L,\delta_{\mathcal{M}},F_{\mathcal{M}}) of ℳℳ\mathcal{M} for some MDP observer function f:S→L:𝑓→𝑆𝐿f:S\rightarrow L to be given.Since φssuperscript𝜑𝑠\varphi^{s} models a restriction of the traces of the MDP and the learner together that we want to enforce, we assume it to have Σ=L×𝒜Σ𝐿𝒜\Sigma=L\times\mathcal{A}, i.e., it reads the part of the system behavior that the abstraction is concerned with.We perform the following steps for both shield types.1.We translate φssuperscript𝜑𝑠\varphi^{s} and φℳsuperscript𝜑ℳ\varphi^{\mathcal{M}} to a safety game 𝒢=(G,g0,ΣI,ΣO,δ,Fg)𝒢𝐺subscript𝑔0subscriptΣ𝐼subscriptΣ𝑂𝛿superscript𝐹𝑔\mathcal{G}=(G,g_{0},\Sigma_{I},\Sigma_{O},\delta,F^{g}) between two players. In the game, the environment player chooses the next observations from the MDP state (i.e., elements from L𝐿L), and the system chooses the next action. Formally, 𝒢𝒢\mathcal{G} has the following components:G𝐺\displaystyle G=Q×Qℳ,absent𝑄subscript𝑄ℳ\displaystyle=Q\times Q_{\mathcal{M}},g0subscript𝑔0\displaystyle g_{0}=(q0,q0,ℳ),absentsubscript𝑞0subscript𝑞0ℳ\displaystyle=(q_{0},q_{0,\mathcal{M}}),ΣIsubscriptΣ𝐼\displaystyle\Sigma_{I}=L,absent𝐿\displaystyle=L,ΣOsubscriptΣ𝑂\displaystyle\Sigma_{O}=𝒜,absent𝒜\displaystyle=\mathcal{A},δ((q,qℳ),l,a)𝛿𝑞subscript𝑞ℳ𝑙𝑎\displaystyle\delta((q,q_{\mathcal{M}}),l,a)=(δ(q,(l,a)),δℳ(q,(l,a))),absent𝛿𝑞𝑙𝑎subscript𝛿ℳ𝑞𝑙𝑎\displaystyle=(\delta(q,(l,a)),\delta_{\mathcal{M}}(q,(l,a))),for all (q,qℳ)∈G,l∈L,a∈𝒜, andformulae-sequencefor all 𝑞subscript𝑞ℳ𝐺formulae-sequence𝑙𝐿𝑎𝒜 and\displaystyle\quad\text{for all }(q,q_{\mathcal{M}})\in G,l\in L,a\in\mathcal{A},\text{ and}Fgsuperscript𝐹𝑔\displaystyle F^{g}=(F×Qℳ)∪(Q×(Qℳ∖Fℳ)).absent𝐹subscript𝑄ℳ𝑄subscript𝑄ℳsubscript𝐹ℳ\displaystyle=(F\times Q_{\mathcal{M}})\cup(Q\times(Q_{\mathcal{M}}\setminus F_{\mathcal{M}})).In the construction, the state space of the game is the product between the specification automaton state set and the abstraction state set. The safe states in the game (in the set Fgsuperscript𝐹𝑔F^{g}) are the ones at which either the specification automaton is in a safe state, or the abstraction is in an unsafe state. The latter case represents that the observed MDP behavior differs from the behavior that was modeled in the abstraction. For game solving, it is important that such cases (whose occurrence in the field witnesses the incorrectness of the abstraction) count as winning for the system player, as the system player only needs to work correctly in environments that conform to the abstraction.2.Next, we compute the winning region W⊆Fg𝑊superscript𝐹𝑔W\subseteq F^{g} of G𝐺G by standard safety game solving as described in [3].To compute a preemtive shield, we then perform the following step:3.We translate G𝐺G and W𝑊W to a reactive system 𝒮=(Q,𝒮q0,𝒮,ΣI,𝒮,ΣO,𝒮,δ𝒮,λ𝒮)\mathcal{S}=(Q,_{\mathcal{S}}q_{0,\mathcal{S}},\Sigma_{I,\mathcal{S}},\Sigma_{O,\mathcal{S}},\delta_{\mathcal{S}},\lambda_{\mathcal{S}}) that constitutes the shield with ΣI,𝒮=ΣI,𝒮1×ΣI,𝒮2subscriptΣ𝐼𝒮subscriptsuperscriptΣ1𝐼𝒮subscriptsuperscriptΣ2𝐼𝒮\Sigma_{I,\mathcal{S}}=\Sigma^{1}_{I,\mathcal{S}}\times\Sigma^{2}_{I,\mathcal{S}} for ΣI,𝒮1=LsubscriptsuperscriptΣ1𝐼𝒮𝐿\Sigma^{1}_{I,\mathcal{S}}=L and ΣI,𝒮2=𝒜subscriptsuperscriptΣ2𝐼𝒮𝒜\Sigma^{2}_{I,\mathcal{S}}=\mathcal{A}. The shield has the following components:Q𝒮subscript𝑄𝒮\displaystyle Q_{\mathcal{S}}=G,absent𝐺\displaystyle=G,q0,𝒮subscript𝑞0𝒮\displaystyle q_{0,\mathcal{S}}=g0,absentsubscript𝑔0\displaystyle=g_{0},ΣI,𝒮subscriptΣ𝐼𝒮\displaystyle\Sigma_{I,\mathcal{S}}=𝒜×L,absent𝒜𝐿\displaystyle=\mathcal{A}\times L,ΣO,𝒮subscriptΣ𝑂𝒮\displaystyle\Sigma_{O,\mathcal{S}}=2𝒜,absentsuperscript2𝒜\displaystyle=2^{\mathcal{A}},δ𝒮(g,l,a)subscript𝛿𝒮𝑔𝑙𝑎\displaystyle\delta_{\mathcal{S}}(g,l,a)=δ(g,l,a)absent𝛿𝑔𝑙𝑎\displaystyle=\delta(g,l,a)for all g∈G,l∈L,a∈𝒜, andformulae-sequencefor all 𝑔𝐺formulae-sequence𝑙𝐿𝑎𝒜 and\displaystyle\quad\text{for all }g\in G,l\in L,a\in\mathcal{A},\text{ and}λ𝒮(g,l)subscript𝜆𝒮𝑔𝑙\displaystyle\lambda_{\mathcal{S}}(g,l)={a∈𝒜∣δ(g,l,a)∈W}absentconditional-set𝑎𝒜𝛿𝑔𝑙𝑎𝑊\displaystyle=\{a\in\mathcal{A}\mid\delta(g,l,a)\in W\}for all g∈G,l∈L.formulae-sequencefor all 𝑔𝐺𝑙𝐿\displaystyle\quad\text{for all }g\in G,l\in L.
|
| 90 |
+
|
| 91 |
+
To simplify 𝒮𝒮\mathcal{S}, it makes sense to optionally remove all states that are unreachable from q0,𝒮subscript𝑞0𝒮q_{0,\mathcal{S}} after constructing 𝒮𝒮\mathcal{S}.
|
| 92 |
+
|
| 93 |
+
To exemplify these steps, let us reconsider the example from Section 4. Building the product game between the specification automaton and the MDP abstraction leads to a game with 602 states (if we merge all states in F×Qℳ𝐹subscript𝑄ℳF\times Q_{\mathcal{M}} into a single error state and all states in Q×(Qℳ∖Fℳ)𝑄subscript𝑄ℳsubscript𝐹ℳQ\times(Q_{\mathcal{M}}\setminus F_{\mathcal{M}}) into a single paradise state from which the game is always won by the system).If we solve the game, then most of the states are winning, but a few are not.Figure 8 shows a small fraction of the game that contains such non-winning states. We can see that, in state (q3,qd)subscript𝑞3subscript𝑞𝑑(q_{3},q_{d}), the system should not choose action 𝑐𝑙𝑜𝑠𝑒𝑐𝑙𝑜𝑠𝑒\mathit{close}, as otherwise the system cannot avoid to reach q𝑓𝑎𝑖𝑙subscript𝑞𝑓𝑎𝑖𝑙q_{\mathit{fail}}. It could be the case that q𝑓𝑎𝑖𝑙subscript𝑞𝑓𝑎𝑖𝑙q_{\mathit{fail}} is actually not reached (when the environment chooses to let the level stay the same for a step), but we cannot be sure because we have to consider all evolutions of the environment to be possible that are consistent with our abstraction. Thus, the shield needs to deactivate the 𝑐𝑙𝑜𝑠𝑒𝑐𝑙𝑜𝑠𝑒\mathit{close} action in state (q3,qd)subscript𝑞3subscript𝑞𝑑(q_{3},q_{d}).
|
| 94 |
+
|
| 95 |
+
The shield allows all actions that are guaranteed to lead to a state in W𝑊W, no matter what the next observation is. Since these states, by the definition of the set of winning states, are exactly the ones from which the system player can enforce not to ever visit a state not in F𝐹F, the shield is minimally interfering. It disables all actions that may lead to an error state (according to the abstraction).
|
| 96 |
+
|
| 97 |
+
The construction of a post-posed shield is very similar to the construction of the preemptive shield. The main difference is that the post-posed shield always outputs a single action. Thus, the last step of the construction above should read as follows.
|
| 98 |
+
|
| 99 |
+
3.We translate G𝐺G and W𝑊W to a reactive system 𝒮=(Q,𝒮q0,𝒮,ΣI,𝒮,ΣO,𝒮,δ𝒮,λ𝒮)\mathcal{S}=(Q,_{\mathcal{S}}q_{0,\mathcal{S}},\Sigma_{I,\mathcal{S}},\Sigma_{O,\mathcal{S}},\delta_{\mathcal{S}},\lambda_{\mathcal{S}}) that constitutes the shield with ΣI,𝒮=ΣI,𝒮1×ΣI,𝒮2subscriptΣ𝐼𝒮subscriptsuperscriptΣ1𝐼𝒮subscriptsuperscriptΣ2𝐼𝒮\Sigma_{I,\mathcal{S}}=\Sigma^{1}_{I,\mathcal{S}}\times\Sigma^{2}_{I,\mathcal{S}} for ΣI,𝒮1=L×𝒜subscriptsuperscriptΣ1𝐼𝒮𝐿𝒜\Sigma^{1}_{I,\mathcal{S}}=L\times\mathcal{A} and ΣI,𝒮2={⋅}subscriptsuperscriptΣ2𝐼𝒮⋅\Sigma^{2}_{I,\mathcal{S}}=\{\cdot\}. The shield has the following components:Q𝒮subscript𝑄𝒮\displaystyle Q_{\mathcal{S}}=G,absent𝐺\displaystyle=G,q0,𝒮subscript𝑞0𝒮\displaystyle q_{0,\mathcal{S}}=(q0,q0,ℳ),absentsubscript𝑞0subscript𝑞0ℳ\displaystyle=(q_{0},q_{0,\mathcal{M}}),ΣI,𝒮subscriptΣ𝐼𝒮\displaystyle\Sigma_{I,\mathcal{S}}=𝒜×L,absent𝒜𝐿\displaystyle=\mathcal{A}\times L,ΣO,𝒮subscriptΣ𝑂𝒮\displaystyle\Sigma_{O,\mathcal{S}}=𝒜,absent𝒜\displaystyle=\mathcal{A},λ𝒮(g,l,a)subscript𝜆𝒮𝑔𝑙𝑎\displaystyle\lambda_{\mathcal{S}}(g,l,a)={aif δ(g,l,a)∈Wa′if δ(g,l,a)∉W for some arbitrary but fixed a′ with δ(g,l,a′)∈W,absentcases𝑎if 𝛿𝑔𝑙𝑎𝑊superscript𝑎′if 𝛿𝑔𝑙𝑎𝑊 for some otherwise arbitrary but fixed superscript𝑎′ with 𝛿𝑔𝑙superscript𝑎′𝑊\displaystyle=\begin{cases}a&\text{if }\delta(g,l,a)\in W\\a^{\prime}&\text{if }\delta(g,l,a)\notin W\text{ for some }\\&\text{ arbitrary but fixed }a^{\prime}\text{ with }\delta(g,l,a^{\prime})\in W,\end{cases}δ𝒮(g,l,a)subscript𝛿𝒮𝑔𝑙𝑎\displaystyle\delta_{\mathcal{S}}(g,l,a)=δ(g,l,λ𝒮(g,l,a))absent𝛿𝑔𝑙subscript𝜆𝒮𝑔𝑙𝑎\displaystyle=\delta(g,l,\lambda_{\mathcal{S}}(g,l,a))for all g∈G,l∈L,a∈𝒜.formulae-sequencefor all 𝑔𝐺formulae-sequence𝑙𝐿𝑎𝒜\displaystyle\quad\text{for all }g\in G,l\in L,a\in\mathcal{A}.The construction can be extended naturally if a ranking of actions 𝑟𝑎𝑛𝑘t={at1,…,atn}subscript𝑟𝑎𝑛𝑘𝑡subscriptsuperscript𝑎1𝑡…subscriptsuperscript𝑎𝑛𝑡\mathit{rank}_{t}=\{a^{1}_{t},\dots,a^{n}_{t}\} is provided bythe agent. Then, the shield selects the first action at=atisubscript𝑎𝑡subscriptsuperscript𝑎𝑖𝑡a_{t}=a^{i}_{t}that is allowed by φssuperscript𝜑𝑠\varphi^{s}. Only if all actions in 𝑟𝑎𝑛𝑘tsubscript𝑟𝑎𝑛𝑘𝑡\mathit{rank}_{t} are unsafe,the shield is allowed to deviate and to select a safe action at∉ranktsubscript𝑎𝑡𝑟𝑎𝑛subscript𝑘𝑡a_{t}\notin rank_{t}.
|
| 100 |
+
|
| 101 |
+
We now prove that the shields computed according to the definitions indeed have the claimed properties, namely correctness, and minimal interference. For brevity, we detail the case of preemptive shields. The line of reasoning for post-posed shielding is similar.
|
| 102 |
+
|
| 103 |
+
A shield works correctly if for every trace s0a0s1a1…∈(S×𝒜)ωsubscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1…superscript𝑆𝒜𝜔s_{0}a_{0}s_{1}a_{1}\ldots\in(S\times\mathcal{A})^{\omega} that MDP, shield and learner can together produce, we have that (f(s0),a0)(f(s1),a1)…𝑓subscript𝑠0subscript𝑎0𝑓subscript𝑠1subscript𝑎1…(f(s_{0}),a_{0})(f(s_{1}),a_{1})\ldots is in the language of the specification automaton φSsuperscript𝜑𝑆\varphi^{S} for the MDP labeling function f𝑓f. Additionally, the shield must always report at least one available action at every step.
|
| 104 |
+
|
| 105 |
+
Let q0q1…∈Qωsubscript𝑞0subscript𝑞1…superscript𝑄𝜔q_{0}q_{1}\ldots\in Q^{\omega} be the run of φSsuperscript𝜑𝑆\varphi^{S} corresponding to s0a0s1a1…subscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1…s_{0}a_{0}s_{1}a_{1}\ldots, i.e., for which for every i∈ℕ𝑖ℕi\in\mathbb{N}, we have ai∈λ(qi,f(si))subscript𝑎𝑖𝜆subscript𝑞𝑖𝑓subscript𝑠𝑖a_{i}\in\lambda(q_{i},f(s_{i})) and qi+1=δ(qi,(f(si),ai))subscript𝑞𝑖1𝛿subscript𝑞𝑖𝑓subscript𝑠𝑖subscript𝑎𝑖q_{i+1}=\delta(q_{i},(f(s_{i}),a_{i})). By the construction of the shield, we have that Q=Q×Qℳ𝑄𝑄subscript𝑄ℳQ=Q\times Q_{\mathcal{M}}, where Q𝑄Q is the state space of φSsuperscript𝜑𝑆\varphi^{S} and Qℳsubscript𝑄ℳQ_{\mathcal{M}} is the state space of the abstraction. Hence, we can also write q0q1…subscript𝑞0subscript𝑞1…q_{0}q_{1}\ldots as (q0S,q0ℳ)(q1S,q1ℳ)…subscriptsuperscript𝑞𝑆0subscriptsuperscript𝑞ℳ0subscriptsuperscript𝑞𝑆1subscriptsuperscript𝑞ℳ1…(q^{S}_{0},q^{\mathcal{M}}_{0})(q^{S}_{1},q^{\mathcal{M}}_{1})\ldots, where q0ℳq1ℳ…subscriptsuperscript𝑞ℳ0subscriptsuperscript𝑞ℳ1…q^{\mathcal{M}}_{0}q^{\mathcal{M}}_{1}\ldots is the run of the abstraction automaton on s0a0s1a1…subscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1…s_{0}a_{0}s_{1}a_{1}\ldots (as defined in Section 4) and q0Sq1S…subscriptsuperscript𝑞𝑆0subscriptsuperscript𝑞𝑆1…q^{S}_{0}q^{S}_{1}\ldots is a run of φSsuperscript𝜑𝑆\varphi^{S} on s0a0s1a1…subscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1…s_{0}a_{0}s_{1}a_{1}\ldots. By the construction of the shield, it only has reachable states (qS,qℳ)superscript𝑞𝑆superscript𝑞ℳ(q^{S},q^{\mathcal{M}}) that are in the set of winning positions. For all possible next labels l∈L𝑙𝐿l\in L, there exists at least one action such that if the action is taken, then the next state (q′S,q′ℳ)superscript𝑞′𝑆superscriptsuperscript𝑞′ℳ(q^{\prime S},{q^{\prime}}^{\mathcal{M}}) is winning as well. Therefore, the shield cannot deadlock. As far as correctness is concerned, the qSsuperscript𝑞𝑆q^{S} component of the run of the shield will always reflect the state of the safety automaton along the trace, and since a winning strategy makes sure that only winning states are ever visited along a play, by the definition of Fgsuperscript𝐹𝑔F^{g}, the error state of φSsuperscript𝜑𝑆\varphi^{S} can only be visited after the error state for the abstraction MDP has been visited (and hence the abstraction turned out to be incorrect).
|
| 106 |
+
|
| 107 |
+
Let the shield, learner, and MDP together produce a prefix trace s0a0s1a1s2a2…sksubscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1subscript𝑠2subscript𝑎2…subscript𝑠𝑘s_{0}a_{0}s_{1}a_{1}\allowbreak{}s_{2}\allowbreak{}a_{2}\ldots s_{k} that induces a (prefix) run q0q1…qk−1∈Q∗subscript𝑞0subscript𝑞1…subscript𝑞𝑘1superscript𝑄q_{0}q_{1}\ldots q_{k-1}\in Q^{*} of the safety automaton φSsuperscript𝜑𝑆\varphi^{S} that we used as the representation of the specification for building the shield. Assume that the shield deactivates an action ak+1subscript𝑎𝑘1a_{k+1} that is available from state sksubscript𝑠𝑘s_{k} in the MDP.We show that the shield had to deactivate ak+1subscript𝑎𝑘1a_{k+1} as there is another MDP that is consistent with the observed behavior and the abstraction for which, regardless of the learner’s policy, there is a non-zero probability to violate the specification after the trace prefix s0a0s1a1s2a2…skak+1subscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1subscript𝑠2subscript𝑎2…subscript𝑠𝑘subscript𝑎𝑘1s_{0}a_{0}s_{1}a_{1}\allowbreak{}s_{2}\allowbreak{}a_{2}\ldots s_{k}a_{k+1}.
|
| 108 |
+
|
| 109 |
+
Using the abstract finite-state machine φℳ=(Qℳ,q0,ℳ,Σ,δ,F)superscript𝜑ℳsubscript𝑄ℳsubscript𝑞0ℳΣ𝛿𝐹\varphi^{\mathcal{M}}=(Q_{\mathcal{M}},q_{0,\mathcal{M}},\Sigma,\delta,F), we define this other MDP ℳ′=(S′,sI′,𝒜,𝒫′,ℛ)superscriptℳ′superscript𝑆′subscriptsuperscript𝑠′𝐼𝒜superscript𝒫′ℛ\mathcal{M}^{\prime}=(S^{\prime},s^{\prime}_{I},\mathcal{A},\mathcal{P}^{\prime},\mathcal{R}) with S′=Qℳ×Lsuperscript𝑆′subscript𝑄ℳ𝐿S^{\prime}=Q_{\mathcal{M}}\times L, sI′=q0,ℳ×f(s0)subscriptsuperscript𝑠′𝐼subscript𝑞0ℳ𝑓subscript𝑠0s^{\prime}_{I}=q_{0,\mathcal{M}}\times f(s_{0}), 𝒜𝒜\mathcal{A} being the same set of actions as in the original MDP, and where 𝒫′((q,l),a)superscript𝒫′𝑞𝑙𝑎\mathcal{P}^{\prime}((q,l),a) is a uniform distribution over all elements from the set {(q′,l′)∈Qℳ×L∣q′=δ(q,(l,a)),q′∈F,∃a′∈𝒜.δ(q′,(l′,a′))∈F}conditional-setsuperscript𝑞′superscript𝑙′subscript𝑄ℳ𝐿formulae-sequenceformulae-sequencesuperscript𝑞′𝛿𝑞𝑙𝑎formulae-sequencesuperscript𝑞′𝐹superscript𝑎′𝒜𝛿superscript𝑞′superscript𝑙′superscript𝑎′𝐹\{(q^{\prime},l^{\prime})\in Q_{\mathcal{M}}\times L\mid q^{\prime}=\delta(q,(l,a)),q^{\prime}\in F,\exists a^{\prime}\in\mathcal{A}.\delta(q^{\prime},(l^{\prime},a^{\prime}))\in F\} for every (q,l)∈S′𝑞𝑙superscript𝑆′(q,l)\in S^{\prime} and a∈𝒜𝑎𝒜a\in\mathcal{A}. Every state (q′,l′)∈S′superscript𝑞′superscript𝑙′superscript𝑆′(q^{\prime},l^{\prime})\in S^{\prime} is mapped to l′superscript𝑙′l^{\prime} by the abstraction function f𝑓f. The reward function is the same as in the original MDP, except that we ignore the (new) state component of the shield.
|
| 110 |
+
|
| 111 |
+
Assume now that action ak+1subscript𝑎𝑘1a_{k+1} was activated after the prefix trace s0a0s1a1s2a2…sksubscript𝑠0subscript𝑎0subscript𝑠1subscript𝑎1subscript𝑠2subscript𝑎2…subscript𝑠𝑘s_{0}a_{0}s_{1}a_{1}\allowbreak{}s_{2}\allowbreak{}a_{2}\ldots s_{k} while the shield is in a state (q𝒮,qℳ)superscript𝑞𝒮superscript𝑞ℳ(q^{\mathcal{S}},q^{\mathcal{M}}). We have that ℳ′superscriptℳ′\mathcal{M}^{\prime} is an MDP in which every finite-length label sequence that is possible in the abstraction for some action sequence has a non-zero probability to occur if the action sequence is chosen. Due to the construction of the shield by game solving, action ak+1subscript𝑎𝑘1a_{k+1} is only deactivated in state (q𝒮,qℳ)superscript𝑞𝒮superscript𝑞ℳ(q^{\mathcal{S}},q^{\mathcal{M}}) if in the game, the environment player had a strategy to violate φSsuperscript𝜑𝑆\varphi^{S} using only traces allowed by the abstraction. Since φSsuperscript𝜑𝑆\varphi^{S} is a safety property, the violation would occur in finite time. Since in ℳ′superscriptℳ′\mathcal{M}^{\prime}, all finite traces that can occur in the abstraction have a non-zero probability, activating ak+1subscript𝑎𝑘1a_{k+1} (and the learner choosing ak+1subscript𝑎𝑘1a_{k+1}) would imply a non-zero proability to violate the specification in the future, no matter what the learner does in the future. Hence, the shield could not prevent a violation in such a case, and ak+1subscript𝑎𝑘1a_{k+1} needs to be deactivated.
|
| 112 |
+
|
| 113 |
+
Define an MDP ℳ=(S,sI,𝒜,𝒫,ℛ)ℳ𝑆subscript𝑠𝐼𝒜𝒫ℛ\mathcal{M}=(S,s_{I},\mathcal{A},\mathcal{P},\mathcal{R}), with discrete state set S𝑆S, discrete state-dependent action sets 𝒜ssubscript𝒜𝑠\mathcal{A}_{s}, and state-dependent transition functions 𝒫s(a,s’)subscript𝒫𝑠𝑎𝑠’\mathcal{P}_{s}(a,s’) that define the probability of transitioning to state s’𝑠’s’ when taking action a𝑎a in state s𝑠s.Assume also that a shield 𝒮=(Q𝒮,q0,𝒮,ΣI,𝒮,ΣO,𝒮,δ𝒮,λ𝒮)𝒮subscript𝑄𝒮subscript𝑞0𝒮subscriptΣ𝐼𝒮subscriptΣ𝑂𝒮subscript𝛿𝒮subscript𝜆𝒮\mathcal{S}=(Q_{\mathcal{S}},q_{0,\mathcal{S}},\Sigma_{I,\mathcal{S}},\Sigma_{O,\mathcal{S}},\delta_{\mathcal{S}},\lambda_{\mathcal{S}}) is given for ℳℳ\mathcal{M} and for some MDP labeling function f:S→L:𝑓→𝑆𝐿f:S\rightarrow L.
|
| 114 |
+
|
| 115 |
+
For both preemptive and post-posed shielding, we can build a product MDP ℳ′superscriptℳ′\mathcal{M^{\prime}} that represents the behavior of the shield and the MDP together. Since ℳ’ℳ’\mathcal{M}’ is a standard MDP, all learning algorithms that converge on standard MDPs can be shown to converge in the presence of a shield under this construction.Note that for the postposed shield case, this argument requires that whenever an action ranking is chosen by the learner that does not contain a safe action, there is a fixed probability distribution over the safe actions executed by the learner instead. This distribution may depend on the state of the MDP and the shield and the selected ranking, but must be constant over time, as otherwise we could not model the joint behavior of the shield and the environment MDP as a product MDP.
|
| 116 |
+
|
| 117 |
+
In both the post-posed and preemptive cases, we make use of the fact that the learner has access to the state of the shield and can base its actions on it in this argument. Shields can be relatively large—especially for complex abstractions and specifications—as they have both the state spaces of the abstraction and the specification automaton as factors. On the other hand, for specifications of the form “at all points during the execution, the label of the MDP states should have a certain form”, the specification automaton has only a single state (plus an error state). The state space of the shield is then exactly the state space of the abstraction (plus paradise states and error states). If the abstraction state can furthermore be determined from the respective last MDP state label, then the shield can be modified to have a single state (plus error states and paradise states). The requirements from Assumption 1 can then be relaxed by allowing the learner to only observe the state of the MDP (rather than the states of both the MDP and the shield) because, if the MDP behaves according to the abstraction, then the paradise state is never visited. At the same time, the shield ensures that no error state is ever visited. Hence, the state space of ℳ′superscriptℳ′\mathcal{M}^{\prime} can be restructured to have to the same state space of ℳℳ\mathcal{M}.In such a case, it suffices for the learner to observe the current state as state of ℳℳ\mathcal{M} rather than ℳ′superscriptℳ′\mathcal{M}^{\prime}. To the learner, this is indistinguishable from operating on ℳℳ\mathcal{M} without a shield.
|
| 118 |
+
|
| 119 |
+
We applied shielded reinforcement learning in four domains: (1) a robot in 9x9 and 15x9 grid worlds, (2) a self-driving car scenario, (3) an Atari® game called Seaquest™, and (4) the water tank example from Section 4. For clarity, we compare between a subset of shielding settings which we later specify for each problem. The simulations were performed on a computer equipped with an Intel® Core™i7-4790K and 16 GB of RAM running a 64-bit version of Ubuntu® 16.04 LTS. Source code, input files, and detailed instructions to reproduce our experiments are available for download.111https://github.com/safe-rl/safe-rl-shielding
|
| 120 |
+
|
| 121 |
+
We performed two experiments on a robot in a grid world. Snapshots of these environments are shown in Fig. 9.In both experiments, the robot’s objective is to visit all the colored regions in a given order while maintaining one or both of the following safety properties.
|
| 122 |
+
|
| 123 |
+
–φ1ssubscriptsuperscript𝜑𝑠1\varphi^{s}_{1}: the robot must not crash into walls or the moving opponent agent. This specification applies to both experiments.–φ2ssubscriptsuperscript𝜑𝑠2\varphi^{s}_{2}: the robot must not stay on a bomb for more than two consecutive steps. This specification applies only to the 9x9 experiment.Fig. 10 shows the deterministic finite automata corresponding to φ1ssubscriptsuperscript𝜑𝑠1\varphi^{s}_{1} and φ2ssubscriptsuperscript𝜑𝑠2\varphi^{s}_{2}.
|
| 124 |
+
|
| 125 |
+
If the robot visits all marked regions in a given order (called episode), a reward is granted, and if a safety property is violated, a penalty is applied.The agent uses tabular Q-learning with an ϵitalic-ϵ\epsilon-greedy explorer that is capable of multiple policy updates at once.
|
| 126 |
+
|
| 127 |
+
In the 9x9 grid-world, we synthesized a shield from φ1s∧φ2ssubscriptsuperscript𝜑𝑠1subscriptsuperscript𝜑𝑠2\varphi^{s}_{1}\wedge\varphi^{s}_{2} and the (precise) environment abstraction in 222 seconds. In the 15x9 experiment, we synthesized a shield from the (precise) environment abstraction and φ1ssubscriptsuperscript𝜑𝑠1\varphi^{s}_{1} to prevent crashes into the wall and the moving opponent agent in 0.60.60.6 seconds.
|
| 128 |
+
|
| 129 |
+
Fig. 11 shows that only the unshielded versions experience negative rewards. Furthermore, the shielded versions are not only safe, but also tend to learn more rapidly.Whenever an unsafe action is picked, the agent updates at least two actions with a |rankt|=1𝑟𝑎𝑛subscript𝑘𝑡1|rank_{t}|=1 shield, and up to 4 actions with a |rankt|=3𝑟𝑎𝑛subscript𝑘𝑡3|rank_{t}|=3.Fig. 11 (right) shows that only the shielded version |rankt|=3𝑟𝑎𝑛subscript𝑘𝑡3|rank_{t}|=3 without penalty (blue, dashed) finds the optimal path, resulting in a higher average reward. In scenarios with |rankt|=1𝑟𝑎𝑛subscript𝑘𝑡1|rank_{t}|=1 (red) or with penalties (solid), the agent computes a suboptimal path. In Fig. 11 (left), we compare between no shielding (red, dashed), no shielding with large penalties for unsafe actions (blue, solid), and a |rankt|=3𝑟𝑎𝑛subscript𝑘𝑡3|rank_{t}|=3 post-posed shielding with penalties for corrected actions (green, solid). The unshielded version with large penalty does not reach the maximum reward score as the other two versions. In addition, the unshielded version does not speed up the learning of the agent as the |rankt|=3𝑟𝑎𝑛subscript𝑘𝑡3|rank_{t}|=3 does.
|
| 130 |
+
|
| 131 |
+
This example considers an agent that learns to drive around a block in a clockwise direction in an environment with the size of 480x480 pixels. In each step, the car moves 3 pixel in the direction of its heading and can make a maximum turn of 7.57.57.5 degrees on the shortest direction to the commanded heading. After each step, the value of the reward and the new state of the car are returned. The state consists of the following four variables: the car’s position in the x-axis, its position in the y-axis, the cosine and the sine of its heading. The safety specification in this example is to avoid crashing into a wall. The input to the shield is calculated from the car’s state. It represents the side of the car with a distance less than 60 pixels away from any of the walls. Both of the preemptive and the post-posed shields were synthesized in 222 seconds.In each step, a positive reward is given if the car moves a step in a clockwise direction and a penalty is given if it moves in a counter-clockwise direction. A crash into the wall results in a penalty and a restart. The agent uses a Deep Q-Network (DQN) with a Boltzmann exploration policy. This network consists of four input nodes for the state variables, eight outputs nodes for the headings and three hidden layers.
|
| 132 |
+
|
| 133 |
+
The plot in Fig. 12 shows that the accumulated rewards for unshielded reinforcement learning (red, dashed) increases over time, but still experiences crashes at the end of the simulation. The shielded version without punishment (blue, solid) learns more rapidly than the unshielded learning scenario and never crashes.
|
| 134 |
+
|
| 135 |
+
Seaquest™ is a underwater combat game in which the agent controls a submarine. The agent has to pick up divers under water, while avoiding or destroyingvarious objects, and must get to the surface before it runs out of oxygen. The goal of the agent is to maximize the game score.
|
| 136 |
+
|
| 137 |
+
For our experiments, we used the OpenAI Gym111https://gym.openai.com/library that integrates the Arcade Learning Environment (ALE) [2], and a Python implementation222https://github.com/devsisters/DQN-tensorflowof DeepMind’s Deep Reinforcement Learning approach [13].The agent receives as input only RGB images of the screen as in Fig. 13 (right). The agent is used purely as a black box, only changing actions that violate the specification described below.
|
| 138 |
+
|
| 139 |
+
We model two simple safety properties. First,the submarine has to surface before oxygen runs out (φ1ssubscriptsuperscript𝜑𝑠1\varphi^{s}_{1}). Secondly,the submarine is not allowed to surface if it has enough oxygen buthas not collected any divers yet (φ2ssubscriptsuperscript𝜑𝑠2\varphi^{s}_{2}).The specification φs=φ1s∧φ2ssuperscript𝜑𝑠subscriptsuperscript𝜑𝑠1subscriptsuperscript𝜑𝑠2\varphi^{s}=\varphi^{s}_{1}\wedge\varphi^{s}_{2} decides when the submarinehas to surface and when it is not allowed to surface, depending on the actual depth, the status of the oxygen reserves, and the number of collected divers.We compute all inputs of the shield from the state of the Atari® simulator.The results illustrated in Fig. 13 (left) show that shielding the learner did not change its performance, however, the safety properties φ1s∧φ2ssubscriptsuperscript𝜑𝑠1subscriptsuperscript𝜑𝑠2\varphi^{s}_{1}\wedge\varphi^{s}_{2} were not violated when shielding the learner.
|
| 140 |
+
|
| 141 |
+
In the example shown in Fig. 3, the tank must never run dry or overflow by controlling the inflow switch (φ1ssubscriptsuperscript𝜑𝑠1\varphi^{s}_{1}). In addition, the inflow switch must not change its mode of operation before 3 time steps have passed since the last mode change (φ2ssubscriptsuperscript𝜑𝑠2\varphi^{s}_{2}). Refer to example 1 of section 4, for a full description of the abstract water tank dynamics and specification.We generated a concrete MDP for this example in which the energy consumption depends only on the state and there are multiple local minima.A post-posed shield was synthesized from φ1s∧φ2ssubscriptsuperscript𝜑𝑠1subscriptsuperscript𝜑𝑠2\varphi^{s}_{1}\wedge\varphi^{s}_{2}, in less than a second.
|
| 142 |
+
|
| 143 |
+
Fig. 14 shows that both shielded (dashed lines) and unshielded Q-learning and SARSA experiments (solid lines) do reach an optimal policy. However, the shielded implementations reach the optimal policy in a significantly shorter time than the unshielded implementations.
|
| 144 |
+
|
| 145 |
+
We developed a method for reinforcement learning under safety constraints expressed as temporal logic specifications. The method is based on shielding the decisions of the underlying learning algorithm from violating the specification.We proposed an algorithm for the automated synthesis of shields for given temporal logic specifications. Even though theinner working of a learning algorithm is often complex, the safety criteria may still be enforced by possibly simple means. Shielding exploits this possibility.
|
| 146 |
+
|
| 147 |
+
A shielddepends only on the monitored input-output behavior, the environment abstraction, and the correctness specifications – it is independent ofthe intricate details of the underlying learning algorithm.
|
| 148 |
+
|
| 149 |
+
We demonstrated the use of shielded learning on several reinforcement learning scenarios. In all of them, the shielded agents perform at least as well as the unshielded ones. In most cases, our approach even improved the learning performance.
|
| 150 |
+
|
| 151 |
+
The main downside of our approach is that in order to prevent the learner from making unsafe actions, some approximate model of when which action is unsafe needs to be available. We argue that this is unavoidable if the allowed actions depend on the state of the environment, as otherwise there is no way to know which actions are allowed. Our experiments show, however, that in applications in which safe learning is needed, the effort to construct an abstraction is well-spent, as our approach not only makes learning safe, but also shows great promise of improving learning performance.
|
1709.00139v4.txt
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Much effort has been made to detect faults and state shifts in industrial machines through monitoring data sensors. Successful fault diagnosis reduces cost of maintenance and improves both worker and machine efficiency. In machine learning, fault diagnosis can be viewed as an outlier detection problem. Support vector data description (SVDD), a machine learning technique that is used for single-class classification and outlier detection, is similar to support vector machine (SVM). SVDD was first introduced in Tax and Duin (2004), although the concept of using SVM to detect novelty was introduced in Schölkopf et al. (2000). SVDD is used in domains where the majority of data belongs to a single class, or when one of the classes is significantly undersampled. The SVDD algorithm builds a flexible boundary around the target class data; this data boundary is characterized by observations that are designated as support vectors. Having the advantage that no assumptions about the distribution of outliers need to be made, SVDD can describe the shape of the target class without prior knowledge of the specific data distribution and can flag observations that fall outside the data boundary as potential outliers. In the case of machine monitoring, data on the normal working conditions of a machine are in abundance, whereas information from outlier system failures are few. By using SVDD on the well-sampled target class, one can obtain a boundary around the distribution of normal working data, and subsequently capture the outlier points where the machine is faulty.
|
| 2 |
+
|
| 3 |
+
Traditional batch methods of SVDD typically pursue a global optimal solution of the SVDD problem; they suffer from low efficiency by considering all available data points. Moreover, these methods are usually ineffective when handling streaming data because the entire algorithm must be rerun with each incoming data point. In contrast, incremental methods deal with large or streaming data efficiently by focusing on smaller portions of the original optimization problem, as in Syed et al. (1999). Online variants of SVDD concentrate only on the current support vector set with incoming data.
|
| 4 |
+
|
| 5 |
+
Cauwenberghs and Poggio (2001) give an incremental and decremental training algorithm for SVM. Their method, also called the C&P algorithm, provides an exact solution for training data and one new data point. Tax and Laskov (2003) use a numerical method to solve incremental SVM, and they describe the relationship between incremental SVM and online SVDD. Their research was extended in Laskov et al. (2006), which provides complete learning algorithms for incremental SVM and SVDD.
|
| 6 |
+
|
| 7 |
+
The algorithm given in Laskov et al. (2006) updates weights of each support vector based on the fact that Karush-Kuhn-Tucker (KKT) conditions must be satisfied before and after a new data point comes in. Consequently, all data points must be kept to pursue an objective value closer to the global optimal value. Furthermore, a kernel matrix must be calculated every update, which can be memory-consuming and slow for large data.
|
| 8 |
+
|
| 9 |
+
These issues are handled by the algorithm that we propose: fast incremental support vector data description (FISVDD). One of the most important properties of support vectors is that in the most simplified form of SVDD they all have the same distance to the center of a sphere. A similar property remains even when the problem is generalized to flexible boundaries. This property is at the core of FISVDD. Unlike the method in Laskov et al. (2006), FISVDD uses only matrix manipulations to find interior points and support vectors, and it is highly efficient in detecting outliers. It can be used either as a batch method or as an online method. It can be seen that the complexity of key parts of FISVDD is O(k2)𝑂superscript𝑘2O(k^{2}), where k𝑘k is the number of support vectors. By Kakde et al. (2017), the number of support vectors should be much less than the number of observations in order to avoid overfitting.
|
| 10 |
+
|
| 11 |
+
The rest of the paper is organized as follows. In Section 2, we introduce the SVDD problem in Tax and Duin (2004). In Section 3, we state some theoretical support for FISVDD. In Section 4, the FISVDD algorithm is introduced and explained. In Section 5, we discuss several important issues in implementing FISVDD. In Section 6, FISVDD is applied to some data sets and compared with other methods. Finally, in Section 7, we give our conclusions.
|
| 12 |
+
|
| 13 |
+
In this paper we follow traditional linear algebra notation. Bold capital letters stand for matrices, and bold small letters stand for vectors. Specifically, matrix 𝐀𝐀\mathbf{A} is used as a Gaussian kernel matrix, and 𝐀ksubscript𝐀𝑘\mathbf{A}_{k} is the Gaussian kernel matrix in the k𝑘kth iteration. The vector 𝐱>𝟎𝐱0\mathbf{x}>\mathbf{0} stands for a positive vector, and 𝐱≥𝟎𝐱0\mathbf{x}\geq\mathbf{0} stands for a nonnegative vector.
|
| 14 |
+
|
| 15 |
+
The SVDD problem is first discussed by Tax and Duin (2004). The idea of SVDD is to find support vectors and use them to define a boundary around data. If a testing data point lies outside the boundary, it is classified as an outlier; otherwise, it is classified as normal data. The simplest form of a boundary is a sphere. For a set of data points 𝐱1,𝐱2,…,𝐱nsubscript𝐱1subscript𝐱2…subscript𝐱𝑛\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{n}, the mathematical formulation of the problem is to find a nonnegative vector 𝜶𝜶\boldsymbol{\alpha} that contains Lagrange multipliers for all data points, ‖𝜶‖1=1subscriptnorm𝜶11\|\boldsymbol{\alpha}\|_{1}=1, such that the following is maximized:L=∑i=1nαi⟨𝐱i,𝐱i⟩−∑i,jαiαj⟨𝐱i,𝐱j⟩.𝐿superscriptsubscript𝑖1𝑛subscript𝛼𝑖subscript𝐱𝑖subscript𝐱𝑖subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗subscript𝐱𝑖subscript𝐱𝑗L=\sum_{i=1}^{n}\alpha_{i}\langle\mathbf{x}_{i},\mathbf{x}_{i}\rangle-\sum_{i,j}\alpha_{i}\alpha_{j}\langle\mathbf{x}_{i},\mathbf{x}_{j}\rangle.(2.1)Here ⟨𝐱i,𝐱j⟩subscript𝐱𝑖subscript𝐱𝑗\langle\mathbf{x}_{i},\mathbf{x}_{j}\rangle is the inner product of 𝐱isubscript𝐱𝑖\mathbf{x}_{i} and 𝐱jsubscript𝐱𝑗\mathbf{x}_{j}. According to Tax and Duin (2004), there are three possibilities for each data point. The 𝐱isubscript𝐱𝑖\mathbf{x}_{i}’s that have zero αisubscript𝛼𝑖\alpha_{i}’s are interior points. The 𝐱isubscript𝐱𝑖\mathbf{x}_{i}’s for which 0<αi<C0subscript𝛼𝑖𝐶0<\alpha_{i}<C for a preselected 0<C≤10𝐶10<C\leq 1 lie on the boundary and are called support vectors. The 𝐱isubscript𝐱𝑖\mathbf{x}_{i}’s for which αi=Csubscript𝛼𝑖𝐶\alpha_{i}=C are outliers (also called bounded support vectors, or bsv, in Ben-Hur et al. (2001)). In this paper, we assume there are no outliers in the training phase, so we set C=1𝐶1C=1. One example of where our algorithm would be useful is when there is a known period during which the incoming data are normal, such as streaming sensor data from machines or vehicles operating under normal conditions. Then the model can be used to detect abnormal states. To determine whether a new data point 𝐳𝐳\mathbf{z} lies inside the boundary, first the distance between 𝐳𝐳\mathbf{z} and the center of the sphere, 𝐚𝐚\mathbf{a}, is calculated:d2(𝐳)=‖𝐳−𝐚‖2=⟨𝐳,𝐳⟩−2∑iαi⟨𝐳,𝐱i⟩+∑i,jαiαj⟨𝐱i,𝐱j⟩.superscript𝑑2𝐳superscriptnorm𝐳𝐚2𝐳𝐳2subscript𝑖subscript𝛼𝑖𝐳subscript𝐱𝑖subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗subscript𝐱𝑖subscript𝐱𝑗d^{2}(\mathbf{z})=\|\mathbf{z}-\mathbf{a}\|^{2}=\langle\mathbf{z},\mathbf{z}\rangle\\-2\sum_{i}\alpha_{i}\langle\mathbf{z},\mathbf{x}_{i}\rangle+\sum_{i,j}\alpha_{i}\alpha_{j}\langle\mathbf{x}_{i},\mathbf{x}_{j}\rangle.(2.2)This distance is then compared to the radius of the sphere for any support vector 𝐱ksubscript𝐱𝑘\mathbf{x}_{k}:R2=⟨𝐱k,𝐱k⟩−2∑iαi⟨𝐱k,𝐱i⟩+∑i,jαiαj⟨𝐱i,𝐱j⟩.superscript𝑅2subscript𝐱𝑘subscript𝐱𝑘2subscript𝑖subscript𝛼𝑖subscript𝐱𝑘subscript𝐱𝑖subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗subscript𝐱𝑖subscript𝐱𝑗R^{2}=\langle\mathbf{x}_{k},\mathbf{x}_{k}\rangle\\-2\sum_{i}\alpha_{i}\langle\mathbf{x}_{k},\mathbf{x}_{i}\rangle+\sum_{i,j}\alpha_{i}\alpha_{j}\langle\mathbf{x}_{i},\mathbf{x}_{j}\rangle.(2.3)A test data point 𝐳𝐳\mathbf{z} is accepted if d2≤R2superscript𝑑2superscript𝑅2d^{2}\leq R^{2}, and it is classified as an outlier if d2>R2superscript𝑑2superscript𝑅2d^{2}>R^{2}. This check is also called scoring. It is easy to derive the conclusion that scoring is equivalent to checking whether the new data point violates the current KKT conditions.
|
| 16 |
+
|
| 17 |
+
A kernel function is needed to draw a more flexible boundary around data in order to avoid underfitting. By Tax and Duin (2004), using a kernel function is equivalent to implicitly mapping data points to a higher feature space. Usually the Gaussian kernel,K(𝐱i,𝐱j)=exp(−‖𝐱i−𝐱j‖222σ2),𝐾subscript𝐱𝑖subscript𝐱𝑗superscriptsubscriptnormsubscript𝐱𝑖subscript𝐱𝑗222superscript𝜎2K(\mathbf{x}_{i},\mathbf{x}_{j})=\exp(-\frac{\|\mathbf{x}_{i}-\mathbf{x}_{j}\|_{2}^{2}}{2\sigma^{2}}),(2.4)is preferred (Ben-Hur et al., 2001; Laskov et al., 2006; Gu et al., 2015), and the Gaussian kernel bandwidth σ𝜎\sigma must be selected beforehand. There are some papers that discuss how to choose a proper Gaussian kernel bandwidth (Evangelista et al., 2007; Xiao et al., 2014; Kakde et al., 2017). Throughout this paper, it is assumed that the Gaussian similarity is used and that a proper Gaussian kernel bandwidth σ𝜎\sigma has been chosen such that the number of support vectors is much less than the number of observations. As stated in Section 5, FISVDD has protections even if a bad bandwidth is provided. With the Gaussian kernel function, the objective function Eq. 2.1 can be simplified to minimizingL=∑i,jαiαjK(𝐱i,𝐱j),𝐿subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗𝐾subscript𝐱𝑖subscript𝐱𝑗L=\sum_{i,j}\alpha_{i}\alpha_{j}K(\mathbf{x}_{i},\mathbf{x}_{j}),(2.5)because K(𝐱i,𝐱i)=1𝐾subscript𝐱𝑖subscript𝐱𝑖1K(\mathbf{x}_{i},\mathbf{x}_{i})=1, ‖𝜶‖1=1subscriptnorm𝜶11\|\boldsymbol{\alpha}\|_{1}=1, and 𝜶𝜶\boldsymbol{\alpha} is nonnegative.
|
| 18 |
+
|
| 19 |
+
Eq. 2.5 can also be expressed in matrix form:L=𝜶T𝐀𝜶,𝐿superscript𝜶𝑇𝐀𝜶L=\boldsymbol{\alpha}^{T}\mathbf{A}\boldsymbol{\alpha},(2.6)where 𝐀𝐀\mathbf{A} is a Gaussian similarity matrix for all support vectors and 𝜶>𝟎𝜶0\boldsymbol{\alpha}>\mathbf{0}. Formulas Eq. 2.2 and Eq. 2.3 then become as follows, respectively:d2(𝐳)=1−2∑iαiK(𝐳,𝐱i)+∑i,jαiαjK(𝐱i,𝐱j),superscript𝑑2𝐳12subscript𝑖subscript𝛼𝑖𝐾𝐳subscript𝐱𝑖subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗𝐾subscript𝐱𝑖subscript𝐱𝑗d^{2}(\mathbf{z})=1-2\sum_{i}\alpha_{i}K(\mathbf{z},\mathbf{x}_{i})+\sum_{i,j}\alpha_{i}\alpha_{j}K(\mathbf{x}_{i},\mathbf{x}_{j}),(2.7)R2=1−2∑iαiK(𝐱k,𝐱i)+∑i,jαiαjK(𝐱i,𝐱j).superscript𝑅212subscript𝑖subscript𝛼𝑖𝐾subscript𝐱𝑘subscript𝐱𝑖subscript𝑖𝑗subscript𝛼𝑖subscript𝛼𝑗𝐾subscript𝐱𝑖subscript𝐱𝑗R^{2}=1-2\sum_{i}\alpha_{i}K(\mathbf{x}_{k},\mathbf{x}_{i})+\sum_{i,j}\alpha_{i}\alpha_{j}K(\mathbf{x}_{i},\mathbf{x}_{j}).(2.8)Note that to determine whether a test data point 𝐳𝐳\mathbf{z} should be accepted, one can compute onlyQ(𝐳)=(d2(𝐳)−R2)/2=∑iαiK(𝐱k,𝐱i)−∑iαiK(𝐳,𝐱i).𝑄𝐳superscript𝑑2𝐳superscript𝑅22subscript𝑖subscript𝛼𝑖𝐾subscript𝐱𝑘subscript𝐱𝑖subscript𝑖subscript𝛼𝑖𝐾𝐳subscript𝐱𝑖Q(\mathbf{z})=(d^{2}(\mathbf{z})-R^{2})/2=\\\sum_{i}\alpha_{i}K(\mathbf{x}_{k},\mathbf{x}_{i})-\sum_{i}\alpha_{i}K(\mathbf{z},\mathbf{x}_{i}).(2.9)Q(𝐳)≤0𝑄𝐳0Q(\mathbf{z})\leq 0 means that 𝐳𝐳\mathbf{z} is an interior point. It is worth mentioning that all support vectors satisfy d2=R2superscript𝑑2superscript𝑅2d^{2}=R^{2}, although they might have different αisubscript𝛼𝑖\alpha_{i}’s.
|
| 20 |
+
|
| 21 |
+
Here we state and prove several theorems necessary for later discussion. First, we state a lemma in Smola and Schölkopf (1998) that a Gaussian similarity matrix has full rank. A direct conclusion of the lemma is that a Gaussian similarity matrix is symmetric positive definite (spd).
|
| 22 |
+
|
| 23 |
+
Lemma 1 implies that 𝐀𝐀\mathbf{A} is spd and its inverse exists. Next, we state lemmas to obtain 𝐀k+1−1superscriptsubscript𝐀𝑘11\mathbf{A}_{k+1}^{-1} if 𝐀k−1superscriptsubscript𝐀𝑘1\mathbf{A}_{k}^{-1} is known and vice versa. In FISVDD, we need to update the inverse of the similarity matrix when a new data point comes in. The proof involves only matrix calculations and is skipped.
|
| 24 |
+
|
| 25 |
+
Lemma 2 provides a method to compute 𝐀k+1−1superscriptsubscript𝐀𝑘11\mathbf{A}_{k+1}^{-1} by using 𝐀k−1superscriptsubscript𝐀𝑘1\mathbf{A}_{k}^{-1} and an incremental vector 𝐯𝐯\mathbf{v}. Note that to compute 𝐀k+1−1superscriptsubscript𝐀𝑘11\mathbf{A}_{k+1}^{-1}, we only need to compute 𝐩=𝐀k−1𝐯𝐩superscriptsubscript𝐀𝑘1𝐯\mathbf{p}=\mathbf{A}_{k}^{-1}\mathbf{v}. Also note that β𝛽\beta is the Schur complement (Meyer, 2000) of 𝐀k−1superscriptsubscript𝐀𝑘1\mathbf{A}_{k}^{-1} in 𝐀k+1−1superscriptsubscript𝐀𝑘11\mathbf{A}_{k+1}^{-1}. Since 𝐀k+1subscript𝐀𝑘1\mathbf{A}_{k+1} is spd, β𝛽\beta is positive (Gallier, 2010). The inverse of Lemma 2 is straightforward and shown below.
|
| 26 |
+
|
| 27 |
+
Lemma 2 and Lemma 3 together play an essential role in FISVDD to increase efficiency. It can be seen from the lemmas that only O(k2)𝑂superscript𝑘2O(k^{2}) multiplications are needed to obtain the updated matrix inverse. Next, we prove that if a positive solution is obtained for the linear system 𝐀𝜶=𝐞𝐀𝜶𝐞\mathbf{A}\boldsymbol{\alpha}=\mathbf{e}, then all data points in the system are support vectors. This is from the property that all support vectors satisfy d2=R2superscript𝑑2superscript𝑅2d^{2}=R^{2}.
|
| 28 |
+
|
| 29 |
+
If a new data point 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} is added to the existing support vector set but the (k+1)𝑘1(k+1)th position in the solution to the linear system 𝐀k+1𝜶=𝐞subscript𝐀𝑘1𝜶𝐞\mathbf{A}_{k+1}\boldsymbol{\alpha}=\mathbf{e} is not positive, then the new data point is an interior point. This is proven in the next theorem.
|
| 30 |
+
|
| 31 |
+
Theorem 5 says that if we put a new data point 𝐱isubscript𝐱𝑖\mathbf{x}_{i} into an existing support vector set to form an expanded set and the (k+1)𝑘1(k+1)th position in the solution to the expanded system 𝐀k+1𝜶=𝐞subscript𝐀𝑘1𝜶𝐞\mathbf{A}_{k+1}\boldsymbol{\alpha}=\mathbf{e} is less than 0, then 𝐱isubscript𝐱𝑖\mathbf{x}_{i} is an interior point and thus can be ignored. Because we can permute the rows and columns in 𝐀k+1−1superscriptsubscript𝐀𝑘11\mathbf{A}_{k+1}^{-1}, by Theorem 5 if αi≤0subscript𝛼𝑖0\alpha_{i}\leq 0 for 1≤i≤k1𝑖𝑘1\leq i\leq k, we can take 𝐱isubscript𝐱𝑖\mathbf{x}_{i} out of the expanded set and solve the shrunken k×k𝑘𝑘k\times k linear system. We can continue shrinking the system until there are no negative entries in 𝜶𝜶\boldsymbol{\alpha}; then a support vector set is obtained. We summarize this shrinking step in the next corollary.
|
| 32 |
+
|
| 33 |
+
Finally, we state and prove an observation that relates the objective function value, the 1-norm of the unnormalized 𝜶𝜶\boldsymbol{\alpha} vector, and the scoring threshold. The observation is substantial for implementing FISVDD. With it a lot of unnecessary computations can be saved. This observation can be also used to make sure that the objective function value in FISVDD is not larger than the objective function value obtained in the previous iteration so the FISVDD model is improved.
|
| 34 |
+
|
| 35 |
+
Corollary 7 shows a direct relationship between the objective function value, the 1-norm of the solution vector to the linear system 𝐀𝜶=𝐞𝐀𝜶𝐞\mathbf{A}\boldsymbol{\alpha}=\mathbf{e}, and the scoring threshold. The objective function value is a very important term of an SVDD model and can be requested by the user at any time. When the solution vector of the linear system is derived, the inverse of its 1-norm directly gives the objective function value, and the calculations in Eq. 2.6 are avoided. At the same time, L𝐿L is also the scoring threshold for the current model. Only the second term in Eq. 2.9 needs to be computed when a new data point needs to be scored. The results from Corollary 7 help make our FISVDD algorithm more efficient.
|
| 36 |
+
|
| 37 |
+
We propose a fast incremental algorithm of SVDD (FISVDD). The central idea of FISVDD is to minimize the objective function (2.6) by quickly updating the inverse of similarity matrices in each iteration. Suppose that we begin with a support vector set 𝐱1,𝐱2,…,𝐱ksubscript𝐱1subscript𝐱2…subscript𝐱𝑘\mathbf{x}_{1},\mathbf{x}_{2},\ldots,\mathbf{x}_{k}. When a new data point 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} comes in, by Theorem 4 the linear system 𝐀k+1𝜶=𝐞subscript𝐀𝑘1𝜶𝐞\mathbf{A}_{k+1}\boldsymbol{\alpha}=\mathbf{e} will have a positive solution if the k+1𝑘1k+1 data points form a new support vector set, and the normalized 𝜶𝜶\boldsymbol{\alpha} vector gives the αisubscript𝛼𝑖\alpha_{i}’s. However, if at least one of the entries in the solution is negative, that indicates there is at least one interior point in the set. Then we are able to drop the negative αisubscript𝛼𝑖\alpha_{i} that has the largest |d2−R2|superscript𝑑2superscript𝑅2|d^{2}-R^{2}| magnitude and solve the shrunken k×k𝑘𝑘k\times k linear system. If the system has a positive solution, then we have found a support vector set. Otherwise, we can continue to drop the next negative αisubscript𝛼𝑖\alpha_{i} that has the largest |d2−R2|superscript𝑑2superscript𝑅2|d^{2}-R^{2}| magnitude and solve the (k−1)×(k−1)𝑘1𝑘1(k-1)\times(k-1) linear system, and so on. It is worth noting that if more than one variable is dropped from the system, the dropped data points should be re-scored against the new boundary to determine whether the KKT conditions are violated. If the KKT conditions are violated, then the system will expand again. We provide details below.
|
| 38 |
+
|
| 39 |
+
The FISVDD algorithm is shown in Algorithm 3. It contains three parts of FISVDD: expanding (which is shown in Algorithm 1), shrinking (which is shown in Algorithm 2), and bookkeeping.
|
| 40 |
+
|
| 41 |
+
When a new data point 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} comes in, it is scored to determine whether it falls in the interior. If so, it is immediately discarded. Otherwise, it is combined with existing support vectors to form an expanded set. The corresponding inverse matrix of the similarity matrix and its row sums are then updated by Lemma 2. If all row sums are positive, then 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} is another support vector and the normalized 𝜶𝜶\boldsymbol{\alpha} vector contains the updated αisubscript𝛼𝑖\alpha_{i}’s. If αk+1≤0subscript𝛼𝑘10\alpha_{k+1}\leq 0, then 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} is taken out of the expanded set and the support vector set returns to the previous set. If αk+1>0subscript𝛼𝑘10\alpha_{k+1}>0 but there is at least one αi≤0subscript𝛼𝑖0\alpha_{i}\leq 0, then there is at least one interior point in the expanded set and the shrinking step is called. The expanding step is given in Algorithm 1.
|
| 42 |
+
|
| 43 |
+
If αk+1>0subscript𝛼𝑘10\alpha_{k+1}>0 but at least one αi<0subscript𝛼𝑖0\alpha_{i}<0, then at least one existing support vector in the support vector set has become an interior point. We need to identify and discard such vectors. By Corollary 6, we can shrink the support vector set one vector at a time until a positive 𝜶𝜶\boldsymbol{\alpha} is obtained. It is possible that there are several negative entries in the 𝜶𝜶\boldsymbol{\alpha} vector, but after taking out one negative entry all other entries are positive. Hence, it is recommended to take out one vector at a time rather than taking out several vectors. Moreover, taking out several vectors at once slows the algorithm because then we need to calculate the inverse of matrices whose rank is larger than 1. Although there is no certain way of choosing which vector to remove first, in FISVDD we choose the negative αisubscript𝛼𝑖\alpha_{i} that has the largest magnitude. From Eq. 3.8 and Eq. 3.10 and permuting columns and rows in 𝐀k+1subscript𝐀𝑘1\mathbf{A}_{k+1}, we haveαk+1=d2−R22(1−𝐯T𝐀k−1𝐯),subscript𝛼𝑘1superscript𝑑2superscript𝑅221superscript𝐯𝑇superscriptsubscript𝐀𝑘1𝐯\alpha_{k+1}=\frac{d^{2}-R^{2}}{2(1-\mathbf{v}^{T}\mathbf{A}_{k}^{-1}\mathbf{v})},(4.1)where αk+1subscript𝛼𝑘1\alpha_{k+1} is the αisubscript𝛼𝑖\alpha_{i} of interest permuted to the (k+1)𝑘1(k+1)th position. It can be seen from Eq. 4.1 that if the denominators of the data points that have negative αisubscript𝛼𝑖\alpha_{i}’s are close, then a data point that has a larger |αi|subscript𝛼𝑖|\alpha_{i}| tends to have a larger |d2−R2|superscript𝑑2superscript𝑅2|d^{2}-R^{2}|, which means it lies farther from the boundary. Intuitively, a data point farther from the boundary is more likely to be a true interior point. Although not guaranteed, the data point farthest from the boundary is typically the one we want to remove first.
|
| 44 |
+
|
| 45 |
+
When the shrinking algorithm is performed, some of the previous support vectors are taken out of the support vector set if they have negative αisubscript𝛼𝑖\alpha_{i}’s. However, having a negative αisubscript𝛼𝑖\alpha_{i} in the middle of a shrinking process does not rule a support vector out from the final set. A data point is considered to be an interior point only if it satisfies (d2−R2)<0superscript𝑑2superscript𝑅20(d^{2}-R^{2})<0 when scored with the final support vector set. Therefore, it is necessary to recheck whether the data points taken out of the support vector set are truly interior points. In FISVDD, we build a backup set when the shrinking stage begins. When a data point is taken out of the support vector set, it is put into the backup set. Then the inverse matrix is “downdated” with Eq. 3.4 and its row sums are calculated. The shrinking continues until there are no negative entries in the 𝜶𝜶\boldsymbol{\alpha} vector. The backup set keeps growing as the linear system shrinks. When there are no negative values in 𝜶𝜶\boldsymbol{\alpha}, we have found a support vector set, although it might not be the final one. Then the data points in the backup set are scored with the support vector set one by one in a first in, first out order. To increase the algorithm’s efficiency, the backup set is scanned only once. If (d2−R2)>0superscript𝑑2superscript𝑅20(d^{2}-R^{2})>0 for a data point, then the expanding algorithm is called again, and the data point is removed from the backup set and placed back into the support vector set. The expanding finishes when all data points in the backup set have (d2−R2)≤0superscript𝑑2superscript𝑅20(d^{2}-R^{2})\leq 0. Although the same check can be performed on all prior data, doing so would cost too much memory and the gains are far less significant. So the backup set is emptied when each new data point arrives.
|
| 46 |
+
|
| 47 |
+
For completeness, we add a check to the unnormalized 𝜶𝜶\boldsymbol{\alpha} vector to make sure that the result in each iteration is improved from the previous iteration. By Corollary 7, the result is improved if the 1-norm of the unnormalized 𝜶𝜶\boldsymbol{\alpha} vector increases. At the end of each iteration, this norm is compared with the norm in the previous iteration. If the norm decreases, then the result from the previous iteration is restored. None of our experiments have ever violated this condition.
|
| 48 |
+
|
| 49 |
+
To summarize, FISVDD is fast and computationally efficient because the algorithm ignores interior points and is built solely on matrix manipulations. First, FISVDD tries to obtain the optimal solution in each iteration without using the interior points, similar to the idea mentioned in Syed et al. (1999). Results from many experiments show that if a proper Gaussian bandwidth is chosen, then the number of support vectors should be far smaller than the total number of observations. FISVDD takes advantage of this fact by calculating only the similarities between the new data points and the support vectors.
|
| 50 |
+
|
| 51 |
+
Secondly, it can be seen from Algorithm 3 that FISVDD is based only on matrix manipulation. Matrix inverse updating steps are the core of FISVDD, which lets the system itself choose which data points to move between support vector sets and interior point sets. Sometimes the choice of the system might not be optimal, but the existence of backup sets allows the system to correct itself and removes a significant number of calculations.
|
| 52 |
+
|
| 53 |
+
In this section we discuss several important details for implementing FISVDD.
|
| 54 |
+
|
| 55 |
+
A key advantage of FISVDD is that the similarity matrix 𝐀𝐀\mathbf{A} is directly calculated only at initialization. As stated in Section 4, each iteration calculates only the similarities between a new data point and the existing support vectors. These are used to update the inverse of the similarity matrix; the similarity matrix is calculated only at initialization. Once the burn-in data points are selected, their similarity matrix 𝐀𝐀\mathbf{A} and its inverse 𝐀−1superscript𝐀1\mathbf{A}^{-1} are calculated. After the row sums of 𝐀−1superscript𝐀1\mathbf{A}^{-1} are calculated, the shrinking step in Algorithm 2 is used to pick out the interior points. Then the vector that contains the normalized row sums of 𝐀−1superscript𝐀1\mathbf{A}^{-1} is the initial 𝜶𝜶\boldsymbol{\alpha}.
|
| 56 |
+
|
| 57 |
+
For any online method, it is important to make sure that both of the following conditions hold:•The complexity in each step is small.•Memory usage will never expand out of control even for very large data.For FISVDD, the two challenges are handled smoothly. The first part is easy to see: The key parts in the algorithm (expanding and shrinking the linear systems) require only O(k2)𝑂superscript𝑘2O(k^{2}) multiplications each time, where k𝑘k is the number of support vectors. In addition, k𝑘k should be far less than the total number of the whole data set if a proper Gaussian kernel bandwidth σ𝜎\sigma is chosen.
|
| 58 |
+
|
| 59 |
+
For the second part, the number of support vectors can indeed grow large with streaming data. To avoid the potential threat of memory expanding out of control, we set a parameter, M𝑀M, for the maximal number of support vectors, where M𝑀M depends on availability of memory. When M𝑀M is reached, the number of support vectors will not grow large. If a new data point 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1} satisfies d2>R2superscript𝑑2superscript𝑅2d^{2}>R^{2}, then one of the three situations will occur:•αk+1>0subscript𝛼𝑘10\alpha_{k+1}>0 but at least one of the αisubscript𝛼𝑖\alpha_{i}’s is less than or equal to 0. In this case, the algorithm runs normally to select the interior points.•All αisubscript𝛼𝑖\alpha_{i}’s are greater than 0, but αk+1subscript𝛼𝑘1\alpha_{k+1} is the smallest among all αisubscript𝛼𝑖\alpha_{i}’s. In this case, αk+1subscript𝛼𝑘1\alpha_{k+1} is discarded.•All αisubscript𝛼𝑖\alpha_{i}’s are greater than 0, and αk+1subscript𝛼𝑘1\alpha_{k+1} is not the smallest among all αisubscript𝛼𝑖\alpha_{i}’s. In this case, the support vector that has the smallest αisubscript𝛼𝑖\alpha_{i} is replaced by 𝐱k+1subscript𝐱𝑘1\mathbf{x}_{k+1}, and the new αisubscript𝛼𝑖\alpha_{i}’s are updated.
|
| 60 |
+
|
| 61 |
+
By handling these three cases, the number of support vectors will not exceed M𝑀M, and the memory usage in each step is controlled.
|
| 62 |
+
|
| 63 |
+
Until now, our analysis focused primarily on describing the boundary of the streaming data. Another important feature of SVDD is that it finds outliers in the data so that further investigations can be taken. In Laskov et al. (2006) and Scheinberg (2006), data points are classified as outliers based on αisubscript𝛼𝑖\alpha_{i} values. FISVDD assumes that outliers are far from normal data and hence do not influence the support vectors and the αisubscript𝛼𝑖\alpha_{i}’s. In addition, we assume that the boundary that is determined by the support vectors is robust to outliers. Note that if a data point is far from the support vectors, the 𝐯𝐯\mathbf{v} vector in Eq. 3.1 should be close to a zero vector, which indicates that the largest value in 𝐯𝐯\mathbf{v} should be close to 0. In FISVDD, a data point 𝐳𝐳\mathbf{z} is classified as an outlier if it satisfies the following condition for a preselected parameter ϵ1>0subscriptitalic-ϵ10\epsilon_{1}>0:max𝐯<ϵ1.𝐯subscriptitalic-ϵ1\max{\mathbf{v}}<\epsilon_{1}.(5.1)If 𝐳𝐳\mathbf{z} is classified as an outlier, then it is passed to further investigation, and no α𝛼\alpha value is assigned to it.
|
| 64 |
+
|
| 65 |
+
Another special case we have to consider is a new data point that is very close to one of the existing support vectors. Although in practice it is rare that a new data point is exactly the same as an existing support vector, it is possible that they are very close to each other. In this case, the similarity matrix 𝐀𝐀\mathbf{A} will be ill-conditioned and 𝐀−1superscript𝐀1\mathbf{A}^{-1} might be not accurate. We can avoid this situation by also looking at the maximal entry value in 𝐯𝐯\mathbf{v}. If a new data point is very close to one of the support vectors, then the maximal entry value in 𝐯𝐯\mathbf{v} will be close to 1. In FISVDD, a point is discarded if it satisfies the following condition for a preselected parameter ϵ2>0subscriptitalic-ϵ20\epsilon_{2}>0:max𝐯>1−ϵ2.𝐯1subscriptitalic-ϵ2\max{\mathbf{v}}>1-\epsilon_{2}.(5.2)
|
| 66 |
+
|
| 67 |
+
Finally, note that these preprocessing steps can help prevent unnecessary calculations if the Gaussian kernel bandwidth σ𝜎\sigma is not a proper bandwidth. If σ𝜎\sigma is too small, then every data point tends to be a support vector and the similarity between every pair of data points is close to 0. If σ𝜎\sigma is too large, then the similarity between every pair of data points is close to 1. Introducing ϵ1subscriptitalic-ϵ1\epsilon_{1} and ϵ2subscriptitalic-ϵ2\epsilon_{2} can prevent these cases.
|
| 68 |
+
|
| 69 |
+
We examined the performance of FISVDD with four real data sets: shuttle data (Lichman, 2013), mammography data (Woods et al., 1993), forest cover (ForestType) data (Rayana, 2016), and the SMTP subset of KDD Cup 99 data (Rayana, 2016). The purpose of our experiments is to show that compared to the incremental SVM method (which can achieve global optimal solutions), the FISVDD method does not lose much in either objective function value or outlier detection accuracy while it demonstrates significant gains in efficiency. Our experiments used 4/5 of the normal data, randomly chosen, for training. The remaining normal data and the outliers together form the testing sets. All duplicates in the data sets are removed beforehand. Proper Gaussian bandwidths are selected by using fivefold cross validation, although selecting a proper Gaussian bandwidth is beyond the scope of this paper. SAS/IML® software is used in performing the experiments. In this paper, we compare FISVDD with the one-class incremental SVM method (Laskov et al., 2006), a well-known technique for performing global optimal SVDD. For each method, the following quantities are measured in Table 1:
|
| 70 |
+
|
| 71 |
+
•Time: The time used to learn the SVDD model.•Objective function value (OFV): The objective function values that were obtained with Eq. 2.6 after each iteration.•Number of support vectors (#sv): The number of support vectors when the training phase is finished. This number is related to the efficiency of the testing phase. When more support vectors exist, more calculations are required in testing.
|
| 72 |
+
|
| 73 |
+
The time consumed by the incremental SVM method with interior points discarded after each iteration is listed in parentheses. Table 1 also lists the settings for the experiments, including Gaussian bandwidth (Sigma), number of training observations (#Train obs), number of testing observations (#Test obs), and number of variables (#Var).
|
| 74 |
+
|
| 75 |
+
Table 1 shows that for the same Gaussian bandwidth, the FISVDD method is much faster than the incremental SVM method, with only a tiny sacrifice in the objective function value. Because incremental SVM achieves global optimal solutions, the solutions provided by FISVDD are very close to the global optimal solutions. Even with interior points discarded after each iteration, FISVDD is faster than incremental SVM for the data sets in our experiments. As explained in Section 4, FISVDD is faster because it is based solely on matrix manipulation and thus many calculations are saved.
|
| 76 |
+
|
| 77 |
+
Figure 1 shows plots of the F-1 measure (Tan et al., 2007) of the accuracy of FISVDD and incremental SVM with different training sizes. The plots show that by discarding interior points at the end of each iteration, there is almost no loss in the quality of outlier detection.
|
| 78 |
+
|
| 79 |
+
This paper introduces a fast incremental SVDD learning algorithm (FISVDD), which is more efficient than existing SVDD algorithms. In each iteration, FISVDD considers only the incoming data point and the support vectors that were determined in the previous iteration. The essential calculations of FISVDD are contributed from incremental and decremental updates of a similar matrix inverse 𝐀−1superscript𝐀1\mathbf{A}^{-1}. This algorithm builds on an observation that is natural in SVDD models but has not been fully utilized by existing SVDD algorithms: that all support vectors on the boundary have the same distance to the center of sphere in a higher-dimensional feature space as mapped by the Gaussian kernel function. FISVDD uses the signs of entries in the row sums of 𝐀−1superscript𝐀1\mathbf{A}^{-1} to determine the interior points and support vectors and uses their magnitudes to determine the Lagrange multiplier αisubscript𝛼𝑖\alpha_{i} for each support vector. Experimental results indicate that FISVDD gains much efficiency with almost no loss in accuracy and objective function value.
|
1709.00155v1.txt
ADDED
|
@@ -0,0 +1,351 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Generating texts from structured data (e.g., a table) is important for various natural language processing tasks such as question answering and dialog systems. Table~\ref{tab:example} shows an example of a Wikipedia infobox (containing fields and values) and a text summary.
|
| 3 |
+
|
| 4 |
+
In early years, text generation is usually accomplished by human-designed rules and templates~\cite{green2006generation,turner2010generating}, and hence the generated texts are not flexible. Recently, researchers apply neural networks to generate texts from structured data~\cite{wikibio}, where a neural encoder captures table information and a recurrent neural network (RNN) decodes these information to a natural language sentence.
|
| 5 |
+
|
| 6 |
+
\begin{table}[!t]
|
| 7 |
+
\textbf{Table:}\\[.2cm]
|
| 8 |
+
\resizebox{\linewidth}{!}{
|
| 9 |
+
\footnotesize
|
| 10 |
+
\begin{tabular}{r|ll|}
|
| 11 |
+
\cline{2-3}
|
| 12 |
+
\textbf{ID}\!\! &\!\! \textbf{Field} & \textbf{Content}\\
|
| 13 |
+
\cline{2-3}
|
| 14 |
+
1\!\! &\!\! Name \!\!&\!\! \textit{Arthur Ignatius Conan Doyle}\\
|
| 15 |
+
2\!\! &\!\! Born \!\!&\!\! \textit{22 May 1859 Edinburgh, Scotland}\\
|
| 16 |
+
3\!\! &\!\! Died \!\!&\!\! \textit{7 July 1930 (aged 71) Crowborough, England}\!\!\\
|
| 17 |
+
4\!\! &\!\! Occupation \!\!&\!\! \textit{Author, writer, physician}\\
|
| 18 |
+
5\!\! &\!\! Nationality \!\!&\!\! \textit{British}\\
|
| 19 |
+
6\!\! &\!\! Alma mater \!\!&\!\! \textit{University of Edinburgh Medical School}\\
|
| 20 |
+
7\!\! &\!\! Genre \!\!&\!\! \textit{Detective fiction fantasy}\\
|
| 21 |
+
8\!\! &\!\! Notable work \!\!\!&\!\! \textit{Stories of Sherlock Homes}\\
|
| 22 |
+
\cline{2-3}
|
| 23 |
+
\end{tabular}
|
| 24 |
+
}\\[.2cm]
|
| 25 |
+
|
| 26 |
+
\textbf{Text:}\\[.1cm]
|
| 27 |
+
{\small\verb| |Sir Arthur Ignatius Conan Doyle (22 May 1859 -- 7 July 1930) was a British writer best known for his detective fiction featuring the character Sherlock Holmes.}
|
| 28 |
+
|
| 29 |
+
\caption{Example of a Wikipedia infobox and a reference text.}\label{tab:example}
|
| 30 |
+
\end{table}
|
| 31 |
+
|
| 32 |
+
Although such neural network-based approach is capable of capturing complicated language and can be trained in an end-to-end fashion, it lacks explicit modeling of content order during text generation. That is to say, an RNN generates a word at a time step conditioned on previous generated words as well as table information, which is more or less ``shortsighted'' and differs from how a human writer does. As suggested in the book \textit{The Elements of Style},
|
| 33 |
+
\begin{quote}
|
| 34 |
+
A basic structural design underlies every kind of writing \dots\
|
| 35 |
+
in most cases, planning must be a deliberate prelude to writing. \cite{element}
|
| 36 |
+
\end{quote}
|
| 37 |
+
This motivates order planning for neural text generation. In other words, a neural network should model not only word order (as has been well captured by RNN) but also the order of contents, i.e., fields in a table.
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
We also observe from real summaries that table fields by themselves provide illuminating clues and constraints of text generation. In the biography domain, for example, the nationality of a person is typically mentioned before the occupation. This could benefit from explicit planning of content order during neural text generation.
|
| 41 |
+
|
| 42 |
+
In this paper, we propose an order-planning method for table-to-text generation. Our model is built upon the encoder-decoder framework and use RNN for text synthesis with attention to table entries. Different from exiting neural models, we design a table field linking mechanism, inspired by temporal memory linkage in the Differentiable Neural Computer~\cite[DNC]{DNC}. Our field linking mechanism explicitly models the relationship between different fields, enabling our neural network to better plan what to say first and what next. Further, we incorporate a copy mechanism~\cite{copynet} into our model to cope with rare words.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
We evaluated our method on the \textsc{WikiBio} dataset~\cite{wikibio}. Experimental results show that our order-planning approach significantly outperforms previous state-of-the-art results in terms of BLEU, ROUGE, and NIST metrics. Extensive ablation tests verify the effectiveness of each component in our model; we also perform visualization analysis to better understand the proposed order-planning mechanism.
|
| 46 |
+
\section{Approach}
|
| 47 |
+
Our model takes as input a table (e.g., a Wikipedia infobox) and generates a natural language summary describing the information based on an RNN. The neural network contains three main components:
|
| 48 |
+
\begin{itemize}
|
| 49 |
+
\item An encoder captures table information;
|
| 50 |
+
\item A dispatcher---a hybrid content- and linkage-based attention mechanism over table contents---plans what to generate next; and
|
| 51 |
+
\item A decoder generates a natural language summary using RNN, where we also incorporate a copy mechanism~\cite{copynet} to cope with rare words.
|
| 52 |
+
\end{itemize}
|
| 53 |
+
We elaborate these components in the rest of this section.
|
| 54 |
+
\subsection{Encoder: Table Representation}
|
| 55 |
+
We design a neural encoder to represent table information.
|
| 56 |
+
As shown in Figure~\ref{fig:arch}, the content of each field is split into separate words and the entire table is transformed into a large sequence. Then we use a recurrent neural network (RNN) with long short term memory (LSTM) units \cite{lstm} to read the contents as well as their corresponding field names.
|
| 57 |
+
|
| 58 |
+
Concretely, let $C$ be the number of content words in a table; let $\bm c_i$ and $\bm f_i$ be the embeddings of a content and its corresponding field, respectively ($i=1\cdots C$). The input of LSTM-RNN is the concatenation of $\bm f_i$ and $\bm c_i$, denoted as $\bm x_i=[\bm f_i; \bm c_i]$, and the output, denoted as $\bm h_i$, is the encoded information corresponding to a content word, i.e.,
|
| 59 |
+
\begin{align}\label{eq:lstm:begin}
|
| 60 |
+
\big[\bm g_\text{in}; \bm g_\text{forget}; \bm g_\text{out}\big] &= \sigma(W_g\bm x_i+U_g\bm h_{i-1}) \\
|
| 61 |
+
\widetilde{\bm x}_i&=\tanh(W_x\bm x_i+U_x\bm h_{i-1}) \\
|
| 62 |
+
\widetilde{\bm h}_i &= \bm g_\text{in}\circ \widetilde{\bm x}_i + \bm g_\text{forget}\circ \widetilde{\bm h}_{i-1}\\
|
| 63 |
+
\bm h_i &= \bm g_\text{out} \circ \tanh(\widetilde{\bm h}_i)\label{eq:lstm:end}
|
| 64 |
+
\end{align}
|
| 65 |
+
where $\circ$ denotes element-wise product, and $\sigma$ denotes the $\operatorname{sigmoid}$ function. $W$'s and $U$'s are weights, and bias terms are omitted in the equations for clarity. $\bm g_\text{in}$, $\bm g_\text{forget}$, and $\bm g_\text{out}$ are known as input, forget, and output gates.
|
| 66 |
+
|
| 67 |
+
Notice that, we have two separate embedding matrices for fields and content words. We observe the field names of different data samples mostly come from a fixed set of candidates, which is reasonable in a particular domain. Therefore, we assign an embedding to a field, regardless of the number of words in the field name. For example, the field \textit{Notable work} in Table~\ref{tab:example} is represented by a single field embedding instead of the embeddings of \textit{notable} and \textit{work}.
|
| 68 |
+
|
| 69 |
+
For content words, we represent them with conventional word embeddings (which are randomly initialized), and use LSTM-RNN to integrate information. In a table, some fields contain a sequence of words (e.g., \textit{Name}=``\textit{Arthur Ignatius Conan Doyle}''), whereas other fields contain a set of words (e.g., \textit{Occupation} = ``\textit{writer, physician}''). We do not have much human engineering here, but let an RNN to capture such subtlety by itself.
|
| 70 |
+
|
| 71 |
+
\begin{figure}[!t]
|
| 72 |
+
\begin{center}
|
| 73 |
+
\begin{tabular}{ccc}
|
| 74 |
+
&\textbf{(a) Encoder} & \textbf{(b) Dispatcher}\\
|
| 75 |
+
&\footnotesize Table Representation &\footnotesize Planning What to Generate Next
|
| 76 |
+
\end{tabular}
|
| 77 |
+
\includegraphics[width=\linewidth]{att.pdf}
|
| 78 |
+
\caption{The (a) Encoder and (b) Dispatcher in our model.}
|
| 79 |
+
\label{fig:arch}
|
| 80 |
+
\end{center}
|
| 81 |
+
\end{figure}
|
| 82 |
+
\subsection{Dispatcher: Planning What to Generate Next}
|
| 83 |
+
After encoding table information, we use another RNN to decode a natural language summary (deferred to the next part). During the decoding process, the RNN is augmented with a dispatcher that plans what to generate next.
|
| 84 |
+
|
| 85 |
+
Generally, a dispatcher is an attention mechanism over table contents. At each decoding time step $t$, the dispatcher computes a probabilistic distribution $\alpha_{t,i}$ ($i=1\cdots C$), which is further used for weighting content representations~$\bm h_i$.
|
| 86 |
+
In our model, the dispatcher is a hybrid of content- and link-based attention, discussed in detail as follows.
|
| 87 |
+
\subsubsection{Content-Based Attention.}
|
| 88 |
+
Traditionally, the computation of attention $\alpha_{t,i}$ is based on the content representation $\bm h_i$ as well as some state during decoding \cite{attention,mei}. We call this \textit{content-based attention}, which is also one component in our dispatcher.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
Since both the field name and the content contain important clues for text generation, we compute the attention weights based on not only the encoded vector of table content $\bm h_{i}$ but also the field embedding $\bm f_i$, thus obtaining the final attention $\alpha_{t,i}^\text{content}$ by re-weighting one with the other. Formally, we have
|
| 92 |
+
\begin{align}\label{eqn:content1}
|
| 93 |
+
\widetilde{\alpha}_{t,i}^{(f)} &= \bm f_i^\top\big(W^{(f)}\bm y_{t-1}+\bm b^{(f)}\big)\\\label{eqn:content2}
|
| 94 |
+
\widetilde{\alpha}_{t,i}^{(c)} &=\bm h_i^\top\big(W^{(c)}\bm y_{t-1}+\bm b^{(c)}\big)\\\label{eqn:content}
|
| 95 |
+
\alpha_{t,i}^\text{content}&=\dfrac{\exp\big\{\widetilde{\alpha}_{t,i}^{(f)}\widetilde{\alpha}_{t,i}^{(c)}\big\}}{\sum_{j=1}^C\exp\big\{\widetilde{\alpha}_{t,j}^{(f)}\widetilde{\alpha}_{t,j}^{(c)}\big\}}
|
| 96 |
+
\end{align}
|
| 97 |
+
where $W^{(f)}, \bm b^{(f)}, W^{(c)}, \bm b^{(c)}$ are learnable parameters; $\bm f_i$ and $\bm h_i$ are vector representations of the field name and encoded content, respectively, for the $i$th row. $\alpha_{t,i}^\text{content}$ is the content-based attention weights. Ideally, a larger content-based attention indicates a more relevant content to the last generated word.
|
| 98 |
+
\subsubsection{Link-Based Attention.}
|
| 99 |
+
We further propose a \textit{link-based attention} mechanism that directly models the relationship between different fields.
|
| 100 |
+
|
| 101 |
+
Our intuition stems from the observation that, a well-organized text typically has a reasonable order of its contents. As illustrated previously, the nationality of a person is often mentioned before his occupation (e.g., \textit{a British writer}). Therefore, we propose an link-based attention to explicitly model such order information.
|
| 102 |
+
|
| 103 |
+
We construct a link matrix $\mathscr{L}\in\mathbb{R}^{n_{\!f}\times n_{\!f}}$, where $n_{f}$ is the number possible field names in the dataset. An element $\mathscr{L}[f_{\!j},f_{\!i}]$ is a real-valued score indicating how likely the field $f_j$ is mentioned after the field $f_i$. (Here, $[\cdot, \cdot]$ indexes a matrix.) The link matrix $\mathscr{L}$ is a part of model parameters and learned by backpropagation. Although the link matrix appears to be large in size (1475$\times$1475), a large number of its elements are not used because most fields do not co-occur in at least one data sample; in total, we have 53422 effective parameters here. In other scenarios, low-rank approximation may be used to reduce the number of parameters.
|
| 104 |
+
|
| 105 |
+
Formally, let $\alpha_{t-1,i}$ ($i=1\dots C$) be an attention probability\footnote{Here, $\alpha_{t-1,i}$ refers to the hybrid content- and link-based attention, which will be introduced shortly.} over table contents in the last time step during generation. For a particular data sample whose content words are of fields $f_1, f_2, \cdots, f_C$, we first weight the linking scores by the previous attention probability, and then normalize the weighted score to obtain link-based attention probability, given by
|
| 106 |
+
\begin{align}
|
| 107 |
+
\alpha_{t,i}^\text{link}&=\text{softmax}\bigg\{\sum_{j=1}^C\alpha_{t-1,j}\cdot\mathscr{L}[f_{\!j},f_{\!i}]\bigg\}\\
|
| 108 |
+
&=\dfrac{\exp\big\{
|
| 109 |
+
\sum_{j=1}^C\alpha_{t-1,j}\cdot\mathscr{L}[f_{\!j},f_{\!i'}]
|
| 110 |
+
\big\}
|
| 111 |
+
}{\sum_{i'=1}^C\exp\big\{\sum_{j}\alpha_{t-1,j}\cdot\mathscr{L}[f_{\!j},f_{\!i'}]\big\}}\label{eq:link}
|
| 112 |
+
\end{align}
|
| 113 |
+
|
| 114 |
+
Intuitively, the link matrix is analogous to the transition matrix in a Markov chain~\cite{stochasticprocess}, whereas the term $\sum_{j=1}^C\alpha_{t-1,j}\cdot\mathscr{L}[f_{\!j},f_{\!i}]$ is similar to one step of transition in the Markov chain. However, in our scenario, a table in a particular data sample contains only a few fields, but a field may occur several times because it contains more than one content words. Therefore, we do not require our link matrix $\mathscr{L}$ to be a probabilistic distribution in each row, but normalize the probability afterwards by Equation~\ref{eq:link}, which turns out to work well empirically.
|
| 115 |
+
|
| 116 |
+
Besides, we would like to point out that the link-based attention is inspired by the Differentiable Neural Computer~\cite[DNC]{DNC}. DNC contains a ``linkage-based addressing'' mechanism to track consecutively used memory slots and thus to integrate order information during memory addressing. Likewise, we design the link-based attention to capture the temporal order of different fields. But different from the linking strength heuristically defined in DNC, the link matrix in our model is directly parameterized and trained in an end-to-end manner.
|
| 117 |
+
\subsubsection{Hybrid Attention.}
|
| 118 |
+
To combine the above two attention mechanisms, we use a self-adaptive gate $z_t\in(0,1)$ by a sigmoid unit
|
| 119 |
+
\begin{align}
|
| 120 |
+
z_t &= \sigma\big(\bm w^\top[\bm h'_{t-1}; \bm e_t^{(f)}; \bm y_{t-1} ]\big)
|
| 121 |
+
\end{align}
|
| 122 |
+
where $\bm w$ is a parameter vector. $\bm h'_{t-1}$ is the last step's hidden state of the decoder RNN. $\bm y_{t-1}$ is the embedding of the word generated in the last step; $\bm e_t^{(f)}$ is the sum of field embeddings $\bm f_i$ weighted by the current step's field attention $\alpha_{t,i}^\text{link}$. As $\bm y_{t-1}$ and $\bm e_t^{(f)}$ emphasize the content and link aspects, respectively, the self-adaptive gate $z$ is aware of both.
|
| 123 |
+
In practice, we find $z$ tends to address link-based attention too much and thus adjust it by $\widetilde z_t= 0.2z_t + 0.5$ empirically.
|
| 124 |
+
|
| 125 |
+
Finally, the hybrid attention, a probabilistic distribution over all content words, is given by
|
| 126 |
+
\begin{equation}
|
| 127 |
+
\bm\alpha_t^\text{hybrid} = \widetilde z_t \cdot \bm \alpha_t^\text{content} + (1-\widetilde z_t)\cdot \bm \alpha_t^\text{link}\label{eq:gate}
|
| 128 |
+
\end{equation}
|
| 129 |
+
\subsection{Decoder: Sentence Generation}
|
| 130 |
+
\begin{figure}[!t]
|
| 131 |
+
\begin{center}
|
| 132 |
+
\textbf{Decoder}\\
|
| 133 |
+
Sentence Generation
|
| 134 |
+
|
| 135 |
+
\smallskip
|
| 136 |
+
|
| 137 |
+
\includegraphics[width=.9\linewidth]{decoder.pdf}
|
| 138 |
+
\caption{The decoder RNN in our model, which is enhanced with a copy mechanism.}
|
| 139 |
+
\end{center}
|
| 140 |
+
\end{figure}
|
| 141 |
+
|
| 142 |
+
The decoder is an LSTM-RNN that predicts target words in sequence. We also have an attention mechanism \cite{attention} that summarizes source information, i.e., the table in our scenario, by weighted sum, yielding an attention vector $\bm a_t$ by
|
| 143 |
+
\begin{equation}
|
| 144 |
+
\bm a_t = \sum_{i=1}^C\alpha_{t,i}^\text{hybrid}\bm h_i
|
| 145 |
+
\end{equation}
|
| 146 |
+
where $\bm h_i$ is the hidden representation obtained by the table encoder. As $\alpha_{t,i}^\text{hybrid}$ is a probabilistic distribution---determined by both content and link information---over content words, it enables the decoder RNN to focus on relevant information at a time, serving as an order-planning mechanism for table-to-text generation.
|
| 147 |
+
|
| 148 |
+
Then we concatenate the attention vector $\bm a_t$ and the embedding of the last step's generated word $\bm y_{t-1}$, and use a single-layer neural network to mix information before feeding to the decoder RNN. In other words, the decoder RNN's input (denoted as $\bm x_t$) is
|
| 149 |
+
\begin{equation}
|
| 150 |
+
\bm x_t=\tanh(W_d[\bm a_t; \bm y_{t-1}]+\bm b_d)\label{eqn:RNNinput}
|
| 151 |
+
\end{equation}
|
| 152 |
+
where $W_d$ and $b_d$ are weights. Similar to Equations~\ref{eq:lstm:begin}--\ref{eq:lstm:end}, at a time step $t$ during decoding, the decoder RNN yields a hidden representation $\bm h_t'$, based on which a score function $\bm s^\text{LSTM}$ is computed suggesting the next word to generate. The score function is computed by
|
| 153 |
+
\begin{equation}
|
| 154 |
+
\bm s_t^\text{LSTM}=W_s\bm h_t'+\bm b_s
|
| 155 |
+
\end{equation}
|
| 156 |
+
where $\bm h_t'$ is the decoder RNN's state. ($W_s$ and $\bm b_s$ are weights.) The score function can be thought of as the input of a softmax layer for classification before being normalized to a probabilistic distribution. We incorporate a copy mechanism~\cite{copynet} into our approach, and the normalization is accomplished after considering a copying score, introduced as follows.
|
| 157 |
+
|
| 158 |
+
\begin{table*}[!t]
|
| 159 |
+
\begin{center}
|
| 160 |
+
\begin{tabular}{llrrr}\toprule
|
| 161 |
+
\textbf{Group}&\textbf{Model} & \textbf{BLEU} &\textbf{ROUGE} &\textbf{NIST}\\
|
| 162 |
+
\midrule
|
| 163 |
+
Previous results\ \ \ \ & KN & 2.21& 0.38& 0.93\\
|
| 164 |
+
&Template KN &19.80 & 10.70& 5.19\\
|
| 165 |
+
\cmidrule{2-5}
|
| 166 |
+
& Table NLM$^l$ & 34.70&25.80 &7.98 \\\midrule
|
| 167 |
+
Our results & Content attention only\ \ \ \ &41.38 &34.65 & 8.57\\
|
| 168 |
+
& Order planning (full model) &\textbf{43.91} &\textbf{37.15} & \textbf{8.85}\\
|
| 169 |
+
\bottomrule
|
| 170 |
+
\end{tabular}
|
| 171 |
+
\end{center}
|
| 172 |
+
\vspace{-.2cm}
|
| 173 |
+
\caption{Comparison of the overall performance between our model and previous methods. $^l$Best results in \protect\newcite{wikibio}.}
|
| 174 |
+
\vspace{-.3cm}
|
| 175 |
+
\label{tab:overall}
|
| 176 |
+
\end{table*}
|
| 177 |
+
\subsubsection{Copy Mechanism.}
|
| 178 |
+
The copy mechanism scores a content word $c_i$ by its hidden representation $\bm h_i$ in the encoder side, indicating how likely the content word $c_i$ is directly copied during target generation. That is,
|
| 179 |
+
\begin{equation}
|
| 180 |
+
s_{t,i}=\sigma(\bm h_i^\top W_c)\bm h_{t}'
|
| 181 |
+
\end{equation}
|
| 182 |
+
and $s_{t,i}$ is a real number for $i=1,\cdots, C$ (the number of content words). Here $W_c$ is a parameter matrix, and $\bm h'$ is the decoding state.
|
| 183 |
+
|
| 184 |
+
In other words, when a word appears in the table content, it has a copying score computed as above. If a word $w$ occurs multiple times in the table contents, the scores are added, given by
|
| 185 |
+
\begin{equation}
|
| 186 |
+
s_t^\text{copy}(w)= \sum_{i=1}^Cs_{t,i} \cdot \mathbbm{1}_{\{c_i=w\}}
|
| 187 |
+
\end{equation}
|
| 188 |
+
where $\mathbbm{1}_{\{c_i=w\}}$ is a Boolean variable indicating whether the content word $c_i$ is the same as the word $w$ we are considering.
|
| 189 |
+
|
| 190 |
+
Finally, the LSTM score and the copy score are added for a particular word and
|
| 191 |
+
further normalized to obtain a probabilistic distribution, given by
|
| 192 |
+
\begin{align}
|
| 193 |
+
s_t(w)&=s_t^\text{LSTM}(w) + s_t^\text{copy}(w)\\
|
| 194 |
+
p_t(w)&=\operatorname{softmax}\left(s_t(w)\right)=\frac{\exp\{s_t(w)\}}{\sum\limits_{w'\in\mathcal{V}\bigcup\mathcal{C}}\exp\{s_t(w')\}}
|
| 195 |
+
\label{eq:predict}
|
| 196 |
+
\end{align}
|
| 197 |
+
where $\mathcal{V}$ refers to the vocabulary list and $\mathcal{C}$ refers to the set of content words in a particular data sample.
|
| 198 |
+
In this way, the copy mechanism can either generate a word from the vocabulary or directly copy a word from the source side. This is hepful in our scenario because some fields in a table (e.g., \textit{Name}) may contain rare or unseen words and the copy mechanism can cope with them naturally.
|
| 199 |
+
|
| 200 |
+
For simplicity, we use greedy search during inference, i.e., for each time step $t$, the word with the largest probability is chosen, given by
|
| 201 |
+
$y_t=\argmax_w{p_t(w)}$. The decoding process terminates when a special symbol $<$eos$>$ is generated, indicating the end of a sequence.
|
| 202 |
+
\subsection{Training Objective}
|
| 203 |
+
Our training objective is the negative log-likelihood of a sentence $y_1\cdots y_T$ in the training set.
|
| 204 |
+
\begin{equation}\label{eq:obj}
|
| 205 |
+
J=-\sum_{t=1}^T\log p(y_t|y_0\cdots y_{t-1})
|
| 206 |
+
\end{equation}
|
| 207 |
+
where $p(y_t|\cdot)$ is computed by Equation~\ref{eq:predict}. An $\ell_2$ penalty is also added as most other studies.
|
| 208 |
+
|
| 209 |
+
Since all the components described above are differentiable, our entire model can be trained end-to-end by backpropagation, and we use Adam~\cite{adam} for optimization.
|
| 210 |
+
\section{Experiments}
|
| 211 |
+
|
| 212 |
+
\subsection{Dataset}
|
| 213 |
+
We used the newly published \textsc{WikiBio} dataset \cite{wikibio},\footnote{\url{https://github.com/DavidGrangier/wikipedia-biography-dataset}} which contains 728,321 biographies from WikiProject Biography\footnote{\url{https://en.wikipedia.org/wiki/Wikipedia:WikiProject_Biography}} (originally from English Wikipedia, September 2015).
|
| 214 |
+
|
| 215 |
+
|
| 216 |
+
Each data sample comprises an infobox table of field-content pairs, being the input of our system. The generation target is the first sentence in the biography, which follows the setting in previous work \cite{wikibio}. Although only the first sentence is considered in the experiment, the sentence typically serves as a summary of the article. In fact, the target sentence has 26.1 tokens on average, which is actually long. Also, the sentence contains information spanning multiple fields, and hence our order-planning mechanism is useful in this scenario.
|
| 217 |
+
|
| 218 |
+
We applied the standard data split: 80\% for training and 10\% for testing, except that model selection was performed on a validaton subset of 1000 samples (based on BLEU-4).
|
| 219 |
+
\subsection{Settings}
|
| 220 |
+
We decapitalized all words and kept a vocabulary size of 20,000 for content words and generation candidates, which also followed previous work~\cite{wikibio}. Even with this reasonably large vocabulary size, we had more than 900k out-of-vocabulary words. This rationalizes the use of the copy mechanism.
|
| 221 |
+
|
| 222 |
+
For the names of table fields, we treated each as a special token. By removing nonsensical fields whose content is ``none'' and grouping fields occurring less than 100 times as an ``Unknown'' field, we had 1475 different field names in total.
|
| 223 |
+
|
| 224 |
+
In our experiments, both words' and table fields' embeddings were 400-dimensional and LSTM layers were 500-dimensional. Notice that, a field (e.g., ``name'') and a content/generation word (e.g., also ``name''), even with the same string, were considered as different tokens; hence, they had different embeddings. We randomly initialized all embeddings, which are tuned during training.
|
| 225 |
+
|
| 226 |
+
We used Adam~\cite{adam} as the optimization algorithm with a batch size of 32; other hyperparameters were set to default values.
|
| 227 |
+
\subsection{Baselines}
|
| 228 |
+
We compared our model with previous results using either traditional language models or neural networks.
|
| 229 |
+
\begin{itemize}
|
| 230 |
+
\item KN and Template KN~\cite{heafield2013scalable}: \newcite{wikibio} train an interpolated Kneser-Ney (KN) language model for comparison with the KenLM toolkit. They also train a KN language model with templates.
|
| 231 |
+
|
| 232 |
+
\item Table NLM: \newcite{wikibio} propose an RNN-based model with attention and copy mechanisms. They have several model variants, and we quote the highest reported results.
|
| 233 |
+
\end{itemize}
|
| 234 |
+
|
| 235 |
+
We report model performance in terms of several metrics, namely BLEU-4, ROUGE-4, and NIST-4, which are computed by standard software, NIST mteval-v13a.pl (for BLEU and NIST) and MSR rouge-1.5.5 (for ROUGE). We did not include the perplexity measure in \newcite{wikibio} because the copy mechanism makes the vocabulary size vary among data samples, and thus the perplexity is not comparable among different approaches.
|
| 236 |
+
\subsection{Results}
|
| 237 |
+
\begin{table}[!t]
|
| 238 |
+
\centering
|
| 239 |
+
\begin{tabular}{lccc}
|
| 240 |
+
\toprule
|
| 241 |
+
\!\!\textbf{Component} & \textbf{BLEU} & \textbf{ROUGE} & \textbf{NIST}\\
|
| 242 |
+
\midrule
|
| 243 |
+
\!\!Content att. &41.38 &34.65 & 8.57\\
|
| 244 |
+
\!\!Link att. &38.24 &32.75 &8.36 \\
|
| 245 |
+
\!\!Hybrid att. &43.01 &36.91 & 8.75\\
|
| 246 |
+
\midrule
|
| 247 |
+
\!\!Copy$+$Content att. &41.89 &34.93 & 8.63\\
|
| 248 |
+
\!\!Copy$+$Link att. &39.08 &33.47 &8.42 \\
|
| 249 |
+
\!\!Copy$+$Hybrid att. &\textbf{43.91} &\textbf{37.15} & \textbf{8.85}\\
|
| 250 |
+
\bottomrule
|
| 251 |
+
\end{tabular}
|
| 252 |
+
\caption{Ablation test.}\label{tab:ablation}
|
| 253 |
+
\end{table}
|
| 254 |
+
\subsubsection{Overall Performance.}
|
| 255 |
+
Table~\ref{tab:overall} compares the overall performance with previous work. We see that, modern neural networks are considerably better than traditional KN models with or without templates. Moreover, our base model (with content-attention only) outperforms \newcite{wikibio}, showing our better engineering efforts. After adding up all proposed components, we obtain +2.5 BLEU and ROUGE improvement and +0.3 NIST improvement, achieving new state-of-the-art results.
|
| 256 |
+
\subsubsection{Ablation Test.}
|
| 257 |
+
Table~\ref{tab:ablation} provides an extensive ablation test to verify the effectiveness of each component in our model. The top half of the table shows the results without the copy mechanism, and the bottom half incorporates the copying score as described previously. We observe that the copy mechasnim is consistently effective with different types of attention.
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
We then compare content-based attention and link-based attention, as well as their hybrid (also Table~\ref{tab:ablation}). The results show that, link-based attention alone is not as effective as content-based attention. However, we achieve better performance if combining them together with an adaptive gate, i.e., the proposed hybrid attention.
|
| 261 |
+
The results are consistent in both halves of Table~\ref{tab:ablation} (with or without copying) and in terms of all metrics (BLEU, ROUGE, and NIST). This implies that content-based attention and link-based attention do capture different aspects of information, and their hybrid is more suited to the task of table-to-text generation.
|
| 262 |
+
\subsubsection{Effect of the gate.}
|
| 263 |
+
\begin{figure}[!t]
|
| 264 |
+
\centering
|
| 265 |
+
\includegraphics[width=.7\linewidth]{z_crop.pdf}
|
| 266 |
+
\vspace{-.3cm}
|
| 267 |
+
\caption{Comparing the self-adaptive gate with interpolation of content- and link-based attention. $z=0$ is link-based attention, $z=1$ is content-based attention.}\label{fig:gate}
|
| 268 |
+
\end{figure}
|
| 269 |
+
We are further interested in the effect of the gate $z$, which balances content-based attention $\bm\alpha^\text{content}$ and link-based attention $\bm\alpha^\text{link}$. As defined in Equation~\ref{eq:gate}, the computation of $z$ depends on the decoding state as well as table information; hence it is ``self-adaptive.'' We would like to verify if such adaptiveness is useful. To verify this, we designed a controlled experiment where the gate $z$ was manually assigned in advance and fixed during training. In other words, the setting was essentially a (fixed) interpolation between $\bm\alpha^\text{content}$ and $\bm\alpha^\text{link}$. Specifically, we tuned $z$ from $0$ to $1$ with a granularity of $0.1$, and plot BLEU scores as the comparison metric in Figure~\ref{fig:gate}.
|
| 270 |
+
|
| 271 |
+
As seen, interpolation of content- and link-based attention is generally better than either single mechanism, which again shows the effectiveness of hybrid attention. However, the peak performance of simple interpolation (42.89 BLEU when $z=0.4$) is worse than the self-adaptive gate, implying that our gating mechanism can automatically adjust the importance of $\bm\alpha^\text{content}$ and $\bm\alpha^\text{link}$ at a particular time based on the current state and input.
|
| 272 |
+
\subsubsection{Different Ways of Using Field Information.}
|
| 273 |
+
We are curious whether the proposed order-planning mechanism is better than other possible ways of using field information. We conducted two controlled experiments as follows. Similar to the proposed approach, we multiplied the attention probability by a field matrix and thus obtained a weighted field embedding. We fed it to either (1) the computation of content-based attention, i.e., Equations~\ref{eqn:content1}--\ref{eqn:content2}, or (2) the RNN decoder's input, i.e., Equation~\ref{eqn:RNNinput}. In both cases, the last step's weighted field embedding was concatenated with the embedding of the generated word $\bm y_{t-1}$.
|
| 274 |
+
|
| 275 |
+
From Table~\ref{tab:field}, we see that feeding field information to the computation of $\bm \alpha^\text{content}$ interferes content attention and leads to performance degradation, and that feeding it to decoder RNN slightly improves model performance. However, both controlled experiments are worse than the proposed method. The results confirm that our order-planning mechanism is indeed useful in modeling the order of fields, outperforming several other approaches that use the same field information in a na\"ive fashion.
|
| 276 |
+
|
| 277 |
+
\begin{table}[!t]
|
| 278 |
+
\centering
|
| 279 |
+
\begin{tabular}{lccc}
|
| 280 |
+
\toprule
|
| 281 |
+
\!\!\textbf{Feeding field info to\dots} & \textbf{BLEU} & \textbf{ROUGE} & \textbf{NIST}\\
|
| 282 |
+
\midrule
|
| 283 |
+
None &41.89 &34.93 & 8.63\\
|
| 284 |
+
Computation of $\bm \alpha^\text{content}$ &40.52&34.95&8.57\\
|
| 285 |
+
Decoder RNN's input & 41.96 & 35.07 & 8.61\\
|
| 286 |
+
\midrule
|
| 287 |
+
Hybrid att. (proposed) &\textbf{43.91} &\textbf{37.15} & \textbf{8.85}\\
|
| 288 |
+
\bottomrule
|
| 289 |
+
\end{tabular}
|
| 290 |
+
\caption{Comparing different possible ways of using field information. ``None'': No field information is fed back to the network, i.e., content-based attention computed by Equation~\ref{eqn:content} (with copying).}
|
| 291 |
+
\label{tab:field}
|
| 292 |
+
\end{table}
|
| 293 |
+
\subsection{Case Study and Visualization}
|
| 294 |
+
\begin{table*}
|
| 295 |
+
\centering
|
| 296 |
+
\begin{minipage}[c]{0.24\textwidth}
|
| 297 |
+
\begin{center}
|
| 298 |
+
\includegraphics[width=\textwidth]{exp2.pdf}\\
|
| 299 |
+
\end{center}
|
| 300 |
+
\end{minipage}
|
| 301 |
+
\begin{minipage}[c]{0.67\textwidth}
|
| 302 |
+
\resizebox{\textwidth}{!}{
|
| 303 |
+
\begin{tabular}{p{2.3cm}p{9.5cm}}\toprule
|
| 304 |
+
Reference & emmett john rice ( december 21 , 1919 -- march 10 , 2011 ) was a former governor of the federal reserve system , a Cornell university economics professor , expert in the monetary systems of developing countries and the father of the current national security advisor to president barack obama , susan e . rice .\\\midrule
|
| 305 |
+
Content-based attention& emmett john rice ( december 21 , 1919 -- march 10 , 2011 ) was an economist , author , public official and the former american governor of the federal reserve system , the first african american UNK .\\\midrule
|
| 306 |
+
Hybrid attention& emmett john rice ( december 21 , 1919 -- march 10 , 2011 ) was an american economist , author , public official and the former governor of the federal reserve system , expert in the monetary systems of developing countries . \\
|
| 307 |
+
\bottomrule
|
| 308 |
+
\end{tabular}
|
| 309 |
+
}
|
| 310 |
+
\end{minipage}
|
| 311 |
+
\vspace{-.1cm}
|
| 312 |
+
\caption{Case study. \textbf{Left}: Wikipedia infobox. \textbf{Right}: A reference and two generated sentences by different attention (both with the copy mechanism).}
|
| 313 |
+
\vspace{-.4cm}
|
| 314 |
+
\label{tab:expsen}
|
| 315 |
+
\end{table*}
|
| 316 |
+
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
We showcase an example in Table~\ref{tab:expsen}. With only content-based attention, the network is confused about when the word \textit{American} is appropriate in the sentence, and corrupts the phrase \textit{former governor of the federal reserve system} as appears in the reference. However, when link-based attention is added, the network is more aware of the order between fields ``Nationality'' and ``Occupation,'' and generates the nationality \textit{American} before the occupation \textit{economist}. This process could also be visualized in Figure~\ref{fig:vis}. Here, we plot our model's content-based attention, link-based attention and their hybrid. (The content- and link-based attention probabilities may be different from those separately trained in the ablation test.) After generating ``\textit{emmett john rice ( december 21, 1919 -- march 10, 2011 ) was},'' content-based attention skips the nationality and focuses more on the occupation. Link-based attention, on the other hand, provides a strong clue suggesting to generate the nationality first and then occupation. In this way, the obtained sentence is more compliant with conventions.
|
| 321 |
+
\section{Related Work}
|
| 322 |
+
Text generation has long aroused interest in the NLP community due to is wide applications including automated navigation~\cite{navigate} and weather forecasting~\cite{weather}. Traditionally, text generation can be divided into several steps~\cite{NLG}: \textit{content planning} defines what information should be conveyed in the generated sentence; (2) \textit{sentence planning} determines what to generate in each sentence; and (3) \textit{surface realization} actually generates those sentences with words.
|
| 323 |
+
|
| 324 |
+
In early years, surface realization is often accomplished by templates~\cite{template} or statistically learned (shallow) models, e.g., probabilistic context-free grammar~\cite{pcfg} and language models~\cite{LM}, with hand-crafted features or rules. Therefore, these methods are weak in terms of the quality of generated sentences. For planning, researchers also apply (shallow) machine learning approaches. \newcite{collective}, for example, model it as a collective classification problem, whereas \newcite{semimarkov} use a generative semi-Markov model to align text segment and assigned meanings. Generally, planning and realization in the above work are separate and have difficulty in capturing the complexity of language due to the nature of shallow models.
|
| 325 |
+
|
| 326 |
+
Recently, the recurrent neural network (RNN) is playing a key role in natural language generating. As RNN can automatically capture highly complicated patterns during end-to-end training, it has successful applications including machine translation~\cite{attention}, dialog systems~\cite{dialog}, and text summarization~\cite{summarization}.
|
| 327 |
+
\begin{figure}[!t]
|
| 328 |
+
\centering
|
| 329 |
+
\includegraphics[width=\linewidth]{att_weights.pdf}
|
| 330 |
+
\vspace{-.7cm}
|
| 331 |
+
\caption{Visualization of attention probabilities in our model. x-axis: generated words ``\dots ) was an american economist \dots ''; y-axis: $\langle$field : content word$\rangle$ pairs in the table. (a) Content-based attention. (b) Link-based attention. (c) Hybrid attention. Subplot (b) exhibits strips because, by definition, link-based attention will yield the same score for all content words with the same field. Please also note that the columns do not sum to 1 in the figure because we only plot a part of the attention probabilities.}
|
| 332 |
+
\vspace{-.2cm}
|
| 333 |
+
\label{fig:vis}
|
| 334 |
+
\end{figure}
|
| 335 |
+
|
| 336 |
+
Researchers are then beginning to use RNN for text generation from structured data. \newcite{mei} propose a coarse-to-fine grained attention mechanism that selects one or more records (e.g., a piece of weather forecast) by a precomputed but fixed probability and then dynamically attends to relevant contents during decoding. \newcite{wikibio} incorporate the copy mechanism~\cite{copynet} into the generation process. However, the above approaches do not explicitly model the order of contents. It is also nontrivial to combine traditional planning techniques to such end-to-end learned RNN.
|
| 337 |
+
|
| 338 |
+
Our paper proposes an order-planning approach by designing a hybrid of content- and link-based attention. The model is inspired by hybrid content- and location-based addressing in the Differentiable Neural Computer~\cite[DNC]{DNC}, where the location-based addressing is defined heuristically. Instead, we propose a transition-like link matrix that models how likely a field is mentioned after another, which is more suited in our scenario.
|
| 339 |
+
|
| 340 |
+
Moreover, our entire model is differentiable, and thus the \textit{planning} and \textit{realization} steps in traditional language generation can be learned end-to-end in our model.
|
| 341 |
+
\section{Conclusion and Future Work}
|
| 342 |
+
In this paper, we propose an order-planning neural network that generates texts from a table (Wikipedia infobox). The text generation process is built upon an RNN with attention to table contents. Different from traditional content-based attention, we explicitly model the order of contents by a link matrix, based on which we compute a link-based attention. Then a self-adaptive gate balances the content- and link-based attention mechanisms. We further incorporate a copy mechanism to our model to cope with rare or unseen words.
|
| 343 |
+
|
| 344 |
+
We evaluated our approach on a newly proposed large scale dataset, \textsc{WikiBio}. Experimental results show that we outperform previous results by a large margin in terms of BLEU, ROUGE, and NIST scores. We also had extensive ablation test showing the effectiveness of the copy mechanism, as well as the hybrid attention of content and linking information. We compared our order-planning mechanism with other possible ways of modeling field; the results confirm that the proposed method is better than feeding field embedding to the network in a na\"ive fashion.
|
| 345 |
+
Finally we provide a case study and visualize the attention scores so as to better understand our model.
|
| 346 |
+
|
| 347 |
+
In future work, we would like to deal with text generation from multiple tables. In particular, we would design hierarchical attention mechanisms that can first select a table containing the information and then select a field for generation, which would improve the attention efficiency. We would also like to apply the proposed method to text generation from other structured data, e.g., a knowledge graph.
|
| 348 |
+
\section{Acknowledgments}
|
| 349 |
+
We thank Jing He from AdeptMind.ai for helpful discussions on different ways of using field information. %
|
| 350 |
+
\bibliographystyle{aaai}
|
| 351 |
+
\bibliography{refsaaai}
|
1709.02087v1.txt
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Consider the following statistical task: Given independent samples from a distribution over an unknown discrete domain 𝛀𝛀\mathbf{\Omega},determine whether it is uniform on some subset of the domain versus significantly different from any such uniform distribution.Formally, let 𝒞U=def{𝐮S:S⊆𝛀}superscriptdefsubscript𝒞𝑈conditional-setsubscript𝐮𝑆𝑆𝛀\mathcal{C}_{U}\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\{\mathbf{u}_{S}:S\subseteq\mathbf{\Omega}\} denote the set of uniform distributions 𝐮Ssubscript𝐮𝑆\mathbf{u}_{S} over subsets S𝑆S of 𝛀𝛀\mathbf{\Omega}.Given sample access to an unknown distribution p𝑝p on 𝛀𝛀\mathbf{\Omega} and a proximity parameterϵ>0italic-ϵ0\epsilon>0, we want to correctly distinguish between the case that p∈𝒞U𝑝subscript𝒞𝑈p\in\mathcal{C}_{U} versus dTV(p,𝒞U)=defminS⊆𝛀dTV(p,𝐮S)≥ϵsuperscriptdefsubscript𝑑T𝑉𝑝subscript𝒞𝑈subscript𝑆𝛀subscript𝑑T𝑉𝑝subscript𝐮𝑆italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\min_{S\subseteq\mathbf{\Omega}}d_{\mathrm{T}V}(p,\mathbf{u}_{S})\geq\epsilon,with probability at least 2/3232/3. Here, dTV(p,q)=(1/2)‖p−q‖1subscript𝑑T𝑉𝑝𝑞12subscriptnorm𝑝𝑞1d_{\mathrm{T}V}(p,q)=(1/2)\|p-q\|_{1} denotes the total variation distance between distributionsp𝑝p and q𝑞q. This natural problem, termed generalized uniformity testing, was recently studied by Batu and Canonne [BC17],who gave the first upper and lower bounds on its sample complexity.
|
| 2 |
+
|
| 3 |
+
Generalized uniformity testing bears a strong resemblance to the familiar task of uniformity testing,where one is given samples from a distribution p𝑝p on an explicitly known domain of size n𝑛nand the goal is to determine, with probability at least 2/3232/3,whether p𝑝p is the uniform distribution 𝐮nsubscript𝐮𝑛\mathbf{u}_{n} on this domain versus dTV(p,𝐮n)≥ϵsubscript𝑑T𝑉𝑝subscript𝐮𝑛italic-ϵd_{\mathrm{T}V}(p,\mathbf{u}_{n})\geq\epsilon.Uniformity testing is arguably the most extensively studied problem in distribution property testing [GR00, Pan08, VV14, DKN15b, Gol16, DGPP16, DGPP17] and its sample complexity is well understood.Specifically, it is known [Pan08, CDVV14, VV14, DKN15b]that Θ(n1/2/ϵ2)Θsuperscript𝑛12superscriptitalic-ϵ2\Theta(n^{1/2}/\epsilon^{2}) samples are necessary and sufficient for this task.
|
| 4 |
+
|
| 5 |
+
The field of distribution property testing [BFR+00] has seen substantial progress in the past decade,see [Rub12, Can15] for two recent surveys.A large body of the literature has focused on characterizing the sample size needed to test propertiesof arbitrary distributions of a given support size. This regime is fairly well understood:for many properties of interest there exist sample-efficient testers [Pan08, CDVV14, VV14, DKN15b, ADK15, CDGR16, DK16, DGPP16, CDS17, DGPP17].Moreover, an emerging body of work has focused on leveraging a priori structureof the underlying distributions to obtain significantly improved samplescomplexities [BKR04, DDS+13, DKN15b, DKN15a, CDKS17, DP17, DDK16, DKN17].
|
| 6 |
+
|
| 7 |
+
Perhaps surprisingly, the natural setting where the distribution is arbitrary on a discrete but unknown domain (of unknown size)does not seem to have been explicitly studied before the recent work of Batu and Canonne [BC17].Returning to the specific problem studied here, at first sight it might seem that generalized uniformity testingand uniformity testing are essentially the same task. However, as shown in [BC17], the sample complexities of thesetwo problems are significantly different. Specifically, [BC17] gave a generalized uniformity tester withexpected sample complexity O(1/(ϵ6‖p‖3))𝑂1superscriptitalic-ϵ6subscriptnorm𝑝3O(1/(\epsilon^{6}\|p\|_{3})) and showed a lower bound of Ω(‖p‖3)Ωsubscriptnorm𝑝3\Omega(\|p\|_{3}).Since generalized uniformity is a symmetric property, any tester should essentially rely on the empirical moments(collision statistics) of the distribution [RRSS09, Val11]. The algorithm in [BC17] uses sufficiently accurate approximations ofthe second and third moments of the unknown distribution. Their lower bound formalizesthe intuition that an approximation of the third norm is in some sense necessary to solve this problem.
|
| 8 |
+
|
| 9 |
+
An immediate open question arising from the work of [BC17] is to precisely characterize the sample complexityof generalized uniformity testing, as a function of all relevant parameters. The main result of this paperprovides an answer to this question. In particular, we show the following:
|
| 10 |
+
|
| 11 |
+
In the following paragraphs, we provide an intuitive explanation of our algorithmand our matching sample size lower bound, in tandem with a comparison to the prior work [BC17].
|
| 12 |
+
|
| 13 |
+
Our algorithm requires considering two cases based on the relativesize of ϵitalic-ϵ\epsilon and ‖p‖22superscriptsubscriptnorm𝑝22\|p\|_{2}^{2}. This case analysis seems somewhat intrinsic to the problemas the correct sample complexity branches into these cases.
|
| 14 |
+
|
| 15 |
+
For large ϵitalic-ϵ\epsilon, we use the same overall technique as [BC17], noting thatp𝑝p is uniform if and only if ‖p‖3=‖p‖24/3subscriptnorm𝑝3superscriptsubscriptnorm𝑝243\|p\|_{3}=\|p\|_{2}^{4/3}, and that for p𝑝p farfrom uniform, ‖p‖3subscriptnorm𝑝3\|p\|_{3} must be substantially larger. The basic idea fromhere is to first obtain rough approximations to ‖p‖2subscriptnorm𝑝2\|p\|_{2} and ‖p‖3subscriptnorm𝑝3\|p\|_{3} inorder to ascertain the correct number of samples to use, and then usestandard unbiased estimators of ‖p‖22superscriptsubscriptnorm𝑝22\|p\|_{2}^{2} and ‖p‖33superscriptsubscriptnorm𝑝33\|p\|_{3}^{3} to approximatethem to appropriate precision, so that their relative sizes can becompared with appropriate accuracy.
|
| 16 |
+
|
| 17 |
+
We improve upon the work of [BC17]in this parameter regime in a couple of ways. First, we obtain more preciselower bounds on the difference ‖p‖33−‖p‖24superscriptsubscriptnorm𝑝33superscriptsubscriptnorm𝑝24\|p\|_{3}^{3}-\|p\|_{2}^{4} in the case where p𝑝p is far from uniform(Lemma 2.4). This allows us to reduce the accuracyneeded in estimating ‖p‖2subscriptnorm𝑝2\|p\|_{2} and ‖p‖3subscriptnorm𝑝3\|p\|_{3}. Second, we refine themethod used for performing the approximations to these moments (ℓrsubscriptℓ𝑟\ell_{r}-norms).In particular, we observe that using the generic estimators for these quantitiesyields sub-optimal bounds for the following reason:The error of the unbiased estimators is related to their variance,which in turn can be expressed in terms of the higher moments of p𝑝p (Fact 2.1).This implies for example that the worst case sample complexityfor estimating ‖p‖3subscriptnorm𝑝3\|p\|_{3} comes when the fourth and fifth moments of p𝑝p are large.However, since we are trying to test for the case of uniformity (where thesehigher moments are minimal), we do not need to worry about this worst case.In particular, after applying sample efficient tests to ensure that the higher moments of p𝑝pare not much larger than expected (Lemma 2.2 (ii)),the standard estimators for the second and third momentsof p𝑝p can be shown to converge more rapidly than they wouldin the worst case (Lemma 2.5).
|
| 18 |
+
|
| 19 |
+
The above algorithm is not sufficient for small values of ϵitalic-ϵ\epsilon.For ϵitalic-ϵ\epsilon sufficiently small, we employ a different, perhaps morenatural, algorithm. Here we take m𝑚m samples (for m𝑚m appropriately chosenbased on an approximation to ‖p‖2subscriptnorm𝑝2\|p\|_{2}) and consider the subset S𝑆S of the domainthat appears in the sample. We then test whether the conditional distribution p𝑝p on S𝑆Sis uniform, and output the answer of this tester.The number of samples m𝑚m drawn in the first step is sufficiently large so thatp(S)𝑝𝑆p(S), the probability mass of S𝑆S under p𝑝p, is relatively high.Hence, it is easy to sample from the conditional distribution using rejection sampling.Furthermore, we can use a standard uniformity testing algorithm requiring O(|S|/ϵ2)𝑂𝑆superscriptitalic-ϵ2O(\sqrt{|S|}/\epsilon^{2}) samples.
|
| 20 |
+
|
| 21 |
+
To establish correctness of this algorithm, we need to show that if p𝑝p is far from uniform, thenthe conditional distribution p𝑝p on S𝑆S is far from uniform as well. To prove this statement,we distinguish two further subcases. If ϵitalic-ϵ\epsilon is “very small”, then we can afford to set m𝑚msufficiently large so that p(S)𝑝𝑆p(S) is at least 1−ϵ/101italic-ϵ101-\epsilon/10. In this case, our claim follows straightforwardly.For the remaining values of ϵitalic-ϵ\epsilon, we can only guarantee that p(S)=Ω(1)𝑝𝑆Ω1p(S)=\Omega(1), hence werequire a more sophisticated argument. Specifically, we show (Lemma 2.6)that for any x𝑥x in an appropriate interval,with high constant probability, the random variable Z(x)=∑i∈S|pi−x|𝑍𝑥subscript𝑖𝑆subscript𝑝𝑖𝑥Z(x)=\sum_{i\in S}|p_{i}-x| is large.It is not hard to show that this holds with high probability for each fixed x𝑥x,as p𝑝p being far from uniform implies that ∑i∈𝛀min(pi,|pi−x|)subscript𝑖𝛀subscript𝑝𝑖subscript𝑝𝑖𝑥\sum_{i\in\mathbf{\Omega}}\min(p_{i},|p_{i}-x|) is large.This latter condition can be shown to provide a clean lower boundfor the expectation of Z(x)𝑍𝑥Z(x). To conclude the argument,we show that Z(x)𝑍𝑥Z(x) is tightly concentrated around its expectation.
|
| 22 |
+
|
| 23 |
+
The lower bound of Ω(1/(ϵ2‖p‖2))Ω1superscriptitalic-ϵ2subscriptnorm𝑝2\Omega(1/(\epsilon^{2}\|p\|_{2})) follows directly from the standardlower bound of Ω(n1/2/ϵ2)Ωsuperscript𝑛12superscriptitalic-ϵ2\Omega(n^{1/2}/\epsilon^{2}) [Pan08]for uniformity testing on a given domain of size n𝑛n. Specifically, it is implied from the factthat the hard instances satisfy ‖p‖2=Θ(n−1/2)subscriptnorm𝑝2Θsuperscript𝑛12\|p\|_{2}=\Theta(n^{-1/2}). The other branch of the lower bound,namely Ω(1/(ϵ4/3‖p‖3))Ω1superscriptitalic-ϵ43subscriptnorm𝑝3\Omega(1/(\epsilon^{4/3}\|p\|_{3})), is more involved. To prove this lower bound, we use the shared informationmethod [DK16] for the following family of hard instances: In the “YES” case,we consider the distribution over (pseudo-)distributions on N𝑁N bins, where each pisubscript𝑝𝑖p_{i} is (1+ϵ2)/N1superscriptitalic-ϵ2𝑁(1+\epsilon^{2})/Nwith probability n/(N(1+ϵ2))𝑛𝑁1superscriptitalic-ϵ2n/(N(1+\epsilon^{2})), and 00 otherwise. (Here we assume that the parameterN𝑁N is sufficiently large compared to the other parameters.)In the “NO” case, we consider the distribution over (pseudo-)distributions on N𝑁N bins, where each pisubscript𝑝𝑖p_{i} is (1+ϵ)/N1italic-ϵ𝑁(1+\epsilon)/Nwith probability n/(2N)𝑛2𝑁n/(2N), (1−ϵ)/N1italic-ϵ𝑁(1-\epsilon)/N with probability n/(2N)𝑛2𝑁n/(2N), and 00 otherwise.
|
| 24 |
+
|
| 25 |
+
Let 𝛀𝛀\mathbf{\Omega} denote the unknown discrete domain.Each probability distribution over 𝛀𝛀\mathbf{\Omega} can be associated witha probability mass function p:𝛀→ℝ+:𝑝→𝛀subscriptℝp:\mathbf{\Omega}\rightarrow\mathbb{R}_{+} such that ∑i∈𝛀pi=1subscript𝑖𝛀subscript𝑝𝑖1\sum_{i\in\mathbf{\Omega}}p_{i}=1.We will use pisubscript𝑝𝑖p_{i}, instead of p(i)𝑝𝑖p(i), to denote the probability of element i∈𝛀𝑖𝛀i\in\mathbf{\Omega} in p𝑝p.For a distribution (with mass function) p𝑝p and a set S⊆𝛀𝑆𝛀S\subseteq\mathbf{\Omega},we denote by p(S)=def∑i∈Spisuperscriptdef𝑝𝑆subscript𝑖𝑆subscript𝑝𝑖p(S)\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\sum_{i\in S}p_{i} and by(p|S)conditional𝑝𝑆(p|S) the conditional distribution of p𝑝p on S𝑆S.For r≥1𝑟1r\geq 1, the ℓrsubscriptℓ𝑟\ell_{r}-norm of a function p:𝛀→ℝ:𝑝→𝛀ℝp:\mathbf{\Omega}\to\mathbb{R} is‖p‖r=def(∑i∈𝛀|pi|r)1/rsuperscriptdefsubscriptnorm𝑝𝑟superscriptsubscript𝑖𝛀superscriptsubscript𝑝𝑖𝑟1𝑟\|p\|_{r}\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\left(\sum_{i\in\mathbf{\Omega}}|p_{i}|^{r}\right)^{1/r}.For convenience, we will denote 𝐅r(p)=def‖p‖rr=∑i∈𝛀|pi|rsuperscriptdefsubscript𝐅𝑟𝑝superscriptsubscriptnorm𝑝𝑟𝑟subscript𝑖𝛀superscriptsubscript𝑝𝑖𝑟\mathbf{F}_{r}(p)\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\|p\|_{r}^{r}=\sum_{i\in\mathbf{\Omega}}|p_{i}|^{r}.For ∅≠S⊆𝛀𝑆𝛀\emptyset\neq S\subseteq\mathbf{\Omega}, let 𝐮Ssubscript𝐮𝑆\mathbf{u}_{S} be the uniform distribution over S𝑆S.Let 𝒞U=def{𝐮S:∅≠S⊆𝛀}superscriptdefsubscript𝒞𝑈conditional-setsubscript𝐮𝑆𝑆𝛀\mathcal{C}_{U}\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\{\mathbf{u}_{S}:\emptyset\neq S\subseteq\mathbf{\Omega}\}be the set of uniform distributions over subsets of 𝛀𝛀\mathbf{\Omega}.The total variation distance between distributions p,q𝑝𝑞p,q on 𝛀𝛀\mathbf{\Omega} is definedas dTV(p,q)=defmaxS⊆𝛀|p(S)−q(S)|=(1/2)⋅‖p−q‖1superscriptdefsubscript𝑑T𝑉𝑝𝑞subscript𝑆𝛀𝑝𝑆𝑞𝑆⋅12subscriptnorm𝑝𝑞1d_{\mathrm{T}V}(p,q)\stackrel{{\scriptstyle{\mathrm{\footnotesize def}}}}{{=}}\max_{S\subseteq\mathbf{\Omega}}|p(S)-q(S)|=(1/2)\cdot\|p-q\|_{1}.Finally, we denote by Poi(λ)Poi𝜆\mathrm{Poi}(\lambda) the Poisson distributionwith parameter λ𝜆\lambda.
|
| 26 |
+
|
| 27 |
+
In this section, we give our sample-optimal generalized uniformity tester,Gen-Uniformity-Test. Before we describe our algorithm, we summarize a few preliminaryresults on estimating the power sums 𝐅r(p)=∑i∈𝛀|pi|rsubscript𝐅𝑟𝑝subscript𝑖𝛀superscriptsubscript𝑝𝑖𝑟\mathbf{F}_{r}(p)=\sum_{i\in\mathbf{\Omega}}|p_{i}|^{r} of an unknown distribution p𝑝p.We present these results in Section 2.1.In Section 2.2, we give a detailed pseudo-code for our algorithm.In Section 2.3, we analyze the sample complexity, and inSection 2.4 we provide the proof of correctness.
|
| 28 |
+
|
| 29 |
+
We will require various notions of approximation for the power sums of a discrete distribution.We start with the following fact:
|
| 30 |
+
|
| 31 |
+
The estimator 𝐅^r(p)subscript^𝐅𝑟𝑝{\widehat{\mathbf{F}}}_{r}(p) is standard: It draws Poi(m)Poi𝑚\mathop{\textnormal{Poi}}\nolimits(m) samples from p𝑝pand mr⋅𝐅^r(p)⋅superscript𝑚𝑟subscript^𝐅𝑟𝑝m^{r}\cdot{\widehat{\mathbf{F}}}_{r}(p) equals the number of r𝑟r-wise collisions, i.e., ordered r𝑟r-tuplesof samples that land in the same bin.Using Fact 2.1, we getthe following lemma which will be crucial for our generalized uniformity tester:
|
| 32 |
+
|
| 33 |
+
Using Fact 2.1,it is shown in [AOST17] that if we draw m=O(1δ2‖p‖r)𝑚𝑂1superscript𝛿2subscriptnorm𝑝𝑟m=O(\frac{1}{\delta^{2}\|p\|_{r}}) samples from p𝑝p,then with high constant probability we have that |𝐅^r(p)−𝐅r(p)|≤δ⋅𝐅r(p)subscript^𝐅𝑟𝑝subscript𝐅𝑟𝑝⋅𝛿subscript𝐅𝑟𝑝|{\widehat{\mathbf{F}}}_{r}(p)-\mathbf{F}_{r}(p)|\leq\delta\cdot\mathbf{F}_{r}(p).Since the value of ‖p‖rsubscriptnorm𝑝𝑟\|p\|_{r} is unknown, this guarantee does not quite suffice for (i).We instead start by approximating 1/‖p‖rr1subscriptsuperscriptnorm𝑝𝑟𝑟1/\|p\|^{r}_{r} within a constant factor.We do this by counting the number of samples we need to draw from p𝑝puntil we see the first r𝑟r-wise collision. By Fact 2.1 andChebyshev’s inequality, this gives a constant factor approximation to 1/‖p‖rr1subscriptsuperscriptnorm𝑝𝑟𝑟1/\|p\|^{r}_{r}with expected sample size of O(1/‖p‖r)𝑂1subscriptnorm𝑝𝑟O(1/\|p\|_{r}). We thus get (i).
|
| 34 |
+
|
| 35 |
+
We now proceed to show (ii). The algorithm is straightforward: Draw Poi(O(m))Poi𝑂𝑚\mathop{\textnormal{Poi}}\nolimits\left(O(m)\right) samples from p𝑝p andcalculate 𝐅^r(p)subscript^𝐅𝑟𝑝{\widehat{\mathbf{F}}}_{r}(p). If mr𝐅^r(p)>csuperscript𝑚𝑟subscript^𝐅𝑟𝑝𝑐m^{r}{\widehat{\mathbf{F}}}_{r}(p)>c, output “large”; otherwise output “small”.Suppose that mr𝐅r(p)≤c/20superscript𝑚𝑟subscript𝐅𝑟𝑝𝑐20m^{r}\mathbf{F}_{r}(p)\leq c/20. By Markov’s inequality, with probability at least 19/20192019/20 we will have thatmr𝐅^r(p)≤csuperscript𝑚𝑟subscript^𝐅𝑟𝑝𝑐m^{r}{\widehat{\mathbf{F}}}_{r}(p)\leq c, in which case we output “small”. Now suppose that mr𝐅r(p)≥20csuperscript𝑚𝑟subscript𝐅𝑟𝑝20𝑐m^{r}\mathbf{F}_{r}(p)\geq 20c.Since c≥1𝑐1c\geq 1, this gives that ‖p‖r≥1/msubscriptnorm𝑝𝑟1𝑚\|p\|_{r}\geq 1/m. Therefore, after we draw Poi(O(m))Poi𝑂𝑚\mathop{\textnormal{Poi}}\nolimits(O(m)) samples from p𝑝p,with probability at least 19/20192019/20 we have that 𝐅^r(p)subscript^𝐅𝑟𝑝{\widehat{\mathbf{F}}}_{r}(p) is a factor 222 approximation to 𝐅r(p)subscript𝐅𝑟𝑝\mathbf{F}_{r}(p).In other words, mr𝐅^r(p)≥10csuperscript𝑚𝑟subscript^𝐅𝑟𝑝10𝑐m^{r}{\widehat{\mathbf{F}}}_{r}(p)\geq 10c and the algorithm outputs “large”.∎
|
| 36 |
+
|
| 37 |
+
The algorithm is given in the following pseudo-code:
|
| 38 |
+
|
| 39 |
+
We start by analyzing the sample complexity of the algorithm.We claim that the expected sample complexity isO(1/(ϵ4/3‖p‖3))𝑂1superscriptitalic-ϵ43subscriptnorm𝑝3O\left(1/\big{(}\epsilon^{4/3}\|p\|_{3}\big{)}\right) for ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4} andO(1/(ϵ2‖p‖2))𝑂1superscriptitalic-ϵ2subscriptnorm𝑝2O\left(1/\big{(}\epsilon^{2}\|p\|_{2}\big{)}\right) for ϵ<n−1/4italic-ϵsuperscript𝑛14\epsilon<n^{-1/4}.
|
| 40 |
+
|
| 41 |
+
By Lemma 2.2 (i),Step 4 can be implemented with expected sample complexity O(1/‖p‖2)𝑂1subscriptnorm𝑝2O(1/\|p\|_{2})and Step 7 with expected sample complexity O(1/‖p‖3)𝑂1subscriptnorm𝑝3O(1/\|p\|_{3}).
|
| 42 |
+
|
| 43 |
+
We start with the case ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4}.If Steps 4, 7, and 8 succeed,then we have that 𝐅2(p)=Θ(1/n)subscript𝐅2𝑝Θ1𝑛\mathbf{F}_{2}(p)=\Theta(1/n) and 𝐅3(p)=Θ(1/n2)subscript𝐅3𝑝Θ1superscript𝑛2\mathbf{F}_{3}(p)=\Theta(1/n^{2}). Also note that no further stepsare executed unless the condition of Step 8 holds.Note that all subsequent steps that draw samples(Steps 11, 14, and 16)by definition use at most Poi(O(m))Poi𝑂𝑚\mathop{\textnormal{Poi}}\nolimits(O(m)) additional samples.Since Step 16 is executed only if γ^3=Θ(1/n2)subscript^𝛾3Θ1superscript𝑛2{\widehat{\gamma}}_{3}=\Theta(1/n^{2}),we have that m=O(γ^3−1/3/ϵ4/3)=O(1/(ϵ4/3‖p‖3))𝑚𝑂superscriptsubscript^𝛾313superscriptitalic-ϵ43𝑂1superscriptitalic-ϵ43subscriptnorm𝑝3m=O({\widehat{\gamma}}_{3}^{-1/3}/\epsilon^{4/3})=O(1/(\epsilon^{4/3}\|p\|_{3})).Therefore, for ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4},the expected sample complexity of the algorithm is bounded byO(1/‖p‖2)+O(1/‖p‖3)+O(1/(ϵ4/3‖p‖3))=O(1/(ϵ4/3‖p‖3)).𝑂1subscriptnorm𝑝2𝑂1subscriptnorm𝑝3𝑂1superscriptitalic-ϵ43subscriptnorm𝑝3𝑂1superscriptitalic-ϵ43subscriptnorm𝑝3O\left(1/\|p\|_{2}\right)+O\left(1/\|p\|_{3}\right)+O\left(1/\big{(}\epsilon^{4/3}\|p\|_{3}\big{)}\right)=O\left(1/\big{(}\epsilon^{4/3}\|p\|_{3}\big{)}\right)\;.
|
| 44 |
+
|
| 45 |
+
For the case of n−1/4log−1(n)≤ϵ<n−1/4superscript𝑛14superscript1𝑛italic-ϵsuperscript𝑛14n^{-1/4}\log^{-1}(n)\leq\epsilon<n^{-1/4}, the additional sample size drawn on top of Step 4is O(n+n1/2/ϵ2)=O(n1/2/ϵ2)𝑂𝑛superscript𝑛12superscriptitalic-ϵ2𝑂superscript𝑛12superscriptitalic-ϵ2O(n+n^{1/2}/\epsilon^{2})=O(n^{1/2}/\epsilon^{2}). Since n=Θ(1/‖p‖22)𝑛Θ1subscriptsuperscriptnorm𝑝22n=\Theta(1/\|p\|^{2}_{2}), the total sample complexity in this case isO(1/‖p‖2)+O(1/(ϵ2‖p‖2))=O(1/(ϵ2‖p‖2)).𝑂1subscriptnorm𝑝2𝑂1superscriptitalic-ϵ2subscriptnorm𝑝2𝑂1superscriptitalic-ϵ2subscriptnorm𝑝2O\left(1/\|p\|_{2}\right)+O\left(1/\big{(}\epsilon^{2}\|p\|_{2}\big{)}\right)=O\left(1/\big{(}\epsilon^{2}\|p\|_{2}\big{)}\right)\;.Finally, for ϵ<n−1/4log−1(n)italic-ϵsuperscript𝑛14superscript1𝑛\epsilon<n^{-1/4}\log^{-1}(n), the sample size drawn on top of Step 4is O(nlogn+n1/2/ϵ2)=O(n1/2/ϵ2)𝑂𝑛𝑛superscript𝑛12superscriptitalic-ϵ2𝑂superscript𝑛12superscriptitalic-ϵ2O(n\log n+n^{1/2}/\epsilon^{2})=O(n^{1/2}/\epsilon^{2}). Since n=Θ(1/‖p‖22)𝑛Θ1subscriptsuperscriptnorm𝑝22n=\Theta(1/\|p\|^{2}_{2}), the total sample complexity in this case isO(1/(ϵ2‖p‖2))𝑂1superscriptitalic-ϵ2subscriptnorm𝑝2O\left(1/\big{(}\epsilon^{2}\|p\|_{2}\big{)}\right), as before. This completes the analysis of the sample complexity.
|
| 46 |
+
|
| 47 |
+
This section is devoted to the correctness proof of Gen-Uniformity-Test.In particular, we will show that if p∈𝒞U𝑝subscript𝒞𝑈p\in\mathcal{C}_{U}, the algorithm outputs “YES”with probability at least 2/3232/3 (completeness); and if dTV(p,𝒞U)≥ϵsubscript𝑑T𝑉𝑝subscript𝒞𝑈italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\geq\epsilon,the algorithm outputs “NO” with probability at least 2/3232/3 (soundness).
|
| 48 |
+
|
| 49 |
+
We start with the following simple claim givinga useful condition for the soundness case:
|
| 50 |
+
|
| 51 |
+
Let Shsubscript𝑆ℎS_{h} be the set of i∈𝛀𝑖𝛀i\in\mathbf{\Omega} on which pi>x/2subscript𝑝𝑖𝑥2p_{i}>x/2.Let δ=∑i∈𝛀min{pi,|x−pi|}.𝛿subscript𝑖𝛀subscript𝑝𝑖𝑥subscript𝑝𝑖\delta=\sum_{i\in\mathbf{\Omega}}\min\{p_{i},|x-p_{i}|\}.Note that δ=‖p−cx,Sh‖1𝛿subscriptnorm𝑝subscript𝑐𝑥subscript𝑆ℎ1\delta=\|p-c_{x,S_{h}}\|_{1},where cx,Shsubscript𝑐𝑥subscript𝑆ℎc_{x,S_{h}} is the pseudo-distributionthat is x𝑥x on Shsubscript𝑆ℎS_{h} on 00 elsewhere.If ‖cx,Sh‖1subscriptnormsubscript𝑐𝑥subscript𝑆ℎ1\|c_{x,S_{h}}\|_{1} were 111, cx,Shsubscript𝑐𝑥subscript𝑆ℎc_{x,S_{h}} would be the uniform distribution𝐮Shsubscript𝐮subscript𝑆ℎ\mathbf{u}_{S_{h}} and we would have δ≥ϵ𝛿italic-ϵ\delta\geq\epsilon.However, this need not be the case.That said, it is easy to see that‖𝐮Sh−cx,Sh‖1=|1−‖cx,Sh‖1|≤‖p−cx,Sh‖1=δsubscriptnormsubscript𝐮subscript𝑆ℎsubscript𝑐𝑥subscript𝑆ℎ11subscriptnormsubscript𝑐𝑥subscript𝑆ℎ1subscriptnorm𝑝subscript𝑐𝑥subscript𝑆ℎ1𝛿\|\mathbf{u}_{S_{h}}-c_{x,S_{h}}\|_{1}=|1-\|c_{x,S_{h}}\|_{1}|\leq\|p-c_{x,S_{h}}\|_{1}=\delta.Therefore, by the triangle inequality2δ≥‖p−cx,Sh‖1+‖𝐮Sh−cx,Sh‖1≥‖p−𝐮Sh‖1≥ϵ.2𝛿subscriptnorm𝑝subscript𝑐𝑥subscript𝑆ℎ1subscriptnormsubscript𝐮subscript𝑆ℎsubscript𝑐𝑥subscript𝑆ℎ1subscriptnorm𝑝subscript𝐮subscript𝑆ℎ1italic-ϵ2\delta\geq\|p-c_{x,S_{h}}\|_{1}+\|\mathbf{u}_{S_{h}}-c_{x,S_{h}}\|_{1}\geq\|p-\mathbf{u}_{S_{h}}\|_{1}\geq\epsilon\;.This completes the proof of Claim 2.3.∎
|
| 52 |
+
|
| 53 |
+
We now proceed to analyze correctness for the various ranges of ϵ.italic-ϵ\epsilon.
|
| 54 |
+
|
| 55 |
+
Case I: [ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4}].The following structural lemma provides a reformulation of generalized uniformity testingin terms of the second and third norms of the unknown distribution:
|
| 56 |
+
|
| 57 |
+
The proof of (i) is straightforward. Suppose that p=𝐮S𝑝subscript𝐮𝑆p=\mathbf{u}_{S} for some ∅≠S⊆𝛀𝑆𝛀\emptyset\neq S\subseteq\mathbf{\Omega}.It then follows that 𝐅2(p)=1/|S|subscript𝐅2𝑝1𝑆\mathbf{F}_{2}(p)=1/|S| and 𝐅3(p)=1/|S|2subscript𝐅3𝑝1superscript𝑆2\mathbf{F}_{3}(p)=1/|S|^{2}, yielding part (i) of the lemma.
|
| 58 |
+
|
| 59 |
+
We now proceed to prove part (ii).Suppose that dTV(p,𝒞U)≥ϵsubscript𝑑T𝑉𝑝subscript𝒞𝑈italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\geq\epsilon.First, it will be useful to rewrite the quantity 𝐅3(p)−𝐅22(p)subscript𝐅3𝑝superscriptsubscript𝐅22𝑝\mathbf{F}_{3}(p)-\mathbf{F}_{2}^{2}(p) as follows:𝐅3(p)−𝐅22(p)=∑i∈𝛀pi(pi−𝐅2(p))2.subscript𝐅3𝑝superscriptsubscript𝐅22𝑝subscript𝑖𝛀subscript𝑝𝑖superscriptsubscript𝑝𝑖subscript𝐅2𝑝2\mathbf{F}_{3}(p)-\mathbf{F}_{2}^{2}(p)=\sum_{i\in\mathbf{\Omega}}p_{i}(p_{i}-\mathbf{F}_{2}(p))^{2}\;.(1)Note that (1) follows from the identity pi(pi−𝐅2(p))2=pi3+pi𝐅2(p)2−2pi2𝐅2(p)subscript𝑝𝑖superscriptsubscript𝑝𝑖subscript𝐅2𝑝2superscriptsubscript𝑝𝑖3subscript𝑝𝑖subscript𝐅2superscript𝑝22superscriptsubscript𝑝𝑖2subscript𝐅2𝑝p_{i}(p_{i}-\mathbf{F}_{2}(p))^{2}=p_{i}^{3}+p_{i}\mathbf{F}_{2}(p)^{2}-2p_{i}^{2}\mathbf{F}_{2}(p)by summing over i∈𝛀𝑖𝛀i\in\mathbf{\Omega}.Since dTV(p,𝒞U)≥ϵsubscript𝑑T𝑉𝑝subscript𝒞𝑈italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\geq\epsilon, an application of Claim 2.3 for x=𝐅2(p)∈[0,1]𝑥subscript𝐅2𝑝01x=\mathbf{F}_{2}(p)\in[0,1], gives that∑i∈𝛀min{pi,|𝐅2(p)−pi|}≥ϵ/2.subscript𝑖𝛀subscript𝑝𝑖subscript𝐅2𝑝subscript𝑝𝑖italic-ϵ2\sum_{i\in\mathbf{\Omega}}\min\{p_{i},|\mathbf{F}_{2}(p)-p_{i}|\}\geq\epsilon/2\;.We partition 𝛀𝛀\mathbf{\Omega} into the sets Sl={i∈𝛀∣pi<𝐅2(p)/2}subscript𝑆𝑙conditional-set𝑖𝛀subscript𝑝𝑖subscript𝐅2𝑝2S_{l}=\{i\in\mathbf{\Omega}\mid p_{i}<\mathbf{F}_{2}(p)/2\}and its complement Sh=𝛀∖Slsubscript𝑆ℎ𝛀subscript𝑆𝑙S_{h}=\mathbf{\Omega}\setminus S_{l}. Note that∑i∈𝛀min{pi,|𝐅2(p)−pi|}=∑i∈Slpi+∑i∈Sh|𝐅2(p)−pi|.subscript𝑖𝛀subscript𝑝𝑖subscript𝐅2𝑝subscript𝑝𝑖subscript𝑖subscript𝑆𝑙subscript𝑝𝑖subscript𝑖subscript𝑆ℎsubscript𝐅2𝑝subscript𝑝𝑖\sum_{i\in\mathbf{\Omega}}\min\{p_{i},|\mathbf{F}_{2}(p)-p_{i}|\}=\sum_{i\in S_{l}}p_{i}+\sum_{i\in S_{h}}|\mathbf{F}_{2}(p)-p_{i}|\;.It follows that either ∑i∈Slpi≥ϵ/4subscript𝑖subscript𝑆𝑙subscript𝑝𝑖italic-ϵ4\sum_{i\in S_{l}}p_{i}\geq\epsilon/4or ∑i∈Sh|𝐅2(p)−pi|≥ϵ/4subscript𝑖subscript𝑆ℎsubscript𝐅2𝑝subscript𝑝𝑖italic-ϵ4\sum_{i\in S_{h}}|\mathbf{F}_{2}(p)-p_{i}|\geq\epsilon/4. We analyze each case separately.First, suppose that ∑i∈Slpi≥ϵ/4subscript𝑖subscript𝑆𝑙subscript𝑝𝑖italic-ϵ4\sum_{i\in S_{l}}p_{i}\geq\epsilon/4. Using (1) we can now write𝐅3(p)−𝐅22(p)≥∑i∈Slpi(pi−𝐅2(p))2>(𝐅2(p)/2)2⋅∑i∈Slpi=ϵ𝐅22(p)/16.subscript𝐅3𝑝superscriptsubscript𝐅22𝑝subscript𝑖subscript𝑆𝑙subscript𝑝𝑖superscriptsubscript𝑝𝑖subscript𝐅2𝑝2⋅superscriptsubscript𝐅2𝑝22subscript𝑖subscript𝑆𝑙subscript𝑝𝑖italic-ϵsubscriptsuperscript𝐅22𝑝16\mathbf{F}_{3}(p)-\mathbf{F}_{2}^{2}(p)\geq\sum_{i\in S_{l}}p_{i}(p_{i}-\mathbf{F}_{2}(p))^{2}>(\mathbf{F}_{2}(p)/2)^{2}\cdot\sum_{i\in S_{l}}p_{i}=\epsilon\mathbf{F}^{2}_{2}(p)/16\;.Now suppose that ∑i∈Sh|𝐅2(p)−pi|≥ϵ/4subscript𝑖subscript𝑆ℎsubscript𝐅2𝑝subscript𝑝𝑖italic-ϵ4\sum_{i\in S_{h}}|\mathbf{F}_{2}(p)-p_{i}|\geq\epsilon/4. Note that 1≤|Sh|≤2/|𝐅2(p)|1subscript𝑆ℎ2subscript𝐅2𝑝1\leq|S_{h}|\leq 2/|\mathbf{F}_{2}(p)|.In this case, using (1) we obtain𝐅3(p)−𝐅22(p)subscript𝐅3𝑝superscriptsubscript𝐅22𝑝\displaystyle\mathbf{F}_{3}(p)-\mathbf{F}_{2}^{2}(p)≥\displaystyle\geq∑i∈Shpi(pi−𝐅2(p))2subscript𝑖subscript𝑆ℎsubscript𝑝𝑖superscriptsubscript𝑝𝑖subscript𝐅2𝑝2\displaystyle\sum_{i\in S_{h}}p_{i}(p_{i}-\mathbf{F}_{2}(p))^{2}≥\displaystyle\geq(𝐅2(p)/2)⋅∑i∈Sh(pi−𝐅2(p))2⋅subscript𝐅2𝑝2subscript𝑖subscript𝑆ℎsuperscriptsubscript𝑝𝑖subscript𝐅2𝑝2\displaystyle(\mathbf{F}_{2}(p)/2)\cdot\sum_{i\in S_{h}}(p_{i}-\mathbf{F}_{2}(p))^{2}≥\displaystyle\geq(𝐅2(p)/2)⋅(∑i∈Sh|𝐅2(p)−pi|)2|Sh|⋅subscript𝐅2𝑝2superscriptsubscript𝑖subscript𝑆ℎsubscript𝐅2𝑝subscript𝑝𝑖2subscript𝑆ℎ\displaystyle(\mathbf{F}_{2}(p)/2)\cdot\frac{(\sum_{i\in S_{h}}|\mathbf{F}_{2}(p)-p_{i}|)^{2}}{|S_{h}|}≥\displaystyle\geq(𝐅2(p)/2)2⋅(ϵ/4)2⋅superscriptsubscript𝐅2𝑝22superscriptitalic-ϵ42\displaystyle(\mathbf{F}_{2}(p)/2)^{2}\cdot(\epsilon/4)^{2}=\displaystyle=ϵ2𝐅22(p)/64,superscriptitalic-ϵ2subscriptsuperscript𝐅22𝑝64\displaystyle\epsilon^{2}\mathbf{F}^{2}_{2}(p)/64\;,where the second inequality uses the definition of Shsubscript𝑆ℎS_{h},and the third inequality is Cauchy-Schwarz.This completes the proof of Lemma 2.4.∎
|
| 60 |
+
|
| 61 |
+
By Lemma 2.4,the proof in this case boils down to proving that our estimates for 𝐅2(p)subscript𝐅2𝑝\mathbf{F}_{2}(p)and 𝐅3(p)subscript𝐅3𝑝\mathbf{F}_{3}(p) obtained in Step 16 are sufficiently accurateto distinguish between the completeness and soundness cases.We note that since Steps (8), (12), and(15) have succeeded, with probability at least 19/20192019/20 each of the corresponding conditionsis satisfied. Specifically, this implies that the following conditions hold:𝐅2(p)=Θ(1/n)subscript𝐅2𝑝Θ1𝑛\mathbf{F}_{2}(p)=\Theta(1/n), 𝐅3(p)=Θ(1/n2)subscript𝐅3𝑝Θ1superscript𝑛2\mathbf{F}_{3}(p)=\Theta(1/n^{2}), 𝐅4(p)=O(m−4+n−3)subscript𝐅4𝑝𝑂superscript𝑚4superscript𝑛3\mathbf{F}_{4}(p)=O(m^{-4}+n^{-3}), and𝐅5(p)=O(m−5+n−4)subscript𝐅5𝑝𝑂superscript𝑚5superscript𝑛4\mathbf{F}_{5}(p)=O(m^{-5}+n^{-4}).
|
| 62 |
+
|
| 63 |
+
We henceforth condition on this event. The following lemma shows that our approximations to the secondand third moments are appropriately accurate:
|
| 64 |
+
|
| 65 |
+
The lemma follows using Fact 2.1 and an application of Chebyshev’s inequality,crucially exploiting the improved variance bounds that hold when the aboveconditions are satisfied.
|
| 66 |
+
|
| 67 |
+
To prove part (i), note that 𝐕𝐚𝐫[𝐅^2(p)]=O(m−2𝐅2(p)+m−1𝐅3(p))𝐕𝐚𝐫delimited-[]subscript^𝐅2𝑝𝑂superscript𝑚2subscript𝐅2𝑝superscript𝑚1subscript𝐅3𝑝\mathbf{Var}[{\widehat{\mathbf{F}}}_{2}(p)]=O\left(m^{-2}\mathbf{F}_{2}(p)+m^{-1}\mathbf{F}_{3}(p)\right).We use that 𝐅3(p)=Θ(1/n2)=Θ(𝐅22(p))subscript𝐅3𝑝Θ1superscript𝑛2Θsubscriptsuperscript𝐅22𝑝\mathbf{F}_{3}(p)=\Theta(1/n^{2})=\Theta(\mathbf{F}^{2}_{2}(p)),where the second inequality uses the fact that 1/n=Θ(𝐅2(p))1𝑛Θsubscript𝐅2𝑝1/n=\Theta(\mathbf{F}_{2}(p))(as follows from Steps 4 and 5 of the algorithm).Now recall that the sample size m𝑚m is defined to be Θ(n2/3/ϵ4/3)Θsuperscript𝑛23superscriptitalic-ϵ43\Theta(n^{2/3}/\epsilon^{4/3}), for a sufficientlylarge universal constant in the big-ΘΘ\Theta.We can therefore bound the variance 𝐕𝐚𝐫[𝐅^2(p)]𝐕𝐚𝐫delimited-[]subscript^𝐅2𝑝\mathbf{Var}[{\widehat{\mathbf{F}}}_{2}(p)] from above byO(m−2n−1+m−1n−2)=O(ϵ8/3n−7/3+ϵ4/3n−8/3)=O(ϵ4/n2),𝑂superscript𝑚2superscript𝑛1superscript𝑚1superscript𝑛2𝑂superscriptitalic-ϵ83superscript𝑛73superscriptitalic-ϵ43superscript𝑛83𝑂superscriptitalic-ϵ4superscript𝑛2O\left(m^{-2}n^{-1}+m^{-1}n^{-2}\right)=O\left(\epsilon^{8/3}n^{-7/3}+\epsilon^{4/3}n^{-8/3}\right)=O(\epsilon^{4}/n^{2})\;,where we used the assumption that ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4}. By Chebyshev’s inequality, we therefore get that|𝐅2^(p)−𝐅2(p)|≤O(ϵ2/n),^subscript𝐅2𝑝subscript𝐅2𝑝𝑂superscriptitalic-ϵ2𝑛|{\widehat{\mathbf{F}_{2}}}(p)-\mathbf{F}_{2}(p)|\leq O(\epsilon^{2}/n)\;,(2)with probability at least 19/20192019/20. By selecting the constant factorin the definition of m𝑚m appropriately, we can make the RHS in (2)at most c⋅ϵ2𝐅2(p)⋅𝑐superscriptitalic-ϵ2subscript𝐅2𝑝c\cdot\epsilon^{2}\mathbf{F}_{2}(p), as desired.
|
| 68 |
+
|
| 69 |
+
Part (ii) is proved similarly. We have that𝐕𝐚𝐫[𝐅^3(p)]=O(m−3𝐅3(p)+m−2𝐅4(p)+m−1𝐅5(p))𝐕𝐚𝐫delimited-[]subscript^𝐅3𝑝𝑂superscript𝑚3subscript𝐅3𝑝superscript𝑚2subscript𝐅4𝑝superscript𝑚1subscript𝐅5𝑝\mathbf{Var}[{\widehat{\mathbf{F}}}_{3}(p)]=O\left(m^{-3}\mathbf{F}_{3}(p)+m^{-2}\mathbf{F}_{4}(p)+m^{-1}\mathbf{F}_{5}(p)\right).We use that 𝐅3(p)=Θ(1/n2)subscript𝐅3𝑝Θ1superscript𝑛2\mathbf{F}_{3}(p)=\Theta(1/n^{2}),𝐅4(p)=O(m−4+n−3)subscript𝐅4𝑝𝑂superscript𝑚4superscript𝑛3\mathbf{F}_{4}(p)=O(m^{-4}+n^{-3}), and 𝐅5(p)=O(m−5+n−4)subscript𝐅5𝑝𝑂superscript𝑚5superscript𝑛4\mathbf{F}_{5}(p)=O(m^{-5}+n^{-4}).Recalling that the sample size m𝑚m is defined to be Θ(n2/3/ϵ4/3)Θsuperscript𝑛23superscriptitalic-ϵ43\Theta(n^{2/3}/\epsilon^{4/3}),we can bound the variance 𝐕𝐚𝐫[𝐅^3(p)]𝐕𝐚𝐫delimited-[]subscript^𝐅3𝑝\mathbf{Var}[{\widehat{\mathbf{F}}}_{3}(p)] from above byO(m−3n−2+m−6+m−2n−3+m−1n−4)=O(ϵ4/n4),𝑂superscript𝑚3superscript𝑛2superscript𝑚6superscript𝑚2superscript𝑛3superscript𝑚1superscript𝑛4𝑂superscriptitalic-ϵ4superscript𝑛4O\left(m^{-3}n^{-2}+m^{-6}+m^{-2}n^{-3}+m^{-1}n^{-4}\right)=O\left(\epsilon^{4}/n^{4}\right)\;,where we used the assumption that m=Θ(n2/3/ϵ4/3)𝑚Θsuperscript𝑛23superscriptitalic-ϵ43m=\Theta(n^{2/3}/\epsilon^{4/3}) and ϵ≥n−1/4italic-ϵsuperscript𝑛14\epsilon\geq n^{-1/4}.By Chebyshev’s inequality, we therefore get that|𝐅3^(p)−𝐅3(p)|≤O(ϵ2/n2),^subscript𝐅3𝑝subscript𝐅3𝑝𝑂superscriptitalic-ϵ2superscript𝑛2|{\widehat{\mathbf{F}_{3}}}(p)-\mathbf{F}_{3}(p)|\leq O(\epsilon^{2}/n^{2})\;,(3)with probability at least 19/20192019/20. By selecting the constant in the big-ΘΘ\Thetadefining m𝑚m appropriately, it is clear that we can make the RHS in (3)at most c⋅ϵ2𝐅22(p)⋅𝑐superscriptitalic-ϵ2superscriptsubscript𝐅22𝑝c\cdot\epsilon^{2}\mathbf{F}_{2}^{2}(p), as desired.This completes the proof of Lemma 2.5.∎
|
| 70 |
+
|
| 71 |
+
We now have all the necessary ingredients to establish completeness and soundness in Case I.If p∈𝒞U𝑝subscript𝒞𝑈p\in\mathcal{C}_{U}, it is easy to see that Steps (8), (12), and(15) succeed with high constant probability, as follows from the factthat the norms are minimal in this case and Lemma 2.2. Moreover, if the algorithmdoes not reject in any of these steps, the corresponding conditions on the magnitude of thesenorms are satisfied. If the conditions of Lemma 2.5 hold, then we have that|(𝐅3(p)−𝐅22(p))−(𝐅^3(p)−𝐅^2(p)2)|≤c⋅ϵ2𝐅22(p).subscript𝐅3𝑝superscriptsubscript𝐅22𝑝subscript^𝐅3𝑝subscript^𝐅2superscript𝑝2⋅𝑐superscriptitalic-ϵ2subscriptsuperscript𝐅22𝑝\left|\left(\mathbf{F}_{3}(p)-\mathbf{F}_{2}^{2}(p)\right)-\left({\widehat{\mathbf{F}}}_{3}(p)-{\widehat{\mathbf{F}}}_{2}(p)^{2}\right)\right|\leq c\cdot\epsilon^{2}\mathbf{F}^{2}_{2}(p)\;.Therefore, the algorithm correctly distinguishes between the completenessand soundness cases, via Lemma 2.4.This completes the correctness analysis of Case I.
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
Case II: [n−1/4log−1(n)≤ϵ<n−1/4superscript𝑛14superscript1𝑛italic-ϵsuperscript𝑛14n^{-1/4}\log^{-1}(n)\leq\epsilon<n^{-1/4}].The correctness in the completeness case is straightforward.If p∈𝒞U𝑝subscript𝒞𝑈p\in\mathcal{C}_{U}, it is easy to see that Conditions 22 and 23will be satisfied with high constant probability.Moreover, the conditional distribution (p|S)conditional𝑝𝑆(p|S) equals 𝐮Ssubscript𝐮𝑆\mathbf{u}_{S},and therefore the overall algorithm outputs “YES” with high constant probability.
|
| 76 |
+
|
| 77 |
+
The correctness of the soundness case is more involved.Suppose that dTV(p,𝒞U)≥ϵsubscript𝑑T𝑉𝑝subscript𝒞𝑈italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\geq\epsilon.If the algorithm does not output “NO” in Step 24, the following conditions hold with high probability:(a) |S|≥n/2𝑆𝑛2|S|\geq n/2, (b) p(S)≥1/2𝑝𝑆12p(S)\geq 1/2, and (c) pi=O(logn/n)subscript𝑝𝑖𝑂𝑛𝑛p_{i}=O(\log n/n) for all i∈𝛀𝑖𝛀i\in\mathbf{\Omega}.We will use these statements to prove the following lemma:
|
| 78 |
+
|
| 79 |
+
Suppose that dTV(p,𝒞U)≥ϵsubscript𝑑T𝑉𝑝subscript𝒞𝑈italic-ϵd_{\mathrm{T}V}(p,\mathcal{C}_{U})\geq\epsilon. We want to show that with high probability over the samples it holds∑i∈S|pi−p(S)/|S||=Ω(ϵ)subscript𝑖𝑆subscript𝑝𝑖𝑝𝑆𝑆Ωitalic-ϵ\sum_{i\in S}\left|p_{i}-p(S)/|S|\right|=\Omega(\epsilon).The main difficulty is that the value of p(S)𝑝𝑆p(S) is unknown, hencewe need a somewhat indirect argument.By Claim 2.3, for all x∈[0,1]𝑥01x\in[0,1] we have that∑i∈𝛀min{pi,|pi−x|}≥ϵ/2.subscript𝑖𝛀subscript𝑝𝑖subscript𝑝𝑖𝑥italic-ϵ2\sum_{i\in\mathbf{\Omega}}\min\{p_{i},|p_{i}-x|\}\geq\epsilon/2\;.(4)To show that ∑i∈S|pi−p(S)/|S||=Ω(ϵ)subscript𝑖𝑆subscript𝑝𝑖𝑝𝑆𝑆Ωitalic-ϵ\sum_{i\in S}\left|p_{i}-p(S)/|S|\right|=\Omega(\epsilon),it suffices to prove that the following holds:
|
| 80 |
+
|
| 81 |
+
First note that for x>4/n𝑥4𝑛x>4/n or x<1/(4n)𝑥14𝑛x<1/(4n), the above claim is satisfied automatically.Indeed, for x>4/n𝑥4𝑛x>4/n, we have ∑i∈S|pi−x|≥|S|⋅x−p(S)≥(n/2)x−1≥1subscript𝑖𝑆subscript𝑝𝑖𝑥⋅𝑆𝑥𝑝𝑆𝑛2𝑥11\sum_{i\in S}|p_{i}-x|\geq|S|\cdot x-p(S)\geq(n/2)x-1\geq 1.For x<1/(4n)𝑥14𝑛x<1/(4n), we have ∑i∈S|pi−x|≥p(S)−|S|⋅x≥1/2−nx≥1/4subscript𝑖𝑆subscript𝑝𝑖𝑥𝑝𝑆⋅𝑆𝑥12𝑛𝑥14\sum_{i\in S}|p_{i}-x|\geq p(S)-|S|\cdot x\geq 1/2-nx\geq 1/4.
|
| 82 |
+
|
| 83 |
+
We henceforth focus on the setting where 1/(4n)≤x≤4/n14𝑛𝑥4𝑛1/(4n)\leq x\leq 4/n.Here we show that 𝐄[Z(x)]𝐄delimited-[]𝑍𝑥\mathbf{E}[Z(x)] is large and that Z𝑍Z is tightly concentrated around its expectation.
|
| 84 |
+
|
| 85 |
+
Let Zisubscript𝑍𝑖Z_{i}, i∈𝛀𝑖𝛀i\in\mathbf{\Omega}, be the indicatorof the event i∈S𝑖𝑆i\in S. Then, Z(x)=∑i∈𝛀|pi−x|Zi𝑍𝑥subscript𝑖𝛀subscript𝑝𝑖𝑥subscript𝑍𝑖Z(x)=\sum_{i\in\mathbf{\Omega}}|p_{i}-x|Z_{i}. Note that Zisubscript𝑍𝑖Z_{i} is a Bernoulli random variablewith 𝐄[Zi]=1−e−pin𝐄delimited-[]subscript𝑍𝑖1superscript𝑒subscript𝑝𝑖𝑛\mathbf{E}[Z_{i}]=1-e^{-p_{i}n} and that the Zisubscript𝑍𝑖Z_{i}’s are mutually independent.Note that𝐄[Z(x)]=∑i∈𝛀(1−e−pin)|pi−x|𝐄delimited-[]𝑍𝑥subscript𝑖𝛀1superscript𝑒subscript𝑝𝑖𝑛subscript𝑝𝑖𝑥\mathbf{E}[Z(x)]=\sum_{i\in\mathbf{\Omega}}(1-e^{-p_{i}n})|p_{i}-x|.We recall the following concentration inequality for sums of non-negative random variables(see, e.g., Exercise 2.9 in [BLM13]):
|
| 86 |
+
|
| 87 |
+
Since Z(x)=∑i∈𝛀|pi−x|Zi𝑍𝑥subscript𝑖𝛀subscript𝑝𝑖𝑥subscript𝑍𝑖Z(x)=\sum_{i\in\mathbf{\Omega}}|p_{i}-x|Z_{i} where the Zisubscript𝑍𝑖Z_{i}’s are independent Bernoulli random variableswith 𝐄[Zi2]=1−e−pin𝐄delimited-[]superscriptsubscript𝑍𝑖21superscript𝑒subscript𝑝𝑖𝑛\mathbf{E}[Z_{i}^{2}]=1-e^{-p_{i}n},an application of Fact 2.8 yields thatPr[Z(x)≤𝐄[Z(x)]−t]≤exp(−t22∑i∈𝛀(1−e−pin)(pi−x)2.)\Pr\left[Z(x)\leq\mathbf{E}[Z(x)]-t\right]\leq\exp\left(\frac{-t^{2}}{2\mathop{\textstyle\sum}_{i\in\mathbf{\Omega}}(1-e^{-p_{i}n})(p_{i}-x)^{2}}\;.\right)(5)Let Sl={i∈𝛀:pi≤x/2}subscript𝑆𝑙conditional-set𝑖𝛀subscript𝑝𝑖𝑥2S_{l}=\{i\in\mathbf{\Omega}:p_{i}\leq x/2\} and Sh=𝛀∖Slsubscript𝑆ℎ𝛀subscript𝑆𝑙S_{h}=\mathbf{\Omega}\setminus S_{l}.By (4), we get that∑i∈Slpi+∑i∈Sh|x−pi|≥ϵ/2.subscript𝑖subscript𝑆𝑙subscript𝑝𝑖subscript𝑖subscript𝑆ℎ𝑥subscript𝑝𝑖italic-ϵ2\sum_{i\in S_{l}}p_{i}+\sum_{i\in S_{h}}|x-p_{i}|\geq\epsilon/2\;.For i∈Sl𝑖subscript𝑆𝑙i\in S_{l}, we have that (1−e−pin)|pi−x|≥n⋅pi⋅|x/2|=Ω(pi)1superscript𝑒subscript𝑝𝑖𝑛subscript𝑝𝑖𝑥⋅𝑛subscript𝑝𝑖𝑥2Ωsubscript𝑝𝑖(1-e^{-p_{i}n})|p_{i}-x|\geq n\cdot p_{i}\cdot|x/2|=\Omega(p_{i}).For i∈Sh𝑖subscript𝑆ℎi\in S_{h}, we have that (1−e−pin)=Ω(1)1superscript𝑒subscript𝑝𝑖𝑛Ω1(1-e^{-p_{i}n})=\Omega(1) and therefore(1−e−pin)|pi−x|=Ω(1)|pi−x|.1superscript𝑒subscript𝑝𝑖𝑛subscript𝑝𝑖𝑥Ω1subscript𝑝𝑖𝑥(1-e^{-p_{i}n})|p_{i}-x|=\Omega(1)|p_{i}-x|. We therefore get that𝐄[Z(x)]=Ω(ϵ)𝐄delimited-[]𝑍𝑥Ωitalic-ϵ\mathbf{E}[Z(x)]=\Omega(\epsilon).We now bound ∑i∈𝛀(1−e−pin)(pi−x)2subscript𝑖𝛀1superscript𝑒subscript𝑝𝑖𝑛superscriptsubscript𝑝𝑖𝑥2\mathop{\textstyle\sum}_{i\in\mathbf{\Omega}}(1-e^{-p_{i}n})(p_{i}-x)^{2} from aboveusing the fact that pi≤logn/nsubscript𝑝𝑖𝑛𝑛p_{i}\leq\log n/n, for all i∈Ω𝑖Ωi\in\Omega.This assumption and the range of x𝑥x imply that∑i∈𝛀(1−e−pin)(pi−x)2≤O(logn/n)⋅𝐄[Z].subscript𝑖𝛀1superscript𝑒subscript𝑝𝑖𝑛superscriptsubscript𝑝𝑖𝑥2⋅𝑂𝑛𝑛𝐄delimited-[]𝑍\mathop{\textstyle\sum}_{i\in\mathbf{\Omega}}(1-e^{-p_{i}n})(p_{i}-x)^{2}\leq O(\log n/n)\cdot\mathbf{E}[Z]\;.So, by setting t=𝐄[Z]/2𝑡𝐄delimited-[]𝑍2t=\mathbf{E}[Z]/2 in (5), we get thatPr[Z(x)≤𝐄[Z(x)]/2]≤exp(−Ω(ϵn/logn))=exp(−nΩ(1)),Pr𝑍𝑥𝐄delimited-[]𝑍𝑥2Ωitalic-ϵ𝑛𝑛superscript𝑛Ω1\Pr[Z(x)\leq\mathbf{E}[Z(x)]/2]\leq\exp\left(-\Omega(\epsilon n/\log n)\right)=\exp\left(-n^{\Omega(1)}\right)\;,where the last inequality follows from the range of ϵitalic-ϵ\epsilon.Recalling that x𝑥x lies in a grid of size O(n/ϵ)𝑂𝑛italic-ϵO(n/\epsilon), Claim 2.7 follows by a union bound.This completes the analysis of Case II.
|
| 88 |
+
|
| 89 |
+
Case III: [ϵ<n−1/4log−1(n)italic-ϵsuperscript𝑛14superscript1𝑛\epsilon<n^{-1/4}\log^{-1}(n)].The correctness in this case is quite simple.In the completeness case, conditioning on Step 4 succeeding,we know that p𝑝p is uniform over a domain of size O(n)𝑂𝑛O(n). Therefore, after Θ(nlogn)Θ𝑛𝑛\Theta(n\log n) samples,we have seen all the elements of the domain with high probability, i.e., the set S𝑆Shas p(S)=1𝑝𝑆1p(S)=1. Therefore, the conditional distribution p|Sconditional𝑝𝑆p|S is identifiedwith p𝑝p, and the final tester outputs “YES”.On the other hand, if p𝑝p is ϵitalic-ϵ\epsilon-far from uniform. and the algorithm does not reject in Step 32,then it follows that p(S)≥1−O(ϵ/n1/4)>1−ϵ/10𝑝𝑆1𝑂italic-ϵsuperscript𝑛141italic-ϵ10p(S)\geq 1-O(\epsilon/n^{1/4})>1-\epsilon/10.Therefore, p|Sconditional𝑝𝑆p|S should be at least ϵ/2italic-ϵ2\epsilon/2-far from 𝐮Ssubscript𝐮𝑆\mathbf{u}_{S} andthe tester will output “NO.” This completes the proof of correctness.∎
|
| 90 |
+
|
| 91 |
+
In this section, we prove a sample size lower bound matching our algorithm Gen-Uniformity-Test.One part of the lower bound is fairly easy. In particular, it is known [Pan08]that Ω(n/ϵ2)Ω𝑛superscriptitalic-ϵ2\Omega(\sqrt{n}/\epsilon^{2}) samples are required to test uniformity of a distribution with a known support of size n𝑛n.It is easy to see that the hard cases for this lower bound still work when ‖p‖2=Θ(n−1/2)subscriptnorm𝑝2Θsuperscript𝑛12\|p\|_{2}=\Theta(n^{-1/2}).
|
| 92 |
+
|
| 93 |
+
The other half of the lower bound is somewhat more difficult and we rely on the lower bound techniques of [DK16].In particular, for n>0,𝑛0n>0, and 1/10>ϵ>n−1/4110italic-ϵsuperscript𝑛141/10>\epsilon>n^{-1/4} and for N𝑁N sufficiently large, we produce a pair of distributions𝒟𝒟\mathcal{D} and 𝒟′superscript𝒟′\mathcal{D^{\prime}} over positive measures on [N]delimited-[]𝑁[N], so that:1.A random sample from 𝒟𝒟\mathcal{D} or 𝒟′superscript𝒟′\mathcal{D^{\prime}} has total mass Θ(1)Θ1\Theta(1) with high probability.2.A random sample from 𝒟𝒟\mathcal{D} or 𝒟′superscript𝒟′\mathcal{D^{\prime}} has support of size Θ(n)Θ𝑛\Theta(n) with high probability.3.A sample from μ∈𝒟𝜇𝒟\mu\in\mathcal{D} has μ/‖μ‖1𝜇subscriptnorm𝜇1\mu/\|\mu\|_{1} be the uniform distribution over some subsetof [N]delimited-[]𝑁[N] with probability 111.4.A sample from μ∈𝒟′𝜇superscript𝒟′\mu\in\mathcal{D^{\prime}} has μ/||μ∥1\mu/||\mu\|_{1}be at least Ω(ϵ)Ωitalic-ϵ\Omega(\epsilon)-far from any uniform distribution with high probability.5.Given a measure μ𝜇\mu taking randomly from either 𝒟𝒟\mathcal{D} or 𝒟′superscript𝒟′\mathcal{D^{\prime}},no algorithm given the output of a Poisson process with intensity kμ𝑘𝜇k\mu for k=o(min(n2/3/ϵ4/3,n))𝑘𝑜superscript𝑛23superscriptitalic-ϵ43𝑛k=o(\min(n^{2/3}/\epsilon^{4/3},n))can reliably distinguish between a μ𝜇\mu taken from 𝒟𝒟\mathcal{D} and μ𝜇\mu taken from 𝒟′superscript𝒟′\mathcal{D^{\prime}}.
|
| 94 |
+
|
| 95 |
+
Before we exhibit these families, we first discuss why the above is sufficient.This Poissonization technique has been used previously in various settings [VV14, DK16, WY16, DGPP17],so we only provide a sketch here.In particular, suppose that we have such families 𝒟𝒟\mathcal{D} and 𝒟′superscript𝒟′\mathcal{D^{\prime}},but that there is also an algorithm A𝐴A that distinguishes between a distribution p𝑝p being uniformand being ϵitalic-ϵ\epsilon-far from uniform in m=o(ϵ−4/3/‖p‖3)𝑚𝑜superscriptitalic-ϵ43subscriptnorm𝑝3m=o(\epsilon^{-4/3}/\|p\|_{3}) samples. We show that we can use algorithm A𝐴Ato violate property 5 above. In particular, letting p=μ/‖μ‖1𝑝𝜇subscriptnorm𝜇1p=\mu/\|\mu\|_{1} for μ𝜇\mu a random measure takenfrom either 𝒟𝒟\mathcal{D} or 𝒟′superscript𝒟′\mathcal{D^{\prime}}, we note that with high probability p𝑝p has support of size Θ(n)Θ𝑛\Theta(n),and thus ‖p‖3=O(n−2/3).subscriptnorm𝑝3𝑂superscript𝑛23\|p\|_{3}=O(n^{-2/3}). Therefore, m′=o(n2/3/ϵ4/3)superscript𝑚′𝑜superscript𝑛23superscriptitalic-ϵ43m^{\prime}=o(n^{2/3}/\epsilon^{4/3}) samples are sufficient to distinguishbetween p𝑝p being uniform and being Ω(ϵ)Ωitalic-ϵ\Omega(\epsilon) far from uniform. However, by properties 3and 4,this is equivalent to distinguish between μ𝜇\mu being taken from 𝒟𝒟\mathcal{D} and being taken from 𝒟′superscript𝒟′\mathcal{D^{\prime}}.On the other hand, given the output of a Poisson process with intensity Cm′μ𝐶superscript𝑚′𝜇Cm^{\prime}\mu,for C𝐶C a sufficiently large constant, a random m′superscript𝑚′m^{\prime} of these samples (note that there are at least m′superscript𝑚′m^{\prime} total samples with high probability)are distributed identically to m′superscript𝑚′m^{\prime} samples from p𝑝p. Thus, applying A𝐴A to these samples distinguishes betweenμ𝜇\mu taken from 𝒟𝒟\mathcal{D} and μ𝜇\mu taken from 𝒟′superscript𝒟′\mathcal{D^{\prime}}, thus contradicting property 5.
|
| 96 |
+
|
| 97 |
+
We now exhibit the families 𝒟𝒟\mathcal{D} and 𝒟′superscript𝒟′\mathcal{D^{\prime}}.In both cases, we want to arrange μi:=μ({i})assignsubscript𝜇𝑖𝜇𝑖\mu_{i}:=\mu(\{i\}) to be i.i.d. for different i𝑖i.We also want it to be the case that the first and second moments of μisubscript𝜇𝑖\mu_{i}are the same for 𝒟𝒟\mathcal{D} and 𝒟′superscript𝒟′\mathcal{D^{\prime}}.Combining this with requirements on closeness to uniform, we are led to the following definitions:
|
| 98 |
+
|
| 99 |
+
For μ𝜇\mu taken from 𝒟′superscript𝒟′\mathcal{D^{\prime}}, we letμi={1+ϵn, with probability n2N1−ϵn, with probability n2N0, otherwise .subscript𝜇𝑖cases1italic-ϵ𝑛, with probability 𝑛2𝑁1italic-ϵ𝑛, with probability 𝑛2𝑁0, otherwise .\mu_{i}=\begin{cases}\frac{1+\epsilon}{n}&\textrm{, with probability }\frac{n}{2N}\\\frac{1-\epsilon}{n}&\textrm{, with probability }\frac{n}{2N}\\0&\textrm{, otherwise\;.}\end{cases}For μ𝜇\mu taken from 𝒟𝒟\mathcal{D}, we letμi={1+ϵ2n, with probability nN(1+ϵ2)0, otherwise .subscript𝜇𝑖cases1superscriptitalic-ϵ2𝑛, with probability 𝑛𝑁1superscriptitalic-ϵ20, otherwise .\mu_{i}=\begin{cases}\frac{1+\epsilon^{2}}{n}&\textrm{, with probability }\frac{n}{N(1+\epsilon^{2})}\\0&\textrm{, otherwise\;.}\end{cases}
|
| 100 |
+
|
| 101 |
+
Note that in both cases, the average total mass is 111,and it is easy to see by Chernoff bounds that the actual mass of μ𝜇\mu is Θ(1)Θ1\Theta(1) with high probability.Additionally, the support size is always Θ(n)Θ𝑛\Theta(n) times the total mass, and so is Θ(n)Θ𝑛\Theta(n) with high probability.For μ𝜇\mu taken from 𝒟𝒟\mathcal{D}, all of the μisubscript𝜇𝑖\mu_{i} are either 00 or 1+ϵ2n1superscriptitalic-ϵ2𝑛\frac{1+\epsilon^{2}}{n},and thus μ/‖μ‖1𝜇subscriptnorm𝜇1\mu/\|\mu\|_{1} is uniform over its support. For μ𝜇\mu taken from 𝒟′superscript𝒟′\mathcal{D^{\prime}},with high probability at least a third of the bins in its support have μi=1+ϵnsubscript𝜇𝑖1italic-ϵ𝑛\mu_{i}=\frac{1+\epsilon}{n},and at least a third have μi=1−ϵnsubscript𝜇𝑖1italic-ϵ𝑛\mu_{i}=\frac{1-\epsilon}{n}. If this is the case, then at least a constant fraction of the massof μ/‖μ‖1𝜇subscriptnorm𝜇1\mu/\|\mu\|_{1} comes from bins with mass off from the average mass by at least a (1±ϵ)plus-or-minus1italic-ϵ(1\pm\epsilon) factor,and this implies that μ/‖μ‖1𝜇subscriptnorm𝜇1\mu/\|\mu\|_{1} is at least Ω(ϵ)Ωitalic-ϵ\Omega(\epsilon)-far from uniform.
|
| 102 |
+
|
| 103 |
+
We have thus verified 1-4. Property 5 will be somewhat more difficult to prove.For this, let X𝑋X be a random {0,1}01\{0,1\} random variable with equal probabilities.Let μ𝜇\mu be chosen randomly from 𝒟𝒟\mathcal{D} if X=0𝑋0X=0,and randomly from 𝒟′superscript𝒟′\mathcal{D^{\prime}} if X=1𝑋1X=1.Let our Poisson process with intensity kμ𝑘𝜇k\mu return Aisubscript𝐴𝑖A_{i} samples from bin i𝑖i.We note that, by the same arguments as in [DK16],it suffices to show that the shared information I(X;A1,…,AN)=o(1).𝐼𝑋subscript𝐴1…subscript𝐴𝑁𝑜1I(X;A_{1},\ldots,A_{N})=o(1).In order to prove this, we note that the Aisubscript𝐴𝑖A_{i} are conditionally independent on X𝑋X,and thus we have that I(X;A1,…,AN)≤∑i=1NI(X;Ai)=NI(X;A1)𝐼𝑋subscript𝐴1…subscript𝐴𝑁superscriptsubscript𝑖1𝑁𝐼𝑋subscript𝐴𝑖𝑁𝐼𝑋subscript𝐴1I(X;A_{1},\ldots,A_{N})\leq\sum_{i=1}^{N}I(X;A_{i})=NI(X;A_{1}).Thus, we need to show that I(X;A1)=o(1/N)𝐼𝑋subscript𝐴1𝑜1𝑁I(X;A_{1})=o(1/N).For notational simplicity, we drop the subscript in A1subscript𝐴1A_{1}.
|
| 104 |
+
|
| 105 |
+
This boils down to an elementary but tedious calculation.We begin by noting that we can boundI(X;A)=∑t=0∞O((Pr(A=t|X=0)−Pr(A=t|X=1))2Pr(A=t)).𝐼𝑋𝐴superscriptsubscript𝑡0𝑂superscriptPr𝐴conditional𝑡𝑋0Pr𝐴conditional𝑡𝑋12Pr𝐴𝑡I(X;A)=\sum_{t=0}^{\infty}O\left(\frac{(\Pr(A=t|X=0)-\Pr(A=t|X=1))^{2}}{\Pr(A=t)}\right)\;.(This calculation is standard. See Fact 81 in [CDKS17] for a proof.)We seek to bound each of these terms.The distribution of A𝐴A conditioned on μ1subscript𝜇1\mu_{1} is Poisson with parameter kμ1𝑘subscript𝜇1k\mu_{1}.Thus, the distribution of A𝐴A conditioned on X𝑋X is a mixture of two or three Poisson distributions,one of which is the trivial constant 00. We start by giving explicit expressions for these probabilities.
|
| 106 |
+
|
| 107 |
+
Firstly, for the t=0𝑡0t=0 term, note thatPr(A=t|X=1)=1−nN(1−e−k(1+ϵ)/n+e−k(1−ϵ)/n2),Pr𝐴conditional𝑡𝑋11𝑛𝑁1superscript𝑒𝑘1italic-ϵ𝑛superscript𝑒𝑘1italic-ϵ𝑛2\Pr(A=t|X=1)=1-\frac{n}{N}\left(1-\frac{e^{-k(1+\epsilon)/n}+e^{-k(1-\epsilon)/n}}{2}\right)\;,Pr(A=t|X=0)=1−nN(1+ϵ2)(1−e−k(1+ϵ2)/n).Pr𝐴conditional𝑡𝑋01𝑛𝑁1superscriptitalic-ϵ21superscript𝑒𝑘1superscriptitalic-ϵ2𝑛\Pr(A=t|X=0)=1-\frac{n}{N(1+\epsilon^{2})}(1-e^{-k(1+\epsilon^{2})/n})\;.Note that Pr(A=0)Pr𝐴0\Pr(A=0) is at least 1−n/N≥1/21𝑛𝑁121-n/N\geq 1/2 and Pr(A=t|X=1)−Pr(A=t|X=0)≤n/NPr𝐴conditional𝑡𝑋1Pr𝐴conditional𝑡𝑋0𝑛𝑁\Pr(A=t|X=1)-\Pr(A=t|X=0)\leq n/N.Thus, the contribution from this term, (Pr(A=0|X=0)−Pr(A=0|X=1))2Pr(A=0)superscriptPr𝐴conditional0𝑋0Pr𝐴conditional0𝑋12Pr𝐴0\frac{(\Pr(A=0|X=0)-\Pr(A=0|X=1))^{2}}{\Pr(A=0)},is O(n/N)2=o(1/N)𝑂superscript𝑛𝑁2𝑜1𝑁O(n/N)^{2}=o(1/N).
|
| 108 |
+
|
| 109 |
+
For t≥1𝑡1t\geq 1, there is no contribution from μ1=0subscript𝜇10\mu_{1}=0.We can compute the probabilities involved exactly asPr(A=t|X=1)=nN(k(1+ϵ)/n)te−k(1+ϵ)/n+(k(1−ϵ)/n)te−k(1−ϵ)/n2t!,Pr𝐴conditional𝑡𝑋1𝑛𝑁superscript𝑘1italic-ϵ𝑛𝑡superscript𝑒𝑘1italic-ϵ𝑛superscript𝑘1italic-ϵ𝑛𝑡superscript𝑒𝑘1italic-ϵ𝑛2𝑡\Pr(A=t|X=1)=\frac{n}{N}\frac{(k(1+\epsilon)/n)^{t}e^{-k(1+\epsilon)/n}+(k(1-\epsilon)/n)^{t}e^{-k(1-\epsilon)/n}}{2t!}\;,Pr(A=t|X=0)=nN(1+ϵ2)(k(1+ϵ2)/n)te−k(1+ϵ2)/nt!,Pr𝐴conditional𝑡𝑋0𝑛𝑁1superscriptitalic-ϵ2superscript𝑘1superscriptitalic-ϵ2𝑛𝑡superscript𝑒𝑘1superscriptitalic-ϵ2𝑛𝑡\Pr(A=t|X=0)=\frac{n}{N(1+\epsilon^{2})}\frac{(k(1+\epsilon^{2})/n)^{t}e^{-k(1+\epsilon^{2})/n}}{t!}\;,and obtain that (Pr(A=t|X=0)−Pr(A=t|X=1))2Pr(A=t)superscriptPr𝐴conditional𝑡𝑋0Pr𝐴conditional𝑡𝑋12Pr𝐴𝑡\frac{(\Pr(A=t|X=0)-\Pr(A=t|X=1))^{2}}{\Pr(A=t)} isO((n1−tkt2Nt!)((1+ϵ)te−k(1+ϵ)/n+(1−ϵ)te−k(1−ϵ)/n−2(1+ϵ2)t−1e−k(1+ϵ2)/n)2(1+ϵ)te−k(1+ϵ)/n+(1−ϵ)te−k(1−ϵ)/n+2(1+ϵ2)t−1e−k(1+ϵ2)/n).𝑂superscript𝑛1𝑡superscript𝑘𝑡2𝑁𝑡superscriptsuperscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛superscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛2superscript1superscriptitalic-ϵ2𝑡1superscript𝑒𝑘1superscriptitalic-ϵ2𝑛2superscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛superscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛2superscript1superscriptitalic-ϵ2𝑡1superscript𝑒𝑘1superscriptitalic-ϵ2𝑛O\left(\left(\frac{n^{1-t}k^{t}}{2Nt!}\right)\frac{\left((1+\epsilon)^{t}e^{-k(1+\epsilon)/n}+(1-\epsilon)^{t}e^{-k(1-\epsilon)/n}-2(1+\epsilon^{2})^{t-1}e^{-k(1+\epsilon^{2})/n}\right)^{2}}{(1+\epsilon)^{t}e^{-k(1+\epsilon)/n}+(1-\epsilon)^{t}e^{-k(1-\epsilon)/n}+2(1+\epsilon^{2})^{t-1}e^{-k(1+\epsilon^{2})/n}}\right)\;.Factoring out the e−k/nsuperscript𝑒𝑘𝑛e^{-k/n} terms and noting that, since kϵ/n=o(1)𝑘italic-ϵ𝑛𝑜1k\epsilon/n=o(1),the denominator is Ω(e−k/n)Ωsuperscript𝑒𝑘𝑛\Omega(e^{-k/n}) yields thatO((n1−tkte−k/n2Nt!)((1+ϵ)te−k(1+ϵ)/n+(1−ϵ)te−k(1−ϵ)/n−2(1+ϵ2)t−1e−k(1+ϵ2)/n)2).𝑂superscript𝑛1𝑡superscript𝑘𝑡superscript𝑒𝑘𝑛2𝑁𝑡superscriptsuperscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛superscript1italic-ϵ𝑡superscript𝑒𝑘1italic-ϵ𝑛2superscript1superscriptitalic-ϵ2𝑡1superscript𝑒𝑘1superscriptitalic-ϵ2𝑛2O\left(\left(\frac{n^{1-t}k^{t}e^{-k/n}}{2Nt!}\right)\left((1+\epsilon)^{t}e^{-k(1+\epsilon)/n}+(1-\epsilon)^{t}e^{-k(1-\epsilon)/n}-2(1+\epsilon^{2})^{t-1}e^{-k(1+\epsilon^{2})/n}\right)^{2}\right)\;.Noting that k/n=o(1)𝑘𝑛𝑜1k/n=o(1), we can ignore this e−knsuperscript𝑒𝑘𝑛e^{-kn} term and Taylor expanding the exponentials, we have that(Pr(A=t|X=0)−Pr(A=t|X=1))2Pr(A=t)=superscriptPr𝐴conditional𝑡𝑋0Pr𝐴conditional𝑡𝑋12Pr𝐴𝑡absent\displaystyle\frac{(\Pr(A=t|X=0)-\Pr(A=t|X=1))^{2}}{\Pr(A=t)}=O((n1−tkt2Nt!)((1+ϵ)t(1−k(1+ϵ)/n)+(1−ϵ)t(1+k(1−ϵ)/n)\displaystyle O\left(\left(\frac{n^{1-t}k^{t}}{2Nt!}\right)\left((1+\epsilon)^{t}(1-k(1+\epsilon)/n)+(1-\epsilon)^{t}(1+k(1-\epsilon)/n)\right.\right.−2(1+ϵ2)t−1(1−k(1+ϵ2)/n)+O((kϵ/n)2(1+ϵ)t))2).\displaystyle-\left.\left.2(1+\epsilon^{2})^{t-1}(1-k(1+\epsilon^{2})/n)+O((k\epsilon/n)^{2}(1+\epsilon)^{t})\right)^{2}\right)\;.We deal separately with the cases t=1,t=2formulae-sequence𝑡1𝑡2t=1,t=2 and t>2𝑡2t>2.For the t=1𝑡1t=1 term, we haveO((kN)((1+ϵ)(1−kϵ/n)+(1−ϵ)(1+kϵ/n)−2(1−kϵ2/n)+O((kϵ/n)2))2)𝑂𝑘𝑁superscript1italic-ϵ1𝑘italic-ϵ𝑛1italic-ϵ1𝑘italic-ϵ𝑛21𝑘superscriptitalic-ϵ2𝑛𝑂superscript𝑘italic-ϵ𝑛22\displaystyle O\left(\left(\frac{k}{N}\right)\left((1+\epsilon)(1-k\epsilon/n)+(1-\epsilon)(1+k\epsilon/n)-2(1-k\epsilon^{2}/n)+O((k\epsilon/n)^{2})\right)^{2}\right)=\displaystyle=O((kN)O((kϵ/n)2)2).𝑂𝑘𝑁𝑂superscriptsuperscript𝑘italic-ϵ𝑛22\displaystyle O\left(\left(\frac{k}{N}\right)O((k\epsilon/n)^{2})^{2}\right)\;.Since k=o(n2/3/ϵ4/3)𝑘𝑜superscript𝑛23superscriptitalic-ϵ43k=o(n^{2/3}/\epsilon^{4/3}) and ϵ>n−1/4italic-ϵsuperscript𝑛14\epsilon>n^{-1/4},ϵk/n=o(n−1/3/ϵ1/3)=o(n−1/4)italic-ϵ𝑘𝑛𝑜superscript𝑛13superscriptitalic-ϵ13𝑜superscript𝑛14\epsilon k/n=o(n^{-1/3}/\epsilon^{1/3})=o(n^{-1/4}),and we find that this isO((kN)o(1/n))=o(1/N).𝑂𝑘𝑁𝑜1𝑛𝑜1𝑁\displaystyle O\left(\left(\frac{k}{N}\right)o(1/n)\right)=o(1/N)\;.This appropriately bounds the contribution from this term.
|
| 110 |
+
|
| 111 |
+
When t=2𝑡2t=2, we haveO((k2nN)((1+ϵ)2(1−k(1+ϵ)/n)+(1−ϵ)2(1−k(1−ϵ)/n)\displaystyle O\left(\left(\frac{k^{2}}{nN}\right)\left((1+\epsilon)^{2}(1-k(1+\epsilon)/n)+(1-\epsilon)^{2}(1-k(1-\epsilon)/n)\right.\right.−2(1+ϵ2)(1−k(1+ϵ2)/n)+O((kϵ/n)2))2).\displaystyle\left.\left.-2(1+\epsilon^{2})(1-k(1+\epsilon^{2})/n)+O((k\epsilon/n)^{2})\right)^{2}\right)\;.Note that the terms without k/n𝑘𝑛k/n factors cancel out, (1+ϵ)2+(1−ϵ)2−2(1+ϵ2)=0superscript1italic-ϵ2superscript1italic-ϵ221superscriptitalic-ϵ20(1+\epsilon)^{2}+(1-\epsilon)^{2}-2(1+\epsilon^{2})=0, yieldingO(k2/nN)(kϵ2/n+o(n−1/2))2=O(k4ϵ4/n3N)+o(k2/n2N)=o(k3ϵ4/n2N)+o(1/N)=o(1/N),𝑂superscript𝑘2𝑛𝑁superscript𝑘superscriptitalic-ϵ2𝑛𝑜superscript𝑛122𝑂superscript𝑘4superscriptitalic-ϵ4superscript𝑛3𝑁𝑜superscript𝑘2superscript𝑛2𝑁𝑜superscript𝑘3superscriptitalic-ϵ4superscript𝑛2𝑁𝑜1𝑁𝑜1𝑁O(k^{2}/nN)(k\epsilon^{2}/n+o(n^{-1/2}))^{2}=O(k^{4}\epsilon^{4}/n^{3}N)+o(k^{2}/n^{2}N)=o(k^{3}\epsilon^{4}/n^{2}N)+o(1/N)=o(1/N)\;,using both k=o(n2/3/ϵ4/3)𝑘𝑜superscript𝑛23superscriptitalic-ϵ43k=o(n^{2/3}/\epsilon^{4/3}) and k=o(n)𝑘𝑜𝑛k=o(n).
|
| 112 |
+
|
| 113 |
+
For t>2𝑡2t>2, we let ft(x)=(1+x)t(1−kx/n)subscript𝑓𝑡𝑥superscript1𝑥𝑡1𝑘𝑥𝑛f_{t}(x)=(1+x)^{t}(1-kx/n).In terms of ftsubscript𝑓𝑡f_{t}, we have that (Pr(A=t|X=0)−Pr(A=t|X=1))2Pr(A=t)superscriptPr𝐴conditional𝑡𝑋0Pr𝐴conditional𝑡𝑋12Pr𝐴𝑡\frac{(\Pr(A=t|X=0)-\Pr(A=t|X=1))^{2}}{\Pr(A=t)} is:O((n1−tkt2Nt!)(ft(ϵ)+ft(−ϵ))/2−ft(0)−(ft−1(ϵ2)−ft−1(0))+o(n−1/2)2).𝑂superscript𝑛1𝑡superscript𝑘𝑡2𝑁𝑡subscript𝑓𝑡italic-ϵsubscript𝑓𝑡italic-ϵ2subscript𝑓𝑡0subscript𝑓𝑡1superscriptitalic-ϵ2subscript𝑓𝑡10𝑜superscriptsuperscript𝑛122O\left(\left(\frac{n^{1-t}k^{t}}{2Nt!}\right)(f_{t}(\epsilon)+f_{t}(-\epsilon))/2-f_{t}(0)-(f_{t-1}(\epsilon^{2})-f_{t-1}(0))+o(n^{-1/2})^{2}\right)\;.Using the Taylor expansion of ftsubscript𝑓𝑡f_{t} in terms of its first two derivatives and ft−1subscript𝑓𝑡1f_{t-1} in terms of its first, we see that(ft(ϵ)+ft(−ϵ))/2−ft(0)=ϵ2ft′′(ξ)subscript𝑓𝑡italic-ϵsubscript𝑓𝑡italic-ϵ2subscript𝑓𝑡0superscriptitalic-ϵ2subscriptsuperscript𝑓′′𝑡𝜉(f_{t}(\epsilon)+f_{t}(-\epsilon))/2-f_{t}(0)=\epsilon^{2}f^{\prime\prime}_{t}(\xi)andft−1(ϵ2)−ft−1(0)=ϵ2ft−1′(ξ′),subscript𝑓𝑡1superscriptitalic-ϵ2subscript𝑓𝑡10superscriptitalic-ϵ2subscriptsuperscript𝑓′𝑡1superscript𝜉′f_{t-1}(\epsilon^{2})-f_{t-1}(0)=\epsilon^{2}f^{\prime}_{t-1}(\xi^{\prime})\;,for some ξ∈[−ϵ,ϵ]𝜉italic-ϵitalic-ϵ\xi\in[-\epsilon,\epsilon] and ξ′∈[0,ϵ2]superscript𝜉′0superscriptitalic-ϵ2\xi^{\prime}\in[0,\epsilon^{2}].However, the derivatives areft′(x)=(1+x)t−1(t−(1+x+tx)k/n)subscriptsuperscript𝑓′𝑡𝑥superscript1𝑥𝑡1𝑡1𝑥𝑡𝑥𝑘𝑛f^{\prime}_{t}(x)=(1+x)^{t-1}(t-(1+x+tx)k/n)andft′′(x)=(1+x)t−2(t(t−1)−t(t+1)xk/n),subscriptsuperscript𝑓′′𝑡𝑥superscript1𝑥𝑡2𝑡𝑡1𝑡𝑡1𝑥𝑘𝑛f^{\prime\prime}_{t}(x)=(1+x)^{t-2}(t(t-1)-t(t+1)xk/n)\;,and so |ft′′(ξ)|≤O(t2(1+ϵ)t−1)subscriptsuperscript𝑓′′𝑡𝜉𝑂superscript𝑡2superscript1italic-ϵ𝑡1|f^{\prime\prime}_{t}(\xi)|\leq O(t^{2}(1+\epsilon)^{t-1}) and ft−1′(ξ′)≤O(t(1+ϵ2)t−2)subscriptsuperscript𝑓′𝑡1superscript𝜉′𝑂𝑡superscript1superscriptitalic-ϵ2𝑡2f^{\prime}_{t-1}(\xi^{\prime})\leq O(t(1+\epsilon^{2})^{t-2}).Hence, the term(Pr(A=t|X=0)−Pr(A=t|X=1))2Pr(A=t)superscriptPr𝐴conditional𝑡𝑋0Pr𝐴conditional𝑡𝑋12Pr𝐴𝑡\frac{(\Pr(A=t|X=0)-\Pr(A=t|X=1))^{2}}{\Pr(A=t)}is at mostO(n1−tkt/Nt!)(ϵ4t4(1+ϵ)2t−2)+o(1/n))\displaystyle O(n^{1-t}k^{t}/Nt!)(\epsilon^{4}t^{4}(1+\epsilon)^{2t-2})+o(1/n))=O((k3ϵ4/n2)(t4(1+ϵ)2/N)(k(1+ϵ)2/n)t−3/t!)+o((k/n)t/(Nt!))absent𝑂superscript𝑘3superscriptitalic-ϵ4superscript𝑛2superscript𝑡4superscript1italic-ϵ2𝑁superscript𝑘superscript1italic-ϵ2𝑛𝑡3𝑡𝑜superscript𝑘𝑛𝑡𝑁𝑡\displaystyle=O\left((k^{3}\epsilon^{4}/n^{2})(t^{4}(1+\epsilon)^{2}/N)(k(1+\epsilon)^{2}/n)^{t-3}/t!\right)+o\left((k/n)^{t}/(Nt!)\right)=o(1/N)t4/t!,absent𝑜1𝑁superscript𝑡4𝑡\displaystyle=o(1/N)t^{4}/t!\;,using both k=o(n2/3/ϵ4/3)𝑘𝑜superscript𝑛23superscriptitalic-ϵ43k=o(n^{2/3}/\epsilon^{4/3}) and k=o(n)𝑘𝑜𝑛k=o(n).Since (t+1)4/(t+1)!≤t4/2t!superscript𝑡14𝑡1superscript𝑡42𝑡(t+1)^{4}/(t+1)!\leq t^{4}/2t! for all t≥4𝑡4t\geq 4,even summing the above over all t≥3𝑡3t\geq 3 still leaves o(1/N)𝑜1𝑁o(1/N).
|
| 114 |
+
|
| 115 |
+
Thus, we have that I(X;A)=o(1/N)𝐼𝑋𝐴𝑜1𝑁I(X;A)=o(1/N), and therefore that I(X:A1,…,AN)=o(1)I(X:A_{1},\ldots,A_{N})=o(1).This proves that X=0𝑋0X=0 and X=1𝑋1X=1 cannot be reliably distinguishedgiven A1,…,ANsubscript𝐴1…subscript𝐴𝑁A_{1},\ldots,A_{N}, and thus proves property 5,completing the proof of our lower bound.
|
| 116 |
+
|
| 117 |
+
In this paper, we gave tight upper and lower bounds on the sample complexityof generalized uniformity testing – a natural non-trivial generalization of uniformity testing,recently introduced in [BC17].The obvious research question is to understand the sample complexity of testing more general symmetricproperties (e.g., closeness, independence, etc.) for the regime where the domain of the underlyingdistributions is discrete but unknown (of unknown size).Is it possible to obtain sub-learning sample complexities for these problems?And what is the optimal sample complexity for each of these tasks?It turns out that the answer to the first question is affirmative.These extensions require more sophisticated techniques and will appear in a forthcoming work.
|
1709.02418v2.txt
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Datamining contests such as Kaggle and KDDCup can accelerate progress in many application domains byproviding standardized datasets and a fair basis of comparing multiple algorithmic approaches.However, their utility will diminish if the integrity of leaderboard rankings is calledinto question due to either intentional or accidental overfitting to the test data.Recent research on privacy-preserving machine learning (Whitehill, 2016; Blum and Hardt, 2015; Zheng, 2015)has shown how information on the accuracy of a contestant’s guesses, returned to thecontestant by an oracle, can divulge informationabout the test data’s true labels. Such oracles are often provided by the organizers of the competition themselves.For example, in the 2017 Intel & MobileODT Cervical Cancer Screening competition111https://www.kaggle.com/c/intel-mobileodt-cervical-cancer-screeninghosted by Kaggle, every contestant can submit her/his guesses up to 5 times per day, and for each submission the oracle returns thelog-loss of the guesses with respect to the ground-truth values of the entire 512512512-element test set. The contestantcan use the accuracy information to improve (hopefully) the classifier design and then re-submit.
|
| 2 |
+
|
| 3 |
+
AUC: For binary classification problems, one of the most commonly used accuracy metrics is theArea Under the Receiver Operating Characteristics Curve (AUC). In contrastto other accuracy metrics such as log-loss and 0/1 loss, which can be computed as the sum of example-wiselosses over each example in the test set, the AUC statistic is computed over all possible pairs of test examples,such thateach pair contains one example from each class. In a recent paper, Whitehill (2016)showed that an oracle that provides contestants with information on the AUC of their guesses can inadvertentlydivulge information on the ground-truth labels of the test examples.As a concrete example, suppose that a tiny test set contains just 4 examples; acontestant’s real-valued guesses for these labels is 𝐲^=(0.2,0.5,0.9,0.1)^𝐲0.20.50.90.1\hat{\bf y}=(0.2,0.5,0.9,0.1);and an oracle informs the contestant that her/his guesses have achieved an AUC of exactly0.75=3/40.75340.75=3/4. How does this information constrain the set of possible binary ground-truth vectors for the test set?In this example, it turns out that there is exactly one possible ground-truth vector – namely𝐲=(1,0,1,0)𝐲1010{\bf y}=(1,0,1,0) – for whichthe AUC of the contestant’s guesses is exactly 0.750.750.75. Hence, based on a single oracle query, the contestant hasmanaged to deduce the test labels with complete certainty.This simple example raises more general questions: For a test set with n𝑛n examples and a fixed AUCof c=p/q𝑐𝑝𝑞c=p/q (where p,q∈ℤ𝑝𝑞ℤp,q\in\mathbb{Z}), how many compatible binary ground-truth vectors are there? Does this number grow monotonicallyin n𝑛n, or might there exist some “pathological” combinations of the number of test examples n𝑛n,number of positively labeled examples n1subscript𝑛1n_{1}, and the contestant’s AUC c𝑐c, such that this number is small?If the number is small, can the solution candidates be enumerated efficiently?This paper explores these questions in some detail.
|
| 4 |
+
|
| 5 |
+
Related work:Over the past few years there has been growing theoretical and practical interest in the statistical validityof scientific results that are obtained from adaptive data analyses, in which the results of one experimentinform the design of the next (Dwork et al., 2015; Hardt and Ullman, 2014). For the particular application ofdatamining contests – in which contestants can submit their guesses to an oracle, receive information on their accuracy, revisetheir guesses, and resubmit –a potential danger is that the rankings and associated accuracy statistics of different contestantsmay be unreliable. Therefore, the design of algorithms to generate contest leaderboards that are robust to “hacking”,whether intentional as part of an attack orinadvertently due to adaptive overfitting, has begun to generate significant research interest (Blum and Hardt, 2015; Zheng, 2015).In particular,Blum and Hardt (2015) proposed an algorithm (“Ladder”)that can reliably estimate the accuracy of a contestant’s classifier on the true test data distribution,even when the classifier has been adaptively optimized based on the output of an oracle on the empirical test distribution.
|
| 6 |
+
|
| 7 |
+
While the availability of an oracle in datamining contests presents potential problems, it is alsouseful for helping contestants to focus theirefforts on more promising algorithmic approaches. Our research is thus related to privacy-preserving machine learningand differential privacy (e.g., Dwork (2011); Chaudhuri andMonteleoni (2009); Blum, Ligett, and Roth (2013)), which are concerned with how to provideuseful aggregate statistics without disclosing private information about particular examples in the dataset.The AUC statistic, in particular, has been investigated in the context of privacy:Stoddard, Chen, andMachanavajjhala (2014) proposed an algorithm for computing “private ROC”curves and associated AUC statistics. Matthews and Harel (2013) showed how an attacker who already knows most of the test labels canestimate the remaining labels if he/she gains access to an empirical ROC curve, i.e.,a set of classifier thresholds and corresponding true positive and false positive rates.
|
| 8 |
+
|
| 9 |
+
The prior work most similar to ours is by Whitehill (2016). Theyshowed a weak form of lower bound on the number of possiblebinary ground-truth vectors 𝐲∈{0,1}n𝐲superscript01𝑛{\bf y}\in\{0,1\}^{n} for which the contestant’s guesses 𝐲^^𝐲\hat{\bf y} achieveany fixed AUC c𝑐c. Specifically, for every AUC value c=p/q∈(0,1)𝑐𝑝𝑞01c=p/q\in(0,1), there exists an infinite sequence of datasetsizes (n=4q,8q,12q,…𝑛4𝑞8𝑞12𝑞…n=4q,8q,12q,\ldots) such that the number of satisfying ground-truth vectors 𝐲∈{0,1}n𝐲superscript01𝑛{\bf y}\in\{0,1\}^{n} grows exponentially inn𝑛n. However, this result does not preclude the possibility that there might be certain pathological cases –combinations of p𝑝p, q𝑞q, n0subscript𝑛0n_{0}, and n1subscript𝑛1n_{1} – for which the number of satisfying ground-truth vectors is actually much smaller.Conceivably, there might be values of n𝑛n that lie between integer multiples of 4q4𝑞4q for which the number of satisfying solutions is small.Moreover, the lower bound in Whitehill (2016) applies only to datasets that contain at least 4q4𝑞4q examples and says nothingabout smaller (but possibly still substantial) datasets.
|
| 10 |
+
|
| 11 |
+
Contributions: The novel contributions of our paper are the following:(1) We derive an algorithm to compute the exact number ofn𝑛n-dimensional binary ground-truth vectorsfor which a contestant’s real-valued vector of guesses achieves a fixed AUC, alongwith an algorithm to efficiently generate all such vectors. (2) We show thatthe number of distinct binary ground-truth vectors, in whichn1subscript𝑛1n_{1} entries are 111, and for which a contestant’s guesses achieve a fixed AUC,is equal to the number of elements in a truncated n1subscript𝑛1n_{1}-dimensional discrete simplex(i.e., a subset of Δdn1subscriptsuperscriptΔsubscript𝑛1𝑑\Delta^{n_{1}}_{d}). (3) We provide empirical evidence that the number of satisfying binary ground-truth vectorscan actually decrease with increasing n𝑛n, until a test set-dependent threshold is reached.
|
| 12 |
+
|
| 13 |
+
Let 𝐲=(y1,…,yn)∈{0,1}n𝐲subscript𝑦1…subscript𝑦𝑛superscript01𝑛{\bf y}=(y_{1},\ldots,y_{n})\in\{0,1\}^{n} be the ground-truth binary labelsof n𝑛n test examples, and let 𝐲^=(y^1,…,y^n)∈ℝn^𝐲subscript^𝑦1…subscript^𝑦𝑛superscriptℝ𝑛\hat{\bf y}=(\hat{y}_{1},\ldots,\hat{y}_{n})\in\mathbb{R}^{n} be thecontestant’s real-valued guesses. Let ℒ1(𝐲)={i:yi=1}subscriptℒ1𝐲conditional-set𝑖subscript𝑦𝑖1\mathcal{L}_{1}({\bf y})=\{i:y_{i}=1\}and ℒ0(𝐲)={i:yi=0}subscriptℒ0𝐲conditional-set𝑖subscript𝑦𝑖0\mathcal{L}_{0}({\bf y})=\{i:y_{i}=0\} represent the index sets of the examples that are labeled 111 and 00, respectively.Similarly define n1(𝐲)=|ℒ1(𝐲)|subscript𝑛1𝐲subscriptℒ1𝐲n_{1}({\bf y})=|\mathcal{L}_{1}({\bf y})| and n0(𝐲)=|ℒ0(𝐲)|subscript𝑛0𝐲subscriptℒ0𝐲n_{0}({\bf y})=|\mathcal{L}_{0}({\bf y})| to be the number of examples labeled 111 and 00 in 𝐲𝐲{\bf y}, respectively. For brevity, we sometimes write simply n1subscript𝑛1n_{1}, n0subscript𝑛0n_{0}, ℒ0subscriptℒ0\mathcal{L}_{0}, or ℒ1subscriptℒ1\mathcal{L}_{1} if the argument to these functions isclear from the context.
|
| 14 |
+
|
| 15 |
+
We assume that the contestant’s guessesy^1,…,y^nsubscript^𝑦1…subscript^𝑦𝑛\hat{y}_{1},\ldots,\hat{y}_{n} are all distinct (i.e., y^i=y^j⇔i=jiffsubscript^𝑦𝑖subscript^𝑦𝑗𝑖𝑗\hat{y}_{i}=\hat{y}_{j}\iff i=j).In machine learning applications where classifiers analyze high-dimensional, real-valued feature vectors, this is common.
|
| 16 |
+
|
| 17 |
+
Importantly, but without loss of generality, we assume that the test examples are ordered according toy^1,…,y^nsubscript^𝑦1…subscript^𝑦𝑛\hat{y}_{1},\ldots,\hat{y}_{n}, i.e., y^i>y^j⇔i>jiffsubscript^𝑦𝑖subscript^𝑦𝑗𝑖𝑗\hat{y}_{i}>\hat{y}_{j}\iff i>j. This significantly simplifies the notation.
|
| 18 |
+
|
| 19 |
+
Finally, we assume that the oracle provides the contestant with perfect knowledge of the AUC c=p/q𝑐𝑝𝑞c=p/q, where p/q𝑝𝑞p/q is a reducedfraction (i.e., the greatest common factor of p𝑝p and q𝑞q 1) on the entire test set,and that the contestant knows both p𝑝p and q𝑞q.
|
| 20 |
+
|
| 21 |
+
The AUC has two mathematically equivalent definitions (Tyler and Chen, 2000; Agarwal et al., 2005): (1)the AUC is the Area under the Receiver Operating Characteristics (ROC) curve, which plotsthe true positive rate against the false positive rate of a classifier on some test set.The ROC thus characterizes the performance of the classifier over all possible thresholds on its real-valued output, and theAUC is the integral of the ROC over all possible false positive rates in the interval [0,1]01[0,1]. (2)The AUC represents the fraction of pairs of test examples – one labeled 111 and one labeled 00 – in which the classifiercan correctly identify the positively labeled example based on the classifier output. Specifically, since we assumethat all of the contestant’s guesses are distinct, then the AUC can be computed as:AUC(𝐲,𝐲^)=1n0n1∑i∈ℒ0∑j∈ℒ1𝕀[y^i<y^j]AUC𝐲^𝐲1subscript𝑛0subscript𝑛1subscript𝑖subscriptℒ0subscript𝑗subscriptℒ1𝕀delimited-[]subscript^𝑦𝑖subscript^𝑦𝑗\textrm{AUC}({\bf y},\hat{\bf y})=\frac{1}{n_{0}n_{1}}\sum_{i\in\mathcal{L}_{0}}\sum_{j\in\mathcal{L}_{1}}\mathbb{I}[\hat{y}_{i}<\hat{y}_{j}](1)Equivalently, we can define the AUC in terms of the number of misclassified pairs hℎh:AUC(𝐲,𝐲^)=1−h(𝐲,𝐲^)n0n1AUC𝐲^𝐲1ℎ𝐲^𝐲subscript𝑛0subscript𝑛1\textrm{AUC}({\bf y},\hat{\bf y})=1-\frac{h({\bf y},\hat{\bf y})}{n_{0}n_{1}}whereh(𝐲,𝐲^)=∑i∈ℒ0∑j∈ℒ1𝕀[y^i>y^j]ℎ𝐲^𝐲subscript𝑖subscriptℒ0subscript𝑗subscriptℒ1𝕀delimited-[]subscript^𝑦𝑖subscript^𝑦𝑗h({\bf y},\hat{\bf y})=\sum_{i\in\mathcal{L}_{0}}\sum_{j\in\mathcal{L}_{1}}\mathbb{I}[\hat{y}_{i}>\hat{y}_{j}]As is evident in Eq. 1, all that mattersto the AUC is the relative ordering of the y^isubscript^𝑦𝑖\hat{y}_{i}, not their exact values.Also, if all examples belong to the same class and either n1=0subscript𝑛10n_{1}=0 or n0=0subscript𝑛00n_{0}=0, then the AUC is undefined.Finally, the AUC is a rational number because it can be written as the fraction of two integers p𝑝p and q𝑞q,where q𝑞q must divide n0n1subscript𝑛0subscript𝑛1n_{0}n_{1}.
|
| 22 |
+
|
| 23 |
+
Since we assume (without loss of generality) that the contestant’s guesses are ordered such that y^i<y^j⇔i<jiffsubscript^𝑦𝑖subscript^𝑦𝑗𝑖𝑗\hat{y}_{i}<\hat{y}_{j}\iff i<j, thenwe can simplify the definition of hℎh to be:h(𝐲,𝐲^)=∑i∈ℒ0∑j∈ℒ1𝕀[i>j]ℎ𝐲^𝐲subscript𝑖subscriptℒ0subscript𝑗subscriptℒ1𝕀delimited-[]𝑖𝑗h({\bf y},\hat{\bf y})=\sum_{i\in\mathcal{L}_{0}}\sum_{j\in\mathcal{L}_{1}}\mathbb{I}[i>j](2)
|
| 24 |
+
|
| 25 |
+
In this paper, we are interested in determining the number of unique binary vectors 𝐲∈{0,1}n𝐲superscript01𝑛{\bf y}\in\{0,1\}^{n} such thatthe contestant’s guesses 𝐲^∈ℝn^𝐲superscriptℝ𝑛\hat{\bf y}\in\mathbb{R}^{n} achieve a fixed AUC of c𝑐c. The bulk of the effort is toderive a recursive formula for the number of unique binary vectors with a fixed number n1subscript𝑛1n_{1} of 111s that give thedesired AUC value.
|
| 26 |
+
|
| 27 |
+
Intuition: Given a real-valued vector 𝐲^^𝐲\hat{\bf y} representingthe contestant’s guesses and a corresponding binary vector 𝐲𝐲{\bf y} representing the ground-truth test labels, the number h(𝐲,𝐲^)ℎ𝐲^𝐲h({\bf y},\hat{\bf y})of misclassifiedpairs of examples (such that each pair contains one example from each class) can be increased by 111 by“left-swapping” any occurrence of 111 in 𝐲𝐲{\bf y} (at index j′superscript𝑗′j^{\prime}) with a 00 that occurs immediately to the left of it(i.e., at index j′−1superscript𝑗′1j^{\prime}-1) – see Figure 1.To generate a vector 𝐲𝐲{\bf y} such that h(𝐲,𝐲^)=dℎ𝐲^𝐲𝑑h({\bf y},\hat{\bf y})=d for any desired d∈{0,…,q}𝑑0…𝑞d\in\{0,\ldots,q\},we start with a vector 𝐫𝐫{\bf r}in “right-most configuration” – i.e., where all the 00s occur to the left of all the 111s – because (as we will show)h(𝐫,𝐲^)=0ℎ𝐫^𝐲0h({\bf r},\hat{\bf y})=0. We then apply a sequence of multiple left-swaps to each of the 111s in 𝐫𝐫{\bf r}, and countthe number of ways of doing so such that the total number is d𝑑d.Because we want to determine the number of unique vectors 𝐲𝐲{\bf y} such thath(𝐲,𝐲^)=dℎ𝐲^𝐲𝑑h({\bf y},\hat{\bf y})=d, we restrict the numbers s1,…,sn1subscript𝑠1…subscript𝑠subscript𝑛1s_{1},\ldots,s_{n_{1}} of left-swaps applied to the n1subscript𝑛1n_{1} different 111s in 𝐫𝐫{\bf r} so thatsi≥sjsubscript𝑠𝑖subscript𝑠𝑗s_{i}\geq s_{j} for all i<j𝑖𝑗i<j. This results in a proof that the number of possible ground-truth binary labelings, for any givenvalue of n1subscript𝑛1n_{1} and for which a given vector of guesses misclassifies d𝑑d pairs of examples, is equal to the number of points in an1subscript𝑛1n_{1}-dimensional discrete simplex Δdn1subscriptsuperscriptΔsubscript𝑛1𝑑\Delta^{n_{1}}_{d} that has been truncated by the additionalconstraint that n0≥s1≥…≥sn1subscript𝑛0subscript𝑠1…subscript𝑠subscript𝑛1n_{0}\geq s_{1}\geq\ldots\geq s_{n_{1}}.
|
| 28 |
+
|
| 29 |
+
To get started, we first define “left-swap” and “right-most configuration” more precisely:
|
| 30 |
+
|
| 31 |
+
Interestingly, the set 𝒮n1(d)superscriptsubscript𝒮subscript𝑛1𝑑\mathcal{S}_{n_{1}}^{(d)} is a discrete n1subscript𝑛1n_{1}-dimensional simplexΔdn1subscriptsuperscriptΔsubscript𝑛1𝑑\Delta^{n_{1}}_{d} that has been truncated by the additional constraint that n0≥s1≥…≥sn1subscript𝑛0subscript𝑠1…subscript𝑠subscript𝑛1n_{0}\geq s_{1}\geq\ldots\geq s_{n_{1}}.
|
| 32 |
+
|
| 33 |
+
Based on Theorem 1, we can compute the number, v(n0,n1,d)𝑣subscript𝑛0subscript𝑛1𝑑v(n_{0},n_{1},d), of binary vectors of length n=n0+n1𝑛subscript𝑛0subscript𝑛1n=n_{0}+n_{1},such that n1subscript𝑛1n_{1} of the entries are labeled 111 and for which h(𝐲,𝐲^)=dℎ𝐲^𝐲𝑑h({\bf y},\hat{\bf y})=d.Recall that the AUC can be computed by dividing the number d𝑑d of misclassified pairs by the total number of example-pairsn0n1subscript𝑛0subscript𝑛1n_{0}n_{1}. Hence, to compute the total number, w(n,c)𝑤𝑛𝑐w(n,c), of binary vectors of length n𝑛nfor which AUC(𝐲,𝐲^)=cAUC𝐲^𝐲𝑐\textrm{AUC}({\bf y},\hat{\bf y})=c, we must first determine the set 𝒩1subscript𝒩1\mathcal{N}_{1} of possible values for n1subscript𝑛1n_{1},and then sum v(n0,n1,d)𝑣subscript𝑛0subscript𝑛1𝑑v(n_{0},n_{1},d) over every value in 𝒩1subscript𝒩1\mathcal{N}_{1} and the corresponding value d𝑑d.
|
| 34 |
+
|
| 35 |
+
Suppose that the oracle reports an AUC of c=p/q𝑐𝑝𝑞c=p/q, where p/q𝑝𝑞p/q is a reduced fraction, Since c𝑐crepresents the fraction of all pairs of examples – one from each class – that are classified by the contestant’sguesses correctly, then q𝑞q must divide the total number (n0n1subscript𝑛0subscript𝑛1n_{0}n_{1}) of pairsin the test set. Hence:𝒩1={n1:(0<n1<n)∧(q|(n−n1)n1)}subscript𝒩1conditional-setsubscript𝑛10subscript𝑛1𝑛conditional𝑞𝑛subscript𝑛1subscript𝑛1\mathcal{N}_{1}=\{n_{1}:(0<n_{1}<n)\ \wedge\ (q\ |\ (n-n_{1})n_{1})\}Since it is possible that q<n0n1𝑞subscript𝑛0subscript𝑛1q<n_{0}n_{1}, we must scale (q−p)𝑞𝑝(q-p) by n0n1/qsubscript𝑛0subscript𝑛1𝑞n_{0}n_{1}/q to determine the actual number ofmisclassified pairs d𝑑d. In particular, we defined(n1)=(q−p)n0n1/q=(q−p)(n−n1)n1/q𝑑subscript𝑛1𝑞𝑝subscript𝑛0subscript𝑛1𝑞𝑞𝑝𝑛subscript𝑛1subscript𝑛1𝑞d(n_{1})=(q-p)n_{0}n_{1}/q=(q-p)(n-n_{1})n_{1}/q
|
| 36 |
+
|
| 37 |
+
Based on 𝒩1subscript𝒩1\mathcal{N}_{1} and m𝑚m, we can finally compute:w(n,c)=|⋃n1∈𝒩1𝒮n1(d(n1))|=∑n1∈𝒩1v(n−n1,n1,d(n1))since the 𝒮n1(d(n1)) are disjoint.formulae-sequence𝑤𝑛𝑐subscriptsubscript𝑛1subscript𝒩1superscriptsubscript𝒮subscript𝑛1𝑑subscript𝑛1subscriptsubscript𝑛1subscript𝒩1𝑣𝑛subscript𝑛1subscript𝑛1𝑑subscript𝑛1since the 𝒮n1(d(n1)) are disjoint.w(n,c)=\left|\bigcup_{n_{1}\in\mathcal{N}_{1}}\mathcal{S}_{n_{1}}^{(d(n_{1}))}\right|=\sum_{n_{1}\in\mathcal{N}_{1}}v(n-n_{1},n_{1},d(n_{1}))\quad\textrm{since the $\mathcal{S}_{n_{1}}^{(d(n_{1}))}$ are disjoint.}
|
| 38 |
+
|
| 39 |
+
We can derive a recursion relation for v(n0,n1,d)𝑣subscript𝑛0subscript𝑛1𝑑v(n_{0},n_{1},d) as follows:Given any binary vector 𝐫𝐫{\bf r} of length n𝑛n, with n1subscript𝑛1n_{1} 111s, in right-most configuration,we can apply k∈{0,1,…,min(d,n0)}𝑘01…𝑑subscript𝑛0k\in\{0,1,\ldots,\min(d,n_{0})\} left-swaps on 𝐫𝐫{\bf r} from index n−n1+1𝑛subscript𝑛11n-n_{1}+1 (i.e., fromthe left-most 111) to yield 𝐲=ρ(𝐫,n−n1+1,k)𝐲𝜌𝐫𝑛subscript𝑛11𝑘{\bf y}=\rho({\bf r},n-n_{1}+1,k).Then the vector (yn−n1−k+2,yn−n1−k+3,yn−n1−k+4,…,yn)subscript𝑦𝑛subscript𝑛1𝑘2subscript𝑦𝑛subscript𝑛1𝑘3subscript𝑦𝑛subscript𝑛1𝑘4…subscript𝑦𝑛(y_{n-n_{1}-k+2},y_{n-n_{1}-k+3},y_{n-n_{1}-k+4},\ldots,y_{n}) (i.e., the last n1−1+ksubscript𝑛11𝑘n_{1}-1+k elements of 𝐲𝐲{\bf y})consists of k𝑘k 00s followed by (n1−1)subscript𝑛11(n_{1}-1) 111s; in other words, it is in right-most configuration.Thus, by iterating over all possible k𝑘k and computing for each choice how many more left-swaps are necessary to reacha total of d𝑑d, we can define v𝑣v recursively:v(n0,n1,d)=∑k=0min(d,n0)v(k,n1−1,d−k)𝑣subscript𝑛0subscript𝑛1𝑑superscriptsubscript𝑘0𝑑subscript𝑛0𝑣𝑘subscript𝑛11𝑑𝑘v(n_{0},n_{1},d)=\sum_{k=0}^{\min(d,n_{0})}v(k,n_{1}-1,d-k)with initial conditions:v(n0,n1,0)𝑣subscript𝑛0subscript𝑛10\displaystyle v(n_{0},n_{1},0)=\displaystyle=1∀n0≥0,n1≥0formulae-sequence1for-allsubscript𝑛00subscript𝑛10\displaystyle 1\quad\forall n_{0}\geq 0,n_{1}\geq 0v(0,n1,d)𝑣0subscript𝑛1𝑑\displaystyle v(0,n_{1},d)=\displaystyle=0∀n1≥0,d>0formulae-sequence0for-allsubscript𝑛10𝑑0\displaystyle 0\quad\forall n_{1}\geq 0,d>0v(n0,0,d)𝑣subscript𝑛00𝑑\displaystyle v(n_{0},0,d)=\displaystyle=0∀n0≥0,d>0formulae-sequence0for-allsubscript𝑛00𝑑0\displaystyle 0\quad\forall n_{0}\geq 0,d>0Dynamic programming using a three-dimensional memoization table can be used to compute v𝑣vin time O(n0n1d)𝑂subscript𝑛0subscript𝑛1𝑑O(n_{0}n_{1}d). Moreover, the recursive algorithm above can also be used constructively (thoughwith large space costs)to compute the set of all binary vectors 𝐲𝐲{\bf y} of length n𝑛n, of which n1subscript𝑛1n_{1} are 111,such that h(𝐲,𝐲^)=dℎ𝐲^𝐲𝑑h({\bf y},\hat{\bf y})=d for any d𝑑d; conceivably, this could be useful forperforming some kind of attack that uses the set of all compatible binary ground-truth vectors to improvethe contestant’s accuracy (Whitehill, 2016). In order to apply this construction, the test examplesmust first be sorted in increasing value of the contestant’s guesses; the constructive algorithm is then applied togenerate all possible 𝐲𝐲{\bf y}; and then the components of each of the possible binary vectors must be reorderedto recover the original order of the test examples.
|
| 40 |
+
|
| 41 |
+
Whitehill (2016) showed that, for every fixed rational c=p/q∈(0,1)𝑐𝑝𝑞01c=p/q\in(0,1), the number of possiblebinary ground-truth vectors for which the contestant’s guesses achieve AUC of exactly c𝑐c, growsexponentially in n𝑛n. However, their result applies only to datasets that are at leastn=4q𝑛4𝑞n=4q in size. What can happen for smaller n𝑛n?
|
| 42 |
+
|
| 43 |
+
Using the recursive formula from Section 5, we found empirical evidence thatw(n,c)𝑤𝑛𝑐w(n,c) may actually be (initially) monotonically decreasing in n𝑛n, until n𝑛n reaches a threshold (specificto q𝑞q) at which it begins to increase again. As an example with p=1387𝑝1387p=1387 and q=1440𝑞1440q=1440 (and henced=1440−1387=53𝑑1440138753d=1440-1387=53), we cancompute the number of possible binary labelings that are compatiblewith an AUC of exactly c=p/q=1387/1440𝑐𝑝𝑞13871440c=p/q=1387/1440 (which is approximately 96.3%percent96.396.3\%) as a function ofn𝑛n:
|
| 44 |
+
|
| 45 |
+
Here, w(n,c)𝑤𝑛𝑐w(n,c) decreases steadily until n=106𝑛106n=106.We conjecture that w(n,c)𝑤𝑛𝑐w(n,c) is monotonically non-increasingin n𝑛n for n≤min{n0+n1:n0n1=2q}𝑛:subscript𝑛0subscript𝑛1subscript𝑛0subscript𝑛12𝑞n\leq\min\{n_{0}+n_{1}:n_{0}n_{1}=2q\}, for every fixed c𝑐c.
|
| 46 |
+
|
| 47 |
+
While the number of satisfying solutions in this example for n=106𝑛106n=106 is still in the hundreds of thousands, it iseasily small enough to allow each possibility to be considered individually, e.g., as part ofsome algorithmic attack to maximize performance within a datamining competition (Whitehill, 2016).Furthermore, we note that test sets on the order of hundreds of examples are not uncommon –the 2017 Intel & MobileODT Cervical Cancer Screening is one example.
|
| 48 |
+
|
| 49 |
+
We have investigated the mathematical structure of how the Area Under the Receiver Operating Characteristics Curve(AUC) accuracy metric is computed from the binary vector of ground-truth labels and a real-valued vectorof guesses. In particular, we derived an efficient recursive algorithm with which to count the exact numberof binary vectors for which the AUC of a fixed vector of guesses is some value c𝑐c; we also derived a constructivealgorithm with which to enumerate all such binary vectors.
|
| 50 |
+
|
| 51 |
+
In future work it would be interesting to examine whetherand how knowledge of the possible ground-truth labelings could be exploited to improve an existing vector of guesses;a simple mechanism was proposed by Whitehill (2016), but it is practical only for tiny datasets. In addition,it would be useful to explore how multiple subsequent oracle queries might be used to prunethe set of possible ground-truth labelings more rapidly.
|
1709.02564v7.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
1709.03528v5.txt
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The large-scale nature of many modern “big-data” problems, arising routinely in science, engineering, financial markets, Internet and social media, etc., poses significant computational as well as storage challenges for machine learning procedures. For example, the scale of data gathered in many applications nowadays typically exceeds the memory capacity of a single machine, which, in turn, makes learning from data ever more challenging.In this light, several modern parallel (or distributed) computing architectures,e.g., MapReduce [4], Apache Spark [56, 27],GraphLab [20], and Parameter Server [17],have been designed to operate on and learn from data at massive scales. Despite the fact that, when compared to a single machine, distributed systems tremendously reduce the storage and (local) computational costs, the inevitable cost of communications across the network can often be the bottleneck of distributed computations. As a result, designing methods which can strike an appropriate balance between the cost of computations and that of communications are increasingly desired.
|
| 2 |
+
|
| 3 |
+
The desire to reduce communication costs is even more pronounced in the federated learning framework [14, 15, 2, 26, 47].Similarly to typical settings of distributed computing, federated learning assumes data are distributed over a network across nodes that enjoy reasonable computational resources, e.g., mobile phones, wearable devices, and smart homes.However, the network has severely limited bandwidth and high latency.As a result, it is imperative to reduce the communications between the center and a node or between two nodes.In such settings, the preferred methods are those which can perform expensive local computations with the aim of reducing the overall communications across the network.
|
| 4 |
+
|
| 5 |
+
Optimization algorithms designed for distributed setting are abundantly found in the literature.First-order methods, i.e, those that rely solely on gradient information, are often embarrassingly parallel and easy to implement.Examples of such methods include distributed variants of stochastic gradient descent (SGD) [24, 37, 60],accelerated SGD [45],variance reduction SGD [16, 38], stochastic coordinate descent methods [9, 19, 29, 41]and dual coordinate ascent algorithms [40, 55, 59].The common denominator in all of these methods is that they significantly reduce the amount of local computation. But this blessing comes with an inevitable curse that they, in turn, may require a far greater number of iterations and hence, incur more communications overall.Indeed, as a result of their highly iterative nature, many of these first-order methods require several rounds of communications and, potentially, synchronizations in every iteration, and they must do so for many iterations.In a computer cluster, due to limitations on the network’s bandwidth and latency and software system overhead,communications across the nodes can oftentimes be the critical bottleneck for the distributed optimization.Such overheads are increasingly exacerbated by the growing number of compute nodes in the network, limiting the scalability of any distributed optimization method that requires many communication-intensive iterations.
|
| 6 |
+
|
| 7 |
+
To remedy such drawbacks of high number of iterations for distributed optimization, communication-efficient second-order methods, i.e., those that, in addition to the gradient, incorporate curvature information, have also been recently considered [23, 46, 39, 58, 11, 22, 48]; see also Section 1.1.The common feature in all of these methods is that they intend to increase the local computations with the aim of reducing the overall iterations, and hence, lowering the communications. In other words, these methods are designed to perform as much local computation as possible before making any communications across the network.Pursuing similar objectives, in this paper, we propose a Globally Improved Approximate NewTon (GIANT) method and establish its improved theoretical convergence properties as compared with other similar second-order methods.We also showcase the superior empirical performance of GIANT through several numerical experiments.
|
| 8 |
+
|
| 9 |
+
The rest of this paper is organized as follows.Section 1.1 briefly reviews prior works most closely related to this paper. Section 1.2 gives a summary of our main contributions.The formal description of the distributed empirical risk minimization problem is given in Section 2, followed by the derivation of various steps of GIANT in Section 3.Section 4 presents the theoretical guarantees.Section 5 shows our large-scale experiments.The supplementary material provides the proofs.
|
| 10 |
+
|
| 11 |
+
Among the existing distributed second-order optimization methods, the most notably are DANE [46], AIDE [39], and DiSCO [58]. Another similar method is CoCoA [11, 22, 48], which is analogous to second-order methods in that it involves sub-problems which are local quadratic approximations to the dual objective function. However, despite the fact that CoCoA makes use of the smoothness condition, it does not exploit any explicit second-order information.
|
| 12 |
+
|
| 13 |
+
We can evaluate the theoretical properties the above-mentioned methods in light of comparison with optimal first-order methods, i.e., accelerated gradient descent (AGD) methods [32, 33].It is because AGD methods are mostly embarrassingly parallel and can be regarded as the baseline for distributed optimization. Recall that AGD methods, being optimal in worst-case analysis sense [31], are guaranteed to convergence to ℰℰ{\mathcal{E}}-precision in 𝒪(κlog1ℰ)𝒪𝜅1ℰ{\mathcal{O}}(\sqrt{\kappa}\log\frac{1}{{\mathcal{E}}}) iterations [33], where κ𝜅\kappa can be thought of as the condition number of the problem. Each iteration of AGD has two rounds of communications—broadcast or aggregation of a vector.
|
| 14 |
+
|
| 15 |
+
In Table 1, we compare the communication costs with other methods for the ridge regression problem: min𝐰1n‖𝐗𝐰−𝐲‖22+γ‖𝐰‖22subscript𝐰1𝑛superscriptsubscriptnorm𝐗𝐰𝐲22𝛾superscriptsubscriptnorm𝐰22\min_{{\bf w}}\frac{1}{n}\|{\bf X}{\bf w}-{\bf y}\|_{2}^{2}+\gamma\|{\bf w}\|_{2}^{2}.111As for general convex problems, it is very hard to present the comparison in an easily understanding way.This is why we do not compare the convergence for the general convex optimization.The communication cost of GIANT has a mere logarithmic dependence on the condition number κ𝜅\kappa;in contrast, the other methods have at least a square root dependence on κ𝜅\kappa.Even if κ𝜅\kappa is assumed to be small, say κ=𝒪(n)𝜅𝒪𝑛\kappa={\mathcal{O}}(\sqrt{n}), which was made by [58], GIANT’s bound is better than the compared methods regarding the dependence on the number of partitions, m𝑚m.
|
| 16 |
+
|
| 17 |
+
Our GIANT method is motivated by the subsampled Newton method [43, 54, 35].Later we realized that very similar idea has been proposed by DANE [46]222GIANT and DANE are identical for quadratic programming; they are different for the general convex problems.and FADL [23], but we show better convergence bounds.Mahajan et al. [23] has conducted comprehensive empirical studies and concluded that the local quadratic approximation, which is very similar to GIANT, is the final method which they recommended.
|
| 18 |
+
|
| 19 |
+
In this paper, we consider the problem of empirical risk minimization involving smooth and strongly convex objective function (which is the same setting considered in prior works of DANE, AIDE, and DiSCO). In this context, we propose a Globally Improved Approximate NewTon (GIANT) method and establish its theoretical and empirical properties as follows.
|
| 20 |
+
|
| 21 |
+
∙∙\bulletFor quadratic objectives, we establish global convergence of GIANT.To attain a fixed precision, the number of iterations of GIANT (which is proportional to the communication complexity) has a mere logarithmic dependence on the condition number.In contrast, the prior works have at least square root dependence.In fact, for quadratic problems, GIANT and DANE [46] can be shown to be identical. In this light, for such problems, our work improves upon the convergence of DANE.
|
| 22 |
+
|
| 23 |
+
∙∙\bulletFor more general problems, GIANT has linear-quadratic convergence in the vicinity of the optimal solution, which we refer to as “local convergence”.333The second-order methods typically have the local convergence issue. Global convergence of GIANT can be trivially established by following [42], however, the convergence rate is not very interesting, as it is worse than the first-order methods.The advantage of GIANT mainly manifests in big-data regimes where there are many data points available.In other words, when the number of data points is much larger than the number of features, the theoretical convergence of GIANT enjoys significant improvement over other similar methods.
|
| 24 |
+
|
| 25 |
+
∙∙\bulletIn addition to theoretical features, GIANT also exhibits desirable practical advantages. For example, in sharp contrast with many existing distributed Newton-type methods, as well as popular first-order methods, GIANT only involves one tuning parameter, i.e., the maximal iterations of its sub-problem solvers, which makes GIANT easy to implement in practice.Furthermore, our experiments on a computer cluster show that GIANT consistently outperforms AGD, L-BFGS, and DANE.
|
| 26 |
+
|
| 27 |
+
In this paper, we consider the distributed variant of empirical risk minimization, a supervised-learning problem arising very often in machine learning and data analysis [44]. More specifically, let 𝐱1,⋯,𝐱n∈ℝdsubscript𝐱1⋯subscript𝐱𝑛superscriptℝ𝑑{\bf x}_{1},\cdots,{\bf x}_{n}\in{\mathbb{R}}^{d} be the input feature vectors and y1,⋯,yn∈ℝsubscript𝑦1⋯subscript𝑦𝑛ℝy_{1},\cdots,y_{n}\in{\mathbb{R}}be the corresponding response.The goal of supervised learning is to compute a model from the training data,which can be achieved by minimizing an empirical risk function, i.e.,min𝐰∈ℝd{f(𝐰)≜1n∑j=1nℓj(𝐰T𝐱j)+γ2‖𝐰‖22},subscript𝐰superscriptℝ𝑑≜𝑓𝐰1𝑛superscriptsubscript𝑗1𝑛subscriptℓ𝑗superscript𝐰𝑇subscript𝐱���𝛾2superscriptsubscriptnorm𝐰22\displaystyle\min_{{\bf w}\in{\mathbb{R}}^{d}}\;\bigg{\{}f({\bf w})\;\triangleq\;\frac{1}{n}\sum_{j=1}^{n}\ell_{j}({\bf w}^{T}{\bf x}_{j})+\frac{\gamma}{2}\|{\bf w}\|_{2}^{2}\bigg{\}},(1)where ℓj:ℝ↦ℝ:subscriptℓ𝑗maps-toℝℝ\ell_{j}:{\mathbb{R}}\mapsto{\mathbb{R}} is convex, twice differentiable, and smooth.We further assume that f𝑓f is strongly convex, which in turn, implies the uniqueness of the minimizer of (1), denoted throughout the text by 𝐰⋆superscript𝐰⋆{\bf w}^{\star}.Note that yjsubscript𝑦𝑗y_{j} is implicitly captured by ℓjsubscriptℓ𝑗\ell_{j}.Examples of the loss function, ℓjsubscriptℓ𝑗\ell_{j}, appearing in (1) includelinear regression:ℓj(zj)=12(zj−yj)2,linear regression:subscriptℓ𝑗subscript𝑧𝑗12superscriptsubscript𝑧𝑗subscript𝑦𝑗2\displaystyle\textrm{linear regression:}\qquad\ell_{j}(z_{j})=\tfrac{1}{2}(z_{j}-y_{j})^{2},logistic regression:ℓj(zj)=log(1+e−zjyj).logistic regression:subscriptℓ𝑗subscript𝑧𝑗1superscript𝑒subscript𝑧𝑗subscript𝑦𝑗\displaystyle\textrm{logistic regression:}\quad\;\ell_{j}(z_{j})=\log(1+e^{-z_{j}y_{j}}).
|
| 28 |
+
|
| 29 |
+
Suppose the n𝑛n feature vectors and loss functions (𝐱1,ℓ1),⋯,(𝐱n,ℓn)subscript𝐱1subscriptℓ1⋯subscript𝐱𝑛subscriptℓ𝑛({\bf x}_{1},\ell_{1}),\cdots,({\bf x}_{n},\ell_{n}) are partitioned among m𝑚m worker machines.Let s≜n/m≜𝑠𝑛𝑚s\triangleq{n}/{m} be the local sample size.Our theories require s>d𝑠𝑑s>d; nevertheless, GIANT empirically works well for s<d𝑠𝑑s<d.
|
| 30 |
+
|
| 31 |
+
We consider solving (1) in the regimes where n≫dmuch-greater-than𝑛𝑑n\gg d.We assume that the data points, {𝐱i}i=1nsuperscriptsubscriptsubscript𝐱𝑖𝑖1𝑛\{{\bf x}_{i}\}_{i=1}^{n} are partitioned among m𝑚m machines, with possible overlaps, such that the number of local data is larger than d𝑑d.Otherwise, if n≪dmuch-less-than𝑛𝑑n\ll d, we can consider the dual problem and partition features.If the dual problem is also decomposable, smooth, strongly convex, and unconstrained, e.g., ridge regression, then our approach directly applies.
|
| 32 |
+
|
| 33 |
+
In this section, we present the algorithm derivation and complexity analysis.GIANT is a centralized and synchronous method; one iteration of GIANT is depicted in Figure 1.The key idea of GIANT is avoiding forming of the exact Hessian matrices 𝐇t∈ℝd×dsubscript𝐇𝑡superscriptℝ𝑑𝑑{\bf H}_{t}\in{\mathbb{R}}^{d\times d} in order to avoid expensive communications.
|
| 34 |
+
|
| 35 |
+
GIANT iterations require the exact gradient, which in the t𝑡t-th iteration, can be written as𝐠t=∇f(𝐰t)=1n∑j=1nℓj′(𝐰tT𝐱j)𝐱j+γ𝐰t∈ℝd.subscript𝐠𝑡∇𝑓subscript𝐰𝑡1𝑛superscriptsubscript𝑗1𝑛superscriptsubscriptℓ𝑗′superscriptsubscript𝐰𝑡𝑇subscript𝐱𝑗subscript𝐱𝑗𝛾subscript𝐰𝑡superscriptℝ𝑑\displaystyle{\bf g}_{t}\;=\;\nabla f({\bf w}_{t})\;=\;\frac{1}{n}\sum_{j=1}^{n}\ell_{j}^{\prime}({\bf w}_{t}^{T}{\bf x}_{j})\;{\bf x}_{j}+\gamma{\bf w}_{t}\;\in\;{\mathbb{R}}^{d}.(2)The gradient, 𝐠tsubscript𝐠𝑡{\bf g}_{t} can be computed, embarrassingly, in parallel.The driver Broadcasts 𝐰tsubscript𝐰𝑡{\bf w}_{t} to all the worker machines. Each machine then uses its own {(𝐱j,ℓj)}subscript𝐱𝑗subscriptℓ𝑗\{({\bf x}_{j},\ell_{j})\} to compute its local gradient. Subsequently, the driver performs a Reduce operation to sum up the local gradients and get 𝐠tsubscript𝐠𝑡{\bf g}_{t}.The per-iteration communication complexity is 𝒪~(d)~𝒪𝑑\tilde{{\mathcal{O}}}(d) words, where 𝒪~~𝒪\tilde{{\mathcal{O}}} hides the dependence on m𝑚m (which can be m𝑚m or logm𝑚\log m, depending on the network structure).
|
| 36 |
+
|
| 37 |
+
More specifically, in the t𝑡t-th iteration, the Hessian matrix at 𝐰t∈ℝdsubscript𝐰𝑡superscriptℝ𝑑{\bf w}_{t}\in{\mathbb{R}}^{d} can be written as𝐇t=∇2f(𝐰t)=1n∑j=1nℓj′′(𝐰tT𝐱j)⋅𝐱j𝐱jT+γ𝐈d.subscript𝐇𝑡superscript∇2𝑓subscript𝐰𝑡1𝑛superscriptsubscript𝑗1𝑛⋅superscriptsubscriptℓ𝑗′′superscriptsubscript𝐰𝑡𝑇subscript𝐱𝑗subscript𝐱𝑗superscriptsubscript𝐱𝑗𝑇𝛾subscript𝐈𝑑\displaystyle{\bf H}_{t}\;=\;\nabla^{2}f({\bf w}_{t})\;=\;\frac{1}{n}\sum_{j=1}^{n}\ell_{j}^{\prime\prime}({\bf w}_{t}^{T}{\bf x}_{j})\cdot{\bf x}_{j}{\bf x}_{j}^{T}+\gamma{\bf I}_{d}.(3)To compute the exact Hessian, the driver must aggregate the m𝑚m local Hessian matrices (each of size d×d𝑑𝑑d\times d) by one Reduce operation, which has 𝒪~(d2)~𝒪superscript𝑑2\tilde{{\mathcal{O}}}(d^{2}) communication complexity and is obviously impractical when d𝑑d is thousands.The Hessian approximation developed in this paper has a mere 𝒪~(d)~𝒪𝑑\tilde{{\mathcal{O}}}(d) communication complexity which is the same to the first-order methods.
|
| 38 |
+
|
| 39 |
+
Assume each worker machine locally holds s𝑠s random samples drawn from {(𝐱j,ℓj)}j=1nsuperscriptsubscriptsubscript𝐱𝑗subscriptℓ𝑗𝑗1𝑛\{({\bf x}_{j},\ell_{j})\}_{j=1}^{n}.444If the samples themselves are i.i.d. drawn from some distribution, then a data-independent partition is equivalent to uniform sampling. Otherwise, the system can Shuffle the data.Let 𝒥isubscript𝒥𝑖{\mathcal{J}}_{i} be the set containing the indices of the samples held by the i𝑖i-th machine, and s=|𝒥i|𝑠subscript𝒥𝑖s=|{\mathcal{J}}_{i}| denote its size.Each worker machine can use its local samples to form a local Hessian matrix𝐇~t,i=1s∑j∈𝒥iℓj′′(𝐰tT𝐱j)⋅𝐱j𝐱jT+γ𝐈d.subscript~𝐇𝑡𝑖1𝑠subscript𝑗subscript𝒥𝑖⋅superscriptsubscriptℓ𝑗′′superscriptsubscript𝐰𝑡𝑇subscript𝐱𝑗subscript𝐱𝑗superscriptsubscript𝐱𝑗𝑇𝛾subscript𝐈𝑑\displaystyle\widetilde{{\bf H}}_{t,i}\;=\;\frac{1}{s}\sum_{j\in{\mathcal{J}}_{i}}\ell_{j}^{\prime\prime}({\bf w}_{t}^{T}{\bf x}_{j})\cdot{\bf x}_{j}{\bf x}_{j}^{T}+\gamma{\bf I}_{d}.Clearly, 𝔼[𝐇~t,i]=𝐇t𝔼delimited-[]subscript~𝐇𝑡𝑖subscript𝐇𝑡{\mathbb{E}}[\widetilde{{\bf H}}_{t,i}]={\bf H}_{t}.We define the Approximate NewTon (ANT) direction by 𝐩~t,i=𝐇~t,i−1𝐠tsubscript~𝐩𝑡𝑖superscriptsubscript~𝐇𝑡𝑖1subscript𝐠𝑡\tilde{{\bf p}}_{t,i}\;=\;\widetilde{{\bf H}}_{t,i}^{-1}{\bf g}_{t}.The cost of computing the ANT direction 𝐩~t,isubscript~𝐩𝑡𝑖\tilde{{\bf p}}_{t,i} in this way, involves 𝒪(sd2)𝒪𝑠superscript𝑑2{\mathcal{O}}(sd^{2}) time to form the d×d𝑑𝑑d\times d dense matrix 𝐇~t,isubscript~𝐇𝑡𝑖\widetilde{{\bf H}}_{t,i} and 𝒪(d3)𝒪superscript𝑑3{\mathcal{O}}(d^{3}) to invert it.To reduce the computational cost, we opt to compute the ANT direction by the conjugate gradient (CG) method [34].Let 𝐚j=ℓj′′(𝐰tT𝐱j)⋅𝐱j∈ℝdsubscript𝐚𝑗⋅superscriptsubscriptℓ𝑗′′superscriptsubscript𝐰𝑡𝑇subscript𝐱𝑗subscript𝐱𝑗superscriptℝ𝑑{\bf a}_{j}=\sqrt{\ell_{j}^{\prime\prime}({\bf w}_{t}^{T}{\bf x}_{j})}\cdot{\bf x}_{j}\in{\mathbb{R}}^{d},𝐀t=[𝐚1T;⋯;𝐚nT]∈ℝn×d,subscript𝐀𝑡superscriptsubscript𝐚1𝑇⋯superscriptsubscript𝐚𝑛𝑇superscriptℝ𝑛𝑑\displaystyle{\bf A}_{t}\;=\;[{\bf a}_{1}^{T};\cdots;{\bf a}_{n}^{T}]\;\in\;{\mathbb{R}}^{n\times d},(4)and 𝐀t,i∈ℝs×dsubscript𝐀𝑡𝑖superscriptℝ𝑠𝑑{\bf A}_{t,i}\in{\mathbb{R}}^{s\times d} contain the rows of 𝐀tsubscript𝐀𝑡{\bf A}_{t} indexed by the set 𝒥isubscript𝒥𝑖{\mathcal{J}}_{i}.Using the matrix notation, we can write the local Hessian matrix as𝐇~t,i=1s𝐀t,iT𝐀t,i+γ𝐈d.subscript~𝐇𝑡𝑖1𝑠superscriptsubscript𝐀𝑡𝑖𝑇subscript𝐀𝑡𝑖𝛾subscript𝐈𝑑\displaystyle\widetilde{{\bf H}}_{t,i}\;=\;\tfrac{1}{s}{\bf A}_{t,i}^{T}{\bf A}_{t,i}+\gamma{\bf I}_{d}.(5)Employing CG, it is thus unnecessary to explicitly form 𝐇~t,isubscript~𝐇𝑡𝑖\widetilde{{\bf H}}_{t,i}. Indeed, one can simply approximately solve(1s𝐀t,iT𝐀t,i+γ𝐈d)𝐩=𝐠t1𝑠superscriptsubscript𝐀𝑡𝑖𝑇subscript𝐀𝑡𝑖𝛾subscript𝐈𝑑𝐩subscript𝐠𝑡\displaystyle\big{(}\tfrac{1}{s}{\bf A}_{t,i}^{T}{\bf A}_{t,i}+\gamma{\bf I}_{d}\big{)}\,{\bf p}\;=\;{\bf g}_{t}(6)in a “Hessian-free” manner, i.e., by employing only Hessian-vector products in CG iterations.
|
| 40 |
+
|
| 41 |
+
Using random matrix concentration, we can show that for sufficiently large s𝑠s, the local Hessian matrix 𝐇~t,isubscript~𝐇𝑡𝑖\widetilde{{\bf H}}_{t,i} is a spectral approximation to 𝐇tsubscript𝐇𝑡{\bf H}_{t}. Now let 𝐩~t,isubscript~𝐩𝑡𝑖\tilde{{\bf p}}_{t,i} be an ANT direction.The Globally Improved ANT (GIANT) direction is defined as𝐩~t=1m∑i=1m𝐩~t,i=1m∑i=1m𝐇~t,i−1𝐠t=𝐇~t−1𝐠t.subscript~𝐩𝑡1𝑚superscriptsubscript𝑖1𝑚subscript~𝐩𝑡𝑖1𝑚superscriptsubscript𝑖1𝑚superscriptsubscript~𝐇𝑡𝑖1subscript𝐠𝑡superscriptsubscript~𝐇𝑡1subscript𝐠𝑡\displaystyle\tilde{{\bf p}}_{t}\;=\;\frac{1}{m}\sum_{i=1}^{m}\tilde{{\bf p}}_{t,i}\;=\;\frac{1}{m}\sum_{i=1}^{m}\widetilde{{\bf H}}_{t,i}^{-1}{\bf g}_{t}\;=\;\widetilde{{\bf H}}_{t}^{-1}{\bf g}_{t}.(7)Interestingly, here 𝐇~tsubscript~𝐇𝑡\widetilde{{\bf H}}_{t} is the harmonic mean defined as𝐇~t≜(1m∑i=1m𝐇~t,i−1)−1≜subscript~𝐇𝑡superscript1𝑚superscriptsubscript𝑖1𝑚superscriptsubscript~𝐇𝑡𝑖11\widetilde{{\bf H}}_{t}\triangleq(\frac{1}{m}\sum_{i=1}^{m}\widetilde{{\bf H}}_{t,i}^{-1})^{-1},whereas the true Hessian 𝐇tsubscript𝐇𝑡{\bf H}_{t} is the arithmetic mean defined as 𝐇t≜1m∑i=1m𝐇~t,i≜subscript𝐇𝑡1𝑚superscriptsubscript𝑖1𝑚subscript~𝐇𝑡𝑖{\bf H}_{t}\triangleq\frac{1}{m}\sum_{i=1}^{m}\widetilde{{\bf H}}_{t,i}.If the data is incoherent, that is, the “information” is spread-out rather than concentrated to a small fraction of samples,then the harmonic mean and the arithmetic mean are very close to each other,and thereby the GIANT direction 𝐩~t=𝐇~−1𝐠tsubscript~𝐩𝑡superscript~𝐇1subscript𝐠𝑡\tilde{{\bf p}}_{t}=\widetilde{{\bf H}}^{-1}{\bf g}_{t} very well approximates the true Newton direction 𝐇−1𝐠tsuperscript𝐇1subscript𝐠𝑡{\bf H}^{-1}{\bf g}_{t}.This is the intuition of our global improvement.
|
| 42 |
+
|
| 43 |
+
The motivation of using the harmonic mean, 𝐇~tsubscript~𝐇𝑡\widetilde{{\bf H}}_{t}, to approximate the arithmetic mean (the true Hessian matrix), 𝐇tsubscript𝐇𝑡{\bf H}_{t}, is the communication cost.Computing the arithmetic mean 𝐇t≜1m∑i=1m𝐇~t,i≜subscript𝐇𝑡1𝑚superscriptsubscript𝑖1𝑚subscript~𝐇𝑡𝑖{\bf H}_{t}\triangleq\frac{1}{m}\sum_{i=1}^{m}\widetilde{{\bf H}}_{t,i} would require the communication of d×d𝑑𝑑d\times d matrices which is very expensive.In contrast, computing 𝐩~tsubscript~𝐩𝑡\tilde{{\bf p}}_{t} merely requires the communication of d𝑑d-dimensional vectors.
|
| 44 |
+
|
| 45 |
+
For each worker machine, the per-iteration time complexity is 𝒪(sdq)𝒪𝑠𝑑𝑞{\mathcal{O}}(sdq), where s𝑠s is the local sample size and q𝑞q is the number of CG iterations for (approximately) solving (6).(See Proposition 5 for the setting of q𝑞q.)If the feature matrix 𝐗∈ℝn×d𝐗superscriptℝ𝑛𝑑{\bf X}\in{\mathbb{R}}^{n\times d} has a sparsity of ϱ=nnz(𝐗)/(nd)<1italic-ϱnnz𝐗𝑛𝑑1\varrho={\mathrm{nnz}({\bf X})}/{(nd)}<1, the expected per-iteration time complexity is then 𝒪(ϱsdq)𝒪italic-ϱ𝑠𝑑𝑞{\mathcal{O}}(\varrho sdq).
|
| 46 |
+
|
| 47 |
+
Each iteration of GIANT has four rounds of communications: two Broadcast for sending and two Reduce for aggregating some d𝑑d-dimensional vector.If the communication is in a tree fashion, the per-iteration communication complexity is then 𝒪~(d)~𝒪𝑑\tilde{{\mathcal{O}}}(d) words, where 𝒪~~𝒪\tilde{{\mathcal{O}}} hides the factor involving m𝑚m which can be m𝑚m or logm𝑚\log m.
|
| 48 |
+
|
| 49 |
+
In this section, we formally present the convergence guarantees of GIANT. Section 4.1 focuses on quadratic loss and treats the global convergence of GIANT. This is then followed by local convergence properties of GIANT for more general non-quadratic loss in Section 4.2.For the results of Sections 4.1 and 4.2, we require that the local linear system to obtain the local Newton direction is solved exactly. Section 4.3 then relaxes this requirement to allow for inexactness in the solution, and establishes similar convergence rates as those of exact variants.
|
| 50 |
+
|
| 51 |
+
For our analysis here, we frequently make use of the notion of matrix row coherence, defined as follows.
|
| 52 |
+
|
| 53 |
+
In this section, we consider a special case of (1) with ℓi(z)=(z−yi)2/2subscriptℓ𝑖𝑧superscript𝑧subscript𝑦𝑖22\ell_{i}(z)=(z-y_{i})^{2}/2, i.e., the quadratic optimization problems:f(𝐰)𝑓𝐰\displaystyle f({\bf w})=\displaystyle=12n‖𝐗𝐰−𝐲‖22+γ2‖𝐰‖22.12𝑛superscriptsubscriptnorm𝐗𝐰𝐲22𝛾2superscriptsubscriptnorm𝐰22\displaystyle\tfrac{1}{2n}\big{\|}{\bf X}{\bf w}-{\bf y}\big{\|}_{2}^{2}+\tfrac{\gamma}{2}\|{\bf w}\|_{2}^{2}.(8)The Hessian matrix is given as ∇2f(𝐰)=1n𝐗T𝐗+γ𝐈dsuperscript∇2𝑓𝐰1𝑛superscript𝐗𝑇𝐗𝛾subscript𝐈𝑑\nabla^{2}f({\bf w})=\frac{1}{n}{\bf X}^{T}{\bf X}+\gamma{\bf I}_{d}, which does not depend on 𝐰𝐰{\bf w}. Theorem 1 describes the convergence of the error in the iterates, i.e., 𝚫t≜𝐰t−𝐰⋆≜subscript𝚫𝑡subscript𝐰𝑡superscript𝐰⋆\mbox{\boldmath$\Delta$\unboldmath}_{t}\triangleq{\bf w}_{t}-{\bf w}^{\star}.
|
| 54 |
+
|
| 55 |
+
For more general (not necessarily quadratic) but smooth loss, GIANT has linear-quadratic local convergence,which is formally stated in Theorem 2 and Corollary 3.Let 𝐇⋆=∇2f(𝐰⋆)superscript𝐇⋆superscript∇2𝑓superscript𝐰⋆{\bf H}^{\star}=\nabla^{2}f({\bf w}^{\star}) and 𝐇t=∇2f(𝐰t)subscript𝐇𝑡superscript∇2𝑓subscript𝐰𝑡{\bf H}_{t}=\nabla^{2}f({\bf w}_{t}).For this general case, we assume the Hessian is L𝐿L-Lipschitz, which is a standard assumption in analyzing second-order methods.
|
| 56 |
+
|
| 57 |
+
Theorem 2 establishes the linear-quadratic convergence of 𝚫t≜𝐰t−𝐰⋆≜subscript𝚫𝑡subscript𝐰𝑡superscript𝐰⋆\mbox{\boldmath$\Delta$\unboldmath}_{t}\triangleq{\bf w}_{t}-{\bf w}^{\star}.We remind that 𝐀t∈ℝn×dsubscript𝐀𝑡superscriptℝ𝑛𝑑{\bf A}_{t}\in{\mathbb{R}}^{n\times d} is defined in (4) (thus 𝐀tT𝐀t+γ𝐈d=𝐇tsuperscriptsubscript𝐀𝑡𝑇subscript𝐀𝑡𝛾subscript𝐈𝑑subscript𝐇𝑡{\bf A}_{t}^{T}{\bf A}_{t}+\gamma{\bf I}_{d}={\bf H}_{t}).Note that, unlike Section 4.1, the coherence of 𝐀tsubscript𝐀𝑡{\bf A}_{t}, denote μtsubscript𝜇𝑡\mu_{t}, changes with iterations.
|
| 58 |
+
|
| 59 |
+
Note that in Theorem 2 the convergence depends on the condition numbers of the Hessian at every point.Due to the Lipschitz assumption on the Hessian, it is easy to see thatthe condition number of the Hessian in a neighborhood of 𝐰⋆superscript𝐰⋆{\bf w}^{\star}is close to κ(𝐇⋆)𝜅superscript𝐇⋆\kappa({\bf H}^{\star}).This simple observation implies Corollary 3, in which the dependence of the local convergence of GIANT on iterations via 𝐇tsubscript𝐇𝑡{\bf H}_{t} is removed.
|
| 60 |
+
|
| 61 |
+
In the t𝑡t-th iteration, the i𝑖i-th worker locally computes 𝐩~t,isubscript~𝐩𝑡𝑖\tilde{{\bf p}}_{t,i} by solving𝐇~t,i𝐩=𝐠tsubscript~𝐇𝑡𝑖𝐩subscript𝐠𝑡\widetilde{{\bf H}}_{t,i}{\bf p}={\bf g}_{t}, where 𝐇~t,isubscript~𝐇𝑡𝑖\widetilde{{\bf H}}_{t,i} is the i𝑖i-th local Hessian matrix defined in (5).In high-dimensional problems, say d≥104𝑑superscript104d\geq 10^{4}, the exact formation of 𝐇~t,i∈ℝd×dsubscript~𝐇𝑡𝑖superscriptℝ𝑑𝑑\widetilde{{\bf H}}_{t,i}\in{\mathbb{R}}^{d\times d} and its inversion are impractical.Instead, we could employ iterative linear system solvers, such as CG, to inexactly solve the arising linear system in (6).Let 𝐩~t,i′superscriptsubscript~𝐩𝑡𝑖′\tilde{{\bf p}}_{t,i}^{\prime} be an inexact solution which is close to 𝐩~t,i≜𝐇~t,i−1𝐠t≜subscript~𝐩𝑡𝑖superscriptsubscript~𝐇𝑡𝑖1subscript𝐠𝑡\tilde{{\bf p}}_{t,i}\triangleq\widetilde{{\bf H}}_{t,i}^{-1}{\bf g}_{t}, in the sense that‖𝐇~t,i1/2(𝐩~t,i′−𝐩~t,i)‖2≤ϵ02‖𝐇~t,i1/2𝐩~t,i‖2,subscriptnormsuperscriptsubscript~𝐇𝑡𝑖12superscriptsubscript~𝐩𝑡𝑖′subscript~𝐩𝑡𝑖2subscriptitalic-ϵ02subscriptnormsuperscriptsubscript~𝐇𝑡𝑖12subscript~𝐩𝑡𝑖2\displaystyle\Big{\|}\widetilde{{\bf H}}_{t,i}^{1/2}\,\big{(}\tilde{{\bf p}}_{t,i}^{\prime}-\tilde{{\bf p}}_{t,i}\big{)}\Big{\|}_{2}\;\leq\;\frac{{\epsilon}_{0}}{2}\Big{\|}\widetilde{{\bf H}}_{t,i}^{1/2}\,\tilde{{\bf p}}_{t,i}\Big{\|}_{2},(9)for some ϵ0∈(0,1)subscriptitalic-ϵ001{{\epsilon}}_{0}\in(0,1). GIANT then takes 𝐩~t′=1m∑i=1m𝐩~t,i′superscriptsubscript~𝐩𝑡′1𝑚superscriptsubscript𝑖1𝑚superscriptsubscript~𝐩𝑡𝑖′\tilde{{\bf p}}_{t}^{\prime}=\frac{1}{m}\sum_{i=1}^{m}\tilde{{\bf p}}_{t,i}^{\prime}as the approximate Newton direction in lieu of 𝐩~tsubscript~𝐩𝑡\tilde{{\bf p}}_{t}.In this case, as long as ϵ0subscriptitalic-ϵ0{{\epsilon}}_{0} is of the same order as ηm+η2𝜂𝑚superscript𝜂2\frac{{\color[rgb]{0,0.6,0}\eta}}{\sqrt{m}}+{{\color[rgb]{0,0.6,0}\eta}}^{2},the convergence rate of such inexact variant of GIANT remains similar to the exact algorithm in which the local linear system is solved exactly. Theorem 4 makes convergence properties of inexact GIANT more explicit.
|
| 62 |
+
|
| 63 |
+
Proposition 5 gives conditions to guarantee (9), which is, in turn, required for Theorem 4.
|
| 64 |
+
|
| 65 |
+
Our experiments are conducted on logistic regression with ℓ2subscriptℓ2\ell_{2} regularization, i.e.,min𝐰1n∑j=1nlog(1+exp(−yj𝐱jT𝐰))+γ2‖𝐰‖22,subscript𝐰1𝑛superscriptsubscript𝑗1𝑛1subscript𝑦𝑗superscriptsubscript𝐱𝑗𝑇𝐰𝛾2superscriptsubscriptnorm𝐰22\displaystyle\min_{{\bf w}}\frac{1}{n}\sum_{j=1}^{n}\log\big{(}1+\exp({-y_{j}{\bf x}_{j}^{T}{\bf w}})\big{)}+\frac{\gamma}{2}\|{\bf w}\|_{2}^{2},(10)where 𝐱j∈ℝdsubscript𝐱𝑗superscriptℝ𝑑{\bf x}_{j}\in{\mathbb{R}}^{d} is a feature vectorand yj∈{−1,+1}subscript𝑦𝑗11y_{j}\in\{-1,+1\} is the corresponding response.For an unseen test sample 𝐱′superscript𝐱′{\bf x}^{\prime}, the logistic regression makes prediction by y′=sgn(𝐰T𝐱′)superscript𝑦′sgnsuperscript𝐰𝑇superscript𝐱′y^{\prime}=\mathrm{sgn}({\bf w}^{T}{\bf x}^{\prime}).
|
| 66 |
+
|
| 67 |
+
All the compared methods are implemented in Scala and Apache Spark [56] and experiments are conducted on the Cori Supercomputer maintained by NERSC. Cori is a Cray XC40 system with 1632 compute nodes, each of which has two 2.3GHz 16-core Haswell processors and 128GB of DRAM. The Cray Aries high-speed interconnect linking the compute nodes is configured in a dragonfly topology.
|
| 68 |
+
|
| 69 |
+
We compare GIANT with three methods: Accelerated Gradient Descent (AGD) [33],Limited memory BFGS (L-BFGS) [18], and Distributed Approximate NEwton (DANE) [46].For each method, we try different settings for their respective parameters and report the best performance.
|
| 70 |
+
|
| 71 |
+
-GIANT has only one tuning parameter, i.e., the maximum number of CG iterations to approximately solve the local sub-problems.-Accelerated Gradient Descent (AGD)repeats the following two steps:𝐯t+1=β𝐯t+𝐠tsubscript𝐯𝑡1𝛽subscript𝐯𝑡subscript𝐠𝑡{\bf v}_{t+1}=\beta{\bf v}_{t}+{\bf g}_{t} and 𝐰t+1=𝐰t−α𝐯t+1subscript𝐰𝑡1subscript𝐰𝑡𝛼subscript𝐯𝑡1{\bf w}_{t+1}={\bf w}_{t}-\alpha{\bf v}_{t+1}.Here 𝐠tsubscript𝐠𝑡{\bf g}_{t} is the gradient, 𝐯tsubscript𝐯𝑡{\bf v}_{t} is the momentum, and α>0𝛼0\alpha>0 and β∈[0,1)𝛽01\beta\in[0,1) are tuning parameters.We choose α𝛼\alpha and β𝛽\beta from {0.1,1,10,100}0.1110100\{0.1,1,10,100\} and {0.5,0.9,0.95,0.99,0.999}0.50.90.950.990.999\{0.5,0.9,0.95,0.99,0.999\}, respectively.We are aware of several variants of AGD; we just compare with one of them.-L-BFGS is a quasi-Newton method that approximates the BFGS method using a limited amount of memory.L-BFGS has one tuning parameter, i.e., the history size, which introduces a trade-off between the memory and computational costs as well as convergence rate.-Distributed Approximate NEwton (DANE)was proposed by [46]; here we use the inexact DANE studied by [39].DANE bears a strong resemblance with GIANT:the local sub-problem of DANE is still a logistic regression,whereas the sub-problem of GIANT is a quadratic approximation to the logistic regression.We have tried AGD and SVRG [12] to solve the corresponding sub-problem and found SVRG to perform much better than AGD.DANE seems to be sensitive to two parameters:the step size (learning rate) and the stopping criterion of SVRG.We choose the step size and the maximal iteration of SVRG from {0.1,1,10,100}0.1110100\{0.1,1,10,100\} and {30,100,300}30100300\{30,100,300\}, respectively.
|
| 72 |
+
|
| 73 |
+
We do not compare with CoCoA [22], DiSCO [57], and AIDE [39] for the following reasons.
|
| 74 |
+
|
| 75 |
+
-CoCoA. The local sub-problems of CoCoA are the dual problems of logistic regression, which is indeed a constrained problem and is, computationally, much more expensive than unconstrained optimization. Unfortunately, in [22], we did not find an appropriate description of how to solve such constrained sub-problems efficiently.-DiSCO.In each iteration, each worker machine is merely charged with performing a matrix-vector multiplication, while the driver must solve a d×d𝑑𝑑d\times d linear system. When d𝑑d is small, DiSCO can be efficient.When d𝑑d is at the thousand scale, most computations are performed by the driver rather than the workers, which are mostly left idle.When d=104𝑑superscript104d=10^{4}, solving the d×d𝑑𝑑d\times d linear system on the driver machine will make DiSCO infeasible.-AIDE is an “accelerated” version of DANE.AIDE invokes DANE as its sub-routine and has one more tuning parameter.However, unlike what we had expected, in all of our off-line small-scale numerical simulations, DANE consistently outperformed AIDE (both with line search).We believe that the Nesterov acceleration does not help make Newton-type method faster.Hence, we opted not to spend our limited budget of Cori CPU hours to conduct a comparison with AIDE.
|
| 76 |
+
|
| 77 |
+
For the compared methods—GIANT, L-BFGS, DANE—we use the backtracking line search to determine the step size.Specifically, let 𝐩𝐩{\bf p} be a computed descending direction at 𝐰𝐰{\bf w}, we seek to find a step size α𝛼\alpha that satisfies the Armijo–Goldstein condition:f(𝐰+α𝐩)≤f(𝐰)+αc⟨𝐩,∇f(𝐰)⟩,𝑓𝐰𝛼𝐩𝑓𝐰𝛼𝑐𝐩∇𝑓𝐰\displaystyle f({\bf w}+\alpha{\bf p})\;\leq\;f({\bf w})+\alpha c\big{\langle}{\bf p},\,\nabla f({\bf w})\big{\rangle},where f𝑓f is the objective function.Throughout, we fix the control parameter to c=0.1𝑐0.1c=0.1 and select the step size, α𝛼\alpha, from the candidate set 𝒜={40,4−1,⋯,4−9}𝒜superscript40superscript41⋯superscript49{\mathcal{A}}=\{4^{0},4^{-1},\cdots,4^{-9}\}.These line search parameters are problem-independent and data-independent and do not need tuning.According to our off-line experiments, the tuning of these parameter does not demonstrate substantial improvement to the convergence.
|
| 78 |
+
|
| 79 |
+
Line search requires two extra rounds of communications.First, the driver Broadcasts 𝐩∈ℝd𝐩superscriptℝ𝑑{\bf p}\in{\mathbb{R}}^{d} to all the worker machines, and subsequently, every worker machine (say the i𝑖i-th) computes its local objective values fi(𝐰+α𝐩)subscript𝑓𝑖𝐰𝛼𝐩f_{i}({\bf w}+\alpha{\bf p}) for α𝛼\alpha in the set of candidate step sizes, 𝒜𝒜{\mathcal{A}}.Second, the driver sums the local objective values by a Reduce operation and obtain f(𝐰+α𝐩)𝑓𝐰𝛼𝐩f({\bf w}+\alpha{\bf p}) for α∈𝒜𝛼𝒜\alpha\in{\mathcal{A}}.Then the driver can locally select a step size from 𝒜𝒜{\mathcal{A}} which satisfies the Armijo–Goldstein condition.
|
| 80 |
+
|
| 81 |
+
The communication complexity of line search is 𝒪~(d)~𝒪𝑑\tilde{{\mathcal{O}}}(d), which is the same as computing the gradient.The local computational cost of line search is at most |𝒜|𝒜|{\mathcal{A}}| times higher than computing the gradient.
|
| 82 |
+
|
| 83 |
+
We used three classification datasets: MNIST8M (n=8M𝑛8𝑀n=8M and d=784𝑑784d=784), Epsilon (n=500K𝑛500𝐾n=500K and d=2K𝑑2𝐾d=2K), and Covtype (n=581K𝑛581𝐾n=581K and d=54𝑑54d=54), which are available at the LIBSVM website.We randomly hold 80%percent8080\% for training and the rest for test.To increase the size of the data, we generate 104superscript10410^{4} random Fourier features [36] and use them in lieu of the original features in the logistic regression problem.We use the RBF kernel k(𝐱i,𝐱j)=exp(−12σ‖𝐱i−𝐱j‖22)𝑘subscript𝐱𝑖subscript𝐱𝑗12𝜎superscriptsubscriptnormsubscript𝐱𝑖subscript𝐱𝑗22k({\bf x}_{i},{\bf x}_{j})=\exp(-\tfrac{1}{2\sigma}\|{\bf x}_{i}-{\bf x}_{j}\|_{2}^{2}) and fix σ𝜎\sigma asσ=∑i,j‖𝐱i−𝐱j‖22𝜎subscript𝑖𝑗superscriptsubscriptnormsubscript𝐱𝑖subscript𝐱𝑗22\sigma={\sum_{i,j}\|{\bf x}_{i}-{\bf x}_{j}\|_{2}^{2}}.
|
| 84 |
+
|
| 85 |
+
We use different settings of the regularization parameter γ𝛾\gamma, which affects the condition number of the Hessian matrix and thereby the convergence rate.We report the results in Figures 2, 3, and 4 which clearly demonstrate the superior performance of GIANT.Using the same amount of wall-clock time, GIANT converges faster than AGD, DANE, and L-BFGS in terms of both training objective value and test classification error.
|
| 86 |
+
|
| 87 |
+
Our theory requires the local sample size s=nm𝑠𝑛𝑚s=\frac{n}{m} to be larger than d𝑑d.But in practice, GIANT converges even if s𝑠s is smaller than d𝑑d.In this set of experiments, we set m=89𝑚89m=89, and thus s𝑠s is about half of d𝑑d.Nevetheless, GIANT with line search converges in all of our experiments.
|
| 88 |
+
|
| 89 |
+
To test the scalability of the compared methods, we increase the number of samples by a factor of k𝑘k by data augmentation.We replicate X𝑋X and y𝑦y and stack them to form a kn×d𝑘𝑛𝑑kn\times d feature matrix and a kn𝑘𝑛kn-dimensional label vector.We inject i.i.d. Gaussian noise 𝒩(0,0.022)𝒩0superscript0.022{\mathcal{N}}(0,0.02^{2}) to every entry of the obtained feature matrix.We do the 80%percent8080\%—20%percent2020\% random partition to get training and test sets and then the random feature mapping.Because the data get k𝑘k times larger, we accordingly use k𝑘k times more compute nodes.We set k=5𝑘5k=5 and report the results in Figure 5; we set k=25𝑘25k=25 and report the results in Figure 6.
|
| 90 |
+
|
| 91 |
+
Figures 4, 5, and 6 respectively show the results on the n×d𝑛𝑑n\times d dataset, the 5n×d5𝑛𝑑5n\times d dataset, and the 25n×d25𝑛𝑑25n\times d data.For the k𝑘k (k=5𝑘5k=5 or 252525) times larger data, we use k𝑘k times more compute nodes in order that the local computation per iteration remains the same.For AGD and L-BFGS, the convergence of the objective function in Figure 5 is slower than in Figure 4, because with 555 times more nodes, communication is slightly more expensive.In contrast, the communication-efficient methods, GIANT and DANE, are almost unaffected.
|
| 92 |
+
|
| 93 |
+
Now we explain why GIANT is more scalable than AGD and L-BFGS.On the one hand, using more compute nodes, the Broadcast and Reduce of a vector from/to all the nodes become more expensive, and the straggler’s effect (i.e., everyone waits for the slowest to complete) deteriorates.In short, the communication and synchronization costs increase rapidly with the number of nodes.On the other hand, since the size of data on each node does not vary, the per-iteration local computation remains the same.AGD and L-BFGS are highly iterative: in each iteration, they do a little computation and 2 rounds of communication.Thus the per-iteration time costs of AGD and L-BFGS increase significantly with the number of nodes; see Figure 7.GIANT is computation intensive: in each iteration, GIANT does much computation and just 6 rounds of communication (including the line search); since the cost is dominated by the local computation, the increase in the communication cost only marginally affects the total runtime.
|
| 94 |
+
|
| 95 |
+
We have proposed GIANT, a practical Newton-type method, for empirical risk minimization in distributed computing environments.In comparison to similar methods, GIANT has three desirable advantages.First, GIANT is guaranteed to converge to high precision in a small number of iterations,provided that the number of training samples, n𝑛n, is sufficiently large, relative to dm𝑑𝑚dm,where d𝑑d is the number of features and m𝑚m is the number of partitions.Second, GIANT is very communication efficient in that each iteration requires four or six rounds of communications, each with a complexity of merely 𝒪~(d)~𝒪𝑑\tilde{{\mathcal{O}}}(d).Third, in contrast to all other alternates, GIANT is easy to use, as it involves tuning one parameter.Empirical studies also showed the superior performance of GIANT as compared several other methods.
|
| 96 |
+
|
| 97 |
+
GIANT has been developed only for unconstrained problems with smooth and strongly convex objective function. However, we believe that similar ideas can be naturally extended to projected Newton for constrained problems, proximal Newton for non-smooth regularization, and trust-region method for nonconvex problems. However, strong convergence bounds of the extensions appear nontrivial and will be left for future work.
|
1709.03654v2.txt
ADDED
|
@@ -0,0 +1,399 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Face verification focuses on the problem of making machines automatically determine whether a pair of face images refer to the same identity.
|
| 3 |
+
As a fundamental research task, its development benefits various real-world applications, ranging from security surveillance to credit investigation.
|
| 4 |
+
Over the past decades, massive face verification methods have achieved significant progress \cite{sun2013hybrid,taigman2014deepface,sun2014deep,jing2016multi,zhang2016multi,he2017learning,huang2017beyond}, especially the ones profiting by the recently raised deep networks.
|
| 5 |
+
Nevertheless, there are still challenges remaining as bottlenecks in the real-world applications, such as pose \cite{huang2017beyond}, NIR-VIS \cite{he2017learning} and makeup changes, which are often summarized as heterogeneous tasks.
|
| 6 |
+
Due to the wide applications of facial cosmetics, the verification task of face images before and after makeup has drawn much attention in the computer vision society.
|
| 7 |
+
|
| 8 |
+
The history of cosmetics can be traced back to at least ancient Egypt \cite{burlando2010herbal}.
|
| 9 |
+
Nowadays wearing makeup is well accepted in the daily life, and is even regarded as a basic courtesy on many important occasions.
|
| 10 |
+
With appropriate cosmetic products, one can easily smooth skin, alter lip colour, change the shape of eyebrows, and accentuate eye regions.
|
| 11 |
+
All these operations are often used to hide facial flaws and improve perceived attractiveness.
|
| 12 |
+
But in the meanwhile, they also bring about remarkable facial appearance changes as exhibited in Figure \ref{pic1}, resulting in both global and local appearance discrepancies between the images with and without makeup.
|
| 13 |
+
Most of the existing face verification methods rely much on the various cues and information captured by the effective appearance features.
|
| 14 |
+
These methods inherently lack robustness over the application of makeup that is non-permanent as well as miscellaneous.
|
| 15 |
+
Recent study in \cite{dantcheva2012can} has claimed that the application of facial cosmetics decreases the performance of both commercial and academic face verification approaches significantly.
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
\begin{figure}[t]
|
| 19 |
+
\begin{center}
|
| 20 |
+
\includegraphics[width=0.7\linewidth]{pic1.png}
|
| 21 |
+
\end{center}
|
| 22 |
+
\caption{Samples of facial images with (the first and the third columns) and without (the second and the fourth columns) the application of cosmetics. The significant discrepancy of the same identity can be observed.}
|
| 23 |
+
\label{pic1}
|
| 24 |
+
\end{figure}
|
| 25 |
+
|
| 26 |
+
In contrast to the mentioned schemes, we consider from a new perspective and propose to settle the makeup-invariant face verification problem via a learning from generation framework.
|
| 27 |
+
This framework simultaneously considers makeup removal and face verification, and is implemented by an end-to-end bi-level adversarial network (BLAN).
|
| 28 |
+
It has the capacity of removing the cosmetics on a face image with makeup, namely synthesizing an appealing non-makeup image with identity information preserved, effectively reducing the adverse impact of facial makeup.
|
| 29 |
+
It promotes the verification performance of faces before and after makeup by imposing adversarial schemes on both pixel level and feature level.
|
| 30 |
+
Considering the variety and temporality characters of makeup, we first push the images to a uniform cosmetic status, the non-makeup status, by a Generative Adversarial Network (GAN) \cite{goodfellow2014generative}.
|
| 31 |
+
And then, deep features are extracted from the synthesized non-makeup faces for further verification task.
|
| 32 |
+
As is illustrated in Figure \ref{pic2}, the two steps above are not detached but integrated, for the adversarial loss on pixel level profits to generate perceptually better faces and the adversarial loss on feature level is employed to enhance the identity preservation.
|
| 33 |
+
Moreover, we also make the reconstruction well constrained via incorporating multiple priors such as symmetry and edges.
|
| 34 |
+
Experiments are conducted on three makeup datasets and favorable results demonstrate the efficiency of our framework.
|
| 35 |
+
|
| 36 |
+
The major contributions of our work are as follows.
|
| 37 |
+
\begin{itemize}
|
| 38 |
+
\item We propose a learning from generation framework for makeup-invariant face verification. To the best of our knowledge, our framework is the first to account for the possibility of accomplishing the makeup-invariant verification task with synthesized faces.
|
| 39 |
+
\item The bi-level adversarial network architecture is newly set up for our proposed framework. There are two adversarial schemes on different levels, with the one on pixel level contributing to reconstruct appealing face images and the other on feature level serving for identity maintenance.
|
| 40 |
+
\item To faithfully retain the characteristic facial structure of a certain individual, we affiliate multiple reconstruction losses in the network. Both convincingly quantitative and perceptual outcomes are achieved.
|
| 41 |
+
\end{itemize}
|
| 42 |
+
\section{Related Works}
|
| 43 |
+
|
| 44 |
+
\subsection{Face Verification}
|
| 45 |
+
As always, the face verification problem has attracted extensive attention and witnessed great progress.
|
| 46 |
+
Recent impressive works are mostly based on deep networks.
|
| 47 |
+
Sun et al. \cite{sun2013hybrid} proposed a hybrid convolutional network - Restricted Boltzmann Machine (ConvNet-RBM) model, which directly learns relational visual features from raw pixels of face pairs, for verification task in wild conditions.
|
| 48 |
+
The Deepface architecture was expounded in \cite{taigman2014deepface} to effectively leverage a very large labeled dataset of faces for obtaining a representation with generalization.
|
| 49 |
+
It also involved an alignment system based on explicit 3D modeling.
|
| 50 |
+
The Deep IDentification-verification features (DeepID2) were learned in \cite{sun2014deep} which uses both identification and verification information as supervision.
|
| 51 |
+
With the further development of the face verification task, there are approaches customized for some certain conditions.
|
| 52 |
+
For instance, Zhang et al. \cite{zhang2016multi} aimed at facilitating the verification performance between the clean face images and the corrupted ID photos.
|
| 53 |
+
Huang et al. \cite{huang2017beyond} attempted to accomplish the recognition task of face images under a large pose.
|
| 54 |
+
In this paper, we focus on the negative effects of the application of cosmetics over the verification systems, which is one of the most practical issue to be resolved in the real-world applications.
|
| 55 |
+
\subsection{Makeup Studies}
|
| 56 |
+
Makeup related studies, such as makeup recommendation \cite{alashkar2017examples}, have become more popular than ever.
|
| 57 |
+
However, relatively less articles pay attention on the challenge of makeup impact on face verification.
|
| 58 |
+
Among these existing works, most of them contrive to design a feature scheme artificially to impel the pair images of the same identity to have the maximum correlation.
|
| 59 |
+
To increase the similarity between face images of the same person, a meta subspace learning method was proposed in \cite{hu2013makeup}.
|
| 60 |
+
Guo et al. \cite{guo2014face} explored the correlation mapping between makeup and non-makeup faces on features extracted from local patches.
|
| 61 |
+
Chen et al. \cite{chen2016ensemble} introduced a patch-based ensemble learning method that uses subspaces generated by sampling patches from before and after makeup face images.
|
| 62 |
+
A hierarchical feature learning framework was demonstrated in \cite{zheng2017multi} that seeks for transformations of multi-level features.
|
| 63 |
+
In addition, Convolutional Neural Network (CNN) based schemes have been recently developed.
|
| 64 |
+
For example, \cite{sun2017weakly} proposed to pre-train network on the free videos and fine-tune it on small makeup and non-makeup datasets.
|
| 65 |
+
\subsection{Generative Adversarial Network}
|
| 66 |
+
Contemporarily, GAN \cite{goodfellow2014generative} is deemed as one of the most successful deep generative models and is applied in various vision related tasks (e.g., saliency detection \cite{hu2017adversarial}).
|
| 67 |
+
It corresponds to a min-max two-player game which ensures its ability of commendably estimating the target distribution and generating images that does not exist in the training set.
|
| 68 |
+
Thereafter, multifariously modified GANs are explored, especially the ones in conditional settings.
|
| 69 |
+
Pathak et al. \cite{pathak2016context} proposed Context Encoders to cope with the image inpainting and
|
| 70 |
+
Ledig et al. \cite{ledig2016photo} applied GAN to super-resolution.
|
| 71 |
+
The work in \cite{isola2016image} investigated conditional adversarial networks as a solution to image-to-image translation problems.
|
| 72 |
+
A Two-Pathway Generative Adversarial Network (TP-GAN) was established for photorealistic frontal view synthesis.
|
| 73 |
+
\section{Bi-level Adversarial Network}
|
| 74 |
+
\begin{figure*}[t]
|
| 75 |
+
\begin{center}
|
| 76 |
+
\includegraphics[width=0.8\linewidth]{pic2.png}
|
| 77 |
+
\end{center}
|
| 78 |
+
\caption{Diagram of the proposed Bi-level Adversarial Network. $I^A$ is an input image with makeup while $I^B$ stands for the corresponding non-makeup image. The generator $G$ learns to fool the two discriminators, where $D_p$ is on the pixel level and $D_f$ on the feature level.}
|
| 79 |
+
\label{pic2}
|
| 80 |
+
\end{figure*}
|
| 81 |
+
|
| 82 |
+
To refrain from the influence induced by facial makeup, we propose to synthesize a non-makeup image $I^B$ from a face image with makeup $I^A$ first, via a generative network.
|
| 83 |
+
And then, a deep feature is extracted from the synthesized $I^B$ to further accomplish the verification task.
|
| 84 |
+
We depict the overall structure of the proposed network in Figure \ref{pic2}, with the details described below.
|
| 85 |
+
\subsection{Notation and Overview}
|
| 86 |
+
The original GAN in \cite{goodfellow2014generative} takes random noise as input and maps it to output images in domains such as MNIST.
|
| 87 |
+
Different from it, we take images as input and set up our network as a conditional GAN.
|
| 88 |
+
The generator denoted as $G$ aims at learning a mapping from elements in domain $A$ (with makeup) to elements in domain $B$ (without makeup): $\mathbb{R}_A^{h \times w \times c} \to \mathbb{R}_B^{h \times w \times c}$, where the superscripts stand for the image size.
|
| 89 |
+
If not constrained, the learned mapping can be arbitrary.
|
| 90 |
+
Whereas, our network is tailored for further face verification application.
|
| 91 |
+
And the two key intuitions are that the non-makeup facial image should be well synthesized and that the input and output of $G$ should be identity invariant.
|
| 92 |
+
We thus impose the constraint on $G$ through introducing two adversarial discriminators on pixel level and feature level respectively.
|
| 93 |
+
|
| 94 |
+
During the training phase, image pairs $\{I^A, I^B\}$ with identity information $y$ are required.
|
| 95 |
+
Some existing conditional GANs based methods \cite{pathak2016context,isola2016image,huang2017beyond} have found that the generator is enhanced by adding a more traditional loss (e.g., L1 and L2 distances) to the GAN objective.
|
| 96 |
+
The reason lies in that the generator is required to produce images close to the ground truth, not just to fool the discriminators in a conditional GAN.
|
| 97 |
+
We thus enrich our training losses with some reconstruction items.
|
| 98 |
+
Suppose that the training set consists of $N$ training pairs, the generator $G$ receives four kinds of losses for parameter updating: two reconstruction loss denoted by $L_{cons-p}$ and $L_{cons-f}$, and two adversarial losses denoted by $L_{D_p}$ and $L_{D_f}$ in the Figure \ref{pic2}.
|
| 99 |
+
And the generator parameters are obtained by the solving the following optimization:
|
| 100 |
+
\begin{equation}\label{eq1}
|
| 101 |
+
G^* = \frac{1}{N} \mathop{\arg \min }_{G} \sum_{n = 1}^{N} L_{cons-p} + \lambda_1 L_{D_p} +
|
| 102 |
+
\lambda_2 L_{cons-f} + \lambda_3 L_{D_f}
|
| 103 |
+
\end{equation}
|
| 104 |
+
where the contributions of the losses are weighted by $\lambda_1$, $\lambda_2$ and $\lambda_3$.
|
| 105 |
+
And the details of each loss will be discussed in the following section.
|
| 106 |
+
As for both the discriminators, we apply the standard GAN discriminator loss formulated in Equation \ref{eq2} and \ref{eq3}, since their duty of telling the fake from the real remains unchanged.
|
| 107 |
+
\begin{multline}\label{eq2}
|
| 108 |
+
D_p^* = \mathop{\arg \max }_{D} \mathbb{E}_{I^B \sim p(I^B)} {\log} D(I^B) + \\
|
| 109 |
+
\mathbb{E}_{I^A \sim p(I^A)} {\log}(1- D(G(I^A)))
|
| 110 |
+
\end{multline}
|
| 111 |
+
\begin{multline}\label{eq3}
|
| 112 |
+
D_f^* = \mathop{\arg \max }_{D} \mathbb{E}_{I^B \sim p(I^B)} {\log} D(F(I^B)) + \\
|
| 113 |
+
\mathbb{E}_{I^A \sim p(I^A)} {\log}(1- D(F(G(I^A))))
|
| 114 |
+
\end{multline}
|
| 115 |
+
Here, the operation of $F(\cdot)$ represents the feature extraction.
|
| 116 |
+
When training the network, we follow the behavior in \cite{goodfellow2014generative} and alternately optimize the min-max problem described above.
|
| 117 |
+
By this means, the generator is constantly driven to produce high-quality images that agree with the target distribution or the ground truth.
|
| 118 |
+
Specifically, the synthesized non-makeup facial images from makeup ones will become more and more reliable and finally benefit the verification task.
|
| 119 |
+
\subsection{Generator Architecture}
|
| 120 |
+
The generator in our proposed BLAN aims to learn a desirable mapping between facial images with and without makeup of the same person.
|
| 121 |
+
An encoder-decoder network \cite{hinton2006reducing} can carry the duty out well and has been widely utilized in existing conditional GANs \cite{pathak2016context,wang2016generative,huang2017beyond,kim2017learning}.
|
| 122 |
+
However, we notice an inherent property here in our task that the input and output of the generator are roughly aligned and share much of the information, both locally and globally.
|
| 123 |
+
In this situation, a simple encoder-decoder network appears to be insufficient.
|
| 124 |
+
The reason is that all the information in the input image has to go through the intermediate bottleneck whose size is usually much smaller than the input.
|
| 125 |
+
This fact determines much of the low level priors captured by the first few layers would be abandoned before the bottleneck, thus makes the encoder-decoder network lack the ability to effectively take advantage of the low level information.
|
| 126 |
+
|
| 127 |
+
To address a similar problem in biomedical image segmentation, Ronneberger et al. \cite{ronneberger2015u} proposed an architecture named ``U-net'' to directly deliver context information to the corresponding layers with higher resolution, yielding the network shape of ``U''.
|
| 128 |
+
Thereafter, Isola et al. \cite{isola2016image} applied a semblable network to its generator for solving the image-to-image translation problem.
|
| 129 |
+
Inspired by these works, we also adopt a network with skip connections to let the information acquired by the encoder benefit the output of decoder as much as possible.
|
| 130 |
+
In specific, we follow the settings in \cite{isola2016image} and concatenate the duplicate of layer $i$ straight to layer $n-i$, with $n$ denoting the total layer amount of the generator.
|
| 131 |
+
\subsection{Generator Losses}
|
| 132 |
+
In the sections above, we have elaborated the overall structure and the generator architecture we employ.
|
| 133 |
+
This part will focus on the four kinds of losses that the generator receive, which has been briefly described in Equation \ref{eq1}.
|
| 134 |
+
Besides the double adversarial losses, we also integrate various perceptual losses in $L_{cons-p}$ to guarantee the quality of generated images.
|
| 135 |
+
Particularly, the reconstruction loss $L_{cons-p}$ is composed of three subordinates --- a pixel-wise loss, a symmetry loss and a first-order loss.
|
| 136 |
+
In the following, we will discuss them in details one by one.
|
| 137 |
+
|
| 138 |
+
It has been mentioned that incorporating traditional losses helps to improve the outcome quality.
|
| 139 |
+
There are generally two options for pixel wise loss --- L1 distance or L2 distance.
|
| 140 |
+
Since L1 distance is generally deemed to arouse less blur than L2 distance, we formulate the pixel-wise loss function as
|
| 141 |
+
\begin{equation}\label{eq4}
|
| 142 |
+
L_{pxl} = \mathbb{E}_{(I^A, I^B)\sim p(I^A, I^B)} \| G(I^A) - I^B \|_1 .
|
| 143 |
+
\end{equation}
|
| 144 |
+
Given the paired data $\{I^A, I^B\}$, the pixel-wise loss continuously push the synthesized non-makeup facial image $G(I^A)$ to be as close to the ground truth $I^B$ as possible.
|
| 145 |
+
In our experiments, we also find that the pixel-wise loss helps to accelerate parameters convergence in some degree.
|
| 146 |
+
|
| 147 |
+
Although the pixel-wise loss in form of L1 distance would bring about blurry results, the adversarial scheme in GANs can alleviate it to some extent.
|
| 148 |
+
However, this is based on the premise that there is adequate training data to learn a qualified discriminator, while the scale of existing makeup datasets are rather limited.
|
| 149 |
+
To further cope with the blurring problem, we propose to train our network with the help of a first-order loss, which takes the form of
|
| 150 |
+
\begin{multline}\label{eq5}
|
| 151 |
+
L_{edg} = \frac{1}{h \times w} \sum_{i = 1}^{h} \sum_{j = 1}^{w} \Big\{\\
|
| 152 |
+
\left\| |G(I^A)_{i,j}- G(I^A)_{i,j+1}| - |I^B_{i,j} - I^B_{i,j+1}| \right\|_1 + \\
|
| 153 |
+
\left\| |G(I^A)_{i,j}- G(I^A)_{i+1,j}| - |I^B_{i,j} - I^B_{i+1,j}| \right\|_1 \Big\}
|
| 154 |
+
\end{multline}
|
| 155 |
+
where $G(I^A)_{i,j}$ stands for the (i,j) pixel of the synthesized image $G(I^A)$.
|
| 156 |
+
The first-order loss can also be referred as the edge loss, for it aims at fully explore the gradient priors provided in $I^B$.
|
| 157 |
+
It actually needs to calculate the edges in images and then drives the edge image of the synthesized face to be close to the edge image of the ground truth.
|
| 158 |
+
|
| 159 |
+
As one of the most prominent characteristics of human faces, the symmetric structure is well exploited in many previous face related studies.
|
| 160 |
+
Here in our network, we take it into consideration as well and imposes a symmetric constraint to guarantee the essential legitimacy of the synthesized face structure.
|
| 161 |
+
The corresponding symmetry loss is calculated by
|
| 162 |
+
\begin{equation}\label{eq6}
|
| 163 |
+
L_{sym} = \frac{1}{h \times w/2} \sum_{i = 1}^{h} \sum_{j = 1}^{w} \| G(I^A)_{i,j} - G(I^A)_{i, w-j+1} \|_1
|
| 164 |
+
\end{equation}
|
| 165 |
+
|
| 166 |
+
The responsibility of the discriminator on the pixel level is to distinguish real non-make facial images from the fake one and it serves as a supervision to produce relatively more pleasing synthesized results.
|
| 167 |
+
Its corresponding adversarial loss on the generator is
|
| 168 |
+
\begin{equation}\label{eq7}
|
| 169 |
+
L_{D_p} = \mathbb{E}_{(I^A)\sim p(I^A)} [ - \log D_p (G(I^A))]
|
| 170 |
+
\end{equation}
|
| 171 |
+
|
| 172 |
+
In addition to removing makeups, we also expect the synthesized images to facilitate the verification performance across makeup status.
|
| 173 |
+
Since the verification task is accomplished on image features (e.g. Light CNN \cite{wu2015light} feature in our experiments), the key issue is converted to produce images with high quality features, which is crucial for identity preserving.
|
| 174 |
+
To this end, we propose to further cascade an adversarial network centering on the feature level at the end of the original conditional GAN model.
|
| 175 |
+
The discriminator $D_f$ is in charge of differentiating between features from real non-makeup images and fake ones, driving to synthesizing images with features close to the target.
|
| 176 |
+
We formulate the adversarial loss on the feature level as
|
| 177 |
+
\begin{equation}\label{eq8}
|
| 178 |
+
L_{D_f} = \mathbb{E}_{(I^A)\sim p(I^A)} [ - \log D_f (F(G(I^A)))] .
|
| 179 |
+
\end{equation}
|
| 180 |
+
Similar to the scheme on the pixel level, we incorporate a reconstruction loss with the adversarial loss which takes the following form:
|
| 181 |
+
\begin{equation}\label{eq9}
|
| 182 |
+
L_{cons-f} = \mathbb{E}_{(I^A, I^B)\sim p(I^A, I^B)} \| F(G(I^A)) - F(I^B) \|_1 .
|
| 183 |
+
\end{equation}
|
| 184 |
+
|
| 185 |
+
\begin{figure*}[t]
|
| 186 |
+
\begin{center}
|
| 187 |
+
\includegraphics[width=0.7\linewidth]{pic3.png}
|
| 188 |
+
\end{center}
|
| 189 |
+
\caption{Sample image pairs of three datasets. }
|
| 190 |
+
\label{pic3}
|
| 191 |
+
\end{figure*}
|
| 192 |
+
\subsection{Discriminator Architecture}
|
| 193 |
+
Inspired by the concepts in Conditional Random Field \cite{lafferty2001conditional}, we address an assumption on deciding whether the input of the discriminator $D_p$ is real or fake: in a certain image, pixels that are apart from each other are relatively independent.
|
| 194 |
+
Based on the assumption, we first divide an image into $k \times k$ patches without overlapping.
|
| 195 |
+
And then the discriminator runs on each patch to obtain a score indicating whether this part of the image is real or not.
|
| 196 |
+
Thus for each input image, the outcome of $D_p$ is a probability map containing $k \times k$ elements.
|
| 197 |
+
In our experiments, we empirically set $k = 2$.
|
| 198 |
+
By this means, $D_p$ is able to pay more attention to local regions instead of the whole image.
|
| 199 |
+
Additionally, the operation simplifies the required structure of $D_p$ and significantly reduces the parameter amount in the network, which is friendly to small datasets.
|
| 200 |
+
As for the discriminator on the feature level (i.e. $D_f$), we concisely set it up with two linear layers, considering the conflict between the complexity of the BLAN structure and the fact of limited available training data.
|
| 201 |
+
\section{Experiments and Analysis}
|
| 202 |
+
We evaluate our proposed BLAN on three makeup datasets.
|
| 203 |
+
Both visualized results of synthesized non-makeup images and quantitative verification performance are present in this section.
|
| 204 |
+
Furthermore, we explore the effects of all losses and report them in the ablation studies.
|
| 205 |
+
The overall results demonstrate that our framework is able to achieve state-of-the-art verification accuracy across makeup status, with appealing identity-preserved non-makeup images synthesized from the ones with makeup.
|
| 206 |
+
\subsection{Datasets}
|
| 207 |
+
\textbf{Dataset 1}: This dataset is collected in \cite{guo2014face} and contains $1002$ face images of $501$ female individuals.
|
| 208 |
+
For each individual, there are two facial images --- one with makeup and the other without.
|
| 209 |
+
The females span mainly over Asian and Caucasian descents.
|
| 210 |
+
\textbf{Dataset 2}: Assembled in \cite{sun2017weakly}, there are $203$ pairs of images with and without makeup, each pair corresponding to a female individual.
|
| 211 |
+
\textbf{Dataset 3 (FAM)} \cite{hu2013makeup}: Different from the other two datasets, FAM involves $222$ males and $297$ females, with $1038$ images belonging to $519$ subjects in total.
|
| 212 |
+
It is worthy noticing that all these images are not acquired under a controlled condition for they are collected from the Internet.
|
| 213 |
+
Thus there also exist pose changes, expression variations, occlusion and other noises in these datasets except for makeup alteration.
|
| 214 |
+
Some sample images from the three datasets are showed in Figure \ref{pic3}.
|
| 215 |
+
|
| 216 |
+
Following the settings in \cite{guo2014face,sun2017weakly,hu2013makeup}, we adopt five-fold cross validation in our experiments.
|
| 217 |
+
In each round, we use about $4/5$ paired data for training and the rest $1/5$ for testing, no overlap between training set and testing set.
|
| 218 |
+
All the positive pairs are involved in the testing phase and equal pairs of negative samples are randomly selected.
|
| 219 |
+
Hence, taking Dataset 1 as an example, there are about $200$ pairs of faces for testing each time.
|
| 220 |
+
We report the rank-1 average accuracy over the five folds as quantitative evaluation.
|
| 221 |
+
\subsection{Implementation Details}
|
| 222 |
+
In our experiments, all the input images are resized to $128 \times 128 \times 3$ and the generator output synthetic images of the same size.
|
| 223 |
+
BLAN is composed of a generator $G$, two discriminator $D_p$ and $D_f$, and a feature extractor Light CNN.
|
| 224 |
+
The Light CNN used for feature extracting is pre-trained on MS-Celeb-1M \cite{guo2016ms} without fine-tuning on makeup datasets.
|
| 225 |
+
$G$ is an encoder-decoder network with U-Net structure and consists of $8\times2$ Convolution-BatchNorm-ReLU layers.
|
| 226 |
+
It contains about $41,833$k parameters and about $5.6$G FLOPS. $D_p$ is a network with $4$ convolution layers followed by a Sigmoid function. It contains about $667$k parameters and $1.1$G FLOPS. $D_f$ is made of $2$ fc layers and contains about $26$k parameters.
|
| 227 |
+
We accomplish our network on PyTorch \cite{paszkepytorch}.
|
| 228 |
+
It takes about $3$ hours to train BLAN on Dataset 1, with a learning rate of $10^{-4}$.
|
| 229 |
+
Data augmentation of mirroring images is also adopted in the training phase.
|
| 230 |
+
Considering the limited number of images in Dataset 2, we first train BLAN on Dataset 1 and then fine-tune it on Dataset 2 in our experiments.
|
| 231 |
+
As for the loss weights, we empirically set $\lambda_1=3 \times 10^{-3}$, $\lambda_2=0.02$ and $\lambda_3=3 \times 10^{-3}$.
|
| 232 |
+
In particular, we also set a weight of $0.1$ to the edge loss and $0.3$ to the symmetry loss inside $L_{cons-p}$.
|
| 233 |
+
|
| 234 |
+
\begin{figure*}[t]
|
| 235 |
+
\begin{center}
|
| 236 |
+
\includegraphics[width=0.7\linewidth]{pic4.png}
|
| 237 |
+
\end{center}
|
| 238 |
+
\caption{Synthetic non-makeup images by BLAN on three makeup datasets. From top to down, there are makeup images, synthetic images and ground truth, respectively.}
|
| 239 |
+
\label{pic4}
|
| 240 |
+
\end{figure*}
|
| 241 |
+
\subsection{Comparisons with Existing Methods}
|
| 242 |
+
\begin{table}[t]
|
| 243 |
+
\begin{center}
|
| 244 |
+
\caption{Rank-1 accuracy (\%) on three makeup datasets.}
|
| 245 |
+
\vspace{5pt}
|
| 246 |
+
\label{tab1}
|
| 247 |
+
\begin{tabular}{c|cc}
|
| 248 |
+
\hline
|
| 249 |
+
Dataset & Method & Accuracy \\
|
| 250 |
+
\hline
|
| 251 |
+
\multirow{5}{*}{Dataset 1}
|
| 252 |
+
& \cite{guo2014face} & $80.5$ \\
|
| 253 |
+
& \cite{sun2017weakly} & $82.4$ \\
|
| 254 |
+
& VGG & $89.4$ \\
|
| 255 |
+
& Light CNN & $92.4$ \\
|
| 256 |
+
& BLAN & $94.8$ \\
|
| 257 |
+
\hline
|
| 258 |
+
\multirow{4}{*}{Dataset 2}
|
| 259 |
+
& \cite{sun2017weakly} & $68.0$ \\
|
| 260 |
+
& VGG & $86.0$ \\
|
| 261 |
+
& Light CNN & $91.5$ \\
|
| 262 |
+
& BLAN & $92.3$ \\
|
| 263 |
+
\hline
|
| 264 |
+
\multirow{5}{*}{FAM}
|
| 265 |
+
& \cite{nguyen2010cosine} & $59.6$ \\
|
| 266 |
+
& \cite{hu2013makeup} & $62.4$ \\
|
| 267 |
+
& VGG & $81.6$ \\
|
| 268 |
+
& Light CNN & $86.3$ \\
|
| 269 |
+
& BLAN & $88.1$ \\
|
| 270 |
+
\hline
|
| 271 |
+
\end{tabular}
|
| 272 |
+
\end{center}
|
| 273 |
+
\end{table}
|
| 274 |
+
|
| 275 |
+
\begin{table}[t]
|
| 276 |
+
\begin{center}
|
| 277 |
+
\caption{True Positive Rate (\%) on three makeup datasets.}
|
| 278 |
+
\vspace{5pt}
|
| 279 |
+
\label{tab2}
|
| 280 |
+
\begin{tabular}{c|cc}
|
| 281 |
+
\hline
|
| 282 |
+
Dataset & TPR@FPR=0.1\% & TPR@FPR=1\% \\
|
| 283 |
+
\hline
|
| 284 |
+
Dataset 1 & $65.9$ & $99.8$ \\
|
| 285 |
+
Dataset 2 & $38.9$ & $82.7$ \\
|
| 286 |
+
FAM & $52.6$ & $97.0$ \\
|
| 287 |
+
\hline
|
| 288 |
+
\end{tabular}
|
| 289 |
+
\end{center}
|
| 290 |
+
\end{table}
|
| 291 |
+
|
| 292 |
+
The ultimate goal of our proposed BLAN is to facilitate face verification performance across makeup status by generating non-makeup facial images.
|
| 293 |
+
We demonstrate the effectiveness of BLAN by conducting verification task on the mentioned three makeup datasets.
|
| 294 |
+
The results on VGG \cite{simonyan2014very} and Light CNN \cite{wu2015light} serve as baselines.
|
| 295 |
+
Particularly, we adopt VGG-16 and Light CNN without any fine-tuning on the makeup datasets.
|
| 296 |
+
In these experiments, we extract deep features from images with and without makeup via the corresponding networks and directly use them for matching evaluation.
|
| 297 |
+
While in the BLAN experiment, a non-makeup image is first produced by the generator for each makeup image.
|
| 298 |
+
Then the generated non-makeup image is sent to Light CNN for deep feature extraction.
|
| 299 |
+
It should be noted that our method is actually accomplishing verification task on synthetic images, which is of significant progress.
|
| 300 |
+
|
| 301 |
+
We compare the rank-1 verification accuracy with some existing methods in Table \ref{tab1} and report the true positive rate in Table \ref{tab2}.
|
| 302 |
+
The similarity metric used in all experiments is cosine distance.
|
| 303 |
+
Except for the mentioned baselines, the methods listed are all tailored for makeup-invariant face verification.
|
| 304 |
+
Among them, the works in \cite{guo2014face}, \cite{nguyen2010cosine} and \cite{hu2013makeup} explore the correlation between images of a certain identity with and without makeup in traditional ways, while the approach in \cite{sun2017weakly} is based on deep networks.
|
| 305 |
+
From Table \ref{tab1}, we can observe that our proposed BLAN brings prominent improvement to rank-1 accuracy comparing with existing makeup-invariant schemes, both traditional and deep ones.
|
| 306 |
+
In specific, a boost of at least $10\%$ is achieved on each dataset.
|
| 307 |
+
It demonstrates that our architecture is able to achieve state-of-the-art performance on the datasets.
|
| 308 |
+
Additionally, it is worth noticing that both VGG and Light CNN are trained on much larger datasets than the makeup datasets.
|
| 309 |
+
Their produced deep features are thus rather powerful, resulting in much higher accuracies than the traditional schemes.
|
| 310 |
+
Compared the feature extraction processes in BLAN and in Light CNN, the only difference lies in the input.
|
| 311 |
+
Even though, our network still outperforms the two baselines.
|
| 312 |
+
These phenomena consistently validate that our learning from generation framework has the ability of promote verification performance by alleviating impact from makeup.
|
| 313 |
+
\subsection{Synthetic Non-Makeup Images}
|
| 314 |
+
For the existing makeup-invariant face verification methods we discussed, none of them has the capacity of generating non-makeup images from that with makeup.
|
| 315 |
+
In contrast to them, we propose to extract deep features directly from synthetic non-makeup images for face verification.
|
| 316 |
+
To evaluate our BLAN perceptually, we exhibit some synthetic samples in Figure \ref{pic4}.
|
| 317 |
+
Observing the second rows in these figures, we can find that both holistic face structure and most local attributes of the original faces are kept.
|
| 318 |
+
The reason is that in addition to the discriminator on pixel level, we propose to impose another discriminator on feature level to maintain the identity prior as well as facial structure.
|
| 319 |
+
|
| 320 |
+
Different makeup datasets have different characteristics.
|
| 321 |
+
Dataset 1 and Dataset 2 only contain female subjects and the paired images have higher resolution compared with FAM.
|
| 322 |
+
Thus, BLAN achieves perceptually better synthetic images and results in higher verification accuracy on these datasets.
|
| 323 |
+
In contrast, more than $40\%$ of the subjects are male in FAM.
|
| 324 |
+
We show both male and female results of BLAN in Figure \ref{pic4}.
|
| 325 |
+
The makeup removing results of males are not so satisfied as that of females.
|
| 326 |
+
For male individuals, the gap between makeup images and non-makeup ones are relatively narrower than the females and the training data of males is much less than the females, which are determined by the fact that males trend to wear less makeup in reality.
|
| 327 |
+
|
| 328 |
+
\begin{figure}[t]
|
| 329 |
+
\begin{center}
|
| 330 |
+
\includegraphics[width=0.9\linewidth]{pic5.png}
|
| 331 |
+
\end{center}
|
| 332 |
+
\caption{Sample results with pose, expression and occlusion changes.}
|
| 333 |
+
\label{pic5}
|
| 334 |
+
\end{figure}
|
| 335 |
+
|
| 336 |
+
However, we also notice that there exists blurs in our synthetic non-makeup images compared with ground truth.
|
| 337 |
+
And the clarity of facial component outlines, e.g. eyes contour, is not so compelling as expected.
|
| 338 |
+
The reasons lie in multiple folds.
|
| 339 |
+
1) In reconstruction loss on pixel level, we adopt L1 distance.
|
| 340 |
+
It has been reported in \cite{isola2016image} and \cite{huang2017beyond} that L1 distance loss in generator will bring about image blurs for it leads to overly smooth results.
|
| 341 |
+
Even though there are adversarial networks, the overly smooth problem can not be swept away.
|
| 342 |
+
2) We merely utilize the data from the three makeup datasets to train BLAN, without any help from other data.
|
| 343 |
+
Compared with other face related datasets, the data sizes of these makeup datasets are rather limited.
|
| 344 |
+
It consequently decreases the training quality of the network.
|
| 345 |
+
3) As has been introduced in Section Datasets, all the paired images are collected from the Internet.
|
| 346 |
+
In other words, the images are not acquired under a controlled condition.
|
| 347 |
+
Even the facial key points are not strictly aligned as standard facial datasets.
|
| 348 |
+
We present some images pairs with pose, expression and occlusion changes and their synthetic non-makeup results in Figure \ref{pic5}.
|
| 349 |
+
These changes will severely hinder the network training and thus impact the generated image quality.
|
| 350 |
+
\subsection{Ablations}
|
| 351 |
+
\begin{table}[t]
|
| 352 |
+
\begin{center}
|
| 353 |
+
\caption{Rank-1 accuracy (\%) on Dataset 1 with ablation.}
|
| 354 |
+
\vspace{5pt}
|
| 355 |
+
\label{tab3}
|
| 356 |
+
\begin{tabular}{cc}
|
| 357 |
+
\hline
|
| 358 |
+
Method & Accuracy \\
|
| 359 |
+
\hline
|
| 360 |
+
w/o $L_{edg}$ & $92.9$ \\
|
| 361 |
+
w/o $L_{sym}$ & $91.8$ \\
|
| 362 |
+
w/o $L_{D_f}$ & $89.6$ \\
|
| 363 |
+
w/o $L_{cons-f}$ & $76.5$ \\
|
| 364 |
+
BLAN & $94.8$ \\
|
| 365 |
+
\hline
|
| 366 |
+
\end{tabular}
|
| 367 |
+
\end{center}
|
| 368 |
+
\end{table}
|
| 369 |
+
|
| 370 |
+
To fully explore the contribution of each loss, we conduct experiments on different architecture variants of BLAN.
|
| 371 |
+
The quantitative verification results are reported in Table \ref{tab3} for comprehensive comparison.
|
| 372 |
+
We remove one of the losses in generator training each time and examine the corresponding accuracy change.
|
| 373 |
+
As expected, BLAN with all the losses achieves the best accuracy.
|
| 374 |
+
It is evident that $L_{cons-f}$ and $L_{D_f}$ bring the greatest declines, indicating the effectiveness and importance of adversarial network on feature level.
|
| 375 |
+
As for $L_{edg}$ and $L_{sym}$, they also help to promote the performance, though not as much remarkable as the fore discussed two losses.
|
| 376 |
+
We also present visualization samples of each variant in Figure \ref{pic6}.
|
| 377 |
+
The generated images without the edge loss and the symmetry loss tend to suffer from more unnatural artifacts.
|
| 378 |
+
And the absence of adversarial loss on feature level causes serve blur to the synthesized results.
|
| 379 |
+
Finally, $L_{cons-f}$ contributes most to the identity preservation, as can be distinctly observed by comparing the last three rows in Figure \ref{pic6}.
|
| 380 |
+
|
| 381 |
+
\begin{figure}[t]
|
| 382 |
+
\begin{center}
|
| 383 |
+
\includegraphics[width=0.9\linewidth]{pic6.png}
|
| 384 |
+
\end{center}
|
| 385 |
+
\caption{Synthetic results of BLAN and its variants.}
|
| 386 |
+
\label{pic6}
|
| 387 |
+
\end{figure}
|
| 388 |
+
\section{Conclusion}
|
| 389 |
+
In this paper, we have proposed a new learning from generation framework to address the makeup problem in face verification.
|
| 390 |
+
A synthesized non-makeup image is generated with its identity prior well preserved from a makeup image.
|
| 391 |
+
And then, the produced non-makeup images are used for face verification, which effectively bypasses the negative impact incurred by cosmetics.
|
| 392 |
+
Specifically, we have proposed a novel architecture, named bi-level adversarial network (BLAN), where there is one discriminator on pixel level to distinguish real non-makeup images from fake ones and another discriminator on feature level to determine whether a feature vector is from a target image.
|
| 393 |
+
To further improve the quality of our synthesized images, reconstruction losses have been also employed for training the generator.
|
| 394 |
+
Extensive experiments on three makeup datasets show that our network not only generates pleasing non-makeup images but also achieves state-of-the-art verification accuracy under makeup conditions.
|
| 395 |
+
\section{Acknowledgments}
|
| 396 |
+
This work is partially funded by the State Key Development Program (Grant No. 2016YFB1001001) and National Natural Science Foundation of China (Grant No.61473289, 61622310).
|
| 397 |
+
|
| 398 |
+
\bibliographystyle{aaai}
|
| 399 |
+
\bibliography{bibfile}
|
1709.03688v1.txt
ADDED
|
@@ -0,0 +1,246 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Most classification algorithms require a large pool of manually labeled data to learn the optimal parameters of a classifier. The recent exponential growth of visual data, the growing need for fine-grained multi-label annotations, and consistent emergence of new classes (e.g. new products), however, has rendered manual labeling of data practically infeasible. Transfer learning has been proposed as a remedy to deal with this issue \cite{lampert2014attribute}. The idea is to learn on a limited number of classes and then through knowledge transfer, learn how to classify images from the new classes either using only few labeled data points, i.e. few- and one-shot learning \cite{fei2006one}, or in the extreme case without any labeled data, i.e. zero-shot learning (ZSL) \cite{lampert2014attribute}. These transfer learning approaches address the challenge of annotated data unavailability and open the door towards lifelong learning machines. %
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
To learn target classes with no labeled data, one needs to be able to generalize the relationship between the source data and its labels to the target classes. To address this challenge in ZSL, an intermediate shared space (i.e. the space of semantic attributes) is exploited, which allows for knowledge transfer from labeled classes to the unlabeled classes.
|
| 6 |
+
The overarching idea in ZSL is that the source and the target classes share common attributes. The semantic attributes (e.g., can fly, is green) are often provided as accessible side information (e.g. verbal description of a class), which uniquely describe classes of data. To achieve ZSL the relationship between seen data and its corresponding attributes are first learned in the training phase. In testing stage, this allows for parsing a target image from an unseen class into its semantic attributes to predict corresponding label.
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
To clarify the ZSL core idea and the required steps to perform ZSL, consider the following sentence: `Tardigrades (also known as water bears or moss piglets) are water-dwelling, eight-legged, segmented micro animals'\footnote{Source: Wikipedia}. Given this textual description, one can easily identify the creature in Figure \ref{fig:tardigrade}, Left as a Tardigrade even though she may have never seen one before. Performing this task requires three capabilities: 1) parsing the textual information into semantic features, so we can describe the class {\it Tardigrade} as `bear-like', `piglet-like', `water-dwelling', `eight-legged', `segmented', and `microscopic animal', 2) parsing the image into its visual attributes (See Figure \ref{fig:tardigrade}), and 3) matching the parsed visual features to the parsed textual information which often requires extensive prior knowledge. Recent textual features extracted from large unlabeled text corpora; including {\it word2vec} \cite{mikolov2013distributed} and {\it glove} \cite{pennington2014glove} enable a learner to efficiently parse textual information. Deep convolutional neural networks (CNNs) \cite{krizhevsky2012imagenet,simonyan2014very,he2016deep,huang2017densely} have revolutionized the field of computer vision and they enable a learner to extract rich visual features from images. An extensive body of work in the field of ZSL is concentrated on modeling the relationship between visual features and semantic attributes
|
| 10 |
+
\cite{palatucci2009zero,akata2013label,socher2013zero,norouzi2013zero,lampert2014attribute,zhang2015zero,ding2017lowrank}.
|
| 11 |
+
|
| 12 |
+
In this paper, we provide a novel approach to model the relationship between the visual features and the textual information. Our specific contributions are:
|
| 13 |
+
\begin{enumerate}
|
| 14 |
+
\item New formulation of ZSL via joint dictionary learning
|
| 15 |
+
\item Extending the classic joint dictionary learning formulation to an attribute aware formulation that addresses the domain shift/adaptation problem \cite{kodirov2015unsupervised}
|
| 16 |
+
\item Demonstrating the benefit of a transductive learning scheme to reduce the hubness phenomenon \cite{dinu2014improving,shigeto2015ridge}
|
| 17 |
+
\end{enumerate}
|
| 18 |
+
|
| 19 |
+
\begin{figure}
|
| 20 |
+
\includegraphics[width=\columnwidth]{Intro_Figure.png}
|
| 21 |
+
\caption{High-level overview of our approach. Left \& right: visual and attribute feature extraction and representation using union of subspaces. Middle: constraining the dictionary atoms to be coupled. }
|
| 22 |
+
\label{fig:tardigrade}
|
| 23 |
+
\end{figure}
|
| 24 |
+
\section{Related Work}
|
| 25 |
+
ZSL methods often focus on learning the relationship between the visual space and the semantic attribute space. Palatucci et al. \cite{palatucci2009zero} proposed to learn a linear compatibility between the visual space and the semantic attribute space. Lampert et al. \cite{lampert2014attribute} posed the problem as an attribute classification problem and learned individual binary attribute classifiers in the training stage and used the ensemble of classifiers to map visual features to their semantic attributes.
|
| 26 |
+
Yu and Aloimonos \cite{yu2010attribute} approached the problem from a probabilistic point of view and proposed to use generative models to learn prior distributions for image features with respect to each attribute. More recently, various authors have proposed to embed image features and semantic attributes in a shared metric space (i.e. a latent embedding) \cite{akata2013label,romera2015embarrassingly,zhang2015zero} while forcing the embedded representations for image features and their corresponding semantic attributes to be similar. Akata et al. \cite{akata2013label}, for instance, proposed a model that embeds the image features and the semantic attributes in a common space (i.e. a latent embedding) where the compatibility between them is measured via a bilinear function. Similarly, Romera-Paredes and Torr \cite{romera2015embarrassingly} utilized a principled choice of regularizers that enable the authors to derive a simple closed form solution to learn a linear mapping that embeds the image features and the semantic attributes in a low dimensional shared linear subspace. Others have identified the major problems and challenges in ZSL to be the domain shift problem \cite{kodirov2015unsupervised} and the hubness phenomena \cite{dinu2014improving,shigeto2015ridge}. In short, the domain shift problem raises from the fact that the distribution of features corresponding to the same attribute for seen and unseen images could be very different (e.g. stripes of tigers versus zebras). The hubness problem, on the other hand, states that there will often be attributes that are similar (have small distance) to vastly different visual features in the embedding space. Various transductive approaches are presented to overcome the hubness problem \cite{fu2015transductive,yu2017transductive}.
|
| 27 |
+
|
| 28 |
+
The use of sparse dictionaries to model the space of visual features and semantic attributes as union of linear subspaces has been shown to be an effective modeling scheme in recent ZSL papers \cite{yu2017transductive,isele2016using,kodirov2015unsupervised,zhang2015zero}. Zhang et al. \cite{zhang2015zero} showed that modeling the test image features as sparse linear combination of train image features is beneficial and formulated a ZSL method based on this principal. Using similar ideas, Isele et. al. \cite{isele2016using} used joint dictionary learning to learn a dynamical control system using high level task descriptors in an online lifelong zero-shot reinforcement learning setting. Our JD-ZSL build on similar ideas as in \cite{yu2017transductive,isele2016using,kodirov2015unsupervised} and introduce a novel ZSL method based on learning joint sparse dictionaries for the image features and the semantic attributes. At its core, JD-ZSL is equipped with a novel entropy minimization regularizer \cite{grandvalet2004semi}, which facilitates the solution to the ZSL problem by reducing the domain shift effect. We further show that a transductive approach applied to our attribute aware JD-ZSL formulation provide state-of-the-art or close to state-of-the-art performance on various benchmark datasets. Finally it should be noted that the idea of using joint dictionaries to map data from a given metric space to a second related space was pioneered by Yang et al. \cite{yang2010image} in super-resolution applications.
|
| 29 |
+
|
| 30 |
+
Figure \ref{fig:tardigrade} captures the gist of our idea. Visual features are extracted via CNNs, left sub-figure, and the semantic attributes are provided via textual feature extractors like word2vec or via human annotations, right sub-figure. Both the visual features and the semantic attributes are assumed to be representable sparsely in a shared union of linear subspaces, left and right sub-figures. The idea here is then to enforce the sparse representation vectors for both domains be equal and thus effectively couple the learned dictionaries for the the visual and the attribute spaces.
|
| 31 |
+
The intuition from a co-view perspective \cite{yu2014discriminative} is that both the visual and the attribute features provide information about the same class, and so each can augment the learning of the other. Each underlying class is common to both views, and one can find task embeddings that are consistent for both the visual features and their corresponding attributes. Having learned the coupled dictionaries, zero-shot classification can be performed by mapping images of unseen classes into the attribute space, where classification can be simply done via nearest neighbor or via a more elaborate scheme like label propagation. Given the coupled nature of the learned dictionaries, an image could be mapped to its semantic attributes by first finding the sparse representation with respect to the visual dictionary, and next the semantic attribute dictionary can be used to recover the attribute vector from the joint sparse representation which could then be used for classification.
|
| 32 |
+
\section{Problem Statement and Technical Rational}
|
| 33 |
+
Consider a visual feature metric space $\mathcal{X}$ of dimension $p$, an attribute metric space $\mathcal{Z}$ with dimension $q$, and a class label set $\mathcal{Y}$ with dimension $K$ which ranges over a finite alphabet of size $K$ (images can potentially have multiple memberships to the classes). As an example $\mathcal{X}=\mathbb{R}^p$ for the visual features extracted from a deep CNN and $\mathcal{Z}=\{0,1\}^q$ when a binary code of length $q$ is used to identify the presence/absence of various characteristics in an object \cite{lampert2014attribute}. We are given a labeled dataset $\mathcal{D}=\{((\bf{x}_i;\bf{z}_i),\bf{y}_i)\}_{i=1}^N$ of features of seen images and their corresponding semantic attributes, where $\forall i:\bf{x}_i\in \mathcal{X}, \bf{z}_i\in \mathcal{Z}$, and $\bf{y}_{i}\in \mathcal{Y}$. We are also given the unlabeled attributes of unseen classes $\mathcal{D}'=\{\bf{z}'_j\}_{j=1}^M$ (i.e. we have access to textual information for a wide variety of objects but do not have access to the corresponding visual information). In ZSL the set of seen and unseen classes are disjoint and it is assumed that the semantic attributes are class specific. The goal is then to use $\mathcal{D}$ and $\mathcal{D}'$ to learn the relationship between $\mathcal{X}$ and $\mathcal{Z}$ so when an unseen image (image from an unseen class) is fed to the system, its corresponding attributes and consequently its label could be predicted. Finally, we assume that $\psi:\mathcal{Z}\rightarrow \mathcal{Y}$ is the mapping between the attribute space and the label space and $\psi$ is a known linear mapping, $\bf{y}=\psi(\bf{z})=V\bf{z}$.
|
| 34 |
+
|
| 35 |
+
To further clarify the problem, consider an instance of ZSL in which features extracted from images of horses and tigers are included in seen visual features $X=[\bf{x}_1,...,\bf{x}_N]$, where $\bf{x}_i\in\mathcal{X}$, but $X$ does not contain features from images containing zebras. On the other hand, the semantic attributes contain information of all seen $Z=[\bf{z}_1,...,\bf{z}_N]$ for $\bf{z}_i\in\mathcal{Z}$ and unseen $Z'=[\bf{z}'_1,...,\bf{z}'_M]$ for $\bf{z}'_j\in\mathcal{Z}$ classes including the zebras. Intuitively, by learning the relationship between the image features and the attributes ``has hooves", ``has mane'', and ``has stripes" from the seen images, we must be able to assign an image of a zebra to its corresponding attribute, while we have never seen a zebra before. More formally, we want to learn the mapping $\phi:\mathcal{X}\rightarrow\mathcal{Z} $ which relates the visual space and the attribute space. Having learned this mapping, for an unseen image one can recover the corresponding attribute vector using the image features and then classify the image using the mapping $\bf{y}=(\psi\circ\phi)(\bf{x})$, where `$\circ$' represents function composition.
|
| 36 |
+
\subsection{Technical Rational}
|
| 37 |
+
For the rest of our discussion we assume that $\mathcal{X}=\R^p$, $\mathcal{Z}=\R^q$, and $\mathcal{Y}=\R^K$. The simplest ZSL approach is to assume that the mapping $\phi:\mathbb{R}^p\rightarrow \mathbb{R}^q$ is linear, $\phi(\x)=W^T\x$ where $W\in \R^{p\times q}$, and then minimize the regression error $\frac{1}{N}\sum_i \|W^T\x_i-\z_i\|^2_2$ to learn $W$. Despite existence of a closed form solution for $W$, the solution contains the inverse of the covariance matrix of $X$, $(\frac{1}{N}\sum_i (x_ix_i^T))^{-1}$, which requires a large number of data points for accurate estimation. To overcome this problem, various regularizations are considered for $W$. Decomposition of $W$ as $W=P\Lambda Q$, where $P\in\R^{p\times l}$, $\Lambda\in\R^{l\times l}$, $Q\in\R^{l\times q}$, and $l<min(p,q)$ can also be helpful. Intuitively, $P$ is a right linear operator that projects $\x$'s into a shared low dimensional subspace, $Q$ is a left linear operator that projects $\z$ into the same shared subspace, and $\Lambda$ provides a bi-linear similarity measure in the shared subspace. The regression problem then can be transformed into maximizing $\frac{1}{N}\sum_i \x_i^TP\Lambda Q\z_i$, which is a weighted correlation between the embedded $\x$'s and $\z$'s. This is the essence of many ZSL techniques including Akata et al. \cite{akata2013label} and Romera-Paredes et al.\cite{romera2015embarrassingly}. This technique can be extended to nonlinear mappings using kernel methods. However, the choice of kernels remains a challenge.
|
| 38 |
+
|
| 39 |
+
On the other side of the spectrum, the mapping $\phi:\R^p\rightarrow \R^q$ can be chosen to be highly nonlinear, as in deep neural networks (DNN). Let a DNN be denoted as $\phi(.;\theta)$, where $\theta$ represents the parameters of the network (i.e. synaptic weights and biases). ZSL can then be addressed by minimizing $\frac{1}{N}\sum_i \|\phi(\x_i;\theta)-\z_i\|^2_2$ with respect to $\theta$. Alternatively, one can nonlinearly embed $\x$'s and $\z$'s in a shared metric space via deep nets, $f(\x;\theta_x):\R^p\rightarrow \R^l$ and $g(\z;\theta_z):\R^q\rightarrow \R^l$, and maximize their similarity measure in the embedded space, $\frac{1}{N}\sum_i f(\x_i;\theta_x)^T g(\z_i;\theta_z)$, as in \cite{lei2015predicting}. Nonlinear methods are computationally expensive, require a large training dataset, and can easily overfit to the training data. On the other hand, linear ZSL algorithms are efficient, easy to train, and generalizable but they are often outperformed by nonlinear methods. As a compromise, we model nonlinearities in data distributions as union of linear subspaces with coupled dictionaries. By jointly learning the visual and attribute dictionaries, we effectively model the relationship between the metric spaces. This allows a nonlinear scheme with a computational complexity comparable to linear techniques.
|
| 40 |
+
\section{Zero Shot Learning using Joint Dictionaries}
|
| 41 |
+
\label{sec:jointDL}
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
Joint dictionary learning has been proposed to couple related features from two metric spaces \cite{yang2010image,shekhar2014joint}. Yang et al. \cite{yang2010image} proposed the approach to tackle the problem of image super-resolution and Shekhar et al. \cite{shekhar2014joint} used joint dictionary learning for multimodal biometrics recognition. Following a similar framework, the gist of our approach is to learn the mapping $\phi:\mathbb{R}^p\rightarrow \mathbb{R}^q$ through two dictionaries, $D_x\in\mathbb{R}^{p\times r}$ and $D_z\in \mathbb{R}^{q\times r}$ that model $X$ and $[Z,Z']$, respectively, where $r>max(p,q)$. The goal is to find a shared sparse representation (i.e. sparse code) $\a_i$ for $\x_i$ and $\z_i$, such that $\x_i=D_x\a_i$ and $\z_i=D_z\a_i$. Below we describe the training and testing phases of our proposed method.
|
| 45 |
+
\subsection{Training phase}
|
| 46 |
+
The standard dictionary learning is based on minimizing the empirical average estimation error $\frac{1}{N}\|X-D_xA\|^2_F$ on a given training set $X$, where $\ell_1$ regularization on $A$ enforces sparsity:
|
| 47 |
+
\begin{eqnarray}
|
| 48 |
+
\begin{split}
|
| 49 |
+
D^*_x,A^* = & \operatorname*{argmin}_{D_x,A} \frac{1}{N}\|X-D_xA\|^2_F+\lambda\|A\|_1 \\
|
| 50 |
+
&\text{s.t.}~ \|D^{[i]}_x\|^2_2 \leq 1.
|
| 51 |
+
\end{split}
|
| 52 |
+
\label{eq:mainDx}
|
| 53 |
+
\end{eqnarray}
|
| 54 |
+
Here $\lambda$ is the regularization parameter, which controls the sparsity of $A$, and $D_x^{[i]}$ is the i'th column of $D_x$. Alternatively, following the Lagrange multiplier technique, the Frobenius norm of $D_x$ could be used as a regularizer in place of the costraint.
|
| 55 |
+
|
| 56 |
+
In our joint dictionary learning framework, we aim to learn $D_x$ and $D_z$ such that they share the sparse coefficients $A$ to represent the seen visual features $X$ and their corresponding attributes $Z$, respectively. An important twist here is that the attribute dictionary, $D_z$, is also required to sparsify the semantic attributes of other (unseen) classes, $Z'$. To obtain such coupled dictionaries we propose the following optimization,
|
| 57 |
+
\begin{eqnarray}
|
| 58 |
+
\begin{split}
|
| 59 |
+
\underset{D_x,A,D_z,B}{\operatorname*{argmin}} & \{ \frac{1}{Np}(\|X-D_xA\|^2_F+ \frac{p\lambda}{r}\|A\|_1) + \\& \frac{1}{Nq}\|Z-D_zA\|^2_F+
|
| 60 |
+
\frac{1}{Mq}(\|Z'-D_zB\|^2_F+\\& \frac{q\lambda}{r}\|B\|_1) \}
|
| 61 |
+
\hspace{.2in} \text{s.t.:} \|D^{[i]}_x\|^2_2\leq 1,~\|D^{[i]}_z\|^2_2\leq 1
|
| 62 |
+
\end{split}
|
| 63 |
+
\label{eq:maineq}
|
| 64 |
+
\end{eqnarray}
|
| 65 |
+
The above formulation combines the dictionary learning problem for $X$ and $Z$ by coupling them via $A$, and also enforces $D_z$ to be a sparsifying dictionary (i.e. a good model) for $Z'$. The optimization in Eq \eqref{eq:maineq}, while convex in each individual term, is highly nonconvex in all variables. Following the approach proposed in \cite{yang2012coupled} we use an Expectation Maximization (EM) like alternation to update dictionaries $D_x$ and $D_z$. To do so, we rewrite the optimization problem into the following two steps:
|
| 66 |
+
\begin{enumerate}
|
| 67 |
+
\item For a fixed $D_x$ update $D_z$ via the following optimization:
|
| 68 |
+
\begin{eqnarray}
|
| 69 |
+
\begin{split}
|
| 70 |
+
&\underset{D_z,B}{\operatorname*{min}} \frac{1}{Mq}(\|Z'-D_zB\|^2_F+\frac{q\lambda}{r}\|B\|_1)+ \\&\hspace{.3in}\frac{1}{Nq}\|Z-D_zA^*\|_F^2\\& \text{s.t.}~~ A^*=\operatorname*{argmin}_{A} \frac{1}{p}\|X-D_xA\|^2_F+ \frac{\lambda}{r}\|A\|_1,\\& \|D_z^{[i]}\|_2^2\leq 1
|
| 71 |
+
\end{split}
|
| 72 |
+
\label{eq:maineq1}
|
| 73 |
+
\end{eqnarray}
|
| 74 |
+
$A$ is found using a Lasso optimization problem, and FISTA \cite{beck2009fast} is used to update $D_z$ and $B$.
|
| 75 |
+
\item For a fixed $D_z$ update $D_x$ via:
|
| 76 |
+
\begin{eqnarray}
|
| 77 |
+
\begin{split}
|
| 78 |
+
&\underset{D_x}{\operatorname*{min}} ~~~ \|X-D_xA^*\|^2_F \\
|
| 79 |
+
& \text{s.t.}~~ A^*=\operatorname*{argmin}_{A} \frac{1}{q}\|Z-D_zA\|_F^2+\frac{\lambda}{r} \|A\|_1,\\& \hspace{.2in}\|D_x^{[i]}\|_2^2\leq 1,
|
| 80 |
+
\end{split}
|
| 81 |
+
\label{eq:maineq2}
|
| 82 |
+
\end{eqnarray}
|
| 83 |
+
which involves a Lasso optimization together with a simple regression with a close form solution.
|
| 84 |
+
\end{enumerate}
|
| 85 |
+
\subsection{Zero-Shot Prediction of Unseen Attributes}
|
| 86 |
+
In the testing phase we are only given the extracted features from unseen images, $X'=[\x'_1,...,\x'_l]\in\R^{p\times l}$ and the goal is to predict their corresponding semantic attributes. Here we introduce a progression of methods, which clarifies the logic behind our method, and enables us to efficiently predict the semantic attributes of the unseen images based on the learned dictionaries in the training phase.
|
| 87 |
+
\subsubsection{Attribute Agnostic Prediction}
|
| 88 |
+
The attribute agnostic (AAg) formulation, is the naive way of predicting semantic attributes from an unseen image $\x'_i$. In the AAg formulation, we first find the sparse representation $\balpha_i$ of the unseen image $\x'_i$ with respect to the learned dictionary $D_x$ by solving the following Lasso problem,
|
| 89 |
+
\begin{equation}
|
| 90 |
+
\balpha_i=\operatorname{argmin}_\a \frac{1}{p}\|\x_i-D_x\a\|_2^2 +\frac{\lambda}{r}\|\a\|_1.
|
| 91 |
+
\label{eq:attrAgn}
|
| 92 |
+
\end{equation}
|
| 93 |
+
Here, one can simply use $\balpha_i$ and compare it to the sparse codes of the unseen attributes, $\mathbf{b}_j$. In our experiments, however, we found that this approach is not suitable in our JD-ZSL setting as the dictionaries could have redundant atoms that cause two similar image features or attributes to have different sparse codes. Instead, we do the comparison in the attribute space and predict the corresponding attribute via $\hat{z}_i=D_z\balpha_i$. In the attribute-agnostic formulation, the sparse coefficients are calculated without any information from the attribute space. Not using the information from the attribute space would lead to the domain shift problem, in the sense that there is no guarantee that $\balpha_i$ would reconstruct a meaningful attribute in $\mathcal{Z}$. In other words, $\hat{z}_i=D_z\balpha_i$ could be far from the unseen attributes, $\z'_m$, and therefore could not be assigned to any known attribute with high confidence. To alleviate this problem we progress to an extended solution, which we denote as the Attribute Aware (AAw) prediction. %
|
| 94 |
+
\subsubsection{Attribute Aware Prediction}
|
| 95 |
+
In the attribute-aware (AAw) formulation we would like to find the sparse representation $\balpha_i$ to not only approximate the input visual feature, $\x'_i\approx D_x\balpha_i$, but also provide an attribute prediction, $\hat{z}_i=D_z\balpha_i$, that is well resolved in the attribute space and does not suffer from the domain shift problem. Note that, ideally $\hat{\z}_i=\z'_m$ for some $m\in\{1,...,M\}$. To achieve this we define the soft assignment of $\hat{\z}_i$ to $\z'_m$, denoted by $p_m$, using the Student's t-distribution as a kernel to measure similarity between $\hat{\z}_i=D_z\balpha_i$ and $\z'_m$,
|
| 96 |
+
\begin{equation}
|
| 97 |
+
p_m(\balpha_i)=\frac{(1+\frac{\|D_z\balpha_i-\z'_m\|^2_2}{\rho})^{-\frac{\rho+1}{2}}}{\sum_k (1+\frac{\|D_z\balpha_i-\z'_k\|^2_2}{\rho})^{-\frac{\rho+1}{2}}}
|
| 98 |
+
\label{eq:softass}
|
| 99 |
+
\end{equation}
|
| 100 |
+
where $\rho$ is the kernel parameter. The choice of t-distribution is due to its long tail and low sensitivity to the choice of kernel parameter, $\rho$. Ideally, $p_m(\balpha_i)=1$ for some $m\in\{1,...,M\}$ and $p_j(\balpha_i)=0$ for $j\neq m$. The ideal soft-assignment $\p=[p_1,p_2,...,p_M]$ then would be one-sparse and therefore would have minimum entropy. This motivates our attribute-aware formulation, which regularizes the AAg formulation in Equation \ref{eq:attrAgn} with the entropy of $\p$.
|
| 101 |
+
\begin{equation}
|
| 102 |
+
\begin{split}
|
| 103 |
+
\balpha_i=\operatorname{argmin}_\a&\underbrace{\frac{1}{p}\|\x'_i-D_x\a\|_2^2 -\gamma \sum_m p_m(\a)log(p_m(\a))}_{g(\a)} \\&+\frac{\lambda}{r}\|\a\|_1\end{split}
|
| 104 |
+
\label{eq:attrAware}
|
| 105 |
+
\end{equation}
|
| 106 |
+
where $\gamma$ is the regularization parameter for entropy of the soft-assignment probability vector $\p$. Such entropy minimization scheme has been successfully used in several work \cite{grandvalet2004semi,huang2016sparse} whether as a sparsifying regularization or to boost the confidence of classifiers. We note that the entropy regularization enforces the prediction to be close to one of the unseen attributes, but it can potentially backfire in that a low-entropy solution (aligned to a prototype) doesn't necessarily have to be the correct solution. In our experiments, we consistently observed higher performance for the AAw formulation.
|
| 107 |
+
|
| 108 |
+
The entropy regularization turns the optimization in Eq. \eqref{eq:attrAware} into a nonconvex problem. In \cite{huang2016sparse}, the authors use a generalized gradient descent approach similar to FISTA to optimize this non-convex problem. We use a similar scheme to optimize the objective function in Eq. \eqref{eq:attrAware}. In short, we relax $g(\a)$ using its quadratic approximation around the previous estimation of $\a$, $\a_{k-1}$, and update $\a$ as the solution of the following problem %
|
| 109 |
+
\begin{eqnarray}
|
| 110 |
+
\begin{split}
|
| 111 |
+
\bf{a}_k = \operatorname{argmin}_{\bf{a}}&
|
| 112 |
+
\frac{1}{2t}\|\bf{a}-(\bf{a}_{k-1}-t\nabla g(\bf{a}_{k-1}))\|_2^2+\\& \frac{\lambda}{r}\|a\|_1
|
| 113 |
+
\end{split}
|
| 114 |
+
\label{eq:au1}
|
| 115 |
+
\end{eqnarray}
|
| 116 |
+
Equation \eqref{eq:au1} is a LASSO problem and can be solved efficiently using FISTA. It only remains to compute $\nabla g$:
|
| 117 |
+
{\small\begin{eqnarray}
|
| 118 |
+
\begin{split}
|
| 119 |
+
\nabla g(\a) = & \frac{1}{p}D_x^T(D_x\a-\x')-\\& \frac{\gamma}{(\sum_k l_k(\a))^2} \sum_m\{(1+log(p_m(\a)))\times \\&(\frac{\partial l_m(\a)}{\partial \a}\sum_k l_k(\a)-l_m(\a)\sum_k \frac{\partial l_k(\a)}{\partial \a}) \}
|
| 120 |
+
\end{split}
|
| 121 |
+
\label{eq:au2}
|
| 122 |
+
\end{eqnarray} }
|
| 123 |
+
where:
|
| 124 |
+
{\small
|
| 125 |
+
\begin{equation*}
|
| 126 |
+
\begin{split}
|
| 127 |
+
&l_m(\bf{a})=(1+\frac{\| D_z{\bf a}-\bf{z}'_m\|_2^2}{\rho})^{-\frac{\rho+1}{2}},\\&\frac{\partial l_m({\bf a})}{\partial{ \bf a}}=-\frac{\rho+1}{\rho}(D_z^T(D_z{\bf a}-\bf{z})) (1+\frac{\|D_z{\bf a}-\bf{z}'_m\|_2^2}{\rho})^{-\frac{\rho+3}{2}}.
|
| 128 |
+
\end{split}
|
| 129 |
+
\label{eq:au4}
|
| 130 |
+
\end{equation*}}
|
| 131 |
+
Due to the non-convex nature of the objective function, a good initialization is needed to achieve a sensible solution. Therefore we initialize $\balpha$ from the solution of the AAg formulation. Finally the corresponding attributes are estimated by $\hat{z}_i=D_z\balpha_i$, for $i=1,...,l$.
|
| 132 |
+
\subsection{From Predicted Attributes to Labels}
|
| 133 |
+
In order to predict the image labels, one needs to assign the predicted attributes, $\hat{Z}=[\hat{\z}_1,...,\hat{\z}_l]$, to the $M$ attributes of the unseen classes $Z'$ (i.e. prototypes). This task can be performed in two ways, namely the inductive approach and the transductive approach. In the inductive scheme the inference could be performed using a nearest neighbor (NN) approach in which label of each individual $\hat{\z}_i$ is assigned to be the label of its nearest neighbor $\z'_m$. In such approach the structure of $\hat{\z}_i$'s is not taken into account and the hubness problem could easily degrade the performance of the ZSL algorithm. Looking at the t-SNE embedding visualization \cite{maaten2008visualizing} of $\hat{\z}_i$'s and $\z'_m$'s in Figure \ref{fig:tsne}, details are explained later, it can be seen that NN does not provide an optimal label assignment.
|
| 134 |
+
|
| 135 |
+
In the transductive setting, on the other hand, the attributes for all test images (i.e. unseen) are first predicted to form $\hat{Z}=[\hat{\z}_1,...,\hat{\z}_l]$. Next, a graph is formed on $[Z',\hat{Z}]$ where the labels for $Z'$ are known and the task is to infer the labels of $\hat{Z}$. This problem can be formulated as a graph-based semi-supervised label propagation \cite{belkin2004regularization,zhou2003learning}. We follow the work of Zhou et al. \cite{zhou2003learning} and spread the labels of $Z'$ to $\hat{Z}$. More precisely, we first reduce the dimension of $[Z',\hat{Z}]$ via t-SNE \cite{maaten2008visualizing} and then form a graph in the lower dimension and perform label propagation on this graph. Figure \ref{fig:tsne} reconfirms that label propagation in a transductive setting could significantly improve the performance of ZSL and resolve the hubness and domain shift issues as also demonstrated in \cite{fu2015transductive,yu2017transductive}.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
|
| 146 |
+
\begin{figure*}[t]
|
| 147 |
+
\centering
|
| 148 |
+
\includegraphics[width=\linewidth]{Attribute_prediction.png}
|
| 149 |
+
\caption{Attributes predicted from the input visual features for the unseen classes of images for AWA dataset using our attribute agnostic and attribute aware formulations respectively in top and bottom rows. The nearest neighbor and label propagation assignment of the labels together with the ground truth labels are visualized. It can be seen that the attribute aware formulation together with the label propagation scheme overcomes the hubness and domain shift problems. Best seen in color. }
|
| 150 |
+
\label{fig:tsne}
|
| 151 |
+
\end{figure*}
|
| 152 |
+
\section{Theoretical Discussion}
|
| 153 |
+
\label{sec:analysis}
|
| 154 |
+
The core step for ZSL in our scheme is to compute the joint sparse representation for an unseen image. Note that in the testing phase, the sparse representation $\bf{a}$ is estimated using \eqref{eq:attrAgn}, while the dictionaries are learned for optimal sparse representations as in \eqref{eq:maineq}. More specifically, we need to demonstrate that the following two problems lead to close approximations:
|
| 155 |
+
\begin{equation}
|
| 156 |
+
\begin{split}
|
| 157 |
+
\balpha^*&=\operatorname{argmin}_a \|\x-D_x\a\|_2^2 +\|\z-D_z\a\|_2^2+\lambda\|a\|_1\\&= \operatorname{argmin}_a \|\begin{bmatrix}
|
| 158 |
+
\x \\
|
| 159 |
+
\z
|
| 160 |
+
\end{bmatrix}-\begin{bmatrix}
|
| 161 |
+
D_x \\
|
| 162 |
+
D_z
|
| 163 |
+
\end{bmatrix}\bf{a}\|_2^2 +\lambda\|\bf{a}\|_1\\
|
| 164 |
+
&\balpha^+=\operatorname{argmin}_a \|\x-D_x\a\|_2^2 +\lambda\|\a\|_1,
|
| 165 |
+
\end{split}
|
| 166 |
+
\label{eq:dic}
|
| 167 |
+
\end{equation}
|
| 168 |
+
in order to conclude that we can solve for $\balpha^+$ in ZSL regime (i.e. prediction attributes for unseen images) to estimate $\balpha^*$ with good accuracy. Note that the major challenge in the testing phase is that we are using the dictionary $D_x\in\mathbb{R}^{p\times r}$ to find the shared sparse parameters, $\balpha$, instead of $\tilde{D}=[D_x,D_z]^T\in\mathbb{R}^{(p+q)\times r}$. To study the effect of this change, we first point out that Eq.~\ref{eq:mainDx} can be interpreted as result of a maximum a posteriori (MAP) inference from a Bayesian perspective. This means that from a probabilistic perspective, $\balpha$'s are drawn from a Laplacian distribution and the dictionary $D$ is a Gaussian matrix with elements drawn i.i.d: $d_{ij} \sim \mathcal{N}(\bm{0}, \sigma^2)$. This means that given a drawn dataset, we learn MAP estimate of a Gaussian matrix. In order to analyze the effect, we rely on the following theorem about LASSO with Gausian matrices \cite{negahban2009unified}:
|
| 169 |
+
|
| 170 |
+
\textbf{Theorem 1 \cite{negahban2009unified}}:
|
| 171 |
+
Let $\balpha_s$ be the unique sparse solution of the linear system $\x=D\a$ with $\|\a\|_0=k$ and $D \in \R^{p\times n}$. If $\balpha^\ddagger$ is the LASSO solution
|
| 172 |
+
for the system from noisy observations, then with high probability: \mbox{$\|\balpha_s-\balpha^\ddagger\|_2 \leq c'\sqrt{k\frac{\log r}{p}}$} \enspace,
|
| 173 |
+
where $c'\in\mathbb{R}^+$ is a constant which depends on the loss function which measures the data fidelity, here the Euclidean distance.
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
\textbf{Lemma 1}: Attribute prediction error in ZSL setting is upper-bounded proportional to $(\frac{1}{\sqrt{p}}+\frac{1}{\sqrt{q+p}})$.
|
| 177 |
+
|
| 178 |
+
|
| 179 |
+
Proof: note that if $\balpha^*$ is a solution of $[\bf{x}^T,\bf{z}^T]^T=\tilde{D}\bf{a}$, trivially it is also a solution for $ \x =D_x\a$ as well. Now using Theorem 1:
|
| 180 |
+
\begin{equation}
|
| 181 |
+
\begin{split}
|
| 182 |
+
&\|\z^*-\z^+\|\le \|D_x(\alpha^*-\alpha^+)\|\\
|
| 183 |
+
& \|D_x(\alpha^*-\alpha^+)\| \le c'\|D_z\|_2 \sqrt{k\log r}(\frac{1}{\sqrt{p}}+\frac{1}{\sqrt{q+p}})
|
| 184 |
+
\end{split}
|
| 185 |
+
\label{eq:error}
|
| 186 |
+
\end{equation}
|
| 187 |
+
Note we have used the triangular inequality first and then the theorem in the above deduction and $\|\cdot\|_2$ denotes spectral norm for a matrix. This result accords with intuition. First, it advises sparseness of $\z$, i.e. smaller $k$, decreases the error which means that a good sparsifying dictionary would lead to less ZSL error. Second, the error is proportional to inverse of both $\sqrt{p}$ and $\sqrt{p+q}$, meaning that rich visual and attribute descriptions lead to minimal ZSL error. This suggests that for our approach to work, existence of a good sparsifying dictionary as well as rich visual and attribute data is essential. Finally, although increasing the number of dictionary columns $r$ intuitively can improve sparsity, i.e. decrease $k$, this result shows that it can potentially increase the ZSL error, and should be tuned for an optimal performance.
|
| 188 |
+
|
| 189 |
+
|
| 190 |
+
\begin{table}[t!]
|
| 191 |
+
{\small
|
| 192 |
+
\begin{tabular}{lc|ccc }
|
| 193 |
+
\multicolumn{2}{c}{Method} & SUN & CUB & AwA \\
|
| 194 |
+
\hline
|
| 195 |
+
\multicolumn{2}{c|}{\cite{romera2015embarrassingly}$^\ddagger$} & 82.10 & - & 75.32 \\
|
| 196 |
+
\multicolumn{2}{c|}{\cite{zhang2015zero}$^\dagger$} & 82.5 & 30.41 & 76.33 \\
|
| 197 |
+
\multicolumn{2}{c|}{\cite{zhang2016zero}$^\dagger$} & 82.83 & 42.11 & 80.46\\
|
| 198 |
+
\multicolumn{2}{c|}{\cite{bucher2016improving}$^\dagger$}&84.41& 43.29 & 77.32\\
|
| 199 |
+
\multicolumn{2}{c|}{\cite{xu2017matrix}$^\dagger$}& 83.5 & 53.6 & 84.5 \\
|
| 200 |
+
\multicolumn{2}{c|}{\cite{li2017zero} $^\dagger$} & - & 61.79 & 87.22 \\
|
| 201 |
+
\multicolumn{2}{c|}{\cite{yezero}$^\dagger$ } & 85.40 & 57.14 & 85.66 \\
|
| 202 |
+
\multicolumn{2}{c|}{\cite{ding2017lowrank}$^\dagger$ } & 86.0 & 45.2 & 82.8 \\
|
| 203 |
+
\multicolumn{2}{c|}{\cite{wang2017zero}$^\dagger$} &- & 42.7&79.8 \\
|
| 204 |
+
\multicolumn{2}{c|}{\cite{kodirov2017semantic}$^\dagger$} &91.0 & 61.4 &84.7\\
|
| 205 |
+
\hline
|
| 206 |
+
Ours & AAg \eqref{eq:attrAgn} & 82.05 & 35.81 & 77.73 \\
|
| 207 |
+
Ours & AAw \eqref{eq:softass} & 83.22 & 38.36 & 83.33 \\
|
| 208 |
+
\rowcolor{mycolor!30}
|
| 209 |
+
Ours & Transductive AAw (TAAw) & 85.90 & 47.12 & 88.23 \\
|
| 210 |
+
\hline
|
| 211 |
+
Ours &TAAw hit@3 & 94.52 & 58.19 & 91.73 \\
|
| 212 |
+
Ours &TAAw hit@5 & 98.15 & 69.67 & 97.13 \\
|
| 213 |
+
\end{tabular}}
|
| 214 |
+
\caption{ Zero-shot classification results for three benchmark datasets. All methods use VGG19 features trained on the ImageNet dataset and the original continuous (or binned) attributes provided by the datasets. Here, $\dagger$ indicates that the results are extracted directly from the corresponding paper, $\ddagger$ indicates that the results are reimplemented with VGG19 features, and $-$ indicates that the results are not reported. }
|
| 215 |
+
\label{tab:table1}
|
| 216 |
+
\end{table}
|
| 217 |
+
\section{Experiments}
|
| 218 |
+
\label{sec:results}
|
| 219 |
+
We carried out experiments on three benchmark ZSL datasets and empirically evaluated the resulting performance against nascent ZSL algorithms.
|
| 220 |
+
|
| 221 |
+
{\bf Datasets:} We conducted our experiments on three benchmark datasets namely: the Animals with Attributes (AwA1) \cite{lampertattribute}, the SUN attribute \cite{patterson2012sun}, and the Caltech-UCSD-Birds 200-2011 (CUB) bird \cite{wah2011caltech} datasets. The AwA1 dataset is a coarse-grained dataset containing 30475 images of 50 types of animals with 85 corresponding attributes for these classes. Semantic attributes for this dataset are obtained via human annotations. The images for the AWA1 dataset are not publicly available; therefore we use the publicly available features of dimension $4096$ extracted from a VGG19 convolutional neural network, which was pretrained on the ImageNet dataset. Following the conventional usage of this dataset, 40 classes are used as source classes to learn the model and the remaining 10 classes are used as target (unseen) classes to test the performance of zero-shot classification. The SUN dataset is a fine-grained dataset and contains 717 classes of different scene categories with 20 images per category (14340 images total). Each image is annotated with 102 attributes that describe the corresponding scene. Following \cite{lampertattribute}, 707 classes are used to learn the dictionaries and the remaining 10 classes are used for testing. The CUB200 dataset is a fine-grained dataset containing 200 classes of different types of birds with 11788 images with 312 attributes and boundary segmentation for each image. The attributes are obtained via human annotation. The dataset is divided into four almost equal folds, where three folds are used to learn the model and the fourth fold is used for testing. For both SUN and CUB200-2011 datasets we used features from VGG19 trained on the ImageNet dataset, which have $4096$ dimensions. We note that our results using ResNet50 and DenseNet \cite{huang2017densely} features will be published in an extended version of this paper.
|
| 222 |
+
|
| 223 |
+
{\bf Tuning parameters:} The optimization regularization parameters $\lambda$, $\rho$, $\gamma$ as well as the number of dictionary atoms $r$ need to be tuned for maximal performance. We used standard $k$-fold cross validation to search for the optimal parameters for each dataset. After splitting the datasets accordingly into training, validation, and testing sets, we used performance on the validation set for tuning the parameters in a brute-force search.
|
| 224 |
+
we used the common evaluation metrics in ZSL, flat hit@K classification accuracy, to measure the performance. This means that a test image is said to be classified correctly if it is classified among the top $K$ predicted labels. We report hit@1 rate to measure ZSL image classification performance and hit@3 and hit@5 for image retrieval performance. Each experiment is performed ten times and the mean is reported in Tabel \ref{tab:table1}.
|
| 225 |
+
|
| 226 |
+
{\bf Results:} Figure \ref{fig:tsne} demonstrates the 2D t-SNE embedding for predicted attributes and actual class attributes of the AWA dataset. The actual attributes are depicted by colored circles with black edges. The first column of Figure \ref{fig:tsne} demonstrates the attribute prediction for AAg and AAw formulations. It can be clearly seen that the entropy regularization in AAw formulation improves the clustering quality, decreases data overlap, and reduces the domain shift problem. The nearest neighbor label assignment is shown in the second column, which demonstrates the domain shift and hubness problems with NN label assignment in the attribute space. The third column of Figure \ref{fig:tsne} shows the transductive approach in which a label propagation is performed on the graph of the predicted attributes. Note that the label propagation addresses the domain shift and hubness problem and when used with the AAw formulation provides significantly better zero-shot classification accuracy.
|
| 227 |
+
|
| 228 |
+
|
| 229 |
+
Performance comparison results are summarized in Table \ref{tab:table1}. As pointed out by Xian et al. \cite{xian2017zero} the variety of used image features (e.g. various DNNs and various combinations of these features) as well as the variation of used attributes (e.g. word2vec, human annotation), and different data splits make direct comparison with the ZSL methods in the literature very challenging. In Table \ref{tab:table1} we provide a fair comparison of our JDZSL performance to the recent methods in the literature. All compared methods use the same visual features (i.e. VGG19) and the same attributes (i.e. the continuous or binned) provided in the dataset. %
|
| 230 |
+
Table \ref{tab:table1} provides a comprehensive explanation of the shown results. Note that our method achieves state-of-the-art or close to state-of-the-art performance.
|
| 231 |
+
|
| 232 |
+
We report the hit@1 accuracy on unseen classes in the first nine rows of the table to measure image classification performance. For the sake of transparency and to provide the complete picture to the reader, we included results for the AAg formulation using nearest neighbor, the AAw using nearest neighbor, and AAw using the transductive approach, denoted as transductive attribute aware (TAA) formulation. As it can be seen, while the AAw formulation significantly improves the AAg formulation and adding the transductive approach (i.e. label propagation on predicted attributes) to the AAw formulation further boosts the classification accuracy, as also shown in Figure \ref{fig:tsne}. In addition, our approach leads to better and comparable performance in all three datasets which include zero-shot scene and object recgonition tasks. More importantly, while the other methods can perform well on a specific dataset, our algorithm leads to competitive performance on all the three datasets.%
|
| 233 |
+
\section{Conclusions}
|
| 234 |
+
\label{sec:conclusion}
|
| 235 |
+
A ZSL formulation is developed that models the relationship between visual features and semantic attributes via joint sparse dictionaries. We showed that while a classic joint dictionary learning approach suffers from the domain shift problem, an entropy regularization scheme can help with this phenomenon and provide superior performance. In addition, we demonstrated that a transductive approach towards assigning labels to the predicted attributes can boost the performance considerably and lead to state-of-the-art zero-shot classification. Finally, we compared our method to the nascent approaches in the literature and demonstrated its competitiveness on benchmark datasets.
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
\clearpage
|
| 239 |
+
|
| 240 |
+
\bibliographystyle{aaai}
|
| 241 |
+
\bibliography{jointDL}
|
| 242 |
+
|
| 243 |
+
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
\clearpage
|
1709.03698v2.txt
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Deep learning powers many research areas and impacts various aspects of society (?) from computer vision (?; ?), natural language processing (?) to biology (?) and e-commerce. Recent progress in designing architectures for deep networks has further accelerated this trend (?; ?; ?). Among the most successful architectures are deep residual network (ResNet) and its variants, which are widely used in many computer vision applications (?; ?) and natural language processing tasks (?; ?; ?). However, there still are few theoretical analyses and guidelines for designing and training ResNet.
|
| 2 |
+
|
| 3 |
+
In contrast to the recent interest in deep residual networks, system of Ordinary Differential Equations (ODEs), special kinds of dynamical systems, have long been studied in mathematics and physics with rich theoretical and empirical success (?; ?; ?). The connection between nonlinear ODEs and deep ResNets has been established in the recent works of (?; ?; ?; ?; ?; ?). The continuous interpretation of ResNets as dynamical systems allows the adaption of existing theory and numerical techniques for ODEs to deep learning. For example, the paper (?) introduces the concept of stable networks that can be arbitrarily long. However, only deep networks with simple single-layer convolution building blocks are proposed, and the architectures are not reversible (and thus the length of the network is limited by the amount of available memory), and only simple numerical examples are provided. Our work aims at overcoming these drawbacks and further investigates the efficacy and practicability of stable architectures derived from the dynamical systems perspective.
|
| 4 |
+
|
| 5 |
+
In this work, we connect deep ResNets and ODEs more closely and propose three stable and reversible architectures. We show that the three architectures are governed by stable and well-posed ODEs. In particular, our approach allows to train arbitrarily long networks using only minimal memory storage.We illustrate the intrinsic reversibility of these architectures with both theoretical analysis and empirical results. The reversibility property easily leads to a memory-efficient implementation, which does not need to store the activations at most hidden layers. Together with the stability, this allows one to train almost arbitrarily deep architectures using modest computational resources.
|
| 6 |
+
|
| 7 |
+
The remainder of our paper is organized as follows. We discuss related work in Sec. 2. In Sec. 3 we review the notion of reversibility and stability in ResNets, present three new architectures, and a regularization functional. In Sec. 4 we show the efficacy of our networks using three common classification benchmarks (CIFAR-10, CIFAR-100, STL-10). Our new architectures achieve comparable or even superior accuracy and, in particular, generalize better when a limited number of labeled training data is used. In Sec. 5 we conclude the paper.
|
| 8 |
+
|
| 9 |
+
ResNets are deep neural networks obtained by stacking simple residual blocks (?). A simple residual network block can be written as𝐘j+1=𝐘j+ℱ(𝐘j,𝜽j)forj=0,…,N−1.formulae-sequencesubscript𝐘𝑗1subscript𝐘𝑗ℱsubscript𝐘𝑗subscript𝜽𝑗for𝑗0…𝑁1\mathbf{Y}_{j+1}=\mathbf{Y}_{j}+\mathcal{F}(\mathbf{Y}_{j},{\boldsymbol{\theta}}_{j})\quad\mathrm{for}\quad j=0,...,N-1.(1)Here, 𝐘jsubscript𝐘𝑗{\bf Y}_{j} are the values of the features at the j𝑗jth layer and 𝜽jsubscript𝜽𝑗{\boldsymbol{\theta}}_{j} are the j𝑗jth layer’s network parameters. The goal of the training is to learn the network parameters 𝜽𝜽{\boldsymbol{\theta}}.Eq. (1) represents a discrete dynamical system.An early review on neural networks as dynamical systems is presented in (?).
|
| 10 |
+
|
| 11 |
+
ResNets have been broadly applied in many domains including computer vision tasks such as image recognition (?), object detection (?), semantic segmentation (?) and visual reasoning (?), natural language processing tasks such as speech synthesis (?), speech recognition (?) and machine translation (?).
|
| 12 |
+
|
| 13 |
+
Besides broadening the application domain, some ResNet successors focus on improving accuracy (?; ?) and stability (?), saving GPU memory (?), and accelerating the training process (?). For instance, ResNxt (?) introduces a homogeneous, multi-branch architecture to increase the accuracy. Stochastic depth (?) reduces the training time while increases accuracy by randomly dropping a subset of layers and bypassing them with identity function.
|
| 14 |
+
|
| 15 |
+
To see the connection between ResNet and ODE systems we add a hyperparameter h>0ℎ0h>0 to Eq. (1) and rewrite the equation as𝐘j+1−𝐘jh=ℱ(𝐘j,𝜽j).subscript𝐘𝑗1subscript𝐘𝑗ℎℱsubscript𝐘𝑗subscript𝜽𝑗\frac{\mathbf{Y}_{j+1}-\mathbf{Y}_{j}}{h}=\mathcal{F}(\mathbf{Y}_{j},{\boldsymbol{\theta}}_{j}).(2)For a sufficiently small hℎh, Eq. (2) is a forward Euler discretization of the initial value problem𝐘˙(t)=ℱ(𝐘(t),𝜽(t)),𝐘(0)=𝐘0.formulae-sequence˙𝐘𝑡ℱ𝐘𝑡𝜽𝑡𝐘0subscript𝐘0\dot{\mathbf{Y}}(t)=\mathcal{F}(\mathbf{Y}(t),{\boldsymbol{\theta}}(t)),\quad\mathbf{Y}(0)=\mathbf{Y}_{0}.(3)Thus, the problem of learning the network parameters, 𝜽𝜽{\boldsymbol{\theta}}, is equivalent to solving a parameter estimation problem or optimal control problem involving the ODE system Eq. (3). In some cases (e.g., in image classification), Eq. (3) can be interpreted as a system of Partial Differential Equations (PDEs).Such problems have rich theoretical and computational framework, including techniques to guarantee stable networks by using appropriate functions ℱℱ\mathcal{F}, the discretization of the forward propagation process (?; ?; ?), theoretical frameworks for the optimization over the parameters 𝜽𝜽{\boldsymbol{\theta}} (?; ?; ?), and methods for computing the gradient of the solution with respect to 𝜽𝜽{\boldsymbol{\theta}} (?).
|
| 16 |
+
|
| 17 |
+
Reversible numerical methods for dynamical systems allow the simulation of the dynamic going from the final time to the initial time, and vice versa.Reversible numerical methods are commonly used in the context of hyperbolic PDEs, where various methods have been proposed and compared (?). The theoretical framework for reversible methods is stronglytied to issues of stability. In fact, as we show here, not every method that is algebraically reversible is numerically stable. This has a strong implication for the practical applicability of reversible methods to deep neural networks.
|
| 18 |
+
|
| 19 |
+
Recently, various reversible neural networks have been proposed for different purposes and based on different architectures. Recent work by (?; ?) inverts the feed-forward net and reproduces the input features from their values at the final layers. This suggests that some deep neural networks are reversible: the generative model is just the reverse of the feed-forward net (?). (?) provide a theoretical connection between a model-based compressive sensing and CNNs. NICE (?; ?) uses an invertible non-linear transformation to map the data distribution into a latent space where the resulting distribution factorizes, yielding good generative models. Besides the implications that reversibility has on the deep generative models, the property can be used for developing memory-efficient algorithms. For instance, RevNet (?), which is inspired by NICE, develops a variant of ResNet where each layer’s activations can be reconstructed from next layer’s. This allows one to avoid storing activations at all hidden layers, except at those layers with stride larger than one. We will show later that our physically-inspired network architectures also have the reversible property and we derive memory-efficient implementations.
|
| 20 |
+
|
| 21 |
+
We introduce three new reversible architectures for deep neural networksand discuss their stability. We capitalize on the link between ResNets andODEs to guarantee stability of the forward propagation process and the well-posedness of the learning problem. Finally, we present regularization functionals that favor smooth time dynamics.
|
| 22 |
+
|
| 23 |
+
Eq. (3) interprets ResNet as a discretization of a differential equation, whose parameters 𝜽𝜽{\boldsymbol{\theta}} are learned in the training process.The process of forward propagation can be viewed as simulating the nonlinear dynamics that takethe initial data, 𝐘0subscript𝐘0{\bf Y}_{0}, which are hard to classify, and moves them to a final state𝐘Nsubscript𝐘𝑁{\bf Y}_{N}, which can be classified easily using, e.g., a linear classifier.
|
| 24 |
+
|
| 25 |
+
A fundamental question that needs to be addressed is, under what conditions is forward propagation well-posed?This question is important for two main reasons. First, instability of the forward propagationmeans that the solution is highly sensitive to data perturbation (e.g., image noise or adversarial attacks). Given thatmost computations are done in single precision, this may cause serious artifactsand instabilities in the final results.Second, training unstable networks may be very difficult in practice and, althoughimpossible to prove, instability can add many local minima.
|
| 26 |
+
|
| 27 |
+
Let us first review the issue of stability. A dynamical system is stable ifa small change in the input data leads to a small change in the final result.To better characterize this, assume a small perturbation,δ𝐘(0)𝛿𝐘0\delta{\bf Y}(0) to the initial data 𝐘(0)𝐘0{\bf Y}(0) in Eq. (3).Assume that this change is propagated throughout the network. The questionis, what would be the change after some time t𝑡t, that is, what isδ𝐘(t)𝛿𝐘𝑡\delta{\bf Y}(t)?
|
| 28 |
+
|
| 29 |
+
This change can be characterized by the Lyapunov exponent (?), which measuresthe difference in the trajectories of a nonlinear dynamical systemgiven the initial conditions. The Lyapunov exponent, λ𝜆\lambda, is defined asthe exponent that measures the difference:‖δ𝐘(t)‖≈exp(λt)‖δ𝐘(0)‖.norm𝛿𝐘𝑡𝜆𝑡norm𝛿𝐘0\|\delta{\bf Y}(t)\|\approx\exp(\lambda t)\|\delta{\bf Y}(0)\|.(4)The forward propagation is well-posed when λ≤0𝜆0\lambda\leq 0, and ill-posed if λ>0𝜆0\lambda>0.A bound on the value of λ𝜆\lambda can be derived from the eigenvalues of the Jacobian matrix of ℱℱ\mathcal{F} with respect to 𝐘𝐘{\bf Y}, which is given by𝐉(t)=∇𝐘(t)ℱ(𝐘(t)).𝐉𝑡subscript∇𝐘𝑡ℱ𝐘𝑡\mathbf{J}(t)=\nabla_{\mathbf{Y}(t)}\mathcal{F}(\mathbf{Y}(t)).A sufficient condition for stability ismaxi=1,2,…,nRe(λi(𝐉(t)))≤0,∀t∈[0,T],formulae-sequencesubscript𝑖12…𝑛𝑅𝑒subscript𝜆𝑖𝐉𝑡0for-all𝑡0𝑇\max\limits_{i=1,2,...,n}Re(\lambda_{i}(\mathbf{J}(t)))\leq 0,\quad\forall t\in[0,T],(5)where λi(𝐉)subscript𝜆𝑖𝐉\lambda_{i}(\mathbf{J}) is the i𝑖ith eigenvalue of 𝐉𝐉\mathbf{J}, and Re(⋅)𝑅𝑒⋅Re(\cdot) denotes the real part.
|
| 30 |
+
|
| 31 |
+
This observation allows us to generate networks that are guaranteed to be stable. It should be emphasized that the stability of the forward propagation is necessary to obtain stable networks that generalize well, but not sufficient. In fact, if the real parts of the eigenvalues in Eq. (5) are negative and large, λ≪0much-less-than𝜆0\lambda\ll 0, Eq. (4) shows that differences in the input features decay exponentially in time. This complicates the learning problem and therefore we consider architectures that lead to Jacobians with (approximately) purely imaginary eigenvalues.We now discuss three such networks that are inspired by different physical interpretations.
|
| 32 |
+
|
| 33 |
+
(?) propose a neural network architecture inspired by Hamiltonian systems𝐘˙(t)˙𝐘𝑡\displaystyle\dot{\mathbf{Y}}(t)=σ(𝐊(t)𝐙(t)+𝐛(t)),absent𝜎𝐊𝑡𝐙𝑡𝐛𝑡\displaystyle=\sigma(\mathbf{K}(t)\mathbf{Z}(t)+\mathbf{b}(t)),(6)𝐙˙(t)˙𝐙𝑡\displaystyle\dot{\mathbf{Z}}(t)=−σ(𝐊(t)T𝐘(t)+𝐛(t)),absent𝜎𝐊superscript𝑡𝑇𝐘𝑡𝐛𝑡\displaystyle=-\sigma(\mathbf{K}(t)^{T}\mathbf{Y}(t)+\mathbf{b}(t)),where 𝐘(t)𝐘𝑡\mathbf{Y}(t) and 𝐙(t)𝐙𝑡\mathbf{Z}(t) are partitions of the features, σ𝜎\sigma is an activation function, and the network parameters are θ=(𝐊,𝐛)𝜃𝐊𝐛\theta=(\mathbf{K},\mathbf{b}). For convolutional neural networks, 𝐊(t)𝐊𝑡\mathbf{K}(t) and 𝐊(t)T𝐊superscript𝑡𝑇\mathbf{K}(t)^{T} are convolution operator and convolution transpose operator respectively.It can be shown that the Jacobian matrix of this ODE satisfies the condition in Eq. (5), thus it is stable and well-posed. The authors also demonstrate the performance on a small dataset.However, in our numerical experiments we have found that the representability of this “one-layer” architecture is limited.
|
| 34 |
+
|
| 35 |
+
According to the universal approximation theorem (?), a two-layer neural network can approximate any monotonically-increasing continuous function on a compact set. Recent work (?) shows that simple two-layer neural networks already have perfect finite sample expressivity as soon as the number of parameters exceeds the number of data points.Therefore, we propose to extend Eq. (6) to the following two-layer structure:𝐘˙(t)˙𝐘𝑡\displaystyle\dot{\mathbf{Y}}(t)=𝐊1T(t)σ(𝐊1(t)𝐙(t)+𝐛1(t)),absentsuperscriptsubscript𝐊1𝑇𝑡𝜎subscript𝐊1𝑡𝐙𝑡subscript𝐛1𝑡\displaystyle=\mathbf{K}_{1}^{T}(t)\sigma(\mathbf{K}_{1}(t)\mathbf{Z}(t)+\mathbf{b}_{1}(t)),(7)𝐙˙(t)˙𝐙𝑡\displaystyle\dot{\mathbf{Z}}(t)=−𝐊2T(t)σ(𝐊2(t)𝐘(t)+𝐛2(t)).absentsuperscriptsubscript𝐊2𝑇𝑡𝜎subscript𝐊2𝑡𝐘𝑡subscript𝐛2𝑡\displaystyle=-\mathbf{K}_{2}^{T}(t)\sigma(\mathbf{K}_{2}(t)\mathbf{Y}(t)+\mathbf{b}_{2}(t)).In principle, any linear operator can be used within the Hamiltonian framework. However, since our numerical experiments considerimages, we choose𝐊isubscript𝐊𝑖\mathbf{K}_{i} to be a convolution operator, 𝐊iTsuperscriptsubscript𝐊𝑖𝑇\mathbf{K}_{i}^{T} as its transpose.Rewriting Eq. (7) in matrix form gives(𝐘˙𝐙˙)=(𝐊1T00−𝐊2T)σ((0𝐊1𝐊20)(𝐘𝐙)+(𝐛1𝐛2)).matrix˙𝐘˙𝐙matrixsuperscriptsubscript𝐊1𝑇00superscriptsubscript𝐊2𝑇𝜎matrix0subscript𝐊1subscript𝐊20matrix𝐘𝐙matrixsubscript𝐛1subscript𝐛2\begin{pmatrix}\dot{\mathbf{Y}}\\\dot{\mathbf{Z}}\end{pmatrix}=\begin{pmatrix}\mathbf{K}_{1}^{T}&0\\0&-\mathbf{K}_{2}^{T}\end{pmatrix}\sigma\Big{(}\begin{pmatrix}0&\mathbf{K}_{1}\\\mathbf{K}_{2}&0\end{pmatrix}\begin{pmatrix}\mathbf{Y}\\\mathbf{Z}\end{pmatrix}+\begin{pmatrix}\mathbf{b}_{1}\\\mathbf{b}_{2}\end{pmatrix}\Big{)}.(8)There are different ways of partitioning the input features, including checkerboard partition and channel-wise partition (?). In this work, we use equal channel-wise partition, that is, the first half of the channels of the input is 𝐘𝐘\mathbf{Y} and the second half is 𝐙𝐙\mathbf{Z}.
|
| 36 |
+
|
| 37 |
+
It can be shown that the Jacobian matrix of Eq. (8) satisfies the condition in Eq. (5), that is,𝐉𝐉\displaystyle\mathbf{J}=∇(𝐘𝐙)(𝐊1T00−𝐊2T)σ((0𝐊1𝐊20)(𝐲𝐳))absentsubscript∇binomial𝐘𝐙matrixsuperscriptsubscript𝐊1𝑇00superscriptsubscript𝐊2𝑇𝜎matrix0subscript𝐊1subscript𝐊20matrix𝐲𝐳\displaystyle=\nabla_{\binom{\mathbf{Y}}{\mathbf{Z}}}\begin{pmatrix}\mathbf{K}_{1}^{T}&0\\0&-\mathbf{K}_{2}^{T}\end{pmatrix}\sigma\Big{(}\begin{pmatrix}0&\mathbf{K}_{1}\\\mathbf{K}_{2}&0\end{pmatrix}\begin{pmatrix}\mathbf{y}\\\mathbf{z}\end{pmatrix}\Big{)}=(𝐊1T00−𝐊2T)diag(σ′)(0𝐊1𝐊20),absentmatrixsuperscriptsubscript𝐊1𝑇00superscriptsubscript𝐊2𝑇diagsuperscript𝜎′matrix0subscript𝐊1subscript𝐊20\displaystyle=\begin{pmatrix}\mathbf{K}_{1}^{T}&0\\0&-\mathbf{K}_{2}^{T}\end{pmatrix}\mathrm{diag}(\sigma^{\prime})\begin{pmatrix}0&\mathbf{K}_{1}\\\mathbf{K}_{2}&0\end{pmatrix},(9)where diag(σ′)diagsuperscript𝜎′{\rm diag}(\sigma^{\prime}) is the derivative of the activation function.The eigenvalues of 𝐉𝐉\mathbf{J} are all imaginary (see the Appendix for a proof).Therefore Eq. (5) is satisfied and the forward propagation of our neural network is stable and well-posed.
|
| 38 |
+
|
| 39 |
+
A commonly used discretization technique for Hamiltonian systems such as Eq. (7) is the Verlet method (?) that reads𝐘j+1subscript𝐘𝑗1\displaystyle\mathbf{Y}_{j+1}=𝐘j+h𝐊j1Tσ(𝐊j1𝐙j+𝐛j1),absentsubscript𝐘𝑗ℎsuperscriptsubscript𝐊𝑗1𝑇𝜎subscript𝐊𝑗1subscript𝐙𝑗subscript𝐛𝑗1\displaystyle=\mathbf{Y}_{j}+h\mathbf{K}_{j1}^{T}\sigma(\mathbf{K}_{j1}\mathbf{Z}_{j}+\mathbf{b}_{j1}),(10)𝐙j+1subscript𝐙𝑗1\displaystyle\mathbf{Z}_{j+1}=𝐙j−h𝐊j2Tσ(𝐊j2𝐘j+1+𝐛j2).absentsubscript𝐙𝑗ℎsuperscriptsubscript𝐊𝑗2𝑇𝜎subscript𝐊𝑗2subscript𝐘𝑗1subscript𝐛𝑗2\displaystyle=\mathbf{Z}_{j}-h\mathbf{K}_{j2}^{T}\sigma(\mathbf{K}_{j2}\mathbf{Y}_{j+1}+\mathbf{b}_{j2}).We choose Eq. (10) to be our Hamiltonian blocks and illustrate it in Fig. 1.Similar to ResNet (?), our Hamiltonian reversible network is built by first concatenating blocks to units, and then concatenating units to a network.An illustration of our architecture is provided in Fig. 2.
|
| 40 |
+
|
| 41 |
+
Another reversible numerical method for discretizing the first-order ODE in Eq. (3) is obtained by using central finite differences in time𝐘j+1−𝐘j−12h=ℱ(𝐘j).subscript𝐘𝑗1subscript𝐘𝑗12ℎℱsubscript𝐘𝑗\frac{\mathbf{Y}_{j+1}-\mathbf{Y}_{j-1}}{2h}=\mathcal{F}(\mathbf{Y}_{j}).(11)This gives the following forward propagation𝐘j+1=𝐘j−1+2hℱ(𝐘j), for j=1,…,N−1,formulae-sequencesubscript𝐘𝑗1subscript𝐘𝑗12ℎℱsubscript𝐘𝑗 for 𝑗1…𝑁1\mathbf{Y}_{j+1}=\mathbf{Y}_{j-1}+2h\mathcal{F}(\mathbf{Y}_{j}),\;\text{ for }\;j=1,\ldots,N-1,(12)where 𝐘1subscript𝐘1\mathbf{Y}_{1} is obtained by one forward Euler step. To guarantee stability for a single layer we can use the function ℱℱ{\cal F} to contain an anti-symmetric linear operator, that is,ℱ(𝐘)=σ((𝐊−𝐊T)𝐘+𝐛).ℱ𝐘𝜎𝐊superscript𝐊𝑇𝐘𝐛\mathcal{F}(\mathbf{Y})=\sigma((\mathbf{K}-\mathbf{K}^{T})\mathbf{Y}+\mathbf{b}).(13)The Jacobian of this forward propagation is𝐉=diag(σ′)(𝐊−𝐊T),𝐉diagsuperscript𝜎′𝐊superscript𝐊𝑇{\bf J}={\rm diag}(\sigma^{\prime})(\mathbf{K}-\mathbf{K}^{T}),(14)which has only imaginary eigenvalues.This yields the single layer midpoint network𝐘j+1={2hσ((𝐊j−𝐊jT)𝐘j+𝐛j),j=0,𝐘j−1+2hσ((𝐊j−𝐊jT)𝐘j+𝐛j),j>0.{\bf Y}_{j+1}=\left\{\begin{aligned} &2h\sigma((\mathbf{K}_{j}-\mathbf{K}_{j}^{T})\mathbf{Y}_{j}+\mathbf{b}_{j}),&j=0,\\&\mathbf{Y}_{j-1}+2h\sigma((\mathbf{K}_{j}-\mathbf{K}_{j}^{T})\mathbf{Y}_{j}+\mathbf{b}_{j}),&{\rm j>0.}\end{aligned}\right.(15)
|
| 42 |
+
|
| 43 |
+
As we see next, it is straightforward to show that the midpoint method is reversible (at least algebraically).However,while it is possible to potentially use a double layer midpoint network, it is difficult toensure the stability of such network. To this end, we explore the leapfrog network next.
|
| 44 |
+
|
| 45 |
+
A stable leapfrog network can be seen as a special case of the Hamiltonian network in Eq. (7) when one of the kernels is the identity matrix and one of the activation is the identity function. The leapfrog network involves two derivatives in time and reads𝐘¨(t)=−𝐊(t)Tσ(𝐊(t)𝐘(t)+b(t)),𝐘(0)=𝐘0.formulae-sequence¨𝐘𝑡𝐊superscript𝑡𝑇𝜎𝐊𝑡𝐘𝑡𝑏𝑡𝐘0subscript𝐘0\ddot{\mathbf{Y}}(t)=-{\bf K}(t)^{T}\sigma(\mathbf{K}(t){\bf Y}(t)+b(t)),\quad{\bf Y}(0)={\bf Y}_{0}.(16)It can be discretized, for example, using the conservative leapfrog discretization, which uses the following symmetric approximation to the second derivative in time𝐘¨(tj)≈h−2(𝐘j+1−2𝐘j+𝐘j−1).¨𝐘subscript𝑡𝑗superscriptℎ2subscript𝐘𝑗12subscript𝐘𝑗subscript𝐘𝑗1\ddot{{\bf Y}}(t_{j})\approx h^{-2}({\bf Y}_{j+1}-2{\bf Y}_{j}+{\bf Y}_{j-1}).Substituting the approximation in Eq. (16), we obtain:𝐘j+1={2𝐘j−h2���𝐊jTσ(𝐊j𝐘j+𝐛j),j=0,2𝐘j−𝐘j−1−h2𝐊jTσ(𝐊j𝐘j+𝐛j),j>0.{\bf Y}_{j+1}=\left\{\begin{aligned} &2{\bf Y}_{j}-h^{2}{\bf K}^{T}_{j}\sigma(\mathbf{K}_{j}{\bf Y}_{j}+\mathbf{b}_{j}),&j=0,\\&2{\bf Y}_{j}-{\bf Y}_{j-1}-h^{2}{\bf K}_{j}^{T}\sigma(\mathbf{K}_{j}{\bf Y}_{j}+\mathbf{b}_{j}),&{j>0.}\end{aligned}\right.(17)
|
| 46 |
+
|
| 47 |
+
An architecture is called reversible if it allows the reconstruction of theactivations going from the end to the beginning. Reversible numerical methods for ODEs have been studiedin the context of hyperbolic differential equations (?), and reversibility was discovered recently in the machine learningcommunity (?; ?).Reversible techniques enable memory-efficient implementations of the network that requires the storage of the last activations only.
|
| 48 |
+
|
| 49 |
+
Let us first demonstrate the reversibility of the leapfrog network.Assume that we are given the last two states, 𝐘Nsubscript𝐘𝑁{\bf Y}_{N} and 𝐘N−1subscript𝐘𝑁1{\bf Y}_{N-1}.Then, using Eq. (17) it is straight-forward to compute 𝐘N−2subscript𝐘𝑁2{\bf Y}_{N-2}:𝐘N−2=2𝐘N−1−𝐘N−h2𝐊N−1Tσ(𝐊N−1𝐘N−1+𝐛N−1).subscript𝐘𝑁22subscript𝐘𝑁1subscript𝐘𝑁superscriptℎ2superscriptsubscript𝐊𝑁1𝑇𝜎subscript𝐊𝑁1subscript𝐘𝑁1subscript𝐛𝑁1{\bf Y}_{N-2}=2{\bf Y}_{N-1}-{\bf Y}_{N}\\-h^{2}{\bf K}_{N-1}^{T}\sigma({\bf K}_{N-1}{\bf Y}_{N-1}+\mathbf{b}_{N-1}).(18)Given 𝐘N−2subscript𝐘𝑁2{\bf Y}_{N-2} one can continue and re-compute the activations at each hidden layer during backpropagation.Similarly, it is straightforward to show that the midpoint network is reversible.
|
| 50 |
+
|
| 51 |
+
The Hamiltonian network is similar to theRevNet and can be described as𝐘j+1subscript𝐘𝑗1\displaystyle\mathbf{Y}_{j+1}=𝐘j+ℱ(𝐙j),absentsubscript𝐘𝑗ℱsubscript𝐙𝑗\displaystyle=\mathbf{Y}_{j}+\mathcal{F}(\mathbf{Z}_{j}),(19)𝐙j+1subscript𝐙𝑗1\displaystyle\mathbf{Z}_{j+1}=𝐙j+𝒢(𝐘j+1),absentsubscript𝐙𝑗𝒢subscript𝐘𝑗1\displaystyle=\mathbf{Z}_{j}+\mathcal{G}(\mathbf{Y}_{j+1}),where 𝐘jsubscript𝐘𝑗\mathbf{Y}_{j} and 𝐙jsubscript𝐙𝑗\mathbf{Z}_{j} are a partition of the units in block j𝑗j; ℱℱ\mathcal{F} and 𝒢𝒢\mathcal{G} are the residual functions.Eq. (19) is reversible as each layer’s activations can be computed from the next layer’s as follows:𝐙jsubscript𝐙𝑗\displaystyle\mathbf{Z}_{j}=𝐙j+1−𝒢(𝐘j+1),absentsubscript𝐙𝑗1𝒢subscript𝐘𝑗1\displaystyle=\mathbf{Z}_{j+1}-\mathcal{G}(\mathbf{Y}_{j+1}),(20)𝐘jsubscript𝐘𝑗\displaystyle\mathbf{Y}_{j}=𝐘j+1−ℱ(𝐙j).absentsubscript𝐘𝑗1ℱsubscript𝐙𝑗\displaystyle=\mathbf{Y}_{j+1}-\mathcal{F}(\mathbf{Z}_{j}).It is clear that Eq. (10) is a special case of Eq. (19), which enables us to implement Hamiltonian network in a memory efficient way.
|
| 52 |
+
|
| 53 |
+
While RevNet and MidPoint represent reversible networks algebraically, they may not be reversible in practice without restrictions on the residual functions.To illustrate, consider the simple linear case where𝒢(𝐘)=α𝐘𝒢𝐘𝛼𝐘{\cal G}({\bf Y})=\alpha{\bf Y} and ℱ(𝐙)=β𝐙ℱ𝐙𝛽𝐙{\cal F}({\bf Z})=\beta{\bf Z}.The RevNet in this simple case reads𝐘j+1subscript𝐘𝑗1\displaystyle\mathbf{Y}_{j+1}=𝐘j+β𝐙j,absentsubscript𝐘𝑗𝛽subscript𝐙𝑗\displaystyle=\mathbf{Y}_{j}+\beta\mathbf{Z}_{j},𝐙j+1subscript𝐙𝑗1\displaystyle\mathbf{Z}_{j+1}=𝐙j+α𝐘j+1.absentsubscript𝐙𝑗𝛼subscript𝐘𝑗1\displaystyle=\mathbf{Z}_{j}+\alpha\mathbf{Y}_{j+1}.One way to simplify the equations is to look at two time steps and subtract them:𝐘j+1−2𝐘j+𝐘j−1=β(𝐙j−𝐙j−1)=αβ𝐘j,subscript𝐘𝑗12subscript𝐘𝑗subscript𝐘𝑗1𝛽subscript𝐙𝑗subscript𝐙𝑗1𝛼𝛽subscript𝐘𝑗\mathbf{Y}_{j+1}-2\mathbf{Y}_{j}+\mathbf{Y}_{j-1}=\beta({{\bf Z}}_{j}-{{\bf Z}}_{j-1})=\alpha\beta{\bf Y}_{j},which implies that𝐘j+1−(2+αβ)𝐘j+𝐘j−1=0.subscript𝐘𝑗12𝛼𝛽subscript𝐘𝑗subscript𝐘𝑗10\mathbf{Y}_{j+1}-(2+\alpha\beta)\mathbf{Y}_{j}+{\bf Y}_{j-1}=0.These type of equations have a solution of theform 𝐘j=ξjsubscript𝐘𝑗superscript𝜉𝑗{\bf Y}_{j}=\xi^{j}. The characteristic equation isξ2−(2+αβ)ξ+1=0.superscript𝜉22𝛼𝛽𝜉10\xi^{2}-(2+\alpha\beta)\xi+1=0.(21)Define a=12(2+αβ)𝑎122𝛼𝛽a=\frac{1}{2}(2+\alpha\beta), the roots of the equation areξ=a±a2−1.𝜉plus-or-minus𝑎superscript𝑎21\xi=a\pm\sqrt{a^{2}-1}.If a2≤1superscript𝑎21a^{2}\leq 1 then we have thatξ=a±i1−a2.𝜉plus-or-minus𝑎𝑖1superscript𝑎2\xi=a\pm i\sqrt{1-a^{2}}.and|ξ|2=1,superscript𝜉21|\xi|^{2}=1,which implies that the method is stable and no energy in the feature vectors is added or lost.
|
| 54 |
+
|
| 55 |
+
It is obvious that Eq. (21) is not stable for every choice of α𝛼\alpha and β𝛽\beta.Indeed, if, for example, α𝛼\alpha and β𝛽\beta are positive then |ξ|>1𝜉1|\xi|>1 and the solutioncan grow at every layer exhibiting unstable behavior. It is possibleto obtain stable solutions if 0<α0𝛼0<\alpha and β<0𝛽0\beta<0 and both are sufficiently small. This is the role of hℎhin our Hamiltonian network.
|
| 56 |
+
|
| 57 |
+
This analysis plays a key role in reversibility. For unstable networks, either the forward or the backward propagation consists of an exponentially growing mode. For computation in single precision (like most practical CNN), the gradient can be grossly inaccurate. Thus we see that not every choice of the functions ℱℱ{\cal F} and 𝒢𝒢{\cal G} lead to a reasonable network in practice and that some control is needed if we are to have a network that does notgrow exponentially neither forward nor backwards.
|
| 58 |
+
|
| 59 |
+
All three architectures we proposed can be used with arbitrary depth, since they do not have any dissipation. This implies that the signal that is input into the system does not decay even for arbitrarily long networks. Thus signals can propagate through this system to infinite network depth. We have also experimented with slightly dissipative networks, that is, networks that attenuate the signal at each layer, that yielded results that were comparable to the ones obtained by the networks proposed here.
|
| 60 |
+
|
| 61 |
+
Regularization plays a vital role serving as parameter tuning in the deep neural network training to help improve generalization performance (?). Besides commonly used weight decay, we also use weight smoothness decay. Since we interpret the forward propagation of our Hamiltonian network as a time-dependent nonlinear dynamic process, we prefer convolution weights 𝐊𝐊\mathbf{K} that are smooth in time by using the regularization functionalR(𝐊)=∫0T‖𝐊˙1(t)‖F2+‖𝐊˙2(t)‖F2dt,𝑅𝐊superscriptsubscript0𝑇superscriptsubscriptnormsubscript˙𝐊1𝑡𝐹2superscriptsubscriptnormsubscript˙𝐊2𝑡𝐹2d𝑡R(\mathbf{K})=\int_{0}^{T}\|\dot{\mathbf{K}}_{1}(t)\|_{F}^{2}+\|\dot{\mathbf{K}}_{2}(t)\|_{F}^{2}\ \mathrm{d}t,where ∥⋅∥F\|\cdot\|_{F} represents the Frobenius norm.Upon discretization, this gives the following weight smoothness decay as a regularization functionRh(𝐊)=h∑j=1T−1∑k=12‖𝐊jk−𝐊j+1,kh‖F2.subscript𝑅ℎ𝐊ℎsuperscriptsubscript𝑗1𝑇1superscriptsubscript𝑘12superscriptsubscriptnormsubscript𝐊𝑗𝑘subscript𝐊𝑗1𝑘ℎ𝐹2R_{h}(\mathbf{K})=h\sum_{j=1}^{T-1}\sum_{k=1}^{2}\left\|\frac{\mathbf{K}_{jk}-\mathbf{K}_{j+1,k}}{h}\right\|_{F}^{2}.(22)
|
| 62 |
+
|
| 63 |
+
We evaluate our methods on three standard classification benchmarks (CIFAR-10, CIFAR100 and STL10) and compare against state-of-the-art results from the literature. Furthermore, we investigate the robustness of our method as the amount of training data decrease and train a deep network with 1,202 layers.
|
| 64 |
+
|
| 65 |
+
The CIFAR-10 dataset (?) consists of 50,000 training images and 10,000 testing images in 10 classes with 32×32323232\times 32 image resolution. The CIFAR-100 dataset uses the same image data and train-test split as CIFAR-10, but has 100 classes.We use the common data augmentation techniques including padding four zeros around the image, random cropping, random horizontal flipping and image standardization. Two state-of-the-art methods ResNet (?) and RevNet (?) are used as our baseline methods.
|
| 66 |
+
|
| 67 |
+
The STL-10 dataset (?) is an image recognition dataset with 10 classes at image resolutions of 96×96969696\times 96. It contains 5,000 training images and 8,000 test images. Thus, compared with CIFAR-10, each class has fewer labeled training samples but higher image resolution.We used the same data augmentation as the CIFAR-10 except padding 121212 zeros around the images.
|
| 68 |
+
|
| 69 |
+
We use three state-of-the-art methods as baselines for the STL-10 dataset: Deep Representation Learning (?), Convolutional Clustering (?), and Stacked what-where auto-encoders (?).
|
| 70 |
+
|
| 71 |
+
We provide the neural network architecture specifications here. The implementation details are in the Appendix.All the networks contain 3 units, and each unit has n𝑛n blocks. There is also a convolution layer at the beginning of the network and a fully connected layer in the end. For Hamiltonian networks, there are 4 convolution layers in each block, so the total number of layers is 12n+212𝑛212n+2. For MidPoint and Leapfrog, there are 2 convolution layers in each block, so the total number of layers is 6n+26𝑛26n+2.In the first block of each unit, the feature map size is halved and the number of filters is doubled. We perform downsampling by average pooling and increase the number of filters by padding zeros.
|
| 72 |
+
|
| 73 |
+
We show the main results of different architectures on CIFAR-10/100 in Table 1. Our three architectures achieve comparable performance with ResNet and RevNet in term of accuracy using similar number of model parameters. Compared with ResNet, our architectures are more memory efficient as they are reversible, thus we do not need to store activations for most layers. While compared with RevNet, our models are not only reversible, but also stable, which is theoretically proved in Sec. 3. We show later that the stable property makes our models more robust to small amount of training data and arbitrarily deep.
|
| 74 |
+
|
| 75 |
+
Main results on STL-10 are shown in Table 2. Compared with the state-of-the-art results, all our architectures achieve better accuracy.
|
| 76 |
+
|
| 77 |
+
Sometimes labeled data are very expensive to obtain. Thus, it is desirable to design architectures that generalize well when trained with few examples. To verify our intuition that stable architectures generalize well, we conducted extensive numerical experiments using the CIFAR-10 and STL-10 datasets with decreasing number of training data. Our focus is on the behavior of our neural network architecture in face of this data subsampling, instead of improving the state-of-the-art results. Therefore we intentionally use simple architectures:4 blocks, each has 4 units, and the number of filters are 16−64−128−256166412825616-64-128-256.For comparison, we use ResNet (?) as our baseline. CIFAR-10 has much more training data than STL-10 (50,000 vs 5,000), so we randomly subsample the training data from 20%percent2020\% to 0.05%percent0.050.05\% for CIFAR-10, and from 80%percent8080\% to 5%percent55\% for STL-10. The test data set remains unchanged.
|
| 78 |
+
|
| 79 |
+
Fig. 3 shows the result on CIFAR-10 when decreasing the number examples in the training data from 20%percent2020\% to 5%percent55\%. Our Hamiltonian network performs consistently better in terms of accuracy than ResNet, achieving up to 13%percent1313\% higher accuracy when trained using just 3%percent33\% and 4%percent44\% of the original training data.
|
| 80 |
+
|
| 81 |
+
From the result as shown in Fig. 4, we see that Hamiltonian consistently achieves better accuracy than ResNet with the average improvement being around 3.4%percent3.43.4\%. Especially when using just 40%percent4040\% of the training data, Hamiltonian has a 5.7%percent5.75.7\% higher accuracy compared to ResNet.
|
| 82 |
+
|
| 83 |
+
To demonstrate the stability and memory-efficiency of the Hamiltonian network with arbitrary depth, we explore a 1202-layer architecture on CIFAR-10.An aggressively deep ResNet is also trained on CIFAR-10 in (?) with 1202 layers, which has an accuracy of 92.07%percent92.0792.07\%.Our result is shown at the last row of Table 1. Compared with the original ResNet, our architecture uses only a half of parameters and obtains better accuracy.Since the Hamiltonian network is intrinsically stable, it is guaranteed that there is no issue of exploding or vanishing gradient.We can easily train an arbitrarily deep Hamiltonian network without any difficulty of optimization. The implementation of our reversible architecture is memory efficient, which enables a 1202 layer Hamiltonian model running on a single GPU machine with 10GB GPU memory.
|
| 84 |
+
|
| 85 |
+
We present three stable and reversible architectures that connect the stable ODE with deep residual neural networks and yield well-posed learning problems. We exploit the intrinsic reversibility property to obtain a memory-efficient implementation, which does not need to store the activations at most of the hidden layers. Together with the stability of the forward propagation, this allows training deeper architectures with limited computational resources. We evaluate our methods on three publicly available datasets against several state-of-the-art methods. Our experimental results demonstrate the efficacy of our method with superior or on-par state-of-the-art performance. Moreover, with small amount of training data, our architectures achieve better accuracy compared with the widely used state-of-the-art ResNet. We attribute the robustness to small amount of training data to the intrinsic stability of our Hamiltonian neural network architecture.
|
| 86 |
+
|
| 87 |
+
The Jacobian matrix 𝐉𝐉\mathbf{J} is defined in Eq. (3).If 𝐀𝐀\mathbf{A} and 𝐁𝐁\mathbf{B} are two invertible matrices of the same size, then 𝐀𝐁𝐀𝐁\mathbf{AB} and 𝐁𝐀𝐁𝐀\mathbf{BA} have the same eigenvalues (Theorem 1.3.22 in (?)).If we define𝐉′superscript𝐉′\displaystyle\mathbf{J^{\prime}}=diag(σ′)(0𝐊1𝐊20)(𝐊1T00−𝐊2T)absentdiagsuperscript𝜎′matrix0subscript𝐊1subscript𝐊20matrixsuperscriptsubscript𝐊1𝑇00superscriptsubscript𝐊2𝑇\displaystyle=\mathrm{diag}(\sigma^{\prime})\begin{pmatrix}0&\mathbf{K}_{1}\\\mathbf{K}_{2}&0\end{pmatrix}\begin{pmatrix}\mathbf{K}_{1}^{T}&0\\0&-\mathbf{K}_{2}^{T}\end{pmatrix}=diag(σ′)(0−𝐊1𝐊2T𝐊2𝐊1T0)absentdiagsuperscript𝜎′matrix0subscript𝐊1superscriptsubscript𝐊2𝑇subscript𝐊2superscriptsubscript𝐊1𝑇0\displaystyle=\mathrm{diag}(\sigma^{\prime})\begin{pmatrix}0&-\mathbf{K}_{1}\mathbf{K}_{2}^{T}\\\mathbf{K}_{2}\mathbf{K}_{1}^{T}&0\end{pmatrix}:=𝐃𝐌,assignabsent𝐃𝐌\displaystyle:=\mathbf{DM},(23)then 𝐉𝐉\mathbf{J} and 𝐉′superscript𝐉′\mathbf{J}^{\prime} have the same eigenvalues.𝐃𝐃\mathbf{D} is a diagonal matrix with non-negative elements, and 𝐌𝐌\mathbf{M} is a real anti-symmetric matrix such that 𝐌T=−𝐌superscript𝐌𝑇𝐌\mathbf{M}^{T}=-\mathbf{M}.Let λ𝜆\lambda and v𝑣v be a pair of eigenvalue and eigenvector of 𝐉′=𝐃𝐌superscript𝐉′𝐃𝐌\mathbf{J^{\prime}}=\mathbf{D}\mathbf{M}, then𝐃𝐌𝐯𝐃𝐌𝐯\displaystyle\mathbf{D}\mathbf{M}\mathbf{v}=λ𝐯,absent𝜆𝐯\displaystyle=\lambda\mathbf{v},(24)𝐌𝐯𝐌𝐯\displaystyle\mathbf{M}\mathbf{v}=λ𝐃−1𝐯,absent𝜆superscript𝐃1𝐯\displaystyle=\lambda\mathbf{D}^{-1}\mathbf{v},(25)𝐯∗𝐌𝐯superscript𝐯𝐌𝐯\displaystyle\mathbf{v}^{*}\mathbf{M}\mathbf{v}=λ(𝐯∗𝐃−1𝐯),absent𝜆superscript𝐯superscript𝐃1𝐯\displaystyle=\lambda(\mathbf{v}^{*}\mathbf{D}^{-1}\mathbf{v}),(26)where 𝐃−1superscript𝐃1\mathbf{D}^{-1} is the generalized inverse of 𝐃𝐃\mathbf{D}.On one hand, since 𝐃−1superscript𝐃1\mathbf{D}^{-1} is non-negative definite, 𝐯∗𝐃−1𝐯superscript𝐯superscript𝐃1𝐯\mathbf{v}^{*}\mathbf{D}^{-1}\mathbf{v} is real.On the other hand,(𝐯∗𝐌𝐯)∗=𝐯∗𝐌∗𝐯=𝐯∗𝐌T𝐯=−𝐯∗𝐌𝐯,superscriptsuperscript𝐯𝐌𝐯superscript𝐯superscript𝐌𝐯superscript𝐯superscript𝐌𝑇𝐯superscript𝐯𝐌𝐯(\mathbf{v}^{*}\mathbf{M}\mathbf{v})^{*}=\mathbf{v}^{*}\mathbf{M}^{*}\mathbf{v}=\mathbf{v}^{*}\mathbf{M}^{T}\mathbf{v}=-\mathbf{v}^{*}\mathbf{M}\mathbf{v},(27)where ∗* represents conjugate transpose. Eq. 27 implies that 𝐯∗𝐌𝐯superscript𝐯𝐌𝐯\mathbf{v}^{*}\mathbf{M}\mathbf{v} is imaginary. Therefore, λ𝜆\lambda has to be imaginary. As a result, all eigenvalues of 𝐉𝐉\mathbf{J} are imaginary.
|
| 88 |
+
|
| 89 |
+
Our method is implemented using TensorFlow library (?). The CIFAR-10/100 and STL-10 experiments are evaluated on a desktop with an Intel Quad-Core i5 CPU and a single Nvidia 1080 Ti GPU.
|
| 90 |
+
|
| 91 |
+
For CIFAR-10 and CIFAR-100 experiments, we use a fixed mini-batch size of 100 both for training and test data except Hamiltonian-1202, which uses a batch-size of 32. The learning rate is initialized to be 0.1 and decayed by a factor of 10 at 80, 120 and 160 training epochs. The total training step is 80K. The weight decay constant is set to 2×10−42superscript1042\times 10^{-4}, weight smoothness decay is 2×10−42superscript1042\times 10^{-4} and the momentum is set to 0.9.
|
| 92 |
+
|
| 93 |
+
For STL-10 experiments, the mini-batch size is 128. The learning rate is initialized to be 0.1 and decayed by a factor of 10 at 60, 80 and 100 training epochs. The total training step is 20K. The weight decay constant is set to 5×10−45superscript1045\times 10^{-4}, weight smoothness decay is 3×10−43superscript1043\times 10^{-4} and the momentum is set to 0.9.
|
1709.03842v2.txt
ADDED
|
@@ -0,0 +1,316 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\noindent Facial expression editing is the task that transforms the expression of a given face image to a target one without affecting the identity properties. It has applications in facial animation, human-computer interactions, entertainment, etc. The area has been attracting considerable attention both from academic and industrial research communities.
|
| 3 |
+
|
| 4 |
+
Existing methods that address expression editing can be divided into two categories. One category tries to manipulate images by reusing parts of existing ones~\cite{yang2011expression,mohammed2009visio,yeh2016semantic} while the other
|
| 5 |
+
resorts to synthesis techniques to generate a face image with the target
|
| 6 |
+
expression~\cite{susskind2008generating,reed2014learning,cheung2014discovering}.
|
| 7 |
+
In the first category, traditional methods~\cite{yang2011expression} often make use of the expression flow map to transfer an expression by image warping. Recently, \citeauthor{yeh2016semantic}~\shortcite{yeh2016semantic} applies the idea to a variational autoencoder to learn the flow field.
|
| 8 |
+
Although the generated face image has high resolution,
|
| 9 |
+
paired data where one subject has different expressions are needed to train the model.
|
| 10 |
+
In the second category, deep learning-based methods are mainly used. The early work by~\citeauthor{susskind2008generating}~\shortcite{susskind2008generating} uses a deep belief network to generate emotional faces, which can be controlled by the Facial Action Coding System (FACS) labels.
|
| 11 |
+
In~\cite{reed2014learning}, a three-way gated Boltzmann machine is employed to model the relationships between the expression and identity.
|
| 12 |
+
However, the synthesized image of these methods has low resolution (48 x 48), lacking fine details and tending to be blurry.
|
| 13 |
+
|
| 14 |
+
Moreover, existing works can only transform the expression to different classes, like \textit{Angry} or \textit{Happy}.
|
| 15 |
+
However, in reality, the intensity of facial expression is often displayed over a range.
|
| 16 |
+
For example, humans can express the \textit{Happy} expression either with a huge grin or by a gentle smile. Thus it is appealing if both the type of the expression and its intensity can be controlled simultaneously. Motivated by this,
|
| 17 |
+
in this paper, we present a new expression editing model, Expression Generative Adversarial Network (ExprGAN) which has the unique property that
|
| 18 |
+
\textbf{\textit{multiple diverse styles of the target expression can be synthesized where the
|
| 19 |
+
intensity of the generated expression is able to be controlled continuously from weak to strong, without the need for training data with intensity values}}.
|
| 20 |
+
|
| 21 |
+
To achieve this goal, we specially design an expression controller module. Instead of feeding in a deterministic one-hot vector label like previous works, the expression code generated by the expression controller module is used.
|
| 22 |
+
It is a real-valued vector conditioned on the label,
|
| 23 |
+
thus more complex information such as expression intensity can be described.
|
| 24 |
+
Moreover, to force each dimension of the expression code to capture a different factor of the intensity variations,
|
| 25 |
+
the conditional mutual information between the generated image and the expression code is maximized by a regularizer network.
|
| 26 |
+
|
| 27 |
+
Our work is inspired by the recent success of the image generative model, where a generative adversarial network~\cite{goodfellow2014generative} learns to produce samples similar to a given data distribution through a two-player game between a generator and a discriminator. Our ExprGAN also adopts the generator and discriminator framework in addition to the expression controller module and regularizer network. However, to facilitate image editing, the generator is composed of an encoder and a decoder. The input of the encoder is a face image, the output of the decoder is a reconstructed one, and the learned identity and expression representations bridge the encoder and decoder. To preserve the most prominent facial structure,
|
| 28 |
+
we adopt a multi-layer perceptual loss~\cite{johnson2016perceptual} in the feature space in addition to the pixel-wise $L_1$ loss.
|
| 29 |
+
Moreover, to make the synthesized image look more photo-realistic, two adversarial networks are imposed on the encoder and decoder, respectively.
|
| 30 |
+
Because it is difficult to directly train our model on the small training set,
|
| 31 |
+
a three-stage incremental learning algorithm is also developed.
|
| 32 |
+
|
| 33 |
+
The main contributions of our work are as follows:
|
| 34 |
+
\begin{itemize}
|
| 35 |
+
\item We propose a novel model called ExprGAN that can change a face image to a target expression with multiple styles, where the expression intensity can also be controlled continuously.
|
| 36 |
+
\item We show that the synthesized face images have high perceptual quality, which can be used to improve the performance of an expression classifier.
|
| 37 |
+
\item Our identity and expression representations are explicitly disentangled which can be exploited for tasks such as expression transfer, image retrieval, etc.
|
| 38 |
+
\item We develop an incremental training strategy to train the model on a relative small dataset without the rigid requirement of paired samples.
|
| 39 |
+
\end{itemize}
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
\begin{figure*}
|
| 43 |
+
\centering
|
| 44 |
+
\includegraphics[width=0.9\textwidth]{framework4.pdf}
|
| 45 |
+
\caption{Comparison of previous GAN architectures and our proposed ExprGAN.
|
| 46 |
+
}
|
| 47 |
+
\label{fig:framework}
|
| 48 |
+
\end{figure*}
|
| 49 |
+
\section{Related Works}
|
| 50 |
+
|
| 51 |
+
\subsubsection{Deep Generative Model}
|
| 52 |
+
Deep generative models have achieved impressive success in recent years.
|
| 53 |
+
There are two major approaches: generative adversarial network (GAN)~\cite{goodfellow2014generative} and variational autoencoder (VAE)~\cite{kingma2013auto}. GAN is composed of a generator and a discriminator, where the training is carried out with a minimax two-player game. GAN has been used for image synthesis~\cite{radford2015unsupervised}, image superresolution~\cite{ledig2016photo}, etc. One interesting extension of GAN is Conditional GAN (CGAN)~\cite{mirza2014conditional} where the generated image can be controlled by the condition variable.
|
| 54 |
+
On the other hand, VAE is a probabilistic model with an encoder to map an image to a latent representation and a decoder to reconstruct the image. A reparametrization trick is proposed which enables the model to be trained by backpropogation~\cite{rumelhart1988learning}.
|
| 55 |
+
One variant of VAE is Adversarial Autoencoder~\cite{makhzani2015adversarial}, where an adversarial network is adopted to regularize the latent representation to conform to a prior distribution.
|
| 56 |
+
Our ExprGAN also adopts an autoencoder structure, but there are two main differences:
|
| 57 |
+
First, an expression controller module is specially designed, so a face with different types of expressions across a wide range of intensities can be generated.
|
| 58 |
+
Second, to improve the generated image quality, a face identity preserving loss and two adversarial losses are incorporated.
|
| 59 |
+
\subsubsection{Facial Expression Editing}
|
| 60 |
+
Facial expression editing has been actively investigated in computer graphics.
|
| 61 |
+
Traditional approaches include 3D model-based~\cite{blanz2003reanimating}, 2D expression mapping-based~\cite{liu2001expressive} and flow-based~\cite{yang2011expression}.
|
| 62 |
+
Recently, deep learning-based methods have been proposed.
|
| 63 |
+
\citeauthor{susskind2008generating}~\shortcite{susskind2008generating} studied a deep belief network to generate facial expression given high-level identity and facial action unit (AU) labels.
|
| 64 |
+
In~\cite{reed2014learning}, a higher-order Boltzman machine with multiplicative
|
| 65 |
+
interactions was proposed to model the distinct factors of variation.
|
| 66 |
+
\citeauthor{cheung2014discovering}~\shortcite{cheung2014discovering} proposed a decorrelating regularizer to
|
| 67 |
+
disentangle the variations between identity and expression in an unsupervised manner.
|
| 68 |
+
However, the generated image is low resolution with size of 48 x 48, which is not visually satisfying.
|
| 69 |
+
Recently, \citeauthor{yeh2016semantic}~\shortcite{yeh2016semantic} proposed to edit the facial expression by image warping with appearance flow.
|
| 70 |
+
Although the model can generate high-resolution images, paired samples as well as the labeled query image are required.
|
| 71 |
+
|
| 72 |
+
The most similar work to ours is CFGAN~\cite{kaneko2017cvpr}, which uses a filter module to control the generated face attributes. However, there are two main differences:
|
| 73 |
+
First, CFGAN adopts the CGAN architecture where an encoder needs to be trained separately for image editing.
|
| 74 |
+
While for the proposed ExprGAN, the encoder and the decoder are constructed in a unified framework.
|
| 75 |
+
Second, the attribute filter of CFGAN is mainly designed for a single class, while our expression controller module works for multiple categories.
|
| 76 |
+
Most recently,~\citeauthor{zhang2017age} \shortcite{zhang2017age} proposed a conditional AAE (CAAE) for face aging, which can also be applied for expression editing.
|
| 77 |
+
Compared with these studies, our ExprGAN has two main differences: First, in addition to transforming a given face image to a new facial expression, our model can also control the expression intensity continuously without the intensity training labels; Second, photo-realistic face images with new identities can be generated for data augmentation, which is found to be useful to train an improved expression classifier.
|
| 78 |
+
\section{Proposed Method}
|
| 79 |
+
In this section, we describe our Expression Generative Adversarial Network (ExprGAN). We first describe the Conditional Generative Adversarial Network (CGAN)~\cite{mirza2014conditional} and Adversarial Autoencoder (AAE)~\cite{makhzani2015adversarial}, which form the basis of ExprGAN. Then the formulation of ExprGAN is explained. The architectures of the three models are shown in Fig.~\ref{fig:framework}.
|
| 80 |
+
\subsection{Conditional Generative Adversarial Network}
|
| 81 |
+
CGAN is an extension of a GAN~\cite{goodfellow2014generative} for conditional image generation. It is composed of two networks: a generator network G and a discriminator network D that compete in a two-player minimax game. Network G is trained to produce a synthetic image $\hat{x} = G(z, y)$ to fool D to believe it is an actual photograph, where $z$ and $y$ are the random noise and condition variable, respectively. D tries to distinguish the real image $x$ and the generated one $\hat{x}$. Mathematically, the objective function for G and D can be written as follows:
|
| 82 |
+
\begin{equation}
|
| 83 |
+
\begin{split}
|
| 84 |
+
\min_G \max_D & ~\mathbb{E}_{x,y\sim P_{data}(x,y)}[\log D(x,y)] \\
|
| 85 |
+
&+ \mathbb{E}_{z\sim P_z(z), y\sim P_y(y)}[\log(1-D(G(z,y),y))]
|
| 86 |
+
\end{split}
|
| 87 |
+
\end{equation}
|
| 88 |
+
\subsection{Adversarial Autoencoder}
|
| 89 |
+
AAE~\cite{makhzani2015adversarial} is a probabilistic autoencoder which consists of an encoder $G_{enc}$, a decoder $G_{dec}$ and a discriminator $D$. Apart from the reconstruction loss, the hidden code vector $g(x)=G_{enc}(x)$ is also regularized by an adversarial network to impose a prior distribution $P_z(z)$. Network $D$ aims to discriminate $g(x)$ from $z\sim P_z(z)$, while $G_{enc}$ is trained to generate $g(x)$ that could fool $D$.
|
| 90 |
+
Thus, the AAE objective function becomes:
|
| 91 |
+
\begin{equation}
|
| 92 |
+
\begin{split}
|
| 93 |
+
&\min_{G_{enc},G_{dec}}\max_D L_p(G_{dec}(G_{enc}(x)), x)\\
|
| 94 |
+
&+\mathbb{E}_{z\sim P_z(z)}[\log D(z)] + \mathbb{E}_{x\sim P_{data}(x)}[\log(1-D(G_{enc}(x))]
|
| 95 |
+
\end{split}
|
| 96 |
+
\end{equation}
|
| 97 |
+
where $L_p(,)$ is the $p_{th}$ norm: $L_p(x', x) = ||x'-x||_p^p$
|
| 98 |
+
\subsection{Expression Generative Adversarial Network}
|
| 99 |
+
Given a face image $x$ with expression label $y$, the objective of our learning problem is to edit the face to display a new type of expression at different intensities. Our approach is to train a ExprGAN conditional on the original image $x$ and the expression label $y$ with its architecture illustrated in Fig.~\ref{fig:framework} (c).
|
| 100 |
+
\subsubsection{Network Architecture}
|
| 101 |
+
ExprGAN first applies an encoder $G_{enc}$ to map the image $x$ to a latent representation $g(x)$ that preserves identity. Then, an expression controller module $F_{ctrl}$ is adopted to convert the one-hot expression label $y$ to a more expressive expression code $c$. To further constrain the elements of $c$ to capture the various aspects of the represented expression, a regularizer $Q$ is exploited to maximize the conditional mutual information between $c$ and the generated image.
|
| 102 |
+
Finally, the decoder $G_{dec}$ generates a reconstructed image $\hat{x}$ combining the information from $g(x)$ and $c$. To further improve the generated image quality,
|
| 103 |
+
a discriminator $D_{img}$ on the decoder $G_{dec}$ is used to refine the synthesized image $\hat{x}$ to have photo-realistic textures.
|
| 104 |
+
Moreover, to better capture the face manifold, a discriminator $D_{z}$ on the encoder $G_{enc}$ is applied to ensure the learned identity representation is filled and exhibits no \enquote{holes}~\cite{makhzani2015adversarial}.
|
| 105 |
+
\subsubsection{Expression Controller Networks $F_{ctrl}$ and $Q$}
|
| 106 |
+
In previous conditional image generation methods~\cite{tran2017disentangled,zhang2017age}, a binary one-hot vector is usually adopted as the condition variable. This is enough for generating images corresponding to different categories.
|
| 107 |
+
However,
|
| 108 |
+
for our problem,
|
| 109 |
+
a stronger control over the synthesized facial expression is needed:
|
| 110 |
+
we want to change the expression intensity in addition to generating different types of expressions.
|
| 111 |
+
To achieve this goal, an expression controller module $F_{ctrl}$ is designed to ensure the expression code $c$ can describe the property of the expression intensity except the category information. Furthermore, a regularizer network $Q$ is proposed to enforce the elements of $c$ to capture the multiple levels of expression intensity comprehensively.
|
| 112 |
+
|
| 113 |
+
\textbf{Expression Controller Module $F_{ctrl}$}
|
| 114 |
+
To enhance the description capability, $F_{ctrl}$ transforms the binary input $y$ to a continuous representation $c$ by the following operation:
|
| 115 |
+
\begin{equation}
|
| 116 |
+
c_i = F_{ctrl}(y_i, z_y) = |z_y| \cdot (2y_i - 1)~~~~i=1, 2, \dots, K
|
| 117 |
+
\end{equation}
|
| 118 |
+
where the inputs are the expression label $y \in \{0,1\}^K$ and uniformly distributed $z_y\sim U(-1,1)^d$, while the output is the expression code $c=[c_1^T,\dots,c_K^T]^T \in R^{Kd}$,
|
| 119 |
+
$K$ is the number of classes.
|
| 120 |
+
If the $i_{th}$ class expression is present, \textit{i.e.}, $y_i=1$, $c_i\in R^d$ is set to be a positive vector within 0 and 1, while $c_j,j\neq i$ has negative values from -1 to 0. Thus, in testing, we can manipulate the elements of $c$ to generate the desired expression type. This flexibility greatly increases the controllability of $c$ over synthesizing diverse styles and intensities of facial expressions.
|
| 121 |
+
|
| 122 |
+
|
| 123 |
+
\textbf{Regularizer on Expression Code $Q$}
|
| 124 |
+
It is desirable if each dimension of $c$ could learn a different factor of the expression intensity variations.
|
| 125 |
+
Then faces with a specific intensity level can be generated by manipulating the corresponding expression code.
|
| 126 |
+
To enforce this constraint,
|
| 127 |
+
we impose a regularization on $c$ by maximizing the conditional mutual information $I(c; \hat{x}|y)$ between the generated image $\hat{x}$ and the expression code $c$. This ensures that the expression type and intensity encoded in $c$ is reflected in the image generated by the decoder.
|
| 128 |
+
The direct computation of $I$ is hard since it requires the posterior $P(c|\hat{x},y)$, which is generally intractable.
|
| 129 |
+
Thus, a lower bound is derived with variational inference which extends~\cite{chen2016infogan} to the conditional setting:
|
| 130 |
+
\begin{equation}
|
| 131 |
+
\begin{split}
|
| 132 |
+
&I(c; \hat{x}|y)\\
|
| 133 |
+
&= H(c|y) - H(c|\hat{x}, y)\\
|
| 134 |
+
&=\mathbb{E}_{\hat{x}\sim G_{dec}(g(x), c)}[\mathbb{E}_{c'\sim P(c'|\hat{x}, y)}[\log P(c'|\hat{x}, y)]] + H(c|y)\\
|
| 135 |
+
&=\mathbb{E}_{\hat{x}\sim G_{dec}(g(x), c)}[D_{KL}(P(\cdot|\hat{x}, y) || Q(\cdot|\hat{x}, y)) + \\
|
| 136 |
+
&~~~~~~\mathbb{E}_{c'\sim P(c'|\hat{x}, y)}[\log Q(c'|\hat{x}, y)]] + H(c|y)\\
|
| 137 |
+
&\geq \mathbb{E}_{\hat{x}\sim G_{dec}(g(x), c)}[\mathbb{E}_{c'\sim P(c'|\hat{x}, y)}[\log Q(c'|\hat{x}, y)]] + H(c|y)\\
|
| 138 |
+
&=\mathbb{E}_{ c\sim P(c| y),\hat{x}\sim G_{dec}(g(x), c)}[\log Q(c|\hat{x}, y)] + H(c|y)
|
| 139 |
+
\end{split}
|
| 140 |
+
\end{equation}
|
| 141 |
+
For simplicity, the distribution of $c$ is fixed, thus $H(c|y)$ is treated as a constant. Here the auxiliary distribution $Q$ is parameterized as a neural network, thus the final loss function is defined as follows:
|
| 142 |
+
\begin{equation}
|
| 143 |
+
\min_Q L_Q = -\mathbb{E}_{ c\sim P(c| y),\hat{x}\sim G_{dec}(g(x), c)}[\log Q(c|\hat{x}, y)]
|
| 144 |
+
\end{equation}
|
| 145 |
+
\subsubsection{Generator Network $G$}
|
| 146 |
+
The generator network $G=(G_{enc}, G_{dec})$ adopts the autoencoder structure where the encoder $G_{enc}$ first transforms the input image $x$ to a latent representation that preserves as much identity information as possible. After obtaining the identity code $g(x)$ and the expression code $c$, the decoder $G_{dec}$ then generates a synthetic image $\hat{x}=G_{dec}(G_{enc}(x), c)$ which should be identical as $x$. For this purpose, a pixel-wise image reconstruction loss is used:
|
| 147 |
+
\begin{equation}
|
| 148 |
+
\min_{G_{enc},G_{dec}}L_{pixel} = L_1(G_{dec}(G_{enc}(x),c), x)
|
| 149 |
+
\end{equation}
|
| 150 |
+
|
| 151 |
+
To further preserve the face identity between $x$ and $\hat{x}$, a pre-trained discriminative deep face model is leveraged to enforce the similarity in the feature space:
|
| 152 |
+
\begin{equation}
|
| 153 |
+
\min_{G_{enc},G_{dec}}L_{id} = \sum_l\beta_lL_1(\phi_l(G_{dec}(G_{enc}(x),c)), \phi_l(x))
|
| 154 |
+
\end{equation}
|
| 155 |
+
where $\phi_l$ are the $l_{th}$ layer feature maps of a face recognition network, and $\beta_l$ is the corresponding weight. We use the activations at the $conv1\_2$, $conv2\_2$, $conv3\_2$, $conv4\_2$ and $conv5\_2$ layer of the VGG face model~\cite{parkhi2015deep}.
|
| 156 |
+
\subsubsection{Discriminator on Identity Representation $D_z$}
|
| 157 |
+
It is a well known fact that face images lie on a manifold~\cite{he2005face,lee2003video}.
|
| 158 |
+
To ensure that face images generated by interpolating between arbitrary identity representations do not deviate from the face manifold~\cite{zhang2017age}, we impose a uniform distribution on $g(x)$, forcing it to populate the latent space evenly without \enquote{holes}.
|
| 159 |
+
This is achieved through an adversarial training process where the training objective is:
|
| 160 |
+
\begin{equation}
|
| 161 |
+
\begin{split}
|
| 162 |
+
\min_{G_{enc}}\max_{D_z} L_{adv}^z=&\mathbb{E}_{z\sim P_z(z)}[\log D_z(z)]\\
|
| 163 |
+
& + \mathbb{E}_{x\sim P_{data}(x)}[\log(1-D_z(G_{enc}(x))]
|
| 164 |
+
\end{split}
|
| 165 |
+
\end{equation}
|
| 166 |
+
\subsubsection{Discriminator on Image $D_{img}$}
|
| 167 |
+
Similar to existing methods~\cite{huang2017beyond,tran2017disentangled}, an adversarial loss between the generated image $\hat{x}$ and the real image $x$ is further adopted to improve the photorealism:
|
| 168 |
+
\begin{equation}
|
| 169 |
+
\begin{split}
|
| 170 |
+
\min_{G_{enc},G_{dec}} &\max_{D_{img}}L_{adv}^{img}=\mathbb{E}_{x,y\sim P_{data}(x,y)}[\log D_{img}(x,y)] + \\
|
| 171 |
+
&\mathbb{E}_{x,y\sim P_{data}(x,y),z_y\sim P_{z_y}(z_y)}\\
|
| 172 |
+
&[\log(1-D_{img}(G_{dec}(G_{enc}(x),F_{ctrl}(z_y,y)),y))]
|
| 173 |
+
\end{split}
|
| 174 |
+
\end{equation}
|
| 175 |
+
\subsubsection{Overall Objective Function}
|
| 176 |
+
The final training loss function is a weighted sum of all the losses defined above:
|
| 177 |
+
\begin{equation}
|
| 178 |
+
\begin{split}
|
| 179 |
+
\min_{G_{enc},G_{dec},Q} \max_{D_{img},D_z} &L_{ExprGAN} = L_{pixel} + \lambda_1 L_{id} + \lambda_2 L_Q \\
|
| 180 |
+
&+ \lambda_3 L_{adv}^{img} + \lambda_4 L_{adv}^{z} + \lambda_5 L_{tv}
|
| 181 |
+
\end{split}
|
| 182 |
+
\label{eq:all}
|
| 183 |
+
\end{equation}
|
| 184 |
+
We also impose a total variation regularization $L_{tv}$~\cite{mahendran2015understanding} on the reconstructed image to reduce spike artifacts.
|
| 185 |
+
\subsubsection{Incremental Training}
|
| 186 |
+
Empirically we find that jointly training all the subnetworks yields
|
| 187 |
+
poor results as we have multiple loss functions. It is difficult for the model to learn all the functions at one time considering the small size of the dataset.
|
| 188 |
+
Therefore, we propose an incremental training algorithm to train the proposed ExprGAN.
|
| 189 |
+
Overall our incremental training strategy can be seen as a form of curriculum learning, and includes three stages: controller learning stage, image reconstruction stage and image refining stage. First, we teach the network to generate the image conditionally by training $G_{dec}$, $Q$ and $D_{img}$ where the loss function only includes $L_Q$ and $L_{adv}^{img}$. $g(x)$ is set to be random noise in this stage. After the training finishes, we then teach the network to learn the disentangled representations by reconstructing the input image with $G_{enc}$ and $G_{dec}$. To ensure that the network does not forget what is already learned, $Q$ is also trained but with a decreased weight. So the loss function has three parts: $L_{pixel}$, $L_{id}$ and $L_Q$. Finally, we train the whole network to refine the image to be more photo-realistic by adding $D_{img}$ and $D_z$ with the loss function defined in (\ref{eq:all}).
|
| 190 |
+
We find in our experiments that stage-wise training is crucial to learn the desired model on the small dataset.
|
| 191 |
+
\section{Experiments}
|
| 192 |
+
We first describe the experimental setup then three main applications: expression editing with continuous control over intensity, facial expression transfer and conditional face image generation for data augmentation .
|
| 193 |
+
\subsection{Dataset}
|
| 194 |
+
We evaluated the proposed ExprGAN on the widely used Oulu-CASIA~\cite{zhao2011facial} dataset. Oulu-CASIA has 480 image sequences taken under Dark,
|
| 195 |
+
Strong, Weak illumination conditions. In this experiment, only videos with Strong condition captured by a VIS camera are used. There are 80 subjects and six expressions, \textit{i.e.}, \textit{Angry}, \textit{Disgust}, \textit{Fear}, \textit{Happy}, \textit{Sad} and \textit{Surprise}. The first frame is always neutral while the last frame has the peak expression. Only the last three frames are used, and the total number of images is 1440. Training and testing sets are divided based on identity, with 1296 for training and 144 for testing. We aligned the faces using the landmarks detected from~\cite{zhang2016joint}, then cropped and resized the images to dimension of 128 x 128. Lastly, we normalized the pixel values into range of [-1, 1]. To alleviate overfitting, we augmented the training data with random flipping.
|
| 196 |
+
\subsection{Implementation Details}
|
| 197 |
+
The ExprGAN mainly builds on multiple upsampling and downsampling blocks. The upsampling block consists of the nearest-neighbor upsampling followed by a 3 x 3 stride 1 convolution. The downsampling block consists of a 5 x 5 stride 2 convolution. Specifically, $G_{enc}$ has 5 downsampling blocks where the numbers of channels are 64, 128, 256, 512, 1024 and one FC layer to get the identity representation $g(x)$. For $G_{dec}$, it has 7 upsampling blocks with 512, 256, 128, 64, 32, 16, 3 channels. $D_z$ consists of 4 FC layers with 64, 32, 16, 1 channels.
|
| 198 |
+
We model $Q(c|\hat{x},y)$ as a factored Gaussian, and share many parts of $Q$ with $D_{img}$ to reduce computation cost. The shared parts have 4 downsampling blocks with 16, 32, 64, 128 channels and one FC layer to output a 1024-dim representation. Then it is branched into two heads, one for $D_{img}$ and one for $Q$. $Q$ has $K$ branches $\{Q_i\}_{i=1}^K$ where each $Q_i$ has two individual FC layers with 64, $d$ channels to predict the expression code $c_i$.
|
| 199 |
+
Leaky ReLU~\cite{maas2013rectifier} and batch normalization~\cite{ioffe2015batch} are applied to $D_{img}$ and $D_z$, while ReLU~\cite{krizhevsky2012imagenet} activation is used in $G_{enc}$ and $G_{dec}$.
|
| 200 |
+
The random noise $z$ is uniformly distributed from -1 to 1. We fixed the dimensions of $g(x)$ and $c$ to be 50 and 30, and found this configuration sufficient for representing the identity and expression variations.
|
| 201 |
+
|
| 202 |
+
We train the networks using the Adam optimizer~\cite{kingma2014adam}, with learning rate of 0.0002, $\beta_1=0.5$, $\beta_2=0.999$ and mini-batch size of 48.
|
| 203 |
+
In the image refining stage, we empirically set $\lambda_1=1$, $\lambda_2 = 1$, $\lambda_3 = 0.01$, $\lambda_4 = 0.01$, $\lambda_5 = 0.001$.
|
| 204 |
+
The model is implemented using Tensorflow~\cite{abadi2016tensorflow}.
|
| 205 |
+
\begin{figure}[!ht]
|
| 206 |
+
\centering
|
| 207 |
+
\includegraphics*[width=\linewidth]{caae}
|
| 208 |
+
\caption{Visual comparison of facial expression editing results. For each input, we compare the ground truth images (top), the synthetic images of ExprGAN (middle) and CAAE (bottom). Zoom in for details.
|
| 209 |
+
}
|
| 210 |
+
\label{fig:edit}
|
| 211 |
+
\end{figure}
|
| 212 |
+
\subsection{Facial Expression Editing}
|
| 213 |
+
In this part, we demonstrate our model's ability to edit the expression of a given face image. To do this, we first input the image to $G_{enc}$ to obtain an identity representation $g(x)$. Then with the decoder $G_{dec}$, a face image of the desired expression $i$ can be generated by setting $c_i$ to be positive and $c_j,j\neq i$ to be negative. A positive (negative) value indicates the represented expression is present (absent). Here 1 and -1 are used.
|
| 214 |
+
Some example results are shown in Fig.~\ref{fig:edit}. The left column contains the original input images, while the middle row in the right column contains the synthesized faces corresponding to six different expressions. For comparison, the ground truth images and the results from the recent proposed CAAE~\cite{zhang2017age} are also shown in the first and third row, respectively.
|
| 215 |
+
We can see faces generated by our ExprGAN preserve the identities well.
|
| 216 |
+
Even some subtle details like the transparent eyeglasses are also kept. Moreover, the synthesized expressions look natural. While CAAE failed to transform the input faces to new expressions with fine details, and the generated faces are blurry.
|
| 217 |
+
|
| 218 |
+
\begin{figure*}
|
| 219 |
+
\centering
|
| 220 |
+
\includegraphics[width=\textwidth]{new_vis.pdf}
|
| 221 |
+
\caption{Face images are transformed to new expressions with different intensity levels. The top row contains the input faces with the original expressions, and the rest rows are the synthesized results.
|
| 222 |
+
Each column corresponds to a new expression with five intensity levels from weak to strong. The \textit{Neutral} expression which is not in the training data is also able to be generated.
|
| 223 |
+
}
|
| 224 |
+
\label{fig:smile_disgust}
|
| 225 |
+
\end{figure*}
|
| 226 |
+
|
| 227 |
+
We now demonstrate that our model can transform a face image to new types of expressions with continuous intensity. This is achieved by exploiting the fact that each dimension of the expression code captures a specific level of expression intensity. In particular, to vary the intensity of the desired class $i$, we set the individual element of the expression code $c_i$ to be 1, while the other dimensions of $c_i$ and all other $c_j,j\neq i$ to be -1.
|
| 228 |
+
The generated results are shown in Fig.~\ref{fig:smile_disgust}.
|
| 229 |
+
Take the \textit{Happy} expression in the forth column as an example. The face in the first row which corresponds to the first element of $c_i$ being 1 displays a gentle smile with mouth closed, while a big smile with white teeth is synthesized in the last row that corresponds to the fifth element of $c_i$ being 1. Moreover, when we set all $c_i$ to be -1, a \textit{Neutral} expression is able to be generated even though this expression class is not present in the training data. This validates that the expression code discovers the diverse spectrum of expression intensity in an unsupervised way, \textit{i.e.}, without the training data containing explicit labels for intensity levels.
|
| 230 |
+
\subsection{Facial Expression Transfer}
|
| 231 |
+
In this part, we demonstrate our model's ability to transfer the expression of another face image $x_B$ to a given face image $x_A$.
|
| 232 |
+
To do this, we first input $x_A$ to $G_{enc}$ to get the identity representation $g(x_A)$. Then we train an expression classifier to predict the expression label $y_B$ of $x_B$. With $y_B$ and $x_B$, the expression code $c_B$ can be obtained from $Q$. Finally, we can get an image with identity A and expression B from $G_{dec}(g(x_A), c_B)$.
|
| 233 |
+
The generated images are shown in Fig.~\ref{fig:transfer}.
|
| 234 |
+
We observe that faces having the source identities and expressions similar to the target ones can be synthesized even for some very challenging cases.
|
| 235 |
+
For example, when the expression \textit{Happy} is transferred to an \textit{Angry} face, the teeth region which does not exist in the source image is also able to be generated.
|
| 236 |
+
|
| 237 |
+
\begin{figure}[!ht]
|
| 238 |
+
\centering
|
| 239 |
+
\includegraphics*[width=\linewidth]{transfer_axis}
|
| 240 |
+
\caption{Facial expression transfer. Expressions from the middle column are transferred to faces in the left column. The results are shown in the right column.
|
| 241 |
+
}
|
| 242 |
+
\label{fig:transfer}
|
| 243 |
+
\end{figure}
|
| 244 |
+
|
| 245 |
+
|
| 246 |
+
|
| 247 |
+
\begin{figure}[!ht]
|
| 248 |
+
\centering
|
| 249 |
+
\includegraphics*[width=\linewidth]{aug.pdf}
|
| 250 |
+
\caption{Random generated subjects displaying six categories of expressions. }
|
| 251 |
+
\label{fig:aug}
|
| 252 |
+
\end{figure}
|
| 253 |
+
\subsection{Face Image Generation for Data Augmentation}
|
| 254 |
+
In this part, we first show our model's ability to generate high-quality face images controlled by the expression label, then quantitatively demonstrate the usefulness of the synthesized images.
|
| 255 |
+
To generate faces with new identities, we feed in random noise and expression code to $G_{dec}$.
|
| 256 |
+
The results are shown in Fig.~\ref{fig:aug}. Each column shows the same subject displaying different expressions. We can see the synthesized face images look realistic. Moreover, because of the design of the expression controller module, the generated expressions for the same class are also diverse. For example, for the class \textit{Happy}, there are big smile with teeth and slight smile with mouth closed.
|
| 257 |
+
|
| 258 |
+
We further demonstrate that the images synthesized by our model can be used for data augmentation to train a robust expression classifier. Specifically, for each expression category, we generate 0.5$K$, 1$K$, 5$K$, and 10$K$ images, respectively. The classifier has the same network architecture as $G_{enc}$ except one additional FC layer with six neurons is added.
|
| 259 |
+
The results are shown in Table~\ref{tab:acc}. We can see by only adding 3$K$ synthetic images, the improvement is marginal, with an accuracy of 78.47\% vs. 77.78\%. However, when the number is increased to 30$K$, the recognition accuracy is improved significantly, reaching to \textbf{84.72\%} with a relative error reduction by \textbf{31.23\%}. The performance starts to saturate when more images (60$K$) are utilized.
|
| 260 |
+
This validates the synthetic face images have high perceptual quality.
|
| 261 |
+
\begin{table}
|
| 262 |
+
\caption{Comparison of expression recognition accuracy with different numbers of synthesized images.}
|
| 263 |
+
\label{tab:acc}
|
| 264 |
+
\centering
|
| 265 |
+
\begin{tabular}{c|c|c|c|c|c}
|
| 266 |
+
\hline
|
| 267 |
+
\hline
|
| 268 |
+
\# Syn. Images&0 & 3$K$ & 6$K$ & 30$K$ & 60$K$\\
|
| 269 |
+
\hline
|
| 270 |
+
Accuracy (\%)&77.78&78.47&81.94&\textbf{84.72}&84.72\\
|
| 271 |
+
\hline
|
| 272 |
+
\end{tabular}
|
| 273 |
+
\end{table}
|
| 274 |
+
\subsection{Feature Visualization}
|
| 275 |
+
In this part, we demonstrate that the identity $g(x)$ and expression $c$ representations learned by our model are disentangled.
|
| 276 |
+
To show this, we first use t-SNE~\cite{maaten2008visualizing} to visualize the 50-dim identity feature $g(x)$ on a two dimensional space. The results are shown in Fig.~\ref{fig:id_feats}.
|
| 277 |
+
We can see that most of the subjects are well separated, which confirms the latent identity features $g(x)$ learn to preserve the identity information.
|
| 278 |
+
\begin{figure}[!ht]
|
| 279 |
+
\centering
|
| 280 |
+
\includegraphics*[width=\linewidth]{id_feats}
|
| 281 |
+
\caption{Identity feature space. Each color represents a different identity and the images for one identity are labeled.
|
| 282 |
+
}
|
| 283 |
+
\label{fig:id_feats}
|
| 284 |
+
\end{figure}
|
| 285 |
+
|
| 286 |
+
To demonstrate that the expression code $c$ captures the high-level expression semantics, we perform image retrieval experiment based on $c$ in terms of Euclidean distance. For comparison, the results with expression label $y$ and image pixel space $x$ are also provided in Fig.~\ref{fig:expression_feats}.
|
| 287 |
+
As expected, the pixel space $x$ sometimes fails to retrieve images from the same expression.
|
| 288 |
+
While the images retrieved by $y$ do not always have the same \textit{style} of expressions as the queries.
|
| 289 |
+
For example, the query face in the second row shows a big smile with teeth, but the retrieved image by $y$ only has a mild smile with mouth closed.
|
| 290 |
+
However, with the expression code $c$,
|
| 291 |
+
we observe that face images with similar expressions are always retrieved.
|
| 292 |
+
This validates that the expression code learns a rich and diverse feature representation.
|
| 293 |
+
\begin{figure}[!ht]
|
| 294 |
+
\centering
|
| 295 |
+
\includegraphics*[width=0.65\linewidth]{emotion_feats3}
|
| 296 |
+
\caption{Expression-based image retrieval. First column shows query images.
|
| 297 |
+
Other columns show top one retrieval based on $c$, $y$ and $x$.
|
| 298 |
+
}
|
| 299 |
+
\label{fig:expression_feats}
|
| 300 |
+
\end{figure}
|
| 301 |
+
\section{Conclusions}
|
| 302 |
+
This paper presents ExprGAN for facial expression editing. To the best of our knowledge, it is the first GAN-based model that can transform the face image to a new expression where the expression intensity is allowed to be controlled continuously.
|
| 303 |
+
The proposed model learns the disentangled identity and expression representations explicitly,
|
| 304 |
+
allowing for a wide variety of applications, including expression editing, expression transfer, and data augmentation for training improved face expression recognition models.
|
| 305 |
+
We further develop an incremental learning scheme to train the model on small datasets.
|
| 306 |
+
Our future work will explore how to apply ExprGAN to a larger and more unconstrained facial expression dataset.
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
|
| 313 |
+
|
| 314 |
+
|
| 315 |
+
\bibliographystyle{aaai}
|
| 316 |
+
\bibliography{reference}
|
1709.03851v2.txt
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
Face attributes describe the characteristics observed from a face image.
|
| 3 |
+
They were first introduced by \citeauthor{kumar2009attribute}~\shortcite{kumar2009attribute} as mid-level features for face verification~\cite{kumar2011describable} and since then have attracted much attention.
|
| 4 |
+
The last few years have witnessed their successful applications in hashing~\cite{li2015two}, face retrieval~\cite{siddiquie2011image}, and one-shot face recognition~\cite{jadhav2016deep}. Recently, researchers have begun to investigate the possibility of synthesizing face images based on face attributes~\cite{radford2015unsupervised,yan2016attribute2image}.
|
| 5 |
+
|
| 6 |
+
Despite their wide applications, face attribute recognition is not an easy task. One reason is that recognizing different face attributes may require attentions to different regions of the face~\cite{moran1985selective,posner1990attention}. For example, local attributes like \textit{Mustache} could be recognized by just checking the region containing the mouth. Remaining face region does not provide useful information and may even hamper this particular attribute recognition.
|
| 7 |
+
However, recognizing global attributes like \textit{Pale Skin} may require information from the whole face region. Most current research studies do not pay special attention to this problem. They either detect facial landmarks and extract hand-crafted features from patches around them~\cite{kumar2009attribute,berg2013poof} or train a deep network to classify the attributes by taking a whole face as input~\cite{liu2015deep,wang2016walk,rudd2016moon,hand2016attributes}.
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
In this paper, we propose a learning-based method that dynamically selects different face regions for unaligned face attribute prediction.
|
| 11 |
+
It integrates two networks using a cascade: a face region localization (FRL) network followed by an attribute classification network. The localization network detects face areas specific to attributes, especially those that have local spatial support. The classification network selectively leverages information from these face regions to make the final prediction.
|
| 12 |
+
|
| 13 |
+
For accurate face region detection, our localization network is constructed under a multi-task learning framework. The lower layers which are used to extract low level features are shared by all the tasks while the high-level semantics are learned separately. Moreover, a global average pooling is applied to force the network to learn location-sensitive information~\cite{lin2013network}. Although the network is trained in a weakly-supervised manner with attribute labels only, the detected face regions are consistent with what one may expect.
|
| 14 |
+
As a result, face alignment algorithms which are usually sensitive to occlusion, variations of pose and illumination are not needed.
|
| 15 |
+
|
| 16 |
+
For each face region (also called a part) detected by our localization network, we train a separate attribute classification network, called a part-based subnet.
|
| 17 |
+
The localized face parts may not contain enough contextual information for predicting global attributes.
|
| 18 |
+
Thus, a whole-image-based subnet is also trained. To combine the information from the part-based and whole-image-based subnets, a two-layer fully-connected classifier is built on top of the output attribute scores. The first layer is used to select the relevant subnet for predicting each attribute, while the second layer is designed to model the rich attribute relations. The integrated system is called the parts and whole (PaW) network.
|
| 19 |
+
|
| 20 |
+
Since the face region localization network is supervised by attribute labels, it is appealing to adapt its weights to initialize the subnets in PaW. However, features from the localization network, which are mainly designed for localization purpose, are generally not very discriminative for attribute classification. To this end, a multi-net learning method is proposed. It utilizes a network with enhanced attribute classification capability to train the localization network to find a more discriminative solution.
|
| 21 |
+
|
| 22 |
+
A naive implementation of the PaW network is problematic since the number of total parameters increases linearly with the number of attributes, and the subnet adapted from the FRL network is not very compact. To jointly train the PaW network end-to-end, a hint-based model compression technique is further proposed. This not only leads to a compact model with only $11M$ parameters, but also reduces the training time significantly.
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
We applied the proposed method to CelebA dataset~\cite{liu2015deep}. With no use of alignment information, our method achieves an accuracy of \textbf{91.23}\%, reducing the classification error by a significant margin of \textbf{30.9}\% compared with state-of-the-art~\cite{liu2015deep}.
|
| 26 |
+
Moreover, our designed model could select the most relevant face region for predicting each face attribute.
|
| 27 |
+
|
| 28 |
+
To summarize, the contributions of this paper are listed below:
|
| 29 |
+
|
| 30 |
+
\begin{itemize}[noitemsep]
|
| 31 |
+
\item A weakly-supervised localization network is designed to accurately locate attribute regions.
|
| 32 |
+
\item A hybrid classification network is proposed to dynamically choose the pertinent face regions for predicting different attributes.
|
| 33 |
+
\item A hint-based model compression technique is explored to obtain a compact model.
|
| 34 |
+
\item The state-of-the-art of unaligned face attribute classification is significantly improved by the proposed method.
|
| 35 |
+
\end{itemize}
|
| 36 |
+
\section{Related Works}
|
| 37 |
+
\begin{figure*}
|
| 38 |
+
\centering
|
| 39 |
+
\includegraphics[width=\textwidth]{pipeline2.pdf}
|
| 40 |
+
\caption{Overview of our face attribute recognition framework. It consists of
|
| 41 |
+
a facial region localization (FRL) network and a Parts and Whole (PaW) classification network. The localization network
|
| 42 |
+
detects a discriminative part for each attribute. Then the detected face regions and the whole face image are fed into
|
| 43 |
+
the PaW classification network. The region switch layer (RSL) selects the relevant subnet for predicting the attribute, while the attribute relation layer (ARL) models the attribute relationships.
|
| 44 |
+
}
|
| 45 |
+
\label{fig:pipeline}
|
| 46 |
+
\end{figure*}
|
| 47 |
+
|
| 48 |
+
\noindent \textbf{Face Attribute Recognition}
|
| 49 |
+
Early works~\cite{kumar2009attribute,berg2013poof} on face attribute recognition used manually defined face parts to extract features and then train a linear SVM classifier. This strategy though is well suited for near-frontal faces, is heavily dependent on the accuracy of landmark detection.
|
| 50 |
+
Recently, with the emergence of large-scale data and deep neural networks,
|
| 51 |
+
holistic methods~\cite{liu2015deep,wang2016walk,huang2016learning} have produced better performance than the part-based method.
|
| 52 |
+
~\citeauthor{liu2015deep}\shortcite{liu2015deep} noticed that a deep model pre-trained for face recognition implicitly learns attributes.
|
| 53 |
+
\citeauthor{huang2016learning}~\shortcite{huang2016learning} employed a quintuplet loss to combat the imbalanced data distribution problem.
|
| 54 |
+
These methods typically use the whole face image to train a deep network, ignoring the fact that different facial attributes have different attentional facial regions. This problem has been recently noticed
|
| 55 |
+
in~\cite{ehrlich2016facial,murrugarralearning}.
|
| 56 |
+
\citeauthor{murrugarralearning}~\shortcite{murrugarralearning} created human gaze maps for each attribute such that only features within the saliency maps are used for attribute recognition. Our method differs from the aforementioned approaches in the sense that \textit{the face parts are localized automatically without relying on detected landmarks or human gaze data.} Moreover, our classification network can dynamically select the attentional face regions for predicting different attributes.
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
\noindent\textbf{Weakly Supervised Object Localization}
|
| 60 |
+
Despite training with only image-level labels, recent
|
| 61 |
+
works~\cite{oquab2015object,zhou2016learning,cinbis2017weakly}
|
| 62 |
+
showed that deep Convolutional Neural Networks (CNN) have remarkable object localization ability.
|
| 63 |
+
\citeauthor{zhou2016learning}~\shortcite{zhou2016learning} proposed a class activation mapping method to localize the objects with class labels only. The design of our face region localization network is motivated by this work.
|
| 64 |
+
However, to fully utilize the correlations among different face attributes, the localization network is designed in a multi-task learning framework.
|
| 65 |
+
|
| 66 |
+
\noindent \textbf{Model Compression}
|
| 67 |
+
To obtain a compact model, several methods including network distillation~\cite{buciluǎ2006model}, parameter pruning~\cite{lecun1989optimal} have been proposed.
|
| 68 |
+
Recently, knowledge distillation~\cite{hinton2015distilling} has been shown to be very effective to teach a small student model.
|
| 69 |
+
However, it can not be directly applied to our problem: the teacher net uses the soft labels which contain rich ambiguous information to supervise the student net, while for attribute classification, the output has only one logit for each attribute. Thus, a new loss function based on hints is proposed to replace soft label supervision.
|
| 70 |
+
\section{Proposed Method}
|
| 71 |
+
The proposed method contains two networks: a localization network and an attribute classification network. An overview of the framework is shown in Figure~\ref{fig:pipeline}.
|
| 72 |
+
First, we adopt the multi-net learning method to train a face region localization (FRL) network.
|
| 73 |
+
Then one attentional region is detected for each attribute by the FRL network, which is fed into the PaW network for attribute prediction. To train the PaW end-to-end, a hint-based method is further applied to compress the model.
|
| 74 |
+
The details of the proposed approach are discussed below.
|
| 75 |
+
\subsection{Face Region Localization (FRL) Network}
|
| 76 |
+
One challenge in designing a face region localization algorithm is that we do not have the labeled regions available. \citeauthor{murrugarralearning}~\shortcite{murrugarralearning} used human gaze to label the related region for each attribute, however, this is both time consuming and expensive. Inspired by the success in weakly supervised object localization~\cite{zhou2016learning}, we apply a global average pooling (GAP) network for the localization task, and train it in a weakly-supervised way where only face attribute labels are needed. In this network structure, a GAP layer is used to pool features from the last convolutional layer, and a fully-connected layer is followed to predict the attribute score. A localization heatmap, $H_j$, for the $j$-th attribute, is obtained by applying the class activation mapping method. $H_j = \sum_{i=1}^{N}w_{j,i} F_i, i=1,...,N$, where $F_i$ is the output feature maps from the last convolutional layer and $w_{j,i}$ is the $i$-th weight of the fully connected layer for predicting the $j$-th attribute. $N$ is chosen to be $32$ in our experiments.
|
| 77 |
+
|
| 78 |
+
We design the FRL network using multi-task learning~\cite{caruana1998multitask} strategy, where each attribute can be seen as one separate task. It has five VGGNet~\cite{simonyan2014very} convolutional modules shared by all the attributes, and a domain adapted convolutional layer which has $M$ different branches for each attribute, where $M=40$ is the number of face attributes. The weights of the network are initialized from the VGG-Face CNN~\cite{parkhi2015deep} which is trained on a large-scale face recognition dataset.
|
| 79 |
+
\subsubsection{Multi-Net Learning}
|
| 80 |
+
Since the supervision of the FRL network comes from the attribute tags, it is appealing to transfer its weights to the subnets in PaW for faster convergence and better performance. However, training the FRL net in a plain way leads to less discriminative features due to GAP regularization~\cite{zhou2016learning}. This is also verified in our experiments.
|
| 81 |
+
To this end, a multi-net learning (MNL) method is proposed to boost the classification performance of the GAP feature, which yield improved final attribute classification.
|
| 82 |
+
|
| 83 |
+
The network architecture for MNL is shown in Figure~\ref{fig:mnl}.
|
| 84 |
+
Except for the FRL network (blue and red boxes), another two fully-connected layers (gray box) are also attached to the output of the fifth convolutional module.
|
| 85 |
+
We call it a classification branch because of its improved performance on the classification task compared with the localization branch.
|
| 86 |
+
The idea is to simultaneously train the two different types of networks with the same attributes loss. Meanwhile the first several convolutional layers are constructed to be shared between them. The gradients from both classification and localization branches are backpropagated to the shared layers. This extra supervision from the classification branch regularizes the training process to search for a more discriminative solution.
|
| 87 |
+
Interestingly, we find this simple learning strategy is beneficial for both branches in terms of classification performance.
|
| 88 |
+
\textit{After the multi-net training is completed, the classification branch is removed, and only the localization branch is kept for extracting attribute-specific heatmaps.}
|
| 89 |
+
|
| 90 |
+
To localize the face region, we upsample the location heatmap to the original image size $224\times 224$, and find the position that corresponds to the maximum value. Then, a $64\times64$ patch centered around this position is cropped from the original image as the detected face region. We empirically found this patch size to be sufficient for most face parts. This process is repeated for each attribute and $M$ face regions are obtained.
|
| 91 |
+
\subsection{Attribute Classification Network}
|
| 92 |
+
As shown in Figure~\ref{fig:pipeline}, the proposed attribute classification network PaW contains $M$ part-based subnets and one whole-image-based subnet. After getting the predicted attributes scores from each subnet, a two-layer fully-connected classifier is adopted to combine them.
|
| 93 |
+
\subsubsection{Parts and Whole (PaW) Classification Network}
|
| 94 |
+
Suppose $x_0$ represents the whole face image, $x_1,..., x_M$ represent face region related to each face attribute. $g_i, i\in{0,.., M}$ represent the ($M+1$) subnets. Each $x_i$ is first fed into its corresponding subnet $g_i$ to predict the $M$ attribute scores $\{s_{i,j}\}$, where $s_{i,j}$ represents the predicted score of the $j$-th attribute by the $i$-th subnet. The reason why we train each part-based subnet to predict $M$ attributes instead of the one related to the input region is based on the observation that some attributes can usually be predicted by other ones~\cite{torfasonface}. The predicted scores $s_{i,j}$ will be fed into a region switch layer (RSL) which is designed as $r_j=\sum_{i=0}^{M} W_{ij}s_{ij}, j=1,...,M, W\in R^{(M+1)\times M}$ whose element in the $i$-th row and $j$-th column is $W_{ij}$. RSL adopts a group fully-connected structure, where the $j$-th output is only connected with the $j$-th attribute scores predicted by all subnets.
|
| 95 |
+
Especially, it could balance the scores from the part-based and whole-image-based subnets by putting more weight to the one that is more important. An attribute relation layer (ARL), which is a fully-connected layer, then takes these $r_j, j\in{1,..., M}$ as input to predict the final score for each face attribute. ARL here is used to further model the high correlations among the face attributes.
|
| 96 |
+
The PaW network is trained end-to-end with the sigmoid cross entropy loss: $L_{attr} = \sum_{j=1}^M y_{j}\log o_{j} + (1-y_{j})\log (1-o_{j})$, where $y_j$'s are the attributes labels, and $o_j$'s are the outputs from the ARL layer.
|
| 97 |
+
|
| 98 |
+
\begin{figure}[!tb]
|
| 99 |
+
\centering
|
| 100 |
+
\includegraphics[width=0.45\textwidth]{mnl_pdf.pdf}
|
| 101 |
+
\caption[face CNN resp]{Multi-Net Learning.}
|
| 102 |
+
\label{fig:mnl}
|
| 103 |
+
\end{figure}
|
| 104 |
+
\subsubsection{Hint-based Model Compression}
|
| 105 |
+
Training the PaW network in a naive way is both memory demanding and time consuming, since the total number of network parameters increases substantially as the number of attributes becomes large, and the subnet architecture adapted from the FRL network is not very compact.
|
| 106 |
+
To obtain a compact subnet model, we further propose a model compression technique.
|
| 107 |
+
Motivated by~\cite{abu1992method,ding2016facenet2expnet}, we design a hint loss to make the student net (SNet) reconstruct the feature maps from the teacher net (TNet). It can be expressed as:
|
| 108 |
+
\begin{equation}
|
| 109 |
+
L_{hint}(w) = ||T_k(I) - S_l(I,w)||_2,
|
| 110 |
+
\end{equation}
|
| 111 |
+
where $k$ ($l$) is the chosen layer of the teacher (student) net to transfer (add) supervision, $w$ are the weights of the student net to be learned, and $I$ is the input whole face image.
|
| 112 |
+
The network architecture is shown in Figure~\ref{fig:compress}. Besides the hint loss, the student network is also supervised by the attributes loss. Thus, the total loss function can be written as $L_S = \lambda_1 L_{hint} + \lambda_2 L_{attr}$.
|
| 113 |
+
The FRL network trained by MNL is adopted as the teacher network to teach the whole-image-based subnet (or the student net). Since it is fully-convolutional and deeper layer generally captures high-level semantics~\cite{zeiler2014visualizing,escorcia2015relationship}, we set the supervision layer $k$ to be the teacher network's last convolutional layer. During training, the weights of the teacher network are frozen, and only the student network is learned. The whole training is carried out in two stages: first setting $\lambda_1=1,\lambda_2=0$, and training S with only the hint loss. In this way, the knowledge of the teacher network could help the student network find a good initialization. Then we set $\lambda_1=0,\lambda_2=1$ and train S with attribute loss only. After the whole-image-based subnet is learned, its weights are used to initialize all the part-based subnets in PaW.
|
| 114 |
+
\subsection{Training Methodology}
|
| 115 |
+
The whole training process is carried out as follows:
|
| 116 |
+
\begin{enumerate}[noitemsep]
|
| 117 |
+
\item First, MNL is adopted to train the FRL network with superior classification performance;
|
| 118 |
+
\item Then hint-based compression method is applied to train a compact whole-image-based subnet $g_0$ using the learned FRL network as the teacher net.
|
| 119 |
+
\item Initialize each part-based subnet $\{g_i\}_{i=1}^M$ using the weights from $g_0$ and then train each subnet $g_i$ independently using the corresponding attentional face region;
|
| 120 |
+
\item By fixing all the part-based subnets and the whole-image-based subnet, the RSL and ARL are learned;
|
| 121 |
+
\item Finally, the PaW network is fine-tuned by back-propagating errors from ARL to all the lower layers of the part-based subnets and the whole-image-based subnet.
|
| 122 |
+
\end{enumerate}
|
| 123 |
+
All the subnets and the two layer fully-connected model are trained under the supervision of attribute labels. The third and forth steps initialize the classification model to be close to a good local minimum, which is important for the successful training of PaW.
|
| 124 |
+
|
| 125 |
+
\begin{figure}[!tb]
|
| 126 |
+
\centering
|
| 127 |
+
\includegraphics[width=0.35\textwidth]{hint_pdf.pdf}
|
| 128 |
+
\caption[face CNN resp]{Hint-based Model Compression.}
|
| 129 |
+
\label{fig:compress}
|
| 130 |
+
\end{figure}
|
| 131 |
+
\section{Experiments}
|
| 132 |
+
|
| 133 |
+
\subsection{Dataset}
|
| 134 |
+
We use the CelebA dataset~\cite{liu2015deep} in our experiments, since it has been widely used for face attributes classification. It consists of 202,599 face images collected from the Internet and annotated with 40 binary attributes. As suggested in~\cite{liu2015deep}, 162,770 of these images are used for training, 19,867 and 19,962 are reserved for validation and testing respectively.
|
| 135 |
+
Both unaligned and aligned sets are provided and we applied our method on the unaligned one (\textbf{uCelebA}).
|
| 136 |
+
To conduct experiments on uCelebA, we use the publicly available face detector~\cite{zhang2016joint} to detect faces. For 560 images which have no face detected, we use the provided landmarks to get the groundtruth bounding box (we empirically expand the minimum bounding box containing all landmarks twice to cover the neck and hair region). For 15,181 images with multiple faces detected, we select the bounding box that has maximum overlap with the groundtruth bounding box. This is the only preprocessing step applied to the unaligned images.
|
| 137 |
+
\subsection{Implementation details}
|
| 138 |
+
We applied MNL to train the FRL network. The learning rate is fixed to be 0.0001, and the network is trained for 10 epochs with batch size of 128. The FRL network is then compressed with a learning rate of $1e^{-7}$ for the hint loss training and 0.0001 for the attribute loss training.
|
| 139 |
+
The part-based subnets are trained for 15 epochs with the weights initialized from the whole-image-based subnet. After that, the RSL and ARL are trained with a learning rate of 0.1 with all subnets fixed. Finally, a learning rate of 0.001 is applied to train the PaW network in an end-to-end manner. Stochastic gradient descent (SGD) is used to train all the networks. The momentum and weight decay are set at $0.9$ and $0.0005$ for all the experiments respectively. Horizontal flipping is applied for data augmentation. We use Caffe~\cite{jia2014caffe} to implement our networks.
|
| 140 |
+
\subsection{Ablative Analysis}
|
| 141 |
+
|
| 142 |
+
\subsubsection{Face Region Localization}
|
| 143 |
+
In this section, we evaluate the FRL network qualitatively. Figure~\ref{fig:big_pic} shows the location heatmaps corresponding to several attributes.
|
| 144 |
+
We observe that the localized parts are quite semantically meaningful, even though some face images have large pose variations or under occlusion. For example, the eye area produces the highest response for the \textit{Arched Eyebrow} attribute even though the woman wears sunglasses. While for the attribute of \textit{Wavy Hair}, the network localizes the head region although the man wears a hat. We also examine it quantitatively in the \textbf{Classification Results} section to show that accurate region localization is essential for good classification results.
|
| 145 |
+
\begin{figure}[!ht]
|
| 146 |
+
\centering
|
| 147 |
+
\includegraphics*[width=\linewidth]{big_pic_for_aaai}
|
| 148 |
+
\caption{Location heatmaps from the face region localization network. Face regions that correlate with facial attributes are discovered. }
|
| 149 |
+
\label{fig:big_pic}
|
| 150 |
+
\end{figure}
|
| 151 |
+
\subsubsection{Multi-Net Learning}
|
| 152 |
+
\begin{table}
|
| 153 |
+
\caption{Average classification accuracy on uCelebA dataset.}
|
| 154 |
+
\label{tab:acc}
|
| 155 |
+
\centering
|
| 156 |
+
\begin{tabular}{c|c|c}
|
| 157 |
+
\hline
|
| 158 |
+
\hline
|
| 159 |
+
Methods &Classif. Branch & Loc. Branch \\
|
| 160 |
+
\hline
|
| 161 |
+
Without MNL&-&91.01\\
|
| 162 |
+
MNL& 91.05&\textbf{91.07}\\
|
| 163 |
+
\hline
|
| 164 |
+
\end{tabular}
|
| 165 |
+
\end{table}
|
| 166 |
+
|
| 167 |
+
In this section, we study the ability of MNL for obtaining a localizable and discriminative deep representation.
|
| 168 |
+
Table~\ref{tab:acc} summarizes the attribute classification results from classification and localization branches.
|
| 169 |
+
We find that MNL consistently improves the classification performance of the localization branch, achieving an accuracy of $91.07\%$ vs. $91.01\%$ with/without MNL.
|
| 170 |
+
|
| 171 |
+
\begin{table}
|
| 172 |
+
\caption{Fine-grained classification accuracy on CUB-200 dataset.}
|
| 173 |
+
\label{tab:finegrained}
|
| 174 |
+
\centering
|
| 175 |
+
\setlength\tabcolsep{2pt}
|
| 176 |
+
\begin{tabular}{c|c|c}
|
| 177 |
+
\hline
|
| 178 |
+
\hline
|
| 179 |
+
Methods &Classif. Branch & Loc. Branch \\
|
| 180 |
+
\hline
|
| 181 |
+
Without MNL on full image & -&67.40\\
|
| 182 |
+
MNL on full image &72.10&\textbf{71.66}\\
|
| 183 |
+
\hline
|
| 184 |
+
Without MNL on crop &-&71.90\\
|
| 185 |
+
MNL on crop &75.76&\textbf{76.03}\\
|
| 186 |
+
\hline
|
| 187 |
+
\end{tabular}
|
| 188 |
+
\end{table}
|
| 189 |
+
To further test the proposed MNL, we applied it on the popular CUB-200-2011 dataset~\cite{wah2011caltech} for fine-grained object recognition. The dataset contains 11,788 images, with 5,994 images for training and 5,794 for testing. The network architecture is the same as the one used in uCelebA, except that the last layer is replaced with 200 output nodes (the number of classes).
|
| 190 |
+
The weights are initialized from VGGNet~\cite{simonyan2014very}. Table~\ref{tab:finegrained} summarizes the results.
|
| 191 |
+
We find that the localization branch performs worse than the classification branch, with almost $4\%$ performance gap. After applying MNL, the accuracy of the localization branch is improved from $67.40\%$ to $71.66\%$ when using the full image. We also adopt the same localization technique as~\cite{zhou2016learning} to identify the bounding box of the birds in both the training and testing sets. With the cropped bird images as training data, the performance of the localization branch is further improved from $71.90\%$ to $76.03\%$. This further demonstrates that MNL is able to improve the discriminativeness of the GAP-based localization network.
|
| 192 |
+
|
| 193 |
+
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
\begin{figure*}
|
| 197 |
+
\centering
|
| 198 |
+
\includegraphics[width=\textwidth]{comb_w.pdf}
|
| 199 |
+
\caption{Visualization of the region switch layer weights. For each attribute, the blue and the red bar represent the weight values of RSL that corresponds to the part-based subnet and whole-image-based subnet respectively. It shows that the weights of the part-based subnets are higher for the local attributes. For global attributes, the whole-image-based subnet is assigned larger weight.}
|
| 200 |
+
\label{fig:comb_w}
|
| 201 |
+
\end{figure*}
|
| 202 |
+
\subsubsection{Hint-based Model Compression}
|
| 203 |
+
\begin{table}
|
| 204 |
+
\caption{Comparison of average accuracy and compactness between different compressed models on uCelebA dataset.}
|
| 205 |
+
\label{tab:architect}
|
| 206 |
+
\centering
|
| 207 |
+
\setlength\tabcolsep{1pt}
|
| 208 |
+
\begin{tabular}{l|l|l|l|l}
|
| 209 |
+
\hline
|
| 210 |
+
\hline
|
| 211 |
+
Layer & TNet & SNet1 & SNet2 & SNet3 \\
|
| 212 |
+
\hline
|
| 213 |
+
Conv1& 3x3x32(2) &3x3x32 & 3x3x32 &3x3x16 \\
|
| 214 |
+
Pool1& 2x2x32 & 2x2x32 & 2x2x32 &2x2x16 \\
|
| 215 |
+
Conv2& 3x3x64(2) & 3x3x64 & 3x3x64 &3x3x32 \\
|
| 216 |
+
Pool2& 2x2x64 & 2x2x64 & 2x2x64 &2x2x32 \\
|
| 217 |
+
Conv3& 3x3x128(3) & 3x3x128 &3x3x128 &3x3x64 \\
|
| 218 |
+
Pool3& 2x2x128 & 2x2x128 &2x2x128 &2x2x64 \\
|
| 219 |
+
Conv4& 3x3x256(3) & 3x3x256 &3x3x256 &3x3x128 \\
|
| 220 |
+
Pool4& 2x2x256 & 2x2x256 &2x2x256 &2x2x128 \\
|
| 221 |
+
Conv5& 3x3x512(3) & 3x3x512 &3x3x512 &1x1x1280 \\
|
| 222 |
+
Conv6& 3x3x1280 & 3x3x1280 &1x1x1280 & n/a\\
|
| 223 |
+
Classifier&GAP&GAP&GAP&GAP\\
|
| 224 |
+
&FC40&FC40&FC40&FC40\\
|
| 225 |
+
\hline
|
| 226 |
+
Accuracy & 91.07& 91.02&90.89 &90.60\\
|
| 227 |
+
\hline
|
| 228 |
+
Param. & 19M & 6M& 2M& 0.27M \\
|
| 229 |
+
\hline
|
| 230 |
+
\end{tabular}
|
| 231 |
+
\end{table}
|
| 232 |
+
In this section, we analyze the effectiveness of our model compression technique. To show the flexibility and robustness of our method, we experiment with three student nets (SNet1, SNet2 and SNet3) with different sizes.
|
| 233 |
+
Table~\ref{tab:architect} shows the network architectures and their classification results. We use $s\times s\times n(t)$ to denote kernel size $s\times s$ with $n$ output feature maps, where $t$ is the number of repeated convolution modules. We observe that the proposed method is able to compress a deep network to a relatively shallow network, with little performance drop. For SNet3, which achieves an accuracy of 90.60\%, the depth is shortened from 14 to 5, and the number of parameters is reduced from 19M to 0.27M.
|
| 234 |
+
|
| 235 |
+
|
| 236 |
+
To further compare our approach with existing methods, we also train our models on the \textit{aligned} CelebA dataset. The results are summarized in Table~\ref{tab:compress}. We find that our SNet3 model achieves similar or better accuracy compared to these state-of-the-art methods, while being much more compact and thus faster.
|
| 237 |
+
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
\begin{table}
|
| 241 |
+
\caption{Comparison of average accuracy and compactness on the aligned CelebA dataset.}
|
| 242 |
+
\label{tab:compress}
|
| 243 |
+
\centering
|
| 244 |
+
\begin{tabular}{c|c|c}
|
| 245 |
+
\hline
|
| 246 |
+
\hline
|
| 247 |
+
Method & Accuracy & Param.\\
|
| 248 |
+
\hline
|
| 249 |
+
SOMP~\cite{lu2016fully}-thin-32&89.96&0.22M\\
|
| 250 |
+
SOMP~\cite{lu2016fully}-branch-32&90.74&1.49M \\
|
| 251 |
+
Low Rank~\cite{denton2014exploiting} &90.88 & 4.52M\\
|
| 252 |
+
\hline
|
| 253 |
+
SNet3&\textbf{90.89}&\textbf{0.27M}\\
|
| 254 |
+
\hline
|
| 255 |
+
\end{tabular}
|
| 256 |
+
\end{table}
|
| 257 |
+
|
| 258 |
+
\begin{figure}[!ht]
|
| 259 |
+
\centering
|
| 260 |
+
\includegraphics*[width=\linewidth]{attr_corr_aaai.png}
|
| 261 |
+
\caption{Attribute relation weights learned on uCelebA dataset. Red and yellow colors indicate high values while blue and green colors denote low values.}
|
| 262 |
+
\label{fig:attr_corr}
|
| 263 |
+
\end{figure}
|
| 264 |
+
|
| 265 |
+
\noindent\begin{table*}[t]
|
| 266 |
+
\caption{Performance comparison with state of the art methods on 40 binary facial attributes. The best results are shown in bold.}
|
| 267 |
+
\resizebox{\textwidth}{!}{\begin{tabular}{c|c |c |c| c| c| c| c| c |c |c| c| c| c| c| c |c |c| c| c| c| c|c|}
|
| 268 |
+
\hline\hline
|
| 269 |
+
&&\rot{5 o Clock Shadow} &\rot{Arched Eyebrows} &\rot{Attractive} &\rot{Bags Under Eyes} &\rot{Bald} &\rot{Bangs} &\rot{Big Lips} &\rot{Big Nose} &\rot{Black Hair} &\rot{Blond Hair} &\rot{Blurry} &\rot{Brown Hair} &\rot{Bushy Eyebrows} &\rot{Chubby} &\rot{Double Chin} &\rot{Eyeglasses} &\rot{Goatee} &\rot{Gray Hair} &\rot{Heavy Makeup} &\rot{High Cheekbones} &\rot{Male} \\
|
| 270 |
+
\hline
|
| 271 |
+
|
| 272 |
+
& LNets+ANet~\cite{liu2015deep} & 91.00 & 79.00 & 81.00 & 79.00& 98.00& 95.00& 68.00& 78.00& 88.00 & 95.00 & 84.00 & 80.00 & 90.00 & 91.00 & 92.00 & 99.00 & 95.00 & 97.00 & 90.00 & 87.00 & 98.00 \\
|
| 273 |
+
& Part-only & 93.90 & 81.86 & 81.88 & 84.07& 98.72& 95.71& 70.63& 83.48& 87.97 & 95.16 & 95.83 & 87.53 & 91.73 & 95.05 & 95.92 & 99.46 & 97.19 & 97.93 & 90.26 & 86.20 & 96.65 \\
|
| 274 |
+
uCelebA& Whole-only & 93.95 & 81.43 & 82.06 & 84.11& 98.57& 95.45& 70.66& 82.91& 89.08 & 95.52& 96.01 & 88.63 & 92.32 & 95.12 & 95.98 & 99.40 & 96.90 & 98.07 &90.67 & 86.57 & 97.10 \\
|
| 275 |
+
& PaW & \textbf{94.64} &\textbf{ 83.01} & \textbf{82.86} & \textbf{84.58}& \textbf{98.93}& \textbf{95.93}& \textbf{71.46}& \textbf{83.63}& \textbf{89.84} & \textbf{95.85} & \textbf{96.11} & \textbf{88.50} & \textbf{92.62} & \textbf{95.46} & \textbf{96.26} & \textbf{99.59} & \textbf{97.38} & \textbf{98.21} & \textbf{91.53 }& \textbf{87.44} & \textbf{98.39} \\
|
| 276 |
+
|
| 277 |
+
|
| 278 |
+
\hline\hline
|
| 279 |
+
& &\rot{Mouth Slightly Open} &\rot{Mustache} &\rot{Narrow Eyes} &\rot{No Beard} &\rot{Oval Face} &\rot{Pale Skin} &\rot{Pointy Nose} &\rot{Receding Hairline} &\rot{Rosy Cheeks} &\rot{Sideburns} &\rot{Smiling}&\rot{Straight Hair} &\rot{Wavy Hair} &\rot{Wearing Earrings} &\rot{Wearing Hat} &\rot{Wearing Lipstick} &\rot{Wearing Necklace} &\rot{Wearing Necktie} &\rot{Young} &\rot{}&\rot{\textbf{Average}} \\
|
| 280 |
+
\hline
|
| 281 |
+
|
| 282 |
+
&LNets+ANet~\cite{liu2015deep} & 92.00 & 95.00 & 81.00 & 95.00& 66.00& 91.00& 72.00& 89.00& 90.00 & 96.00 & 92.00 & 73.00 & 80.00 & 82.00 & 99.00 & 93.00 & 71.00 & 93.00 & 87.00 & &87.30 \\
|
| 283 |
+
&Part-only & 93.55 & 96.63 & 86.96 & 95.71& 73.03 & 96.86& 76.40& 92.87& 94.77 & 97.63 & 91.98 & 82.53 & 81.29 & 89.07 & 98.75 & 92.96 & 87.13 & 96.69 & 86.51 & & 90.46\\
|
| 284 |
+
uCelebA &Whole-only & 93.24 & 96.59 & 87.19 &95.40& 74.48 & 96.85& 76.06& 92.95& 94.83 & 97.50 & 91.61 & 82.18 & 82.63& 89.13 & 98.50 & 93.58 & 87.14 & 96.77 & 87.14 & & 90.60\\
|
| 285 |
+
&PaW & \textbf{94.05}& \textbf{96.90} & \textbf{87.56} & \textbf{96.22}& \textbf{75.03}& \textbf{97.08}& \textbf{77.35}& \textbf{93.44}& \textbf{95.07} & \textbf{97.64} & \textbf{92.73}& \textbf{83.52} & \textbf{84.07} & \textbf{89.93}& \textbf{99.02} & \textbf{94.24}& \textbf{87.70} & \textbf{96.85} & \textbf{88.59} & & \textbf{91.23}\\
|
| 286 |
+
|
| 287 |
+
\hline
|
| 288 |
+
\end{tabular}}
|
| 289 |
+
\label{tab:res}
|
| 290 |
+
\end{table*}
|
| 291 |
+
\subsubsection{PaW Classification Network}
|
| 292 |
+
\label{sec:paw}
|
| 293 |
+
In this section, we evaluate the classification performance of the proposed PaW network.
|
| 294 |
+
Before showing the results, we first explore whether the RSL assigns appropriate weights to different subnets for attribute prediction and whether the ARL learns meaningful attributes correlations.
|
| 295 |
+
|
| 296 |
+
\noindent\textbf{Face Region Selection}
|
| 297 |
+
We visualize the weights of RSL in Figure~\ref{fig:comb_w}.
|
| 298 |
+
Although each subnet predicts $M$ attribute scores simultaneously, only the weights of the corresponding part-based subnet against the whole-image-based subnet are shown here.
|
| 299 |
+
The weight magnitude indicates the importance of the subnet for predicting the attribute.
|
| 300 |
+
Interestingly, we find that the part-based subnet related to the local attribute, \textit{e.g.} \textit{5 o Clock Shadow} and \textit{Bushy Eyebrows}, is always assigned the largest weight among the $M+1$ subnets.
|
| 301 |
+
We also observe that for global attributes, \textit{e.g.} \textit{Attractive}, \textit{Blurry}, \textit{Heavy Makeup}, and \textit{Pale Skin}, the whole-image-based subnet achieves the highest weight.
|
| 302 |
+
Intuitively those global attributes should obtain more information from the whole-image-based subnet. This validates the region selection ability of the RSL.
|
| 303 |
+
|
| 304 |
+
\noindent\textbf{Face Attribute Correlation}
|
| 305 |
+
The learned ARL weights are visualized in Figure~\ref{fig:attr_corr}.
|
| 306 |
+
We find that attribute pairs that are mutually exclusive such as (\textit{Attractive, Blurry}), (\textit{Black Hair, Blond Hair}) and (\textit{No Beard, Goatee}) are assigned lowest weights. Rarely co-occurring attribute pairs like (\textit{Male, Heavy Makeup}) are also assigned low weights. Pairs of attributes such as (\textit{Chubby, Double Chin}), (\textit{Heavy Makeup, Wearing Lipstick}) and (\textit{Smiling, High Cheekbones}) that commonly co-occur are given relatively higher weights. Moreover, the weights are asymmetric, for example, a person who wears lipstick is very unlikely to have a beard, but not the other way round. This is also reflected in the learned weights. This shows that ARL captures the attribute relationships.
|
| 307 |
+
|
| 308 |
+
|
| 309 |
+
|
| 310 |
+
\noindent\textbf{Classification Results}
|
| 311 |
+
We show that our model achieves state-of-the-art results on uCelebA dataset.
|
| 312 |
+
In the following experiments, each subnet adopts the architecture of SNet3 in Table~\ref{tab:architect}.
|
| 313 |
+
|
| 314 |
+
We compare PaW with two baselines:
|
| 315 |
+
|
| 316 |
+
1. Part-only: each part net is trained on the detected face region to predict all face attributes. Then the attribute score from the most related part-based subnet is adopted for testing.
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
2. Whole-only: this method does not have part nets. It is trained with the whole face image only and is used to directly predict all attributes.
|
| 320 |
+
|
| 321 |
+
Table~\ref{tab:res} summarizes the classification performances. We observe that the PaW net performs consistently better than either the Part-only or Whole-only method alone, achieving an accuracy of 91.23\% vs. 90.60\% for Part-only and 90.46\% for Whole-only on uCelebA. This shows that RSL learns to selectively combine information from part-based and whole-image-based subnets. For unaligned face attribute classification on uCelebA dataset, we achieve the highest recognition rates across the board on all attributes and decrease the average recognition error from 12.70\% to 8.77\%, a reduction of 30.9\%. Our method on the aligned CelebA also achieves an accuracy of 91.33\% vs. 90.94\% compared with the state-of-the-art~\cite{rudd2016moon}.
|
| 322 |
+
This validates the effectiveness of the proposed attribute classification network.
|
| 323 |
+
Also, the small performance gap on uCelebA and the aligned CelebA means that we practically eliminate the alignment step, and hence no special annotations are needed.
|
| 324 |
+
Although the PaW network contains multiple part-based and whole-image-based subnets, the total number of parameters is only 11 M.
|
| 325 |
+
|
| 326 |
+
|
| 327 |
+
To test the importance of the FRL network, we further employ a baseline that divides each image into $4\times 4$ non-overlapping blocks to simulate crude part detectors. Then part-based subnets and whole-image-based subnet are trained the same way as before. It achieves an average accuracy of 90.95\% on uCelebA. However, we found that the weights corresponding to the whole-image-based net in the RSL are always higher than those of the part-based subnets for predicting \textit{all} the attributes. This is because coarse region localization makes the part-based subnets unreliable, thus all the predictions are essentially made by the whole-image-based subnet only. This validates the effectiveness of the proposed FRL network.
|
| 328 |
+
\section{Conclusions}
|
| 329 |
+
In this paper, we propose to learn
|
| 330 |
+
attentional face regions to improve attribute classification performance under unaligned condition. To this end, a weakly-supervised face region localization network is first designed. Then the information from those detected regions are selectively combined by the hybrid classification network. Visualization shows our method not only discovers semantic meaningful attributes regions, but also captures rich correlations among attributes. Moreover, our results outperform state-of-the-art by a significant margin on the unaligned CelebA dataset.
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
|
| 334 |
+
|
| 335 |
+
|
| 336 |
+
|
| 337 |
+
|
| 338 |
+
\bibliographystyle{aaai}
|
| 339 |
+
\bibliography{egbib}
|
1709.04005v2.txt
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Real-world conversations often involve more than two speakers.In the Ubuntu Internet Relay Chat channel (IRC), for example, one user can initiate a discussion about an Ubuntu-related technical issue, and many other users can work together to solve the problem.Dialogs can have complex speaker interactions: at each turn, users play one of three roles (sender, addressee, observer), and those roles vary across turns.
|
| 2 |
+
|
| 3 |
+
In this paper, we study the problem of addressee and response selection in multi-party conversations: given a responding speaker and a dialog context, the task is to select an addressee and a response from a set of candidates for the responding speaker.The task requires modeling multi-party conversations and can be directly used to build retrieval-based dialog systems (?; ?; ?; ?).
|
| 4 |
+
|
| 5 |
+
The previous state-of-the-art Dynamic-RNN model from ? (?) maintains speaker embeddings to track each speaker status, which dynamically changes across time steps.It then produces the context embedding from the speaker embeddings and selects the addressee and response based on embedding similarity.However, this model updates only the sender embedding, not the embeddings of the addressee or observers, with the corresponding utterance, and it selects the addressee and response separately.In this way, it only models who says what and fails to capture addressee information.Experimental results show that the separate selection process often produces inconsistent addressee-response pairs.
|
| 6 |
+
|
| 7 |
+
To solve these issues, we introduce the Speaker Interaction Recurrent Neural Network (SI-RNN).SI-RNN redesigns the dialog encoder by updating speaker embeddings in a role-sensitive way.Speaker embeddings are updated in different GRU-based units depending on their roles (sender, addressee, observer).Furthermore, we note that the addressee and response are mutually dependent and view the task as a joint prediction problem.Therefore, SI-RNN models the conditional probability (of addressee given the response and vice versa) and selects the addressee and response pair by maximizing the joint probability.
|
| 8 |
+
|
| 9 |
+
On a public standard benchmark data set, SI-RNN significantly improves the addressee and response selection accuracy, particularly in complex conversations with many speakers and responses to distant messages many turns in the past.Our code and data set are available online.111The released code: https://github.com/ryanzhumich/sirnn
|
| 10 |
+
|
| 11 |
+
We follow a data-driven approach to dialog systems.? (?), ? (?), and ? (?) optimize the dialog policy using Reinforcement Learning or the Partially Observable Markov Decision Process framework.In addition, ? (?) propose to use a predefined ontology as a logical representation for the information exchanged in the conversation.The dialog system can be divided into different modules, such as Natural Language Understanding (?; ?), Dialog State Tracking (?; ?), and Natural Language Generation (?).Furthermore, ? (?) and ? (?) propose end-to-end trainable goal-oriented dialog systems.
|
| 12 |
+
|
| 13 |
+
Recently, short text conversation has been popular.The system receives a short dialog context and generates a response using statistical machine translation or sequence-to-sequence networks (?; ?; ?; ?; ?; ?).In contrast to response generation, the retrieval-based approach uses a ranking model to select the highest scoring response from candidates (?; ?; ?; ?).However, these models are single-turn responding machines and thus still are limited to short contexts with only two speakers.As for larger context, ? (?) propose the Next Utterance Classification (NUC) task for multi-turn two-party dialogs.? (?) extend NUC to multi-party conversations by integrating the addressee detection problem.Since the data is text based, they use only textual information to predict addressees as opposed to relying on acoustic signals or gaze information in multimodal dialog systems (?; ?).
|
| 14 |
+
|
| 15 |
+
Furthermore, several other papers are recently presented focusing on modeling role-specific information given the dialogue contexts (?; ?; ?).For example, ? (?) combine content and temporal information to predict the utterance speaker.By contrast, our SIRNN explicitly utilizes the speaker interaction to maintain speaker embeddings and predicts the addressee and response by joint selection.
|
| 16 |
+
|
| 17 |
+
? (?) propose the addressee and response selection task for multi-party conversation.Given a responding speaker aressubscript𝑎𝑟𝑒𝑠a_{res} and a dialog context 𝒞𝒞\mathcal{C}, the task is to select a response and an addressee.𝒞𝒞\mathcal{C} is a list ordered by time step:𝒞=[(asender(t),aaddressee(t),u(t))]t=1T𝒞superscriptsubscriptdelimited-[]subscriptsuperscript𝑎𝑡𝑠𝑒𝑛𝑑𝑒𝑟subscriptsuperscript𝑎𝑡𝑎𝑑𝑑𝑟𝑒𝑠𝑠𝑒𝑒superscript𝑢𝑡𝑡1𝑇\mathcal{C}=[(a^{(t)}_{sender},a^{(t)}_{addressee},u^{(t)})]_{t=1}^{T}where asender(t)subscriptsuperscript𝑎𝑡𝑠𝑒𝑛𝑑𝑒𝑟a^{(t)}_{sender} says u(t)superscript𝑢𝑡u^{(t)} to aaddressee(t)subscriptsuperscript𝑎𝑡𝑎𝑑𝑑𝑟𝑒𝑠𝑠𝑒𝑒a^{(t)}_{addressee} at time step t𝑡t,and T𝑇T is the total number of time steps before the response and addressee selection.The set of speakers appearing in 𝒞𝒞\mathcal{C} is denoted 𝒜(𝒞)𝒜𝒞\mathcal{A(C)}.As for the output, the addressee is selected from 𝒜(𝒞)𝒜𝒞\mathcal{A(C)}, and the response is selected from a set of candidates ℛℛ\mathcal{R}.Here, ℛℛ\mathcal{R} contains the ground-truth response and one or more false responses.We provide some examples in Table 4 (Section 6).
|
| 18 |
+
|
| 19 |
+
In this section, we briefly review the state-of-the-art Dynamic-RNN model (?), which our proposed model is based on.Dynamic-RNN solves the task in two phases:1) the dialog encoder maintains a set of speaker embeddings to track each speaker status, which dynamically changes with time step t𝑡t;2) then Dynamic-RNN produces the context embedding from the speaker embeddings and selects the addressee and response based on embedding similarity among context, speaker, and utterance.
|
| 20 |
+
|
| 21 |
+
Figure 1 (Left) illustrates the dialog encoder in Dynamic-RNN on an example context.In this example, a2subscript𝑎2a_{2} says u(1)superscript𝑢1u^{(1)} to a1subscript𝑎1a_{1}, then a1subscript𝑎1a_{1} says u(2)superscript𝑢2u^{(2)} to a3subscript𝑎3a_{3}, and finally a3subscript𝑎3a_{3} says u(3)superscript𝑢3u^{(3)} to a2subscript𝑎2a_{2}.The context 𝒞𝒞\mathcal{C} will be:𝒞=[(a2,a1,u(1)),(a1,a3,u(2)),(a3,a2,u(3))]𝒞subscript𝑎2subscript𝑎1superscript𝑢1subscript𝑎1subscript𝑎3superscript𝑢2subscript𝑎3subscript𝑎2superscript𝑢3\!\!\!\!\!\!\mathcal{C}=[(a_{2},a_{1},u^{(1)}),(a_{1},a_{3},u^{(2)}),(a_{3},a_{2},u^{(3)})](1)with the set of speakers 𝒜(𝒞)={a1,a2,a3}𝒜𝒞subscript𝑎1subscript𝑎2subscript𝑎3\mathcal{A(C)}=\{a_{1},a_{2},a_{3}\}.
|
| 22 |
+
|
| 23 |
+
For a speaker aisubscript𝑎𝑖a_{i}, the bold letter 𝐚i(t)∈ℝdssuperscriptsubscript𝐚𝑖𝑡superscriptℝsubscript𝑑𝑠\mathbf{a}_{i}^{(t)}\in\mathbb{R}^{d_{s}} denotes its embedding at time step t𝑡t.Speaker embeddings are initialized as zero vectors and updated recurrently as hidden states of GRUs (?; ?).Specifically, for each time step t𝑡t with the sender asdrsubscript𝑎𝑠𝑑𝑟a_{sdr} and the utterance u(t)superscript𝑢𝑡u^{(t)}, the sender embedding 𝐚sdrsubscript𝐚𝑠𝑑𝑟\mathbf{a}_{sdr} is updated recurrently from the utterance:𝐚sdr(t)=GRU(𝐚sdr(t−1),𝐮(t)),superscriptsubscript𝐚𝑠𝑑𝑟𝑡GRUsuperscriptsubscript𝐚𝑠𝑑𝑟𝑡1superscript𝐮𝑡\mathbf{a}_{sdr}^{(t)}=\mathrm{GRU}(\mathbf{a}_{sdr}^{(t-1)},\mathbf{u}^{(t)}),where 𝐮(t)∈ℝdusuperscript𝐮𝑡superscriptℝsubscript𝑑𝑢\mathbf{u}^{(t)}\in\mathbb{R}^{d_{u}} is the embedding for utterance u(t)superscript𝑢𝑡u^{(t)}.Other speaker embeddings are updated from 𝐮(t)=𝟎superscript𝐮𝑡0\mathbf{u}^{(t)}=\mathbf{0}.The speaker embeddings are updated until time step T𝑇T.
|
| 24 |
+
|
| 25 |
+
To summarize the whole dialog context 𝒞𝒞\mathcal{C}, the model applies element-wise max pooling over all the speaker embeddings to get the context embedding 𝐡𝒞subscript𝐡𝒞\mathbf{h}_{\mathcal{C}}:𝐡𝒞=maxai=a1,…,a|𝒜(𝒞)|𝐚i(T)∈ℝdssubscript𝐡𝒞subscriptsubscript𝑎𝑖subscript𝑎1…subscript𝑎𝒜𝒞superscriptsubscript𝐚𝑖𝑇superscriptℝsubscript𝑑𝑠\mathbf{h}_{\mathcal{C}}=\max_{a_{i}=a_{1},\dots,a_{|\mathcal{A(C)}|}}\mathbf{a}_{i}^{(T)}\in\mathbb{R}^{d_{s}}(2)
|
| 26 |
+
|
| 27 |
+
The probability of an addressee and a response being the ground truth is calculated based on embedding similarity.To be specific, for addressee selection, the model compares the candidate speaker apsubscript𝑎𝑝a_{p}, the dialog context 𝒞𝒞\mathcal{C}, and the responding speaker aressubscript𝑎𝑟𝑒𝑠a_{res}:ℙ(ap|𝒞)=σ([𝐚res;𝐡𝒞]⊤𝐖a𝐚p)ℙconditionalsubscript𝑎𝑝𝒞𝜎superscriptsubscript𝐚𝑟𝑒𝑠subscript𝐡𝒞topsubscript𝐖𝑎subscript𝐚𝑝\mathbb{P}(a_{p}|\mathcal{C})=\sigma([\mathbf{a}_{res};\mathbf{h}_{\mathcal{C}}]^{\top}\mathbf{W}_{a}\mathbf{a}_{p})(3)where 𝐚ressubscript𝐚𝑟𝑒𝑠\mathbf{a}_{res} is the final speaker embedding for the responding speaker aressubscript𝑎𝑟𝑒𝑠a_{res}, 𝐚psubscript𝐚𝑝\mathbf{a}_{p} is the final speaker embedding for the candidate addressee apsubscript𝑎𝑝a_{p},σ𝜎\sigma is the logistic sigmoid function, [;][\,;\,] is the row-wise concatenation operator, and 𝐖a∈ℝ2ds×dssubscript𝐖𝑎superscriptℝ2subscript𝑑𝑠subscript𝑑𝑠\mathbf{W}_{a}\in\mathbb{R}^{2d_{s}\times d_{s}} is a learnable parameter.Similarly, for response selection,ℙ(rq|𝒞)=σ([𝐚res;𝐡𝒞]⊤𝐖r𝐫q)ℙconditionalsubscript𝑟𝑞𝒞𝜎superscriptsubscript𝐚𝑟𝑒𝑠subscript𝐡𝒞topsubscript𝐖𝑟subscript𝐫𝑞\mathbb{P}(r_{q}|\mathcal{C})=\sigma([\mathbf{a}_{res};\mathbf{h}_{\mathcal{C}}]^{\top}\mathbf{W}_{r}\mathbf{r}_{q})(4)where 𝐫q∈ℝdusubscript𝐫𝑞superscriptℝsubscript𝑑𝑢\mathbf{r}_{q}\in\mathbb{R}^{d_{u}} is the embedding for the candidate response rqsubscript𝑟𝑞r_{q}, and 𝐖r∈ℝ2ds×dusubscript𝐖𝑟superscriptℝ2subscript𝑑𝑠subscript𝑑𝑢\mathbf{W}_{r}\in\mathbb{R}^{2d_{s}\times d_{u}} is a learnable parameter.
|
| 28 |
+
|
| 29 |
+
The model is trained end-to-end to minimize a joint cross-entropy loss for the addressee selection and the response selection with equal weights.At test time, the addressee and the response are separately selected to maximize the probability in Eq 3 and Eq 4.
|
| 30 |
+
|
| 31 |
+
While Dynamic-RNN can track the speaker status by capturing who says what in multi-party conversation, there are still some issues.First, at each time step, only the sender embedding is updated from the utterance.Therefore, other speakers are blind to what is being said,and the model fails to capture addressee information.Second, while the addressee and response are mutually dependent, Dynamic-RNN selects them independently.Consider a case where the responding speaker is talking to two other speakers in separate conversation threads.The choice of addressee is likely to be either of the two speakers, but the choice is much less ambiguous if the correct response is given, and vice versa.Dynamic-RNN often produces inconsistent addressee-response pairs due to the separate selection.See Table 4 for examples.
|
| 32 |
+
|
| 33 |
+
In contrast to Dynamic-RNN, the dialog encoder in SI-RNN updates embeddings for all the speakers besides the sender at each time step.Speaker embeddings are updated depending on their roles: the update of the sender is different from the addressee, which is different from the observers.Furthermore, the update of a speaker embedding is not only from the utterance, but also from other speakers.These are achieved by designing variations of GRUs for different roles.Finally, SI-RNN selects the addressee and response jointly by maximizing the joint probability.
|
| 34 |
+
|
| 35 |
+
To encode an utterance u=(w1,w2,…,wN)𝑢subscript𝑤1subscript𝑤2…subscript𝑤𝑁u=(w_{1},w_{2},...,w_{N}) of N𝑁N words, we use a RNN with Gated Recurrent Units (?; ?):𝐡j=GRU(𝐡j−1,𝐱j)subscript𝐡𝑗GRUsubscript𝐡𝑗1subscript𝐱𝑗\mathbf{h}_{j}=\mathrm{GRU}(\mathbf{h}_{j-1},\mathbf{x}_{j})where 𝐱jsubscript𝐱𝑗\mathbf{x}_{j} is the word embedding for wjsubscript𝑤𝑗w_{j}, and 𝐡jsubscript𝐡𝑗\mathbf{h}_{j} is the GRUGRU\mathrm{GRU} hidden state.𝐡0subscript𝐡0\mathbf{h}_{0} is initialized as a zero vector, and the utterance embedding is the last hidden state, i.e. 𝐮=𝐡N𝐮subscript𝐡𝑁\mathbf{u}=\mathbf{h}_{N}.
|
| 36 |
+
|
| 37 |
+
Figure 1 (Right) shows how SI-RNN encodes the example in Eq 1.Unlike Dynamic-RNN, SI-RNN updates all speaker embeddings in a role-sensitive manner.For example, at the first time step when a2subscript𝑎2a_{2} says u(1)superscript𝑢1u^{(1)} to a1subscript𝑎1a_{1}, Dynamic-RNN only updates 𝐚2subscript𝐚2\mathbf{a}_{2} using 𝐮(1)superscript𝐮1\mathbf{u}^{(1)}, while other speakers are updated using 𝟎0\mathbf{0}.In contrast, SI-RNN updates each speaker status with different units: IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S} updates the sender embedding 𝐚2subscript𝐚2\mathbf{a}_{2} from the utterance embedding 𝐮(1)superscript𝐮1\mathbf{u}^{(1)} and the addressee embedding 𝐚1subscript𝐚1\mathbf{a}_{1}; IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A} updates the addressee embedding 𝐚1subscript𝐚1\mathbf{a}_{1} from 𝐮(1)superscript𝐮1\mathbf{u}^{(1)} and 𝐚2subscript𝐚2\mathbf{a}_{2}; GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} updates the observer embedding 𝐚3subscript𝐚3\mathbf{a}_{3} from 𝐮(1)superscript𝐮1\mathbf{u}^{(1)}.
|
| 38 |
+
|
| 39 |
+
Algorithm 1 gives a formal definition of the dialog encoder in SI-RNN.The dialog encoder is a function that takes as input a dialog context 𝒞𝒞\mathcal{C} (lines 1-5) and returns speaker embeddings at the final time step (lines 28-30).Speaker embeddings are initialized as dssubscript𝑑𝑠d_{s}-dimensional zero vectors (lines 6-9).Speaker embeddings are updated by iterating over each line in the context (lines 10-27).
|
| 40 |
+
|
| 41 |
+
In this subsection, we explain in detail how IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S}/IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A}/GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} update speaker embeddings according to their roles at each time step (Algorithm 1 lines 19-26).
|
| 42 |
+
|
| 43 |
+
As shown in Figure 2, IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S}/IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A}/GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} are all GRU-based units.IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S} updates the sender embedding from the previous sender embedding 𝐚sdr(t−1)superscriptsubscript𝐚𝑠𝑑𝑟𝑡1\mathbf{a}_{sdr}^{(t-1)}, the previous addressee embedding 𝐚adr(t−1)superscriptsubscript𝐚𝑎𝑑𝑟𝑡1\mathbf{a}_{adr}^{(t-1)}, and the utterance embedding 𝐮(t)superscript𝐮𝑡\mathbf{u}^{(t)}:𝐚sdr(t)←IGRUS(𝐚sdr(t−1),𝐚ad���r(t−1),𝐮(t))←superscriptsubscript𝐚𝑠𝑑𝑟𝑡superscriptIGRU𝑆superscriptsubscript𝐚𝑠𝑑𝑟𝑡1superscriptsubscript𝐚𝑎𝑑𝑟𝑡1superscript𝐮𝑡\mathbf{a}_{sdr}^{(t)}\leftarrow\mathrm{IGRU}^{S}(\mathbf{a}_{sdr}^{(t-1)},\mathbf{a}_{adr}^{(t-1)},\mathbf{u}^{(t)})The update, as illustrated in the upper part of Figure 2, is controlled by three gates.The 𝐫S(t)subscriptsuperscript𝐫𝑡𝑆\mathbf{r}^{(t)}_{S} gate controls the previous sender embedding 𝐚sdr(t−1)superscriptsubscript𝐚𝑠𝑑𝑟𝑡1\mathbf{a}_{sdr}^{(t-1)}, and 𝐩S(t)subscriptsuperscript𝐩𝑡𝑆\mathbf{p}^{(t)}_{S} controls the previous addressee embedding 𝐚adr(t−1)superscriptsubscript𝐚𝑎𝑑𝑟𝑡1\mathbf{a}_{adr}^{(t-1)}.Those two gated interactions together produce the sender embedding proposal 𝐚~sdr(t)superscriptsubscript~𝐚𝑠𝑑𝑟𝑡\mathbf{\widetilde{a}}_{sdr}^{(t)}.Finally, the update gate 𝐳S(t)subscriptsuperscript𝐳𝑡𝑆\mathbf{z}^{(t)}_{S} combines the proposal 𝐚~sdr(t)superscriptsubscript~𝐚𝑠𝑑𝑟𝑡\mathbf{\widetilde{a}}_{sdr}^{(t)} and the previous sender embedding 𝐚sdr(t−1)superscriptsubscript𝐚𝑠𝑑𝑟𝑡1\mathbf{a}_{sdr}^{(t-1)} to update the sender embedding 𝐚sdr(t)superscriptsubscript𝐚𝑠𝑑𝑟𝑡\mathbf{a}_{sdr}^{(t)}.The computations in IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S} (including gates 𝐫S(t)subscriptsuperscript𝐫𝑡𝑆\mathbf{r}^{(t)}_{S}, 𝐩S(t)subscriptsuperscript𝐩𝑡𝑆\mathbf{p}^{(t)}_{S}, 𝐳S(t)subscriptsuperscript𝐳𝑡𝑆\mathbf{z}^{(t)}_{S}, the proposal embedding 𝐚~sdr(t)superscriptsubscript~𝐚𝑠𝑑𝑟𝑡\mathbf{\widetilde{a}}_{sdr}^{(t)}, and the final updated embedding 𝐚sdr(t)superscriptsubscript𝐚𝑠𝑑𝑟𝑡\mathbf{a}_{sdr}^{(t)}) are formulated as:𝐫S(t)=σ(𝐖Sr𝐮(t)+𝐔Sr𝐚sdr(t−1)+𝐕Sr𝐚adr(t−1))𝐩S(t)=σ(𝐖Sp𝐮(t)+𝐔Sp𝐚sdr(t−1)+𝐕Sp𝐚adr(t−1))𝐳S(t)=σ(𝐖Sz𝐮(t)+𝐔Sz𝐚sdr(t−1)+𝐕Sz𝐚adr(t−1))𝐚~sdr(t)=tanh(𝐖S𝐮(t)+𝐔S(𝐫S(t)⊙𝐚sdr(t−1))+𝐕S(𝐩S(t)⊙𝐚adr(t−1)))𝐚sdr(t)=𝐳S(t)⊙𝐚sdr(t−1)+(1−𝐳S(t))⊙𝐚~sdr(t)subscriptsuperscript𝐫𝑡𝑆𝜎superscriptsubscript𝐖𝑆𝑟superscript𝐮𝑡superscriptsubscript𝐔𝑆𝑟superscriptsubscript𝐚𝑠𝑑𝑟𝑡1superscriptsubscript𝐕𝑆𝑟superscriptsubscript𝐚𝑎𝑑𝑟𝑡1subscriptsuperscript𝐩𝑡𝑆𝜎superscriptsubscript𝐖𝑆𝑝superscript𝐮𝑡superscriptsubscript𝐔𝑆𝑝superscriptsubscript𝐚𝑠𝑑𝑟𝑡1superscriptsubscript𝐕𝑆𝑝superscriptsubscript𝐚𝑎𝑑𝑟𝑡1subscriptsuperscript𝐳𝑡𝑆𝜎superscriptsubscript𝐖𝑆𝑧superscript𝐮𝑡superscriptsubscript𝐔𝑆𝑧superscriptsubscript𝐚𝑠𝑑𝑟𝑡1superscriptsubscript𝐕𝑆𝑧superscriptsubscript𝐚𝑎𝑑𝑟𝑡1superscriptsubscript~𝐚𝑠𝑑𝑟𝑡subscript𝐖𝑆superscript𝐮𝑡subscript𝐔𝑆direct-productsubscriptsuperscript𝐫𝑡𝑆superscriptsubscript𝐚𝑠𝑑𝑟𝑡1subscript𝐕𝑆direct-productsubscriptsuperscript𝐩𝑡𝑆superscriptsubscript𝐚𝑎𝑑𝑟𝑡1superscriptsubscript𝐚𝑠𝑑𝑟𝑡direct-productsubscriptsuperscript𝐳𝑡𝑆superscriptsubscript𝐚𝑠𝑑𝑟𝑡1direct-product1subscriptsuperscript𝐳𝑡𝑆superscriptsubscript~𝐚𝑠𝑑𝑟𝑡\displaystyle\begin{split}\mathbf{r}^{(t)}_{S}=&\sigma(\mathbf{W}_{S}^{r}\mathbf{u}^{(t)}+\mathbf{U}_{S}^{r}\mathbf{a}_{sdr}^{(t-1)}+\mathbf{V}_{S}^{r}\mathbf{a}_{adr}^{(t-1)})\\\mathbf{p}^{(t)}_{S}=&\sigma(\mathbf{W}_{S}^{p}\mathbf{u}^{(t)}+\mathbf{U}_{S}^{p}\mathbf{a}_{sdr}^{(t-1)}+\mathbf{V}_{S}^{p}\mathbf{a}_{adr}^{(t-1)})\\\mathbf{z}^{(t)}_{S}=&\sigma(\mathbf{W}_{S}^{z}\mathbf{u}^{(t)}+\mathbf{U}_{S}^{z}\mathbf{a}_{sdr}^{(t-1)}+\mathbf{V}_{S}^{z}\mathbf{a}_{adr}^{(t-1)})\\\mathbf{\widetilde{a}}_{sdr}^{(t)}=&\tanh(\mathbf{W}_{S}\mathbf{u}^{(t)}+\mathbf{U}_{S}(\mathbf{r}^{(t)}_{S}\odot\mathbf{a}_{sdr}^{(t-1)})\\&\qquad+\mathbf{V}_{S}(\mathbf{p}^{(t)}_{S}\odot\mathbf{a}_{adr}^{(t-1)}))\\\mathbf{a}_{sdr}^{(t)}&=\mathbf{z}^{(t)}_{S}\odot\mathbf{a}_{sdr}^{(t-1)}+(1-\mathbf{z}^{(t)}_{S})\odot\mathbf{\widetilde{a}}_{sdr}^{(t)}\\\end{split}where {𝐖Sr,𝐖Sp,𝐖Sz,𝐔Sr,𝐔Sp,𝐔Sz,𝐕Sr,𝐕Sp,𝐕Sz,𝐖S,\{\mathbf{W}_{S}^{r},\mathbf{W}_{S}^{p},\mathbf{W}_{S}^{z},\mathbf{U}_{S}^{r},\mathbf{U}_{S}^{p},\mathbf{U}_{S}^{z},\mathbf{V}_{S}^{r},\mathbf{V}_{S}^{p},\mathbf{V}_{S}^{z},\mathbf{W}_{S},𝐔S,𝐕S}\mathbf{U}_{S},\mathbf{V}_{S}\} are learnable parameters.IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A} uses the same formulation with a different set of parameters, as illustrated in the middle of Figure 2.In addition, we update the observer embeddings from the utterance.GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} is implemented as the traditional GRU unit in the lower part of Figure 2.Note that the parameters in IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S}/IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A}/GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} are not shared.This allows SI-RNN to learn role-dependent features to control speaker embedding updates.The formulations of IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A} and GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O} are similar.
|
| 44 |
+
|
| 45 |
+
The dialog encoder takes the dialog context 𝒞𝒞\mathcal{C} as input and returns speaker embeddings at the final time step, 𝐚i(T)superscriptsubscript𝐚𝑖𝑇\mathbf{a}_{i}^{(T)}.Recall from Section 3.2 that Dynamic-RNN produces the context embedding 𝐡𝒞subscript𝐡𝒞\mathbf{h}_{\mathcal{C}} using Eq 2 and then selects the addressee and response separately using Eq 3 and Eq 4.
|
| 46 |
+
|
| 47 |
+
In contrast, SI-RNN performs addressee and response selection jointly: the response is dependent on the addressee and vice versa.Therefore, we view the task as a sequence prediction process:given the context and responding speaker, we first predict the addressee, and then predict the response given the addressee.(We also use the reversed prediction order as in Eq 7.)
|
| 48 |
+
|
| 49 |
+
In addition to Eq 3 and Eq 4, SI-RNN is also trained to model the conditional probability as follows.To predict the addressee, we calculate the probability of the candidate speaker apsubscript𝑎𝑝a_{p} to be the ground-truth given the ground-truth response r𝑟r (available during training time):ℙ(ap|𝒞,r)=σ([𝐚res;𝐡𝒞;𝐫]⊤𝐖ar𝐚p)ℙconditionalsubscript𝑎𝑝𝒞𝑟𝜎superscriptsubscript𝐚𝑟𝑒𝑠subscript𝐡𝒞𝐫topsubscript𝐖𝑎𝑟subscript𝐚𝑝\mathbb{P}(a_{p}|\mathcal{C},r)=\sigma([\mathbf{a}_{res};\mathbf{h}_{\mathcal{C}};\mathbf{r}]^{\top}\mathbf{W}_{ar}\mathbf{a}_{p})(5)The key difference from Eq 3 is that Eq 5 is conditioned on the correct response r𝑟r with embedding 𝐫𝐫\mathbf{r}.Similarly, for response selection, we calculate the probability of a candidate response rqsubscript𝑟𝑞r_{q} given the ground-truth addressee aadrsubscript𝑎𝑎𝑑𝑟a_{adr}:ℙ(rq|𝒞,aadr)=σ([𝐚res;𝐡𝒞;𝐚adr]⊤𝐖ra𝐫q)ℙconditionalsubscript𝑟𝑞𝒞subscript𝑎𝑎𝑑𝑟𝜎superscriptsubscript𝐚𝑟𝑒𝑠subscript𝐡𝒞subscript𝐚𝑎𝑑𝑟topsubscript𝐖𝑟𝑎subscript𝐫𝑞\mathbb{P}(r_{q}|\mathcal{C},a_{adr})=\sigma([\mathbf{a}_{res};\mathbf{h}_{\mathcal{C}};\mathbf{a}_{adr}]^{\top}\mathbf{W}_{ra}\mathbf{r}_{q})(6)
|
| 50 |
+
|
| 51 |
+
At test time, SI-RNN selects the addressee-response pair from 𝒜(𝒞)×ℛ𝒜𝒞ℛ\mathcal{A(C)}\times\mathcal{R} to maximize the joint probability ℙ(rq,ap|𝒞)ℙsubscript𝑟𝑞conditionalsubscript𝑎𝑝𝒞\mathbb{P}(r_{q},a_{p}|\mathcal{C}):a^,r^=argmaxap,rq∈𝒜(𝒞)×ℛℙ(rq,ap|𝒞)=argmaxap,rq∈𝒜(𝒞)×ℛℙ(rq|𝒞)⋅ℙ(ap|𝒞,rq)+ℙ(ap|𝒞)⋅ℙ(rq|𝒞,ap)^𝑎^𝑟subscriptargmaxsubscript𝑎𝑝subscript𝑟𝑞𝒜𝒞ℛℙsubscript𝑟𝑞conditionalsubscript𝑎𝑝𝒞⋅subscriptargmaxsubscript𝑎𝑝subscript𝑟𝑞𝒜𝒞ℛℙconditionalsubscript𝑟𝑞𝒞ℙconditionalsubscript𝑎𝑝𝒞subscript𝑟𝑞⋅ℙconditionalsubscript𝑎𝑝𝒞ℙconditionalsubscript𝑟𝑞𝒞subscript𝑎𝑝\displaystyle\begin{split}\hat{a},\hat{r}=\operatorname*{arg\,max}_{a_{p},r_{q}\in\mathcal{A(C)}\times\mathcal{R}}&\mathbb{P}(r_{q},a_{p}|\mathcal{C})\\=\operatorname*{arg\,max}_{a_{p},r_{q}\in\mathcal{A(C)}\times\mathcal{R}}&\mathbb{P}(r_{q}|\mathcal{C})\cdot\mathbb{P}(a_{p}|\mathcal{C},r_{q})\\&+\mathbb{P}(a_{p}|\mathcal{C})\cdot\mathbb{P}(r_{q}|\mathcal{C},a_{p})\end{split}(7)In Eq 7, we decompose the joint probability into two terms: the first term selects the response given the context, and then selects the addressee given the context and the selected response; the second term selects the addressee and response in the reversed order.222Detail: We also considered an alternative decomposition of the joint probability as logℙ(rq,ap|𝒞)=12[logℙ(rq|𝒞)+logℙ(ap|𝒞,rq)+logℙ(ap|𝒞)+logℙ(rq|𝒞,ap)]ℙsubscript𝑟𝑞conditionalsubscript𝑎𝑝𝒞12delimited-[]ℙconditionalsubscript𝑟𝑞𝒞ℙconditionalsubscript𝑎𝑝𝒞subscript𝑟𝑞ℙconditionalsubscript𝑎𝑝𝒞ℙconditionalsubscript𝑟𝑞𝒞subscript𝑎𝑝\log\mathbb{P}(r_{q},a_{p}|\mathcal{C})=\frac{1}{2}[\log\mathbb{P}(r_{q}|\mathcal{C})+\log\mathbb{P}(a_{p}|\mathcal{C},r_{q})+\log\mathbb{P}(a_{p}|\mathcal{C})+\log\mathbb{P}(r_{q}|\mathcal{C},a_{p})], but the performance was similar to Eq 7.
|
| 52 |
+
|
| 53 |
+
Data Set.We use the Ubuntu Multiparty Conversation Corpus (?) and summarize the data statistics in Table 3.The whole data set (including the Train/Dev/Test split and the false response candidates) is publicly available.333https://github.com/hiroki13/response-ranking/tree/master/data/inputThe data set is built from the Ubuntu IRC chat room where a number of users discuss Ubuntu-related technical issues.The log is organized as one file per day corresponding to a document 𝒟𝒟\mathcal{D}.Each document consists of (Time, SenderID, Utterance) lines.If users explicitly mention addressees at the beginning of the utterance, the addresseeID is extracted.Then a sample, namely a unit of input (the dialog context and the current sender) and output (the addressee and response prediction) for the task, is created to predict the ground-truth addressee and response of this line.Note that samples are created only when the addressee is explicitly mentioned for clear, unambiguous ground-truth labels.False response candidates are randomly chosen from all other utterances within the same document.Therefore, distractors are likely from the same sub-conversation or even from the same sender but at different time steps.This makes it harder than ? (?) where distractors are randomly chosen from all documents.If no addressee is explicitly mentioned, the addressee is left blank and the line is marked as a part of the context.Baselines.Apart from Dynamic-RNN, we also include several other baselines.Recent+TF-IDF always selects the most recent speaker (except the responding speaker aressubscript𝑎𝑟𝑒𝑠a_{res}) as the addressee and chooses the response to maximize the tf-idf cosine similarity with the context.We improve it by using a slightly different addressee selection heuristic (Direct-Recent+TF-IDF): select the most recent speaker that directly talks to aressubscript𝑎𝑟𝑒𝑠a_{res} by an explicit addressee mention.We select from the previous 15 utterances, which is the longest context among all the experiments.This works much better when there are multiple concurrent sub-conversations, and aressubscript𝑎𝑟𝑒𝑠a_{res} responds to a distant message in the context.We also include another GRU-based model Static-RNN from ? (?).Unlike Dynamic-RNN, speaker embeddings in Static-RNN are based on the order of speakers and are fixed.Furthermore, inspired by ? (?) and ? (?), we implement Static-Hier-RNN, a hierarchical version of Static-RNN.It first builds utterance embeddings from words and then uses high-level RNNs to process utterance embeddings.Implementation DetailsFor a fair comparison, we follow the hyperparameters from ? (?), which are chosen based on the validation data set.We take a maximum of 20 words for each utterance.We use 300-dimensional GloVe word vectors444http://nlp.stanford.edu/projects/glove/, which are fixed during training.SI-RNN uses 50-dimensional vectors for both speaker embeddings and hidden states.Model parameters are initialized with a uniform distribution between -0.01 and 0.01.We set the mini-batch size to 128.The joint cross-entropy loss function with 0.001 L2 weight decay is minimized by Adam (?).The training is stopped early if the validation accuracy is not improved for 5 consecutive epochs.All experiments are performed on a single GTX Titan X GPU.The maximum number of epochs is 30, and most models converge within 10 epochs.
|
| 54 |
+
|
| 55 |
+
For fair and meaningful quantitative comparisons, we follow ? (?)’s evaluation protocols.SI-RNN improves the overall accuracy on the addressee and response selection task.Two ablation experiments further analyze the contribution of role-sensitive units and joint selection respectively.We then confirm the robustness of SI-RNN with the number of speakers and distant responses.Finally, in a case study we discuss how SI-RNN handles complex conversations by either engaging in a new sub-conversation or responding to a distant message.Overall Result.As shown in Table 2, SI-RNN significantly improves upon the previous state-of-the-art.In particular, addressee selection (ADR) benefits most, with different number of candidate responses (denoted as RES-CAND): around 12% inRES-CAND =2absent2=2 and more than 10% in RES-CAND =10absent10=10.Response selection (RES) is also improved, suggesting role-sensitive GRUs and joint selection are helpful for response selection as well.The improvement is more obvious with more candidate responses (2% in RES-CAND =2absent2=2 and 4% in RES-CAND =10absent10=10).These together result in significantly better accuracy on the ADR-RES metric as well.Ablation Study.We show an ablation study in the last rows of Table 2.First, we share the parameters of IGRUSsuperscriptIGRU𝑆\mathrm{IGRU}^{S}/IGRUAsuperscriptIGRU𝐴\mathrm{IGRU}^{A}/GRUOsuperscriptGRU𝑂\mathrm{GRU}^{O}.The accuracy decreases significantly, indicating that it is crucial to learn role-sensitive units to update speaker embeddings.Second, to examine our joint selection, we fall back to selecting the addressee and response separately, as in Dynamic-RNN.We find that joint selection improves ADR and RES individually, and it is particularly helpful for pair selection ADR-RES.
|
| 56 |
+
|
| 57 |
+
Number of Speakers.Numerous speakers create complex dialogs and increased candidate addressee, thus the task becomes more challenging.In Figure 3 (Upper), we investigate how ADR accuracy changes with the number of speakers in the context of length 15, corresponding to the rows with T=15 in Table 2.Recent+TF-IDF always chooses the most recent speaker and the accuracy drops dramatically as the number of speakers increases.Direct-Recent+TF-IDF shows better performance, and Dynamic-RNNis marginally better.SI-RNN is much more robust and remains above 70% accuracy across all bins.The advantage is more obvious for bins with more speakers.Addressing Distance.Addressing distance is the time difference from the responding speaker to the ground-truth addressee.As the histogram in Figure 3 (Lower) shows, while the majority of responses target the most recent speaker, many responses go back five or more time steps.It is important to note that for those distant responses, Dynamic-RNN sees a clear performance decrease, even worse than Direct-Recent+TF-IDF.In contrast, SI-RNN handles distant responses much more accurately.
|
| 58 |
+
|
| 59 |
+
Case Study.Examples in Table 4 show how SI-RNN can handle complex multi-party conversations by selecting from 10 candidate responses.In both examples, the responding speakers participate in two or more concurrent sub-conversations with other speakers.
|
| 60 |
+
|
| 61 |
+
Example (a) demonstrates the ability of SI-RNN to engage in a new sub-conversation.The responding speaker “wafflejock” is originally involved in two sub-conversations: the sub-conversation 1 with “codepython”, and the ubuntu installation issue with “theoletom”.While it is reasonable to address “codepython” and “theoletom”, the responses from other baselines are not helpful to solve corresponding issues.TF-IDF prefers the response with the “install” key-word, yet the response is repetitive and not helpful.Dynamic-RNN selects an irrelevant response to “codepython”.SI-RNN chooses to engage in a new sub-conversation by suggesting a solution to “releaf” about Ubuntu dedicated laptops.
|
| 62 |
+
|
| 63 |
+
Example (b) shows the advantage of SI-RNN in responding to a distant message.The responding speaker “nicomachus” is actively engaged with “VeryBewitching” in the sub-conversation 1 and is also loosely involved in the sub-conversation 2: “chingao” mentions “nicomachus” in the most recent utterance.SI-RNN remembers the distant sub-conversation 1 and responds to “VeryBewitching” with a detailed answer.Direct-Recent+TF-IDF selects the ground-truth addressee because “VeryBewitching” talks to “nicomachus”, but the response is not helpful.Dynamic-RNN is biased to the recent speaker “chingao”, yet the response is not relevant.
|
| 64 |
+
|
| 65 |
+
SI-RNN jointly models who says what to whom by updating speaker embeddings in a role-sensitive way.It provides state-of-the-art addressee and response selection, which can instantly help retrieval-based dialog systems.In the future, we also consider using SI-RNN to extract sub-conversations in the unlabeled conversation corpus and provide a large-scale disentangled multi-party conversation data set.
|
| 66 |
+
|
| 67 |
+
We thank the members of the UMichigan-IBM Sapphire Project and all the reviewers for their helpful feedback.This material is based in part upon work supported by IBM under contract 4915012629.Any opinions, findings, conclusions or recommendations expressed above are those of the authors and do not necessarily reflect the views of IBM.
|
1709.04071v5.txt
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Question answering (QA) has been a long-standing research problem in Machine Learning and Artificial Intelligence. Thanks to the creation of large-scale knowledge graphs such as DBPedia [1] and Freebase [2], QA systems can be armed with well-structured knowledge on specific and open domains. Many traditional approaches for KG-powered QA are based on semantic parsers [3, 4, 5, 6], which first map a question to formal meaning representation (e.g. logical form) and then translate it to a KG query. The answer to the question can be retrieved by executing the query. One of the disadvantages of these approaches is that the model is not trained end-to-end and errors may be cascaded.
|
| 2 |
+
|
| 3 |
+
With the recent success of deep learning, some end-to-end solutions based on neural networks have been proposed and show very promising performance on benchmark datasets, such as Memory Networks [7], Key-Value Memory Networks [8] and Gated Graph Sequence Neural Networks [9]. However, these neural approaches treat the KG as a flattened big table of itemized knowledge records, making it hard to exploit the structure information in the graph and thus weak on logic reasoning. When the answer is not a direct neighbor of the topic entity in question (i.e. there are multiple hops between question and answer entities in the KG), which requires logic reasoning over the KG, the neural approaches usually perform poorly. For instance, it is easy to handle single-hop questions like “Who wrote the paper titled …?” by querying itemized knowledge records in triples (paper_title, authored_by, author_name). However, logic reasoning on the KG is required for multi-hop questions such as “Who have co-authored papers with …?”. With the KG, we start from the mentioned author, and follow author→authoredpaper→authored_byauthor𝑎𝑢𝑡ℎ𝑜𝑟𝑒𝑑→𝑎𝑢𝑡ℎ𝑜𝑟𝑝𝑎𝑝𝑒𝑟𝑎𝑢𝑡ℎ𝑜𝑟𝑒𝑑_𝑏𝑦→𝑎𝑢𝑡ℎ𝑜𝑟author\xrightarrow{authored}paper\xrightarrow{authored\_by}author to find answers. A common remedy is the so-called knowledge graph completion: create new relations for non-neighbor entity pairs in the KG [10, 11, 12]. However, multi-hop reasoning is combinatorial in nature, i.e. the number of multi-hop relations grow explosively with the increase of hops. For example, if we create new relation types like friend-of-friend and friend-of-friend-of-friend, the number of edges in the KG will explode, which is intractable for both storage and computation.
|
| 4 |
+
|
| 5 |
+
Another key challenge is how to locate topic entities in the KG. Most existing works assume that the topic entity in question can be located by simple string matching [8, 13, 9, 5], which is often not true. When people ask questions, either in text or speech, various noise can be introduced in the expressions. For example, people are likely to make typos or name ambiguity in question. In even harder case, audio questions, people may pronounce the same entity differently in different questions, even for the same person. Due to these noises, it is hard to do exact matching to locate topic entities. For text questions, broad matching techniques (e.g. hand-craft rules, regular expressions, edit distance, etc.) are widely used for entity recognition [14]. However, they require domain experts and lots of human effort. For speech questions, it is even harder to match topic entities directly. Most existing QA systems first do speech recognition, converting the audio to text, and then match entities in text. Unfortunately, the error rate is typically high for speech recognition system to recognize entities in voice, such as human names or street addresses. Since it is not end-to-end, the error of the speech recognition system may cascade to affect the downstream QA system.
|
| 6 |
+
|
| 7 |
+
Typically, the training data for QA system is provided as question-answer pairs, where fine-grained annotation of these pairs are not available, or only available for a few. More specifically, there are very few explicit annotations of the exact entity present in the question, the type of the questions, and the exact logic reasoning steps along the knowledge graph leading to the answer. Thus it is challenging to simultaneously learn to locate the topic KG entity in the question, and figure out the unknown reasoning steps pointing to the answer based on training question-answer pairs alone.
|
| 8 |
+
|
| 9 |
+
To address the challenges mentioned above, we propose an end-to-end learning framework for question answering with knowledge graph named variational reasoning network (VRN), which have the following new features:•We build a probabilistic modeling framework for end-to-end QA system, which can simultaneously handle uncertain topic entity and multi-hop reasoning.•We propose a novel propagation-like deep learning architecture over the knowledge graph to perform logic inference in the probabilistic model.•We apply the REINFORCE algorithm with variance reduction technique to make the system end-to-end trainable.•We derive a series of new challenging benchmark datasets MetaQA111Our new benchmark dataset collections MetaQA are publicly available at https://goo.gl/f3AmcY. (MoviE Text Audio QA) intended for research on question-answering systems. These datasets contain over 400K questions for both single- and multi-hop reasoning. To test QA systems in more realistic (and more difficult) scenarios, MetaQA also provides neural-translation-model-paraphrased datasets, and text-to-speech-based audio datasets.
|
| 10 |
+
|
| 11 |
+
Extensive experiments show that our method achieves state-of-the-art performance on both single- and multi-hop datasets, demonstrating the capability of multi-hop reasoning. Moreover, we obtain promising results on the challenging audio QA datasets, showing the effectiveness of end-to-end learning framework. With the rise of virtual assistant tools (e.g. Alexa, Cortana, Google Assistant and Siri), QA systems are now even closer to our daily life. This paper is one step towards more realistic QA systems, which can handle noisy question input in both text and speech, and learn from examples to reason over the knowledge graph.
|
| 12 |
+
|
| 13 |
+
QA with semantic parser:Most traditional approaches for KG-powered QA are based on semantic parsers, which map the question to a certain meaning representation or logical form [3, 4, 15, 5, 6, 16, 17], or directly map the question to an executable program [18]. These approaches require domain-specific grammars, rules, or fine-grained annotations. Also, they are not designed to handle noisy questions, and do not support end-to-end training since they use separate stages for question parsing and logic reasoning.
|
| 14 |
+
|
| 15 |
+
Neural approaches for QA: The family of memory networks achieves state-of-the-art performance in various kinds of QA tasks. Some of them are able to do reasoning within local context [19, 20] using attention mechanism [21]. For QA with KG, Miller et al. [8] achieves state-of-the-art performance, outperforming previous works [22, 7] on benchmark datasets. Recent work [23] uses neural programmer model for QA with single knowledge table. However, the multi-hop reasoning capability of these approaches depends on recurrent attentions and there is no explicit traversal over the KG.
|
| 16 |
+
|
| 17 |
+
Graph embedding: Recently, researchers have built deep architectures to embed structured data, such as trees [24, 25, 26] or graphs [27, 28, 29]. Also some works [9, 30] extend it to sequential case like multi-step reasoning. However, these approaches only work on small instances like sentences or molecules. Instead, our work embeds the reasoning-graph from source entity to every target entity in large-scale knowledge graph.
|
| 18 |
+
|
| 19 |
+
Multi-hop reasoning: There are some other works on knowledge graph completion with traversal, which requires path sampling [12, 31] or dynamic programming [32]. Our work can handle QA with natural language or human speech, and the reasoning-graph embeddings can represent complicated reasoning rules.
|
| 20 |
+
|
| 21 |
+
In summary, most of the existing approaches have separate stages for entity locating, such as keyword matching, frequency-based method, and domain-specific methods [33]. Since they are not jointly trained with the reasoning part, the errors in entity locating (e.g. incorrectly recognized name entity from speech recognition system) will be cascaded to the downstream QA system.
|
| 22 |
+
|
| 23 |
+
Knowledge base/graph (KG): A knowledge graph is a directed graph where the entities and their relations are represented by nodes and edges, respectively, i.e. 𝒢=(V(𝒢),E(𝒢))𝒢𝑉𝒢𝐸𝒢\mathcal{G}=(V(\mathcal{G}),E(\mathcal{G})). Furthermore, each edge from E(𝒢)𝐸𝒢E(\mathcal{G}) is a triplet (ai1,ri,ai2)superscriptsubscript𝑎𝑖1subscript𝑟𝑖superscriptsubscript𝑎𝑖2(a_{i}^{1},r_{i},a_{i}^{2}), representing a directed relation risubscript𝑟𝑖r_{i} between subject entity ai1superscriptsubscript𝑎𝑖1a_{i}^{1} and object entity ai2superscriptsubscript𝑎𝑖2a_{i}^{2} both from the node set V(𝒢)𝑉𝒢V(\mathcal{G}). Each entity in the knowledge graph can also contain additional information such as type and text description. For instance, entity ai1superscriptsubscript𝑎𝑖1a_{i}^{1} is described as actor Jennifer Lawrence, and entity ai2superscriptsubscript𝑎𝑖2a_{i}^{2} is movie Passengers. Then a relation in the knowledge graph can be (Jennifer Lawrence, acted_in, Passengers), where the corresponding risubscript𝑟𝑖r_{i} is acted_in. In this work, we assume that the knowledge graph is given.
|
| 24 |
+
|
| 25 |
+
Question answering with KG:Given a question q𝑞q, the algorithm is asked to output an entity in the knowledge graph which properly answers the question. For example, q𝑞q can be a question like “who acted in the movie Passengers?”, and one possible answer is Jennifer Lawrence, which is an entity in the KG. In a more challenging setting, q𝑞q can even be an audio segment reading the same question. The training set Dtrain={(qi,ai)}i=1Nsubscript𝐷𝑡𝑟𝑎𝑖𝑛superscriptsubscriptsubscript𝑞��subscript𝑎𝑖𝑖1𝑁D_{train}=\{(q_{i},a_{i})\}_{i=1}^{N} contains N𝑁N pairs of question and answers.Note that fine-grained annotation is not present, such as the exact entity present in the question, question type, or the exact logic reasoning steps along the knowledge graph leading to the answer. Thus, a QA system with KG should be able to handle noisy entity in questions and learn multi-hop reasoning directly from question-answer pairs.
|
| 26 |
+
|
| 27 |
+
To address both key challenges in a unified probabilistic framework, we propose the variational reasoning network (VRN). The overall architecture is shown in Fig 1. VRN consists of two probabilistic modules, as described below.
|
| 28 |
+
|
| 29 |
+
Module for topic entity recognition: Recognizing the topic entity y𝑦y (or the entity mentioned in the question) is the first step in performing logic reasoning over the knowledge graph222In this paper, we consider the case with single topic entity in each question.. For example, the topic entity mentioned in Sec 3.1 is the movie Passenger. We denote the topic entity as y𝑦y, and model the compatibility of this entity with the question qisubscript𝑞𝑖q_{i} as a probabilistic model Pθ1(y|qi)subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖P_{\theta_{1}}(y|q_{i}), which shows the probability of the KG entity y𝑦y being mentioned in the question qisubscript𝑞𝑖q_{i}. Depending on the question form (text or audio), the parameterization of Pθ1(y|qi)subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖P_{\theta_{1}}(y|q_{i}) may be different and details can be found in Sec 3.3.
|
| 30 |
+
|
| 31 |
+
Module for logic reasoning over knowledge graph: Given the topic entity y𝑦y in question qisubscript𝑞𝑖q_{i}, one need to reason over the knowledge graph to find out the answer aisubscript𝑎𝑖a_{i}. As described in Sec 3.1, the algorithm should learn to use the reasoning rule (y,acted_by,ai)𝑦acted_bysubscript𝑎𝑖(y,\textit{acted\_by},a_{i}) for that question. Since there is no annotations for such reasoning step, the QA system has to learn it only from question-answer pairs. Thus we model the likelihood of an answer aisubscript𝑎𝑖a_{i} being correct given entity y𝑦y and question qisubscript𝑞𝑖q_{i} as Pθ2(ai|y,qi)subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖P_{\theta_{2}}(a_{i}|y,q_{i}). The parameterization of Pθ2(ai|y,qi)subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖P_{\theta_{2}}(a_{i}|y,q_{i}) need to capture traversal or reasoning over knowledge graph, which is explained in detail in Sec 3.4.
|
| 32 |
+
|
| 33 |
+
Since the topic entity in question is not annotated, it is natural to formulate the problem by treating the topic entity y𝑦y as a latent variable. With the two probabilistic components above, we model the probability of answer aisubscript𝑎𝑖a_{i} being correct given question qisubscript𝑞𝑖q_{i} as ∑y∈V(𝒢)Pθ1(y|qi)Pθ2(ai|y,qi)subscript𝑦𝑉𝒢subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖\sum_{y\in V(\mathcal{G})}P_{\theta_{1}}(y|q_{i})P_{\theta_{2}}(a_{i}|y,q_{i}), which sums out all possibilities of the latent variable. Given a training set Dtrainsubscript𝐷𝑡𝑟𝑎𝑖𝑛D_{train} of N𝑁N question-answer pairs, the set of parameters θ1subscript𝜃1\theta_{1} and θ2subscript𝜃2\theta_{2} can be estimated by maximizing the log-likelihood of this latent variable model:maxθ1,θ21N∑i=1Nlog(∑y∈V(𝒢)Pθ1(y|qi)Pθ2(ai|y,qi)).subscriptsubscript𝜃1subscript𝜃21𝑁superscriptsubscript𝑖1𝑁subscript𝑦𝑉𝒢subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖\max_{\theta_{1},\theta_{2}}~{}~{}\frac{1}{N}\sum_{i=1}^{N}\log\left(\sum_{y\in V(\mathcal{G})}P_{\theta_{1}}(y|q_{i})P_{\theta_{2}}(a_{i}|y,q_{i})\right).(1)Next we will describe our parametrization of Pθ1(y|qi)subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖P_{\theta_{1}}(y|q_{i}) and Pθ2(ai|y,qi)subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖P_{\theta_{2}}(a_{i}|y,q_{i}), and the algorithms for learning and inference based on that.
|
| 34 |
+
|
| 35 |
+
Most existing QA approaches assume that topic entities are annotated, or can be simply found via string matching. However, for more realistic questions or even audio questions, a more general approach is to build a recognizer that can be trained jointly with the logic reasoning engine.
|
| 36 |
+
|
| 37 |
+
To handle unlabeled topic entities, we notice that the full context of the question can be helpful. For example, Michael could either be the name of a movie or an actor. It is hard to tell which one relates to the question by merely looking at this entity name. However, we should be able to resolve the unique entity by checking the surrounding words in the question. Similarly, in the knowledge graph there could be multiple entities with the same name, but the connected edges (relations) of the entity nodes are different, which helps to resolve the unique entity. For example, as a movie name, Michael may be connected with a directed_by edge pointing to an entity of director; while as an actor name, Michael may be connected with birthday and height edges.
|
| 38 |
+
|
| 39 |
+
Specifically, we use a neural network fent(⋅):q↦ℝd:subscript𝑓ent⋅maps-to𝑞superscriptℝ𝑑f_{\mathrm{ent}}(\cdot):q\mapsto\mathbb{R}^{d} which can represent the question q𝑞q in a d𝑑d dimensional vector. Depending on the question form (text or audio), this neural network can be a simple embedding network mapping bag-of-words to a vector, or a recurrent neural network to embed sentences, or a convolution neural network to embed audio questions. Thus the probability of having y𝑦y in q𝑞q isPθ1(y|q)subscript𝑃subscript𝜃1conditional𝑦𝑞\displaystyle P_{\theta_{1}}(y|q)=softmax(Wy⊤fent(q))absentsoftmaxsuperscriptsubscript𝑊𝑦topsubscript𝑓ent𝑞\displaystyle=\mathrm{softmax}\left(W_{y}^{\top}f_{\mathrm{ent}}(q)\right)(2)=exp(Wy⊤fent(q))∑y′∈V(𝒢)exp(Wy′⊤fent(q)),absentsuperscriptsubscript𝑊𝑦topsubscript𝑓ent𝑞subscriptsuperscript𝑦′𝑉𝒢superscriptsubscript𝑊superscript𝑦′topsubscript𝑓ent𝑞\displaystyle=\frac{\exp(W_{y}^{\top}f_{\mathrm{ent}}(q))}{\sum_{y^{\prime}\in V(\mathcal{G})}\exp(W_{y^{\prime}}^{\top}f_{\mathrm{ent}}(q))},(3)where Wy∈ℝd,∀y∈V(𝒢)formulae-sequencesubscript𝑊𝑦superscriptℝ𝑑for-all𝑦𝑉𝒢W_{y}\in\mathbb{R}^{d},\forall y\in V(\mathcal{G}) are the weights in the last classification layer. This parameterization avoids heuristic keyword matching for the entity as is done in previous work [8, 22], and makes the entity recognition process differentiable and end-to-end trainable.
|
| 40 |
+
|
| 41 |
+
Parameterizing the reasoning model Pθ2(a|y,q)subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞P_{\theta_{2}}(a|y,q) is challenging, since 1) the knowledge graph can be very large;2) the required logic reasoning is unknown and can be multi-step. In other words, retrieving the answer requires multi-step traversal over a gigantic graph. Thus in this paper, we propose a reasoning-graph embedding architecture, where all the inference rules and their complex combinations are represented as nonlinear embeddings in vector space and will be learned.
|
| 42 |
+
|
| 43 |
+
Scope of y𝑦y. More specifically, we assume the maximum number of steps (or hops), T𝑇T, of the logic reasoning is known to the algorithm. Starting from a topic entity y𝑦y, we perform topological sort (ignoring the original edge direction) for all entities within T𝑇T hops according to the knowledge graph. After that, we get an ordered list of entities a1,a2,…,amsubscript𝑎1subscript𝑎2…subscript𝑎𝑚a_{1},a_{2},\ldots,a_{m} and their relations from the knowledge graph. We call this subgraph 𝒢ysubscript𝒢𝑦\mathcal{G}_{y} with ordered nodes as the scope of y𝑦y. Fig 2 shows an example of a 2-hop scope, where entities are labeled with their topological distance to the source entity.
|
| 44 |
+
|
| 45 |
+
Reasoning graph to a𝑎a. Given a potential answer a𝑎a in the scope 𝒢ysubscript𝒢𝑦\mathcal{G}_{y}, we denote 𝒢y→asubscript𝒢→𝑦𝑎\mathcal{G}_{y\rightarrow a} to be the minimum subgraph that contains all the paths from y𝑦y to a𝑎a in 𝒢ysubscript𝒢𝑦\mathcal{G}_{y}. The actual logic reasoning leading to answer a𝑎a for question q𝑞q is unknown but hidden in the reasoning graph. Thus we will learn a vector representation (or embedding) for 𝒢y→asubscript𝒢→𝑦𝑎\mathcal{G}_{y\rightarrow a}, denoted as g(𝒢y→a)∈ℝd𝑔subscript𝒢→𝑦𝑎superscriptℝ𝑑g(\mathcal{G}_{y\rightarrow a})\in\mathbb{R}^{d}, for scoring the compatibility of the question type and the hidden path in the reasoning graph.
|
| 46 |
+
|
| 47 |
+
More specifically, suppose the question is embedded using a neural network fqt(⋅):q↦ℝd:subscript𝑓qt⋅maps-to𝑞superscriptℝ𝑑f_{\mathrm{qt}}(\cdot):q\mapsto\mathbb{R}^{d}, which captures the question type and implies the type of logic reasoning we need to perform over knowledge graph. Then the compatibility (or likelihood) of answer a𝑎a being correct can be computed using the embedded reasoning graph 𝒢y→asubscript𝒢→𝑦𝑎\mathcal{G}_{y\rightarrow a} and the scope 𝒢ysubscript𝒢𝑦\mathcal{G}_{y} asPθ2(a|y,q)subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞\displaystyle P_{\theta_{2}}(a|y,q)=softmax(fqt(q)⊤g(𝒢y→a))absentsoftmaxsubscript𝑓qtsuperscript𝑞top𝑔subscript𝒢→𝑦𝑎\displaystyle=\mathrm{softmax}\left(f_{\mathrm{qt}}(q)^{\top}g(\mathcal{G}_{y\rightarrow a})\right)(4)=exp(fqt(q)⊤g(𝒢y→a))∑a′∈V(𝒢y)exp(fqt(q)⊤g(Gy→a′)).absentsubscript𝑓qtsuperscript𝑞top𝑔subscript𝒢→𝑦𝑎subscriptsuperscript𝑎′𝑉subscript𝒢𝑦subscript𝑓qtsuperscript𝑞top𝑔subscript𝐺→𝑦superscript𝑎′\displaystyle=\frac{\exp(f_{\mathrm{qt}}(q)^{\top}g(\mathcal{G}_{y\rightarrow a}))}{\sum_{a^{\prime}\in V(\mathcal{G}_{y})}\exp(f_{\mathrm{qt}}(q)^{\top}g(G_{y\rightarrow a^{\prime}}))}.(5)We note that the normalization in the likelihood requires the embedding of the reasoning graphs for all entities a′superscript𝑎′a^{\prime} in the scope 𝒢ysubscript𝒢𝑦\mathcal{G}_{y}. This may involve thousands of or even more reasoning graphs depending on the KG and the number of hops. Computing these embeddings separately can be very computationally expensive. Instead, we develop a neural architecture which can compute these embeddings jointly and share intermediate computations.
|
| 48 |
+
|
| 49 |
+
Joint embedding reasoning graphs. More specifically, we propose a “forward graph embedding” architecture, which is analogous to forward filtering in Hidden Markov Model or Bayesian Network. The embedding of the reasoning graph for a𝑎a is computed recursively using its parents’ embeddings:g(𝒢y→a)=𝑔subscript𝒢→𝑦𝑎absent\displaystyle g(\mathcal{G}_{y\rightarrow a})=1#Parent(a)∑aj∈Parent(a),(aj,r,a)or(a,r,aj)∈𝒢y1#Parent𝑎subscriptformulae-sequencesubscript𝑎𝑗Parent𝑎subscript𝑎𝑗𝑟𝑎or𝑎𝑟subscript𝑎𝑗subscript𝒢𝑦\displaystyle\frac{1}{\#\text{Parent}(a)}\sum_{a_{j}\in\text{Parent}(a),(a_{j},r,a)~{}\text{or}~{}(a,r,a_{j})\in\mathcal{G}_{y}}(6)σ(V×[g(𝒢y→aj),e→r]),𝜎𝑉𝑔subscript𝒢→𝑦subscript𝑎𝑗subscript→𝑒𝑟\displaystyle\sigma(V\times[g(\mathcal{G}_{y\rightarrow a_{j}}),\vec{e}_{r}]),where e→rsubscript→𝑒𝑟\vec{e}_{r} is the one-hot encoding of relation type r∈ℛ𝑟ℛr\in\mathcal{R}, V∈ℝd×(d+|ℛ|)𝑉superscriptℝ𝑑𝑑ℛV\in\mathbb{R}^{d\times(d+|\mathcal{R}|)} are the model parameters, σ(⋅)𝜎⋅\sigma(\cdot) is a nonlinear function such as ReLU, and #Parent(a)#Parent𝑎\#\text{Parent}(a) counts the number of parents of a𝑎a in 𝒢ysubscript𝒢𝑦\mathcal{G}_{y}. The only boundary case is g(Gy→y)=0→𝑔subscript𝐺→𝑦𝑦→0g(G_{y\rightarrow y})=\vec{0} when y=a𝑦𝑎y=a. Overall, computing the embedding g(𝒢y→a)𝑔subscript𝒢→𝑦𝑎g(\mathcal{G}_{y\rightarrow a}) for all a𝑎a takes O(|V(𝒢y)|+|E(𝒢y)|)𝑂𝑉subscript𝒢𝑦𝐸subscript𝒢𝑦O(\left|V(\mathcal{G}_{y})\right|+\left|E(\mathcal{G}_{y})\right|) time, which is proportional to the number of nodes and edges in the scope 𝒢ysubscript𝒢𝑦\mathcal{G}_{y}.
|
| 50 |
+
|
| 51 |
+
This formulation is able to capture various reasoning rules. Take Fig 2 as an example: the embedding of the entity Killing Them Softly sums up the two embeddings propagated from its parents. Thus it tends to match the reasoning paths from the parent entities. Note that this formulation is significantly different from the work in [27, 28, 29], where embedding is computed for each small molecular graph separately. Furthermore, those graph embedding methods often contain iterative processes which visit each nodes multiple times.
|
| 52 |
+
|
| 53 |
+
In this section, we describe the algorithm for learning the parameters in Pθ1(y|q)subscript𝑃subscript𝜃1conditional𝑦𝑞P_{\theta_{1}}(y|q) and Pθ2(a|y,q)subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞P_{\theta_{2}}(a|y,q). The overall learning algorithm is described in Algorithm 1.
|
| 54 |
+
|
| 55 |
+
EM algorithm is often used to learn latent variable models. However, performing exact EM updates for the objective in (1) is intractable since the posterior cannot be computed in closed form. Instead, we use variational inference and optimize the negative Helmholtz variational free energy:maxψ,θ1,θ2subscript𝜓subscript𝜃1subscript𝜃2\displaystyle\max_{\psi,\theta_{1},\theta_{2}}ℒ(ψ,θ1,θ2)=ℒ𝜓subscript𝜃1subscript𝜃2absent\displaystyle\mathcal{L}(\psi,\theta_{1},\theta_{2})=1N∑i=1N𝔼Qψ(y|qi,ai)[\displaystyle\frac{1}{N}\sum_{i=1}^{N}\mathbb{E}_{Q_{\psi}(y|q_{i},a_{i})}[(7)logPθ1(y|qi)+logPθ2(ai|y,qi)subscript𝑃subscript𝜃1conditional𝑦subscript𝑞𝑖subscript𝑃subscript𝜃2conditionalsubscript𝑎𝑖𝑦subscript𝑞𝑖\displaystyle\log P_{\theta_{1}}(y|q_{i})+\log P_{\theta_{2}}(a_{i}|y,q_{i})−logQψ(y|qi,ai)],\displaystyle-\log Q_{\psi}(y|q_{i},a_{i})],where the variational posterior Qψ(y|q,a)subscript𝑄𝜓conditional𝑦𝑞𝑎Q_{\psi}(y|q,a) is jointly learned with the model. Note that (7) is essentially optimizing the lower bound of (1). Thus to reduce the approximation error, a powerful set of posterior distributions is necessary.
|
| 56 |
+
|
| 57 |
+
Variational posterior. Qψsubscript𝑄𝜓Q_{\psi} computes the likelihood of the topic entity y𝑦y for a question q𝑞q, with additional information of answer a𝑎a. Thus besides the direct text or acoustic compatibility of y𝑦y and q𝑞q, we can also introduce logic match with the help of a𝑎a. Similar to the forward propagation architecture used in Sec 3.4, here we can define the scope 𝒢asubscript𝒢𝑎\mathcal{G}_{a} for answer a𝑎a, the inverse reasoning graph Ga→ysubscript𝐺→𝑎𝑦G_{a\rightarrow y}, and the inverse embedding architecture to efficiently compute the embedding g~(Ga→y)~𝑔subscript𝐺→𝑎𝑦\tilde{g}(G_{a\rightarrow y}). Finally, the variational posterior consists of two parts:Qψ(y|q,a)∝exp(W~y⊤f~ent(q)+f~qt(q)⊤g~(Ga→y)),proportional-tosubscript𝑄𝜓conditional𝑦𝑞𝑎superscriptsubscript~𝑊𝑦topsubscript~𝑓ent𝑞subscript~𝑓qtsuperscript𝑞top~𝑔subscript𝐺→𝑎𝑦Q_{\psi}(y|q,a)\propto\exp\Big{(}\tilde{W}_{y}^{\top}\tilde{f}_{\mathrm{ent}}(q)+\tilde{f}_{\mathrm{qt}}(q)^{\top}\tilde{g}(G_{a\rightarrow y})\Big{)},(8)where the normalization is done over all entities y′superscript𝑦′y^{\prime} in the scope 𝒢asubscript𝒢𝑎\mathcal{G}_{a}. Furthermore, the embedding operators f~ent,f~qtsubscript~𝑓entsubscript~𝑓qt\tilde{f}_{\mathrm{ent}},\tilde{f}_{\mathrm{qt}} and parameters {W~y}y∈V(𝒢)subscriptsubscript~𝑊𝑦𝑦𝑉𝒢\{\tilde{W}_{y}\}_{y\in V(\mathcal{G})} are defined in the same way as (4) and (6) but with different set of parameters. One can also share the parameter to obtain a more compact model.
|
| 58 |
+
|
| 59 |
+
Since the latent variable y𝑦y in the variational objective (7) takes discrete values, which is not differentiable with respect to ψ𝜓\psi, we use the REINFORCE algorithm [34] with variance reduction [35] to tackle this problem.
|
| 60 |
+
|
| 61 |
+
First, using the likelihood ratio trick, the gradient of ℒℒ\mathcal{L} with respect to posterior parameters ψ𝜓\psi can be computed as (for simplicity of notation, we assume that there is only one training instance, i.e., N=1𝑁1N=1):∇ψℒ=𝔼Qψ(y|q,a)[∇ψlogQψ(y|q,a)A(y,q,a)],subscript∇𝜓ℒsubscript𝔼subscript𝑄𝜓conditional𝑦𝑞𝑎delimited-[]subscript∇𝜓subscript𝑄𝜓conditional𝑦𝑞𝑎𝐴𝑦𝑞𝑎\displaystyle\nabla_{\psi}\mathcal{L}=\mathbb{E}_{Q_{\psi}(y|q,a)}\Big{[}\nabla_{\psi}\log Q_{\psi}(y|q,a)\,A(y,q,a)\Big{]},(9)where A(y,q,a)=logPθ1(y|q)+logPθ2(a|y,q)−logQψ(y|q,a)𝐴𝑦𝑞𝑎subscript𝑃subscript𝜃1conditional𝑦𝑞subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞subscript𝑄𝜓conditional𝑦𝑞𝑎A(y,q,a)=\log P_{\theta_{1}}(y|q)+\log P_{\theta_{2}}(a|y,q)-\log Q_{\psi}(y|q,a) can be treated as the learning signal in policy gradient.
|
| 62 |
+
|
| 63 |
+
Second, to reduce the variance of gradient, we center and normalize the signal A(y,q,a)𝐴𝑦𝑞𝑎A(y,q,a) and also subtract a baseline function b(q,a)𝑏𝑞𝑎b(q,a) [35]. Finally, the gradient in (9) can be approximated by the Monte Carlo method using K𝐾K samples of the latent variable from Qψsubscript𝑄𝜓Q_{\psi}:∇ψℒ≈subscript∇𝜓ℒabsent\displaystyle\nabla_{\psi}\mathcal{L}\approx1K∑j=1K∇ψlogQψ(yj|q,a)1𝐾superscriptsubscript𝑗1𝐾subscript∇𝜓subscript𝑄𝜓conditionalsubscript𝑦𝑗𝑞𝑎\displaystyle\frac{1}{K}\sum_{j=1}^{K}\nabla_{\psi}\log Q_{\psi}(y_{j}|q,a)(10)((A(yj,q,a)−μ~)σ~−b(q,a)),𝐴subscript𝑦𝑗𝑞𝑎~𝜇~𝜎𝑏𝑞𝑎\displaystyle\left(\frac{(A(y_{j},q,a)-\tilde{\mu})}{\tilde{\sigma}}-b(q,a)\right),where μ~~𝜇\tilde{\mu} and σ~~𝜎\tilde{\sigma} estimate the mean and standard deviation of A(yj,q,a)𝐴subscript𝑦𝑗𝑞𝑎A(y_{j},q,a) with moving average. b(q,a)𝑏𝑞𝑎b(q,a) is another neural network that fits the expected normalized learning signal. In our experiments, we simply build a two-layer perceptron with concatenated one-hot answer and question features. Here b(q,a)𝑏𝑞𝑎b(q,a) tries to fit A~(yj,q,a)=(A(yj,q,a)−μ~)σ~~𝐴subscript𝑦𝑗𝑞𝑎𝐴subscript𝑦𝑗𝑞𝑎~𝜇~𝜎\tilde{A}(y_{j},q,a)=\frac{(A(y_{j},q,a)-\tilde{\mu})}{\tilde{\sigma}} by minimizing the square loss. For other parameters θ1subscript𝜃1\theta_{1} and θ2subscript𝜃2\theta_{2} in Pθ1(y|q)subscript𝑃subscript𝜃1conditional𝑦𝑞P_{\theta_{1}}(y|q) and Pθ2(a|y,q)subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞P_{\theta_{2}}(a|y,q) respectively, the gradients are computed in the normal way.
|
| 64 |
+
|
| 65 |
+
During inference, we are only given the question q𝑞q, and ideally we want to find the answer by computing argmaxy,alog(Pθ1(y|q)Pθ2(a|y,q))subscript𝑦𝑎subscript𝑃subscript𝜃1conditional𝑦𝑞subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞\arg\max_{y,a}\log\left(P_{\theta_{1}}(y|q)P_{\theta_{2}}(a|y,q)\right). However, this computation is quadratic in the number of entities and thus too expensive. Alternatively, we can approximate it via beam search. So we select k𝑘k candidate entities y1,y2,…,yksubscript𝑦1subscript𝑦2…subscript𝑦𝑘y_{1},y_{2},\ldots,y_{k} with top scores from Pθ1(y|q)subscript𝑃subscript𝜃1conditional𝑦𝑞P_{\theta_{1}}(y|q), and then the answer is given bya∗=argmaxa∈𝒢y,y∈{y1,y2,…,yk}logPθ2(a|y,q).superscript𝑎subscriptargmaxformulae-sequence𝑎subscript𝒢𝑦𝑦subscript𝑦1subscript𝑦2…subscript𝑦𝑘subscript𝑃subscript𝜃2conditional𝑎𝑦𝑞a^{*}=\mathop{\mathrm{argmax}}_{a\in\mathcal{G}_{y},y\in\{y_{1},y_{2},\ldots,y_{k}\}}\log P_{\theta_{2}}(a|y,q).(11)In our experiments, we found that k=1𝑘1k=1 (equivalent as greedy inference) can already achieve good performance.
|
| 66 |
+
|
| 67 |
+
There is an existing public QA dataset named WikiMovies333It is available at https://research.fb.com/downloads/babi., which consists of question-answer pairs in the domain of movies and provides a medium-sized knowledge graph [8]. However, it has several limitations: 1) all questions in it are single-hop, thus it is not able to evaluate the ability of reasoning; 2) there is no noise on the topic entity in question, so it can be easily located in the knowledge graph; 3) it is generated from very limited number of text templates, which is easy to be exploited by models and of limited practical value. Some small datasets like WebQuestions [5] are mostly for single-hop questions; while WikiTableQuestions [36] involves tiny knowledge table for each question, instead of one large-scale knowledge graph shared among all questions.
|
| 68 |
+
|
| 69 |
+
Thus in this paper, we introduce a new challenging question-answer benchmark: MetaQA (MoviE Text Audio QA). It contains more than 400K questions for both single and multi-hop reasoning, and provides more realistic text and audio versions. MetaQA serves as a comprehensive extension of WikiMovies. Due to the page limit, we briefly list the datasets included in MetaQA below, and put more details in Appendix A.
|
| 70 |
+
|
| 71 |
+
•Vanilla: We have the original WikiMovies as the Vanilla 1-hop dataset. For multi-hop reasoning, we design 21 types of 2-hop questions and 15 types of 3-hop questions, and generate them by random sampling from a text template pool. Details and question examples are in Appendix B.•NTM: Thanks to the recent breakthrough in neural translation models (NTM), we can introduce more variations over the Vanilla datasets. We use a NTM trained by dual learning techniques [37] to paraphrase question by first translating it from English to French, and then sample translations back to English with beam search. The questions in the NTM dataset have different wordings but keep the same meaning. This dataset also contains 1-hop, 2-hop and 3-hop categories.•Audio: To make it even more practical and challenging, we generate audio datasets with the help of text-to-speech (TTS) system. We use Google TTS service to read all the questions in Vanilla. We also provide extracted MFCC features for each question. The Audio dataset also contains 1-hop, 2-hop and 3-hop categories. Note that although the audio is machine-generated, it is still much less regulated compared to text-template-generated data, and have a lot of variations in waveforms. For example, even for the same word, the TTS system can have different intonations depending on the word position in question and other context words. Visualization of the audio data can be found in Appendix C.
|
| 72 |
+
|
| 73 |
+
We have three competitor methods:1) as discussed in Sec 2, Miller et al. [8] proposed Key-Value Memory Networks (KV-MemNN), and reported state-of-the-art results at that time on WikiMovies;2) Bordes et al. [22]’s QA system also tries to embed the inference subgraph for reasoning, but the representation is simply an unordered bag-of-relationships and neighbor entities;3) the “supervised embedding” is considered as yet another baseline method, which is a simple approach but often works surprisingly well as reported in Dodge et al. [13].
|
| 74 |
+
|
| 75 |
+
We implement baseline methods with Tensorflow [38].Our results on Vanilla 1-hop are consistent with the reported performance in [8]. We take whichever higher and report it in Table 1. For example, our KV-MemNN obtains 95.8% test accuracy, while the original paper reports 93.9% on the same dataset, so we just report 95.8% in table.
|
| 76 |
+
|
| 77 |
+
When training KV-MemNN, we use the same number of “internal hops” as the hop number of that dataset. We also try to use more “internal hops” than the dataset hop number, but it is not helpful. Also, we insert knowledge items within 3 hops of the located topic entity to the memory slots, which ensures that if the topic entity is correctly matched, the answer is existing somewhere in the memory array.
|
| 78 |
+
|
| 79 |
+
We use all the datasets in MetaQA for experiments. We follow the same split of train/validation/test for all datasets. The number of questions in each part is listed in Appendix (Table 3). We tune hyperparameters on validation set for all methods. In both Vanilla and NTM, we use bag-of-words representation for entity name to parameterize Wysubscript𝑊𝑦W_{y} in (3).
|
| 80 |
+
|
| 81 |
+
For Vanilla, we have two different settings: 1) provide the entity labels in all questions, so that we can compare with KV-MemNN under the same setting of Miller et al. [8] on Vanilla 1-hop dataset; 2) only provide 5% entity labels among all questions, named as Vanilla-EU (EU stands for topic entity unlabeled). We make all the methods use bag-of-words representation of the question, and avoid hard entity matching. This setting is more of a sanity check of how much the method is dependent on labeled topic entities. In practice, hard matching can always be an option on text data, but it is not feasible for audio data.
|
| 82 |
+
|
| 83 |
+
To make task more realistic and challenging, we experiment with EU setting for NTM and Audio datasets. For NTM-EU, only 5% topic entity labels among all questions are provided. For Audio-EU, a higher labeled ratio 20% since it is much more difficult than text data. To handle the variant length of audio questions, we use a simple convolutional neural network (CNN) with three convolutional layers and three max-pooling layers to embed the audio questions into fixed-dimension vectors. We put more details about CNN embedding in Appendix D.
|
| 84 |
+
|
| 85 |
+
For all the EU setting above, the small set of entity labeled questions are used to initialize a topic entity recognizer. After that, all methods train on entire dataset but without the entity labels. For VRN, we show that this pretrained recognizer will also get improved with variational joint training; for other baselines, the entity recognizer will be fixed.
|
| 86 |
+
|
| 87 |
+
The experimental results are listed in Table 1 and Table 2.
|
| 88 |
+
|
| 89 |
+
Vanilla: Since all the topic entities are labeled, Vanilla mainly evaluates the ability of logic reasoning. Note that Vanilla 1-hop is the same as WikiMovies, which is included for sanity check. All the baseline methods achieve similar performance as reported in the original papers [8, 22], while our method performs the best. It is clear to see that 2- and 3-hop questions are harder, leading to significant accuracy drop on all methods. Nevertheless, our method still achieves promising results and lead competitors by a large margin. We notice that KV-MemNN is not performing well on multi-hop reasoning, perhaps due to explosion of relevant knowledge items.
|
| 90 |
+
|
| 91 |
+
Vanilla-EU: Without topic entity labels, all reasoning-based methods are getting worse on multi-hop questions. However, supervised embedding gets better in this case, since it just learns to remember the pair of question and answer entities. According to the statistics in Appendix (Table 4), a big portion of questions can be answered by just memorizing the pairs in training data. That explains why supervised embedding behaves differently on this dataset.
|
| 92 |
+
|
| 93 |
+
NTM-EU: The questions in this dataset are paraphrased by neural translation model, which increases the variety of wordings, and makes the task harder. It is reasonable that all methods are getting slightly worse results compared to Vanilla-EU. The same explanation applies to supervised embedding, which is not reasoning but memorizing all the pairs. This is indeed weak generalization and it takes advantage of the nature of this dataset, but it is not likely to perform well on new entity pairs.
|
| 94 |
+
|
| 95 |
+
Audio-EU: This audio dataset is the most challenging one. As mentioned in Sec 6.1, even the same word can be pronounced in a variety of intonations. It is hard to recognize the entity in audio data, also hard to tell the question type. It is not surprising that all methods perform worse compared to text data. Our method achieves 37% on 1-hop audio questions, which is very promising. For 2-hop and 3-hop questions, our method still outperforms other methods. Clearly, there is large room for improvement on audio QA. We leave it as future work, and hopefully the MetaQA benchmark can facilitate more researchers working on QA systems.
|
| 96 |
+
|
| 97 |
+
Since our framework uses variational method to jointly learn the entity recognizer and reasoning graph embedding, we here do the model ablation to answer the following two questions: 1) is the reasoning graph embedding approach necessary for inference? 2) is the variational method helpful for joint training?
|
| 98 |
+
|
| 99 |
+
Importance of reasoning graph embedding:As the results shown in Table 1, our proposed VRN outperforms all the other baselines, especially in 3-hop setting. Since this experiment only compares the reasoning ability, it clearly shows that simply representing the inference rule as linear combination of reasoning graph entities is not enough.
|
| 100 |
+
|
| 101 |
+
Improvement of entity recognition with joint training:In Fig 3 we show that using our joint training framework with variance reduction REINFORCE, we can improve the entity recognition performance further without the corresponding topic entity label supervision. For 1-hop and 2-hop questions, our model can improve greatly. While for 3-hop, since the inference task is much harder, we can only marginally improve the performance. For audio data, we’ve improved by 10% in 1-hop case, and it is hard to improve further for multi hops. In Table 1, the baselines perform significantly worse in the EU setting, due to the absence of joint training.
|
| 102 |
+
|
| 103 |
+
We study the convergence of our learning algorithm in Appendix E.1. It shows variance reduction technique helps the convergence significantly, while simpler tasks converge better. Also we present an example inference path with highest score in the reasoning graph in Appendix E.2. To answer “What are the main languages in David Mandel films?”, the model learns to find the movie EuroTrip first through directed or wrote relationships, then follow in_language to get the correct answer German. For visualizing general multi-hop reasoning, attention mechanism in the aggregation operator of each node would be helpful.
|
1709.04093v2.txt
ADDED
|
@@ -0,0 +1,365 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\section{Introduction}
|
| 2 |
+
\noindent Recently, deep structured networks such as deep convolutional (CNN) and recurrent (RNN) neural networks
|
| 3 |
+
have become increasingly popular in artificial intelligence, showing remarkable performance on many real-world problems, including scene classification~\cite{Krizhevsky:2012:NIPS}, speech recognition~\cite{hinton2012deep}, gaming~\cite{mnih2013playing,mnih2015human}, semantic segmentation~\cite{Papandreou:2015:ICCV}, and image captioning~\cite{Johnson:2016:CVPR}. However, like most machine learning techniques, current deep learning approaches are based on conventional statistics and require the problem to be formulated in a structured way. In particular, they are designed to learn a model for a distribution (or a function) that maps a structured input, typically a vector, a matrix, or a tensor, to a structured output.
|
| 4 |
+
|
| 5 |
+
Consider the task of image classification as an example. The goal here is to predict a label (or a category) of a given image. The most successful approaches address this task with CNNs, \ie by applying a series of convolutional layers followed by a number of fully connected layers~\cite{Krizhevsky:2012:NIPS,Simonyan:2014:VGG,Szegedy:2014:Inception,He:2016:ResNet}. The final output layer is a fixed-sized vector with the length corresponding to the number of categories in the dataset (\eg~1000 in the case of the ILSVR Challenge~\cite{Russakovsky:2015:ILSVRC}). Each element in this vector is a score or probability for one particular category such that the final prediction corresponds to a probability distribution over all classes. The difficulty arises when the number of classes is unknown in advance and in particular varies for each example. Then, the final output is generated heuristically by a discretization process such as choosing the $k$ highest scores~\cite{gong2013deep,Wang_2016_CVPR}, which is not part of the learning process.
|
| 6 |
+
This shortcoming concerns not only image tagging but also other problems like detection or graph optimization, where connectivity and graph size can be arbitrary.
|
| 7 |
+
|
| 8 |
+
We argue that such problems can be naturally expressed with sets rather than vectors. As opposed to a vector, the size of a set is not fixed in advance, and it is invariant to the
|
| 9 |
+
ordering of entities within it. Therefore, learning approaches built on conventional statistics cannot
|
| 10 |
+
be the right choice for these problems. In this paper, we propose a learning approach based on point processes and finite set statistics to deal with sets in a principled manner. More specifically, in the presented model, we assume that the input (the observation) is still structured, but the output is modelled as a set. Our approach is inspired by a recent work on set learning using deep neural networks~\cite{rezatofighi2017deepsetnet}. The main limitation of that work, however, is that the approach employs two sets of independent weights (two independent networks) to generate the cardinality and state distributions of the output set. In addition, to generate the final output as a set, sequential inference has to be applied instead of joint inference. In this paper, we derive a principled formulation for performing both learning and inference steps jointly. The main contribution of the paper is summarised as follows:
|
| 11 |
+
\begin{enumerate}
|
| 12 |
+
\setlength{\itemsep}{1pt}
|
| 13 |
+
\setlength{\parskip}{0pt}
|
| 14 |
+
\setlength{\parsep}{0pt}
|
| 15 |
+
\item We present a novel way to learn both cardinality and state distributions jointly within a single deep network. Our model is learned end-to-end to generate the output set.
|
| 16 |
+
\item We perform the inference step both jointly and optimally. We show how we can generate the most likely (the optimal) set using MAP inference for our given model.
|
| 17 |
+
\item Our approach outperforms existing solutions and achieves state-of-the-art results on the task of multi-label image classification on two standard datasets.
|
| 18 |
+
\end{enumerate}
|
| 19 |
+
\section{Related Work}
|
| 20 |
+
\label{related work}
|
| 21 |
+
Handling unstructured input and output data, such as sets or point patterns, for both learning and inference is an emerging field of study that has generated substantial interest in recent years. Approaches such as mixture models~\cite{blei2003latent,hannah2011dirichlet,tran2016clustering}, learning distributions from a set of samples~\cite{muandet2012learning,oliva2013distribution}, model-based multiple instance learning~\cite{vo2017model} and novelty detection from point pattern data~\cite{vo2016model}, can be counted as few out many examples that use point patterns or sets as input or output and directly or indirectly model the set distributions. However, existing approaches often rely on parametric models, \eg~the elements in output sets needs to be derived from
|
| 22 |
+
an independent and identically distributed (\iid) Poisson point process distribution~\cite{adams2009tractable,vo2016model}. Recently, deep learning has enabled us to use less parametric models to capture highly complex mapping distributions between structured inputs and outputs. Somewhat surprisingly, there are only few works on learning sets using deep neural networks. One interesting exception in this direction
|
| 23 |
+
is the recent work of Vinyals \etal~\shortcite{vinyals2015order}, which uses an RNN to read and predict sets. However, the output is still assumed to have an ordered structure, which contradicts the orderless (or permutation invariant) property of sets. Moreover, the framework can be used in combination with RNNs only and cannot be trivially extended to any arbitrary learning framework such as feed-forward architectures. Another recent work proposed by Zaheer~\etal~\shortcite{zaheer2017deep} is a deep learning framework which can deal with sets as input with different sizes and permutations. However, the outputs are either assumed to be structured, \eg~a scalar as a regressing score, or a set with the same entities of the input set, which prevents this approach to be used for the problems that require output sets with arbitrary entities. Perhaps the most related work to our problem is a deep set network recently proposed by Rezatofighi~\etal~\shortcite{rezatofighi2017deepsetnet} which seamlessly integrates a deep learning framework into set learning in order to learn to predict sets in
|
| 24 |
+
two challenging computer vision applications, image tagging and pedestrian detection. However, the approach requires to train two independent networks to model a set, one for cardinality and one for state distribution. Our approach is largely inspired by this latter work but overcomes its limitation on independent learning and inference.
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
To validate our model, we apply it on the multi-label image classification task. Despite its relevance, there exists rather little work on this problem that makes use of deep architectures. One example is Gong~\etal~\shortcite{Gong:2013:arxiv}, who combine deep CNNs with a top-$k$ approximate ranking loss to predict multiple labels. Wei~\etal~\shortcite{Wei:2014:arxiv} propose a Hypotheses-Pooling architecture that is specifically designed to handle multi-label output. While both methods open a promising direction, their underlying architectures largely ignore the correlation between multiple labels. To address this limitation, recently, Wang~\etal~\shortcite{Wang_2016_CVPR} proposed a model that combines CNNs and RNNs to predict an arbitrary number of classes in a sequential manner.
|
| 28 |
+
RNNs, however, are not suitable for set prediction mainly for two reasons.
|
| 29 |
+
First, the output represents a sequence and not a set, and is thus highly dependent on the prediction order, as was shown recently by Vinyals~\etal~\shortcite{vinyals2015order}.
|
| 30 |
+
Second, the final prediction may not result in a feasible solution (\eg it may contain the same element multiple times), such that post-processing or heuristics such as beam search must be employed~\cite{Vinyals:2015:NIPS,Wang_2016_CVPR}.
|
| 31 |
+
Here we show that our approach not only guarantees to always predict a valid set, but also outperforms previous methods.
|
| 32 |
+
\section{Background }
|
| 33 |
+
\label{background}
|
| 34 |
+
|
| 35 |
+
To better explain our approach, we first review some mathematical background and introduce the notation used throughout the paper.
|
| 36 |
+
In statistics, a continuous random variable $y$ is a variable that can take an infinite number of possible values. A continuous random vector can be defined by stacking several continuous random variables into a fixed length vector, $Y=\left(y_1,\cdots,y_m\right)$. The mathematical function describing the possible values of a continuous random vector and their associated joint probabilities is known as a probability density function (PDF) $p(Y)$ such that
|
| 37 |
+
$\int p(Y)dY = 1.$
|
| 38 |
+
|
| 39 |
+
In contrast, a random finite set (RFS) $\calY$ is a finite-set valued random variable $\calY=\left\{y_1,\cdots,y_m\right\}$. The main difference between an RFS and a random vector is that for the former, the number of constituent variables, $m$, is random and the variables themselves are random and unordered.
|
| 40 |
+
Throughout the paper, we use $\calY$ for a set with unknown cardinality, $\calY^m$ for a set with known cardinality $m$ and $Y=\left(y_1,\cdots,y_m\right)$ for a vector (or an ordered set) with known dimension $m$.
|
| 41 |
+
|
| 42 |
+
A statistical function describing a finite-set variable $\calY$ is a
|
| 43 |
+
combinatorial probability density function $p(\calY)$ which consists of a discrete probability distribution, the so-called cardinality distribution, and a family of joint probability densities on both the number and the values of the constituent variables~\cite{mahler2007statistical,vo2017model}, \ie
|
| 44 |
+
\begin{equation}
|
| 45 |
+
\begin{aligned}
|
| 46 |
+
p(\calY) & = p(m)U^m p_m(\{y_{1},y_{2},\cdots,y_{m}\})\\
|
| 47 |
+
& = p(m)m!U^m p_m(y_{1},y_{2},\cdots,y_{m}),
|
| 48 |
+
\end{aligned}
|
| 49 |
+
\label{eq:setprob}
|
| 50 |
+
\end{equation}
|
| 51 |
+
where $p(m)$ is the cardinality distribution of the set $\calY$ and $p_m(\{y_{1},y_{2},\cdots,y_{m}\})$ is a symmetric joint probability density distribution of the set $\calY^m$ given known cardinality $m$. The normalisation factor $m!=\prod_{k=1}^m k$ between $p_m(\calY^m)$ and $p_m(Y)$ appears because the probability density for a set with known cardinality $\calY^m$ must be equally distributed among all the $m!$ possible permutations of the corresponding vector $Y$~\cite{mahler2007statistical,vo2017model}. $U$ is the unit of hyper-volume in the feature space, which
|
| 52 |
+
cancels out the unit of the probability density
|
| 53 |
+
$p_m(\cdot)$ making it unit-less, and thereby avoids the unit
|
| 54 |
+
mismatch across the different dimensions (cardinalities). Without this normalizing constant, the comparison between probabilities of the sets with different cardinalities is not properly defined because a distribution with the smallest set size will always have the highest probabilities. For example, $p(y_1)\geq p(y_1,y_2)$ always holds regardless of the particular choice for $y_1$ and $y_2$. Please refer to~\cite{vo2017model} for an intuitive discussion.
|
| 55 |
+
|
| 56 |
+
Finite Set Statistics
|
| 57 |
+
provides powerful and practical mathematical tools for dealing with random finite sets, based on the notion
|
| 58 |
+
of integration and density that is consistent with the point process theory~\cite{mahler2007statistical}.\footnote{A random finite set can be viewed as a simple finite point process~\cite{baddeley2007spatial}.} For example, similar to the definition of a PDF for a random variable, the PDF of an RFS must sum to unity over all possible cardinality values and all possible element values as well as their permutations. This type of statistics, which is derived from the point process stochastic process, defines basic
|
| 59 |
+
mathematical operations on finite sets such as functions, derivatives and integrations as well as other statistical
|
| 60 |
+
tools such as probability density function of a random finite set and its statistical moments~\cite{mahler2007statistical,vo2017model}. For
|
| 61 |
+
further details on point processes, we refer the reader to
|
| 62 |
+
textbooks such as~\cite{chiu2013stochastic,daley2007introduction,moller2003statistical}.
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
Conventional machine learning approaches, such as Bayesian learning and convolutional neural networks, have been proposed to learn the optimal parameters $\bw^*$ of the distribution $p(Y|\bx,\bw^*)$ which maps the input vector $\bx$ to the \emph{output vector} $Y$.
|
| 66 |
+
In this paper, we instead propose an approach that can learn the parameters $\bw^*$ for a set distribution that allows one to map the input vector $\bx$ to the \emph{output set} $\calY$, \ie $p(\calY|\bx,\bw^*)$. For mathematical convenience, we use an \iid-cluster point process model. Moreover, we target applications where the order of the outputs during training is irrelevant, \eg multi-label image classification. Modifying the application or
|
| 67 |
+
the \iid assumption to non-\iid set elements, may require to deal with the complexity of permutation invariant property of sets during the learning step, which leads to serious
|
| 68 |
+
mathematical complexities and is left for future work.
|
| 69 |
+
\section{Joint Deep Set Network}
|
| 70 |
+
\label{JDSN}
|
| 71 |
+
|
| 72 |
+
We follow the convention introduced in~\cite{rezatofighi2017deepsetnet} and define a training set $\D = \{(\bx_{i},\calY_{i})\}$,
|
| 73 |
+
where each training sample $i=1,\ldots,n$ is a pair consisting of an input feature (\eg image), $\bx_{i}\in\mathbb{R}^{l}$ and an output (or label) set
|
| 74 |
+
$\calY_{i} = \{y_{1},y_{2},\ldots,y_{m_i}\}, y_{k}\in\mathbb{R}^{d}, m_i\in\mathbb{N}^0 $. In the following we will drop the instance index $i$ for better readability. Note that $m:=|\calY|$ denotes the cardinality of set $\calY$.
|
| 75 |
+
Following the definition in Eq.(~\ref{eq:setprob}), the probability density of a set $\calY$ with an unknown cardinality is defined as
|
| 76 |
+
\begin{equation}
|
| 77 |
+
\begin{aligned}
|
| 78 |
+
p(\calY|\bx,\bw) =& p(m|\bx,\bw)\times U^m \\ &\times p_m(\{y_{1},y_{2},\cdots,y_{m}\}|\bx,\bw),
|
| 79 |
+
\end{aligned}
|
| 80 |
+
\end{equation}
|
| 81 |
+
where $\bw$ denotes the collection of parameters which model both the \emph{cardinality} distribution of the set elements $p(m|\cdot)$ as well as the parameters of $y_{k}$ that model the joint distribution of set element \emph{values} for a fixed cardinality $p_m(\{y_{1},y_{2},\cdots,y_{m}\}|\cdot)$. Note that in contrast to previous works~\cite{rezatofighi2017deepsetnet,vo2016model,vo2017model} that assume that two sets of independent parameters (two independent networks) are required to represent
|
| 82 |
+
the set distribution $p(\calY|\cdot)$, we will show that one set of parameters $\bw$ is sufficient to learn this distribution and as it turns out also yields better performance.
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
The above formulation represents the probability density
|
| 86 |
+
of a set which is very general and completely independent
|
| 87 |
+
of the choices of both cardinality and state distributions.
|
| 88 |
+
It is thus straightforward to transfer it to many applications
|
| 89 |
+
that require the output to be a set. However, to
|
| 90 |
+
make the problem amenable to mathematical derivation and
|
| 91 |
+
implementation, we adopt two assumptions: \emph{i)} the outputs (or labels) in the set are derived from an independent
|
| 92 |
+
and identically distributed (\iid)-cluster point process model, and \emph{ii)} their cardinality follows
|
| 93 |
+
a categorical distribution parameterised by event probabilities $\brho$.
|
| 94 |
+
Thus, we can write the distribution
|
| 95 |
+
as
|
| 96 |
+
\begin{equation}
|
| 97 |
+
\begin{aligned}
|
| 98 |
+
p(\calY|\bw,\bx) = \int p(m|\brho)&p(\brho|\bx,\bw) d\brho \times U^m \\&\times \left(\prod_{y\in\calY^m}p(\{y\}|\bx,\bw)\right),
|
| 99 |
+
\label{eq:posterior_general}
|
| 100 |
+
\end{aligned}
|
| 101 |
+
\end{equation}
|
| 102 |
+
where $p(\{y\}|\cdot,\cdot)$ denotes the probability of taking on the state $y$ in a singleton set $\{y\}$, and $\brho = (\rho_1,\ldots,\rho_M)$ is the vector of event probabilities,
|
| 103 |
+
\emph{i.e.} $\sum_{i=1}^M \rho_i = 1$ and $\rho_i>0,\forall i\in\{1,\ldots,M\}$.
|
| 104 |
+
\subsection{Posterior distribution}
|
| 105 |
+
\label{sec:posterior}
|
| 106 |
+
To learn the parameters $\bw$, we assume that the training samples are independent from each other and that the distribution $p(\bx)$ from which the input data is sampled is independent from both the output and the parameters.
|
| 107 |
+
Then, the posterior distribution over the parameters can be derived as
|
| 108 |
+
\begin{equation}
|
| 109 |
+
\begin{aligned}
|
| 110 |
+
p(\bw|\D) &\propto p(\D|\bw)p(\bw)\\
|
| 111 |
+
&=\prod_{i=1}^{n}\left[\int p(m_{i}|\brho)p(\brho|\bx_{i},\bw)d\brho\times
|
| 112 |
+
U^{m_i}\right.\\&\quad\quad\times \left.\left(\prod_{y\in\calY^{m_i}_i}p(\{y\}|\bx_i,\bw)\right) \right]p(\bw).
|
| 113 |
+
\end{aligned}
|
| 114 |
+
\label{eq:posterior}
|
| 115 |
+
\end{equation}
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
|
| 119 |
+
A closed-form solution for the integral in Eq.~(\ref{eq:posterior}) can be obtained by using conjugate priors:
|
| 120 |
+
\begin{eqnarray*}
|
| 121 |
+
m & \sim & \text{Cat}(m;\brho)\\
|
| 122 |
+
\brho & \sim & \text{Dir}(\brho;\balpha(\bx,\bw))\\
|
| 123 |
+
&&\balpha(\bx,\bw)>0\quad\forall\bx,\bw,
|
| 124 |
+
\end{eqnarray*}
|
| 125 |
+
where $\text{Cat}(\cdot,\brho)$ and $\text{Dir}(\cdot;\balpha)$ represent respectively a categorical distribution with the event probabilities $\brho = (\rho_1,\ldots,\rho_M)$ and a Dirichlet distribution with parameters $\balpha = (\alpha_1,\ldots,\alpha_M)$. Moreover, $p(\bw)$ can be assumed a zero-mean normal distribution with covariance equal to $\sigma^{2}\mathbf{I}$, \ie $p(\bw) = \mathcal{N}(\cdot;0,\sigma^{2}\mathbf{I})$. The key difference between our method and \cite{rezatofighi2017deepsetnet} is that we only need to use one network as opposed to two networks used in the previous work. It is important to note that our method \emph{jointly} predicts both cardinality and the set elements as opposed to sequentially predicting the cardinality first and then the set elements as previously done in \cite{rezatofighi2017deepsetnet}. We have provided a comparison between the graphical models of both methods in terms of plate notation in Fig.~\ref{fig:pgm} to further illustrate their differences.
|
| 126 |
+
|
| 127 |
+
We assume that the cardinality follows a categorical distribution whose event probabilities vector $\brho$ is estimated from a Dirichlet distribution with parameters $\balpha$, which can be directly estimated from the input data $\bx$. Note that the cardinality distribution in Eq.~(\ref{eq:posterior_general}) can be replaced
|
| 128 |
+
by any other discrete distribution, \eg Poisson, binomial or negative binomial (\cf~\cite{rezatofighi2017deepsetnet}).
|
| 129 |
+
Here, we use the categorical distribution as the cardinality model, which better suits the task at hand. The rationale here is that Poisson and negative binomial are long-tailed distributions and their variance increases with their mean. Therefore, the final model will have more uncertainty (and possibly a higher error) in estimating the cardinality of the sets with high values. In contrast, the categorical distribution does not have the drawback of correlating its mean and variance. Moreover, in the image tagging application, the maximum cardinality is often known and there is no need to use long-tailed distributions, which are more suitable for the applications where the maximum cardinality is unknown.
|
| 130 |
+
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
|
| 134 |
+
Consequently, the integral in Eq.~(\ref{eq:posterior}) is simplified
|
| 135 |
+
and forms a Dirichlet-Categorical distribution
|
| 136 |
+
\begin{equation}
|
| 137 |
+
DC\left(m;\balpha\right) = \frac{\alpha_m+C_m}{\sum_{\acute{m}}\alpha_{\acute{m}}+C}\\,
|
| 138 |
+
\label{eq:DC}
|
| 139 |
+
\end{equation}
|
| 140 |
+
where $C_m$ is the number of samples in the training set with cardinality $m$, and $C$ is the total number of training samples. Finally, the full posterior distribution can be written as
|
| 141 |
+
\begin{equation}
|
| 142 |
+
\begin{aligned}
|
| 143 |
+
p(\bw|\D) \propto\prod_{i=1}^{n}&\bigg[DC\left(m_{i};\balpha(\bx_{i},\bw)\right)\times U^{m_i}\\&\times \left(\prod_{y\in\calY^{m_i}_i}p(\{y\}|\bx_i,\bw)\right)\bigg]p(\bw).
|
| 144 |
+
\label{eq:full-posterior}
|
| 145 |
+
\end{aligned}
|
| 146 |
+
\end{equation}
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
|
| 154 |
+
\begin{figure*}[t]
|
| 155 |
+
\begin{minipage}[b]{.48\linewidth}
|
| 156 |
+
\begin{center}
|
| 157 |
+
\includegraphics[trim={11.5cm 7.2cm 12cm 6cm},clip,width=0.7\linewidth]{figs/pgm_DS.pdf}
|
| 158 |
+
\centerline{(a)}\medskip
|
| 159 |
+
\end{center}
|
| 160 |
+
\end{minipage}
|
| 161 |
+
\hfill
|
| 162 |
+
\begin{minipage}[b]{.48\linewidth}
|
| 163 |
+
\begin{center}
|
| 164 |
+
\includegraphics[trim={12cm 7cm 12cm 6.5cm},clip,width=0.7\linewidth]{figs/pgm_JDS.pdf}
|
| 165 |
+
\centerline{(b)}\medskip
|
| 166 |
+
\end{center}
|
| 167 |
+
\end{minipage}
|
| 168 |
+
\caption{Comparison of the graphical models: a) The set learning approach introduced in ~\cite{rezatofighi2017deepsetnet} by replacing Dirichlet-Categorical as its cardinality distribution; (b) our proposed joint set learning. The work in ~\cite{rezatofighi2017deepsetnet} first predicts the cardinality $m$, and then the labels $y$s given $m$. There is a separation between parameters $\bw$ and $\btheta$. Consequently, an incorrect $m$ predicted via $\bw$ can not be fixed by $\btheta$. Our method only uses one joint parameter $\bw$ which aims to learn and predict the best $m$ and $y$'s \emph{jointly}. $y$ and $m$ are shaded as they are observed in the training data. Note that $m$ is a variable in our model (b) which determines the repetition of the plates (\ie the number of $y$'s). Removing the top-right chain in (a) recovers the traditional vector based (non-set based) method. }
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
\label{fig:pgm}
|
| 172 |
+
\end{figure*}
|
| 173 |
+
\subsection{Learning}
|
| 174 |
+
\label{sec:learning}
|
| 175 |
+
|
| 176 |
+
For simplicity, we use a point estimate for the posterior $p(\bw|\D)$,
|
| 177 |
+
\textit{i.e.} $p(\bw|\D) = \delta(\bw=\bw^{*}|\D)$, where $\bw^{*}$ is computed using the MAP estimator, \ie $\bw^{*} = \arg\max_{\bw}\enspace \log\left(p\left(\bw|\D\right)\right)$.
|
| 178 |
+
Therefore, we have
|
| 179 |
+
\begin{equation}
|
| 180 |
+
\begin{aligned}
|
| 181 |
+
\bw^{*} & =
|
| 182 |
+
\arg\max_{\bw}\enskip\sum_{i=1}^{n}\bigg[\sum_{y\in\calY^{m_i}_i}\bigg(\log\big(p(\{y\}|\bx_i,\bw)\big)\bigg)\\
|
| 183 |
+
&+m_{i}\log U+\log\left(DC\left(m_{i};\balpha(\bx_{i},\bw)\right)\right)\bigg]-\gamma\|\bw\|_2^2.
|
| 184 |
+
\label{eq:map_complete}
|
| 185 |
+
\end{aligned}
|
| 186 |
+
\end{equation}
|
| 187 |
+
|
| 188 |
+
$p(\{y\}|\bx_i,\bw)$ describes a neural network with coefficients $\bw$ learned to map the input $\bx_i$ to the output (label) $y$. This function represents the \emph{state distribution} of each set element over the state space. $\gamma$ is the regularisation parameter, proportional to the predefined covariance parameter $\sigma$. This parameter is also known as the weight decay parameter and is commonly used in training neural networks.
|
| 189 |
+
|
| 190 |
+
For example, in the application to multi-label image classification, $y\in\calY^{m_i}_i\subseteq\{\ell_1,\ell_2,\cdots,\ell_M\}$ represents the existence of a specific label $\ell_j$ in the input image instance $\bx_i$ from all pre-defined $M$ labels. In this application, we can rewrite an equivalent binary formulation for the above MAP problem as
|
| 191 |
+
\begin{equation}
|
| 192 |
+
\begin{aligned}
|
| 193 |
+
\bw^{*}= &\arg\max_{\bw}\enskip\sum_{i=1}^{n}\bigg[\sum_{\ell=1}^M z_i^{\ell}\log p(z_i^{\ell}|\bx_i,\bw)+\sum_{\ell=1}^M z^{\ell}_i \log U\\
|
| 194 |
+
& +\log DC\left(\sum_{\ell=1}^M z^{\ell}_i ;\balpha(\bx_{i},\bw)\right)\bigg]-\gamma\|\bw\|_2^2\\
|
| 195 |
+
=&\arg\max_{\bw}\enskip\sum_{i=1}^{n}\bigg[\sum_{\ell=1}^M z_i^{\ell}\log p(z_i^{\ell}|\bx_i,\bw)+
|
| 196 |
+
\\&\log DC\left(\sum_{\ell=1}^M z^{\ell}_i ;\balpha(\bx_{i},\bw)\right)\bigg]-\gamma\|\bw\|_2^2,
|
| 197 |
+
\end{aligned}
|
| 198 |
+
\label{eq:map_dual}
|
| 199 |
+
\end{equation}
|
| 200 |
+
where $z_i^{\ell}\in\{0,1\}$ represents the existence or non-existence of any specific label in the image $\bx_i$. $p(z_i^{\ell}=1|\bx_i,\bw)$ can be defined as a binary logistic regression function
|
| 201 |
+
\begin{equation*}
|
| 202 |
+
p(z_i^{\ell}=1|\bx_i,\bw) = \frac{\exp{O^\ell(x_i,\bw)}}{1+\exp{O^\ell(x_i,\bw)}},
|
| 203 |
+
\label{eq:BCE_loss}
|
| 204 |
+
\end{equation*}
|
| 205 |
+
where $O^{\ell}(x_i,\bw)$ is the network's predicted output corresponding to the $\ell^\text{th}$ label.
|
| 206 |
+
|
| 207 |
+
Note that $\bw$ can
|
| 208 |
+
generally be learned using a number of existing machine learning techniques. In this paper we rely on deep CNNs to perform this task. More formally, to estimate $\bw^{*}$, we
|
| 209 |
+
compute the partial derivatives of the objective function in Eq.~(\ref{eq:map_dual}) and use standard backpropagation
|
| 210 |
+
to learn the parameters of the deep neural network.
|
| 211 |
+
\subsection{Inference}
|
| 212 |
+
\label{sec:inference}
|
| 213 |
+
Having learned the network parameters $\bw^{*}$, for a test image $\bx^{+}$, we use a MAP estimate to generate a set output as
|
| 214 |
+
\begin{equation}
|
| 215 |
+
\calY^{*}
|
| 216 |
+
= \arg\max_{\calY}\enspace p(\calY|\D,\bx^{+},\bw^{*}),
|
| 217 |
+
\end{equation}
|
| 218 |
+
where $p(\calY|\D,\bx^{+},\bw^{*}) \propto \int p(\calY|\bw,\bx^{+})p(\bw|\D) d\bw$, and $p(\bw|\D) = \delta(\bw=\bw^{*}|\D)$ as above. Therefore, the MAP estimate can be written as follows,
|
| 219 |
+
\begin{equation}
|
| 220 |
+
\begin{aligned}
|
| 221 |
+
\calY^{*}
|
| 222 |
+
& = \arg\max_{\calY}\enspace p(\calY|\D,\bx^{+},\bw^{*})\\
|
| 223 |
+
& = \arg\max_{\calY}\enspace\log\left(p(\calY|\D,\bx^{+},\bw^{*})\right)\\
|
| 224 |
+
& = \arg\max_{m,\calY^m} \enspace \log DC\left(m;\balpha(\bx^{+},\bw^{*})\right)+ m\log U\\
|
| 225 |
+
&\quad\quad\quad\quad\quad + \sum_{y\in\calY^m}\log\left(p(\{y\}|\bx^{+},\bw^{*})\right).
|
| 226 |
+
\end{aligned}
|
| 227 |
+
\label{eq:inference}
|
| 228 |
+
\end{equation}
|
| 229 |
+
Since the unit of hyper-volume $U$ in this application is unknown, we assume it as a constant hyper-parameter, estimated from the validation set of the data.
|
| 230 |
+
|
| 231 |
+
To solve the above inference problem, we define the binary variable $z^{\ell}\in\{0,1\}$ for existence of each label similar to the learning process. Therefore, an equivalent formulation for Eq.~(\ref{eq:inference}) is
|
| 232 |
+
\begin{equation}
|
| 233 |
+
\begin{aligned}
|
| 234 |
+
&Z^{*} = \arg\max_{Z} \enskip\log DC\left(\sum_{\ell=1}^{M} z^{\ell};\balpha(\bx^{+},\bw^{*})\right)+\\&\sum_{\ell=1}^{M} z^{\ell}\log U+\sum_{\ell=1}^{M} z^{\ell}\log\left(\frac{\exp{O^\ell(\bx^{+},\bw^{*})}}{1+\exp{O^\ell(\bx^{+},\bw^{*})}}\right),
|
| 235 |
+
\end{aligned}
|
| 236 |
+
\label{eq:inference_final}
|
| 237 |
+
\end{equation}
|
| 238 |
+
where
|
| 239 |
+
$
|
| 240 |
+
Z=(z^{1},\cdots,z^{M})\in\{0,1\}^M.
|
| 241 |
+
$
|
| 242 |
+
The above problem can be seen as a combination of a higher-order term,
|
| 243 |
+
\begin{equation}
|
| 244 |
+
f(\mathbf{1}^TZ,\balpha(\cdot)) = \log DC\left(\sum_{\ell=1}^{M} z^{\ell};\balpha(\cdot)\right),
|
| 245 |
+
\end{equation}
|
| 246 |
+
which accounts for the total number of selected variables, and a linear binary program, $C^TZ$, where $C = (c^1,\cdots,c^M)$ and
|
| 247 |
+
\begin{equation}
|
| 248 |
+
c^\ell = \log U +\log\left(\frac{\exp{O^\ell(\bx^{+},\bw^{*})}}{1+\exp{O^\ell(\bx^{+},\bw^{*})}}\right).
|
| 249 |
+
\end{equation}
|
| 250 |
+
Therefore, we can re-write it as
|
| 251 |
+
\begin{equation}
|
| 252 |
+
Z^{*} = \arg\max_{Z}\enspace f(\mathbf{1}^TZ,\balpha(\cdot))+C^TZ.
|
| 253 |
+
\end{equation}
|
| 254 |
+
|
| 255 |
+
Since for each specific cardinality $m=\mathbf{1}^TZ$, the most likely set corresponds to the $m$ highest values of $C$, the optimal solution for $m$ can be found efficiently when the sorted values of $C$, here denoted by $C_{st}=(c_{st}^1,\cdots,c_{st}^M)$, and $f(\cdot)$ is maximised \wrt $m$:
|
| 256 |
+
\begin{equation}
|
| 257 |
+
m^{*} = \arg\max_{m} \enspace f(m,\balpha(\cdot))+\sum_{\ell=1}^m c^{\ell}_{st}.
|
| 258 |
+
\label{eq:inference_equival}
|
| 259 |
+
\end{equation}
|
| 260 |
+
Then, the optimal $Z^{*}$ can be obtained by solving a simple linear program:
|
| 261 |
+
\begin{equation}
|
| 262 |
+
Z^{*} = \arg\max_{Z}\quad C^TZ, \quad\quad
|
| 263 |
+
\text{s. t.} \quad\mathbf{1}^TZ=m^*.
|
| 264 |
+
\label{eq:inference_optimum}
|
| 265 |
+
\end{equation}
|
| 266 |
+
Note that the optimal solution to the problem in Eq.~(\ref{eq:inference_optimum}) are exactly those variables that correspond to the $m^*$ highest values of $C$.
|
| 267 |
+
\section{Experimental Results}
|
| 268 |
+
\label{results}
|
| 269 |
+
|
| 270 |
+
To validate our proposed joint set learning approach, we perform experiments on the task of multi-label image classification. This is an appropriate application for our model as its output is expected to be in the form of a set (a set of labels in this particular case) with an unknown cardinality while the order of its elements (labels) in the output list does not have any meaning. Moreover, we assume that the labels are derived from an \iid-cluster process model. To make our work directly comparable to~\cite{rezatofighi2017deepsetnet}, we use the same two standard and popular benchmarks, the PASCAL VOC 2007 dataset~\cite{Everingham:2007:PASCAL-VOC} and the Microsoft Common Objects in Context (MS COCO) dataset~\cite{Lin:2014:COCO}.
|
| 271 |
+
|
| 272 |
+
\myparagraph{Implementation details.}
|
| 273 |
+
We follow the same experimental setup used in~\cite{rezatofighi2017deepsetnet,Wang_2016_CVPR}. Our model is built on the $16$-layers VGG network~\cite{Simonyan:2014:VGG}, pretrained on the 2012 ImageNet dataset. We adapt VGG for our purpose by modifying the last fully connected prediction layer to predict both cardinality and classification distributions according to the loss proposed in \Eq~(\ref{eq:map_dual}), \ie DC for cardinality and \textit{binary cross-entropy} for classification. We then fine-tune the entire network using the training set of these datasets with the same train/test split as in existing literature~\cite{rezatofighi2017deepsetnet,gong2013deep,Wang_2016_CVPR}.
|
| 274 |
+
|
| 275 |
+
To train our network, which we call JDS in the following, we use stochastic gradient descent and set the weight decay to $\gamma = 5\cdot 10^{-4}$, with a momentum of $0.9$ and a dropout rate of $0.5$. The learning rate is adjusted to gradually decrease after each epoch, starting from $0.001$. The network is trained for $60$ epochs for both datasets and the epoch with the lowest validation objective value is chosen for evaluation on the test set. The hyper-parameter $U$ is set to be $2.36$, adjusted on the validation set.
|
| 276 |
+
|
| 277 |
+
To demonstrate that joint learning is helpful to learn a better classifier (state distribution) as well as a better cardinality distribution, we perform an additional baseline experiment where we replace the negative binomial (NB) distribution used in~\cite{rezatofighi2017deepsetnet} with the Dirichlet-Categorical (DC) distribution from \Eq~(\ref{eq:DC}). Then, an independent cardinality distribution network is trained using the same network structure as the one used in~\cite{rezatofighi2017deepsetnet} while modifying the final fully connected layer to predict the cardinality using the DC distribution.
|
| 278 |
+
We fine-tune the network on cardinality distribution, initialised with the network weights learned for the classification task of each of the reported datasets, \ie PASCAL VOC and MS COCO. To train the cardinality CNN, we use the exact same hyper-parameters and training strategy as described above.
|
| 279 |
+
|
| 280 |
+
|
| 281 |
+
\myparagraph{Evaluation protocol.}
|
| 282 |
+
We employ the common evaluation metrics for multi-label image classification also used in~\cite{gong2013deep,Wang_2016_CVPR,rezatofighi2017deepsetnet}. These include the average \textit{precision}, \textit{recall} and \textit{F1-score}\footnote{F1-score is calculated as the harmonic mean of precision and recall.} of the generated labels, calculated per-class (C-P, C-R and C-F1) and overall (O-P, O-R and O-F1). Since C-P, C-R and C-F1 can be biased to the performance of the most frequent classes, we also report the average \textit{precision}, \textit{recall} and \textit{F1-score} of the generated labels per image/instance (I-P, I-R and I-F1).
|
| 283 |
+
|
| 284 |
+
We rely on F1-score to rank approaches on the task of label prediction. A method with better performance has a precision/recall value that has a closer proximity to the perfect point shown by the blue triangle in Fig.~\ref{fig:curves-mlic}. %
|
| 285 |
+
To this end, for the classifiers such as BCE and Softmax, we find the optimal evaluation parameter $k=k^*$ that maximises the F1-score. For the deep set network (DS)~\cite{rezatofighi2017deepsetnet} and our proposed joint set network (JDS), prediction/recall is not dependent on the value of $k$. Rather, one single value for precision, recall and F1-score is computed.
|
| 286 |
+
|
| 287 |
+
\myparagraph{PASCAL VOC 2007.}
|
| 288 |
+
\begin{figure}[t]
|
| 289 |
+
\includegraphics[width=0.85\linewidth]{figs/VOC_Curve_JDS2.pdf}
|
| 290 |
+
\caption{Precision/recall curves for the classification scores when the classifier is trained independently (red solid line) and when it is trained jointly with the cardinality term using our proposed joint approach (black solid line) on PASCAL VOC dataset. The circles represent the upper bound when ground truth cardinality is used for the evaluation of the corresponding classifiers. The ground truth prediction is shown by a blue triangle.}\label{fig:curves-mlic}
|
| 291 |
+
\end{figure}
|
| 292 |
+
\newcommand{\colw}{0.43cm}
|
| 293 |
+
\newcommand{\colww}{0.52cm}
|
| 294 |
+
\newcommand{\lsh}{\!\!\!\!}
|
| 295 |
+
\begin{table*}[!h]
|
| 296 |
+
\caption{Quantitative results for multi-label image classification on the PASCAL VOC dataset.}
|
| 297 |
+
\begin{center}
|
| 298 |
+
\begin{tabular}{lc||p{\colw}p{\colw}p{\colww}| p{\colw}p{\colw}p{\colww}|p{\colw}p{\colw}p{\colww} @{}}
|
| 299 |
+
\lsh Classifier & Eval. & \scriptsize{C-P} & \scriptsize{C-R} & \scriptsize{C-F1} &
|
| 300 |
+
\scriptsize{O-P} & \scriptsize{O-R} & \scriptsize{O-F1} & \scriptsize{I-P} & \scriptsize{I-R} & \scriptsize{I-F1} \\
|
| 301 |
+
\hline\hline %
|
| 302 |
+
\lsh Softmax&k=$k^*$(1)&$88.2$&$65.4$&$75.1$ &$91.3$&$59.2$&$71.8$&$91.3$&$69.8$&$79.1$\\
|
| 303 |
+
\lsh BCE&k=$k^*$(1)&$88.7$&$58.6$&$70.5$&$92.2$&$59.8$&$72.5$&$92.2$&$70.1$&$79.6$\\
|
| 304 |
+
|
| 305 |
+
\lsh DS (BCE-NB)~\cite{rezatofighi2017deepsetnet}&k=$m^*$ &$76.8$&$74.8$&$75.8$&$80.6$&$76.7$&$78.6$&$83.4$&$81.9$&$82.6$\\
|
| 306 |
+
\lsh DS (BCE-DC)&k=$m^*$&$77.1$ & $75.2$ &$76.2$ & $81.0$ & $77.1$ & $79.0$ & $83.9$ & $82.1$ & $83.0$\\
|
| 307 |
+
\hline
|
| 308 |
+
\lsh\textbf{JDS (BCE-DC)}&k=$m^*$ &$83.5$&$74.4$&$\textbf{78.7}$&$85.5$&$77.9$&$\textbf{81.5}$&$87.6$&$82.8$&$\textbf{85.1}$\\
|
| 309 |
+
\end{tabular}
|
| 310 |
+
\end{center}
|
| 311 |
+
\label{table:allvoc-multilabel}
|
| 312 |
+
\end{table*}
|
| 313 |
+
We first test our approach on the Pascal Visual Object Classes benchmark~\cite{Everingham:2007:PASCAL-VOC}, which is one of the most widely used datasets for detection and classification. This dataset includes $9963$ images with a 50/50 split for training and test, where objects from $20$ pre-defined categories have been annotated by bounding boxes. Each image contains between $1$ and $7$ unique objects.
|
| 314 |
+
|
| 315 |
+
We first investigate if the joint learning improves the performance of cardinality and classifier. Fig.~\ref{fig:curves-mlic} shows the precision/recall curves for the classification scores when the classifier is trained solely using binary cross-entropy (BCE) loss (red solid line) and when it is trained using the same loss jointly with the cardinality term (Joint BCE). We also evaluate the precision/recall values when the ground truth cardinality $m[GT]$ is provided. The results confirm our claim that the joint learning indeed improves the classification performance. We also calculate the mean absolute error of the cardinality estimation when the cardinality term using the DC loss is learned jointly and independently as proposed in~\cite{rezatofighi2017deepsetnet}. The mean absolute cardinality error of our prediction on PASCAL VOC is $0.31\pm0.54$, while this error is $0.33\pm0.53$ when the cardinality is learned independently.
|
| 316 |
+
We compare the performance of our proposed joint deep set network, \ie JDS (BCE-DC), with softmax and BCE classifiers with the best $k$ value as well as the deep set network~\cite{rezatofighi2017deepsetnet} when the classifier is binary cross entropy and the cardinality loss is negative binomial, \ie DS (BCE-NB). In addition, Table~\ref{table:allvoc-multilabel} reports the results for the deep set network when the cardinality loss is replaced by our proposed Dirichlet-Categorical loss, \ie (BCE-DC). The results show that we outperform the other approaches \wrt all three types of F1-scores. In addition, our joint formulation allows for a single training step to obtain the final model, while the deep set network learns two VGG networks to generate the output sets.
|
| 317 |
+
|
| 318 |
+
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
|
| 322 |
+
\myparagraph{Microsoft COCO. }
|
| 323 |
+
\begin{figure*}[tb]
|
| 324 |
+
\includegraphics[width=1.03\linewidth,left]{figs/examples1.pdf}
|
| 325 |
+
\caption{Qualitative comparison between our proposed joint deep set network (JDS) and the deep set networks with Dirichlet-Categorical (DS (DC)) and Negative Binomial (DS (NB)) as the cardinality loss. For each image, the ground truth tags and the predictions for our JDS and the two baselines are denoted below. {\textcolor{red}{False positives}} are highlighted in red. Our JDS approach reduces both cardinality and classification error.}
|
| 326 |
+
\label{fig:Results1}
|
| 327 |
+
\end{figure*}
|
| 328 |
+
\begin{table*}[!h]
|
| 329 |
+
\caption{Quantitative results for multi-label image classification on the MS COCO dataset.}
|
| 330 |
+
\begin{center}
|
| 331 |
+
\begin{tabular}{lc||p{\colw}p{\colw}p{\colww}| p{\colw}p{\colw}p{\colww}|p{\colw}p{\colw}p{\colww} @{}}
|
| 332 |
+
\lsh Classifier & Eval. & \scriptsize{C-P} & \scriptsize{C-R} & \scriptsize{C-F1} &
|
| 333 |
+
\scriptsize{O-P} & \scriptsize{O-R} & \scriptsize{O-F1} & \scriptsize{I-P} & \scriptsize{I-R} & \scriptsize{I-F1} \\
|
| 334 |
+
\hline\hline %
|
| 335 |
+
|
| 336 |
+
\lsh Softmax&k=$k^*$(3)&$58.6$&$57.6$&$58.1$ &$60.7$&$63.3$&$62.0$&$60.7$&$74.7$&$67.0$\\
|
| 337 |
+
\lsh BCE&k=$k^*$(3)&$56.2$&$60.1$&$58.1$&$61.6$&$64.2$&$62.9$&$61.6$&$75.3$&$67.8$\\
|
| 338 |
+
\lsh CNN-RNN~\cite{Wang_2016_CVPR}&k=$k^*$(3)&$66.0$&$55.6$&$60.4$&$69.2$&$66.4$&$67.8$&$-$&$-$&$-$\\
|
| 339 |
+
\lsh DS (Softmax-NB)~\cite{rezatofighi2017deepsetnet}&k=$m^*$ &$68.2$&$59.9$&$63.8$&$68.8$&$67.4$&$68.1$&$74.3$ & $72.6$ & $73.5$\\
|
| 340 |
+
\lsh DS (BCE-NB)~\cite{rezatofighi2017deepsetnet}&k=$m^*$ &$66.5$&$62.9$&$64.6$&$70.1$&$68.7$&$69.4$&$75.2$&$73.6$&$74.4$\\
|
| 341 |
+
\lsh DS (BCE-DC)& k=$m^*$& $68.0$ & $61.7$ & $64.7$ & $72.4$ & $67.1$ & $69.6$& $76.0$ & $73.3$ & $74.6$\\
|
| 342 |
+
\hline
|
| 343 |
+
\lsh\textbf{JDS (BCE-DC)}&k=$m^*$ &$70.2$&$61.5$&$\textbf{65.5}$&$74.0$&$67.6$&$\textbf{70.7}$&$77.9$&$73.4$&$\textbf{75.6}$\\
|
| 344 |
+
|
| 345 |
+
\end{tabular}
|
| 346 |
+
\end{center}
|
| 347 |
+
\label{table:allcoco-multilabel}
|
| 348 |
+
\end{table*}
|
| 349 |
+
The MS-COCO~\cite{Lin:2014:COCO} benchmark is another popular benchmark for image captioning, recognition, and segmentation. The dataset includes
|
| 350 |
+
$123$K images, each labelled with per instance
|
| 351 |
+
segmentation masks of $80$ classes. The number of unique objects for each image varies between $0$ and $18$. Around $700$ images in the training set do not contain any of the $80$ classes and there are only a handful of images that have more than $10$ tags. Most images contain between one and three labels. We use $82783$
|
| 352 |
+
images with identical training and validation split as~\cite{rezatofighi2017deepsetnet}, and the remaining $40504$ images as test data.
|
| 353 |
+
|
| 354 |
+
|
| 355 |
+
The classification results on this dataset are reported in Table~\ref{table:allcoco-multilabel}. The results once again show that our approach consistently outperforms our baselines and the other methods measured by F1-score. Due to this improvement, we achieve state-of-the-art results on this dataset as well.
|
| 356 |
+
Some examples of label prediction using our joint deep set network and comparison with other deep set networks are shown in \Fig~\ref{fig:Results1}. The results show that our joint learning can simultaneously reduce the cardinality and classification errors in these examples.
|
| 357 |
+
\section{Conclusion}
|
| 358 |
+
We proposed a framework to jointly learn and predict a set's cardinality and state distributions by modelling both distributions using the same set of weights. This approach not only significantly reduces the number of learnable parameters, but also helps to model both distributions more accurately. We have demonstrated the effectiveness of this approach on multi-class image classification, outperforming previous state of the art on standard datasets.
|
| 359 |
+
The main limitation of our framework is that we do not include the complexity of permutation invariance of sets in the learning step. Therefore, our method is only applicable to set problems that do not rely on permutation invariance during training, such as image tagging. In future, we plan to overcome this limitation by incorporating permutation variables during training procedure. Another potential avenue could be to exploit the Bayesian nature of the model to include uncertainty as opposed to relying on the MAP estimation alone.
|
| 360 |
+
|
| 361 |
+
\myparagraph{Acknowledgments.}
|
| 362 |
+
This research was supported by the Australian Research Council through the Centre of Excellence in Robotic Vision, CE140100016, and through Laureate Fellowship FL130100102 to IDR.
|
| 363 |
+
|
| 364 |
+
\bibliographystyle{aaai}
|
| 365 |
+
\bibliography{reference/ref,reference/refs-short,reference/anton-ref}
|